From pmr at ebi.ac.uk Tue Jul 15 06:20:08 2003 From: pmr at ebi.ac.uk (Peter Rice) Date: Tue, 15 Jul 2003 11:20:08 +0100 Subject: Redefining AjPStr Message-ID: <3F13D558.2060207@ebi.ac.uk> A small C compiler problem has appeared in EMBOSS - I tried to add "const" definitions to functions so we could be sure which ones make changes to the objects we pass. Unfortunately, "const AjPStr" does not work as expected in any compiler I tried. The reason is that "const" has to see a "*" to know it is working on a pointer. To fix this, I will try redefining AjPStr using #define. Existing source code is not affected, except ... 1. The following (deprecated) syntax will break: AjPStr astring, bstring; You have to use: AjPStr astring; AjPStr bstring; 2. You may occasionally see "AjOStr*" in compiler messages where you saw "AjPStr" before. The old AjPStr definition was: typedef struct AjSStr { .......... char *Ptr; } AjOStr, *AjPStr; The new definition will be: typedef struct AjSStr { .......... char *Ptr; } AjOStr; #define AjPStr AjOStr* Now we can use "const AjPStr" in function prototypes and check the string is safe. AjPSeq and other AJAX types are more tricky as "const" only goes down one level, so the compiler will not check everything. For example; AjBool ajStrAssS (AjPStr* pthis, const AjPStr str); ajint ajStrLen(const AjPStr thys); The changes will be committed to CVS today or tomorrow. Peter From henrikki.almusa at helsinki.fi Tue Jul 29 07:29:02 2003 From: henrikki.almusa at helsinki.fi (Henrikki Almusa) Date: Tue, 29 Jul 2003 14:29:02 +0300 Subject: Trying to change output of tmap Message-ID: <200307291429.02190.henrikki.almusa@helsinki.fi> Hello, I'm trying to make program "tmap" to print emboss report format out instead of its own report. But i have not succeeded in doing this. There is two different problems. I haven't changed much in the code since it also prints out graphics and I don't want to break that ability. First is that it currently does a segfault. I've used printf to find out where and it seems that this line: ajSeqAssName (seq,ajSeqsetName(seqset,j)); does it. However i do not understand how that goes wrong. I've included the current (dumping) version of my patch. Second problem would be making featuretable for whole sequence set instead of one. So what I'm doing wrong here? TIA -- Henrikki Almusa -------------- next part -------------- A non-text attachment was scrubbed... Name: tmap_cd.patch Type: text/x-diff Size: 4479 bytes Desc: not available Url : http://lists.open-bio.org/pipermail/emboss-dev/attachments/20030729/0b430d41/attachment.bin From pmr at ebi.ac.uk Tue Jul 29 10:18:35 2003 From: pmr at ebi.ac.uk (Peter Rice) Date: Tue, 29 Jul 2003 15:18:35 +0100 Subject: Trying to change output of tmap References: <200307291429.02190.henrikki.almusa@helsinki.fi> Message-ID: <3F26823B.2010505@ebi.ac.uk> Henrikki Almusa wrote: > Hello, > > I'm trying to make program "tmap" to print emboss report format out instead of > its own report. But i have not succeeded in doing this. There is two > different problems. I haven't changed much in the code since it also prints > out graphics and I don't want to break that ability. > > First is that it currently does a segfault. I've used printf to find out where > and it seems that this line: > > ajSeqAssName (seq,ajSeqsetName(seqset,j)); > > does it. However i do not understand how that goes wrong. I've included the > current (dumping) version of my patch. You must initialize seq before defining it (make it NULL when declared, and call ajSeqNew to create it). The same applies to the feature table, and the the 'tmp' string. > Second problem would be making featuretable for whole sequence set instead of > one. Tricky. I can do it by making a new function to calculate the consensus frmo the sequence set. The code is already in ajalign.c and in prettyplot.c. Assume we will be cleaning it up a little before the next release. Also, assume there will be a report version of tmap (with credit to you for part of the code) in the next release. One more point: You should also define the fields for the report, and create tagged values for the transmemrane segment number. The lines you need are: tmap.acd: report: outfile [ optional: "Y" default: "tmap.res" rformat: "seqtable" taglist: "int:TM=TransMem" ] tmap.c for (i=1; i<=antal; i++) { seqf=ajFeatNewII (feat,npos[i],cpos[i]); ajFmtPrintS( &tmp,"*TM %2d", i); ajFeatTagAdd (seqf,NULL,tmp); } With this, you should get output that looks like this: #======================================= # # Sequence: OPSD_HUMAN from: 1 to: 348 # HitCount: 7 #======================================= Start End TransMem Sequence 43 69 1 YMFLLIVLGFPINFLTLYVTVQHKKLR 73 97 2 NYILLNLAVADLFMVLGGFTSTLYT 112 140 3 LEGFFATLGGEIALWSLVVLAIERYVVVC 148 176 4 FGENHAIMGVAFTWVMALACAAPPLAGWS 201 229 5 ESFVIYMFVVHFTIPMIIIFFCYGQLVFT 255 275 6 IIMVIAFLICWVPYASVAFYI 282 302 7 NFGPIFMTIPAFFAKSAAIYN #--------------------------------------- #--------------------------------------- Hope this helps, Peter Rice From letondal at pasteur.fr Wed Jul 30 05:46:23 2003 From: letondal at pasteur.fr (Catherine Letondal) Date: Wed, 30 Jul 2003 11:46:23 +0200 Subject: url of Pise has changed Message-ID: <200307300946.h6U9kOBX237467@electre.pasteur.fr> Hi, The url of Pise has changed to: http://www.pasteur.fr/recherche/unites/sis/Pise/ Would it be possible to change it on the EMBOSS Web page (such as: http://www.hgmp.mrc.ac.uk/Software/EMBOSS/interfaces.html)? Thanks a lot in advance, -- Catherine Letondal -- Pasteur Institute Computing Center From gwilliam at hgmp.mrc.ac.uk Wed Jul 30 05:50:48 2003 From: gwilliam at hgmp.mrc.ac.uk (Gary Williams, Tel 01223 494522) Date: Wed, 30 Jul 2003 10:50:48 +0100 Subject: url of Pise has changed References: <200307300946.h6U9kOBX237467@electre.pasteur.fr> Message-ID: <3F2794F8.B58F6C97@hgmp.mrc.ac.uk> Thanks Catherine - done. Is the description of Pise on this page correct? Gary Catherine Letondal wrote: > > Hi, > > The url of Pise has changed to: > http://www.pasteur.fr/recherche/unites/sis/Pise/ > > Would it be possible to change it on the EMBOSS Web page (such as: > http://www.hgmp.mrc.ac.uk/Software/EMBOSS/interfaces.html)? > > Thanks a lot in advance, > > -- > Catherine Letondal -- Pasteur Institute Computing Center -- Gary Williams Tel: +44 1223 494522 Fax: +44 1223 494512 mailto:G.Williams at hgmp.mrc.ac.uk http://www.hgmp.mrc.ac.uk/ Bioinformatics, MRC HGMP, Hinxton, Cambridge, CB10 1SB, UK From letondal at pasteur.fr Wed Jul 30 06:00:28 2003 From: letondal at pasteur.fr (Catherine Letondal) Date: Wed, 30 Jul 2003 12:00:28 +0200 Subject: url of Pise has changed In-Reply-To: Your message of "Wed, 30 Jul 2003 10:50:48 BST." <3F2794F8.B58F6C97@hgmp.mrc.ac.uk> Message-ID: <200307301000.h6UA0SBX243553@electre.pasteur.fr> "Gary Williams, Tel 01223 494522" wrote: > Thanks Catherine - done. > Is the description of Pise on this page correct? Do you mean in the page http://www.hgmp.mrc.ac.uk/Software/EMBOSS/interfaces.html? Yes it is correct. Thanks, -- Catherine Letondal -- Pasteur Institute Computing Center From henrikki.almusa at helsinki.fi Thu Jul 31 10:47:26 2003 From: henrikki.almusa at helsinki.fi (Henrikki Almusa) Date: Thu, 31 Jul 2003 17:47:26 +0300 Subject: Recoder output update Message-ID: <200307311747.26372.henrikki.almusa@helsinki.fi> Hello, I'm updating recoder output to conform into emboss formats, using table. Now there seems to be no hitches and it seems to work fine. I also added an option to use complement strand (it used to be automatical) and put it by default to be no. However there is a few questions i want to check. 1. As far as i could understand recoder doesn't reverse complement the 'AjPSeq seq' element (in main) but uses strings copied out of it. Will this cause any problems with report, as report wants a sequence when it is used (even though at the moment, it doesn't show any bits from sequence it self). Would it better if sequence objects sequence is reverse complemented as well? 2. Recoder used to print the sequences (0-4) into the result file. As this doens't suit well with report (could use tail, don't know which would be better), i changed it to print sequences into extra file. However since i couldn't manage to make proper changes into acd file, it now creates the sequence file even if it would be empty. It should depend from options '-sshow' and '-tshow'. I would like to be pointed into right directions with these. Patch is attached. Thanks. -- Henrikki Almusa -------------- next part -------------- A non-text attachment was scrubbed... Name: recoder.patch Type: text/x-diff Size: 14771 bytes Desc: not available Url : http://lists.open-bio.org/pipermail/emboss-dev/attachments/20030731/c43ca7ae/attachment.bin From pmr at ebi.ac.uk Tue Jul 15 10:20:08 2003 From: pmr at ebi.ac.uk (Peter Rice) Date: Tue, 15 Jul 2003 11:20:08 +0100 Subject: Redefining AjPStr Message-ID: <3F13D558.2060207@ebi.ac.uk> A small C compiler problem has appeared in EMBOSS - I tried to add "const" definitions to functions so we could be sure which ones make changes to the objects we pass. Unfortunately, "const AjPStr" does not work as expected in any compiler I tried. The reason is that "const" has to see a "*" to know it is working on a pointer. To fix this, I will try redefining AjPStr using #define. Existing source code is not affected, except ... 1. The following (deprecated) syntax will break: AjPStr astring, bstring; You have to use: AjPStr astring; AjPStr bstring; 2. You may occasionally see "AjOStr*" in compiler messages where you saw "AjPStr" before. The old AjPStr definition was: typedef struct AjSStr { .......... char *Ptr; } AjOStr, *AjPStr; The new definition will be: typedef struct AjSStr { .......... char *Ptr; } AjOStr; #define AjPStr AjOStr* Now we can use "const AjPStr" in function prototypes and check the string is safe. AjPSeq and other AJAX types are more tricky as "const" only goes down one level, so the compiler will not check everything. For example; AjBool ajStrAssS (AjPStr* pthis, const AjPStr str); ajint ajStrLen(const AjPStr thys); The changes will be committed to CVS today or tomorrow. Peter From henrikki.almusa at helsinki.fi Tue Jul 29 11:29:02 2003 From: henrikki.almusa at helsinki.fi (Henrikki Almusa) Date: Tue, 29 Jul 2003 14:29:02 +0300 Subject: Trying to change output of tmap Message-ID: <200307291429.02190.henrikki.almusa@helsinki.fi> Hello, I'm trying to make program "tmap" to print emboss report format out instead of its own report. But i have not succeeded in doing this. There is two different problems. I haven't changed much in the code since it also prints out graphics and I don't want to break that ability. First is that it currently does a segfault. I've used printf to find out where and it seems that this line: ajSeqAssName (seq,ajSeqsetName(seqset,j)); does it. However i do not understand how that goes wrong. I've included the current (dumping) version of my patch. Second problem would be making featuretable for whole sequence set instead of one. So what I'm doing wrong here? TIA -- Henrikki Almusa -------------- next part -------------- A non-text attachment was scrubbed... Name: tmap_cd.patch Type: text/x-diff Size: 4479 bytes Desc: not available URL: From pmr at ebi.ac.uk Tue Jul 29 14:18:35 2003 From: pmr at ebi.ac.uk (Peter Rice) Date: Tue, 29 Jul 2003 15:18:35 +0100 Subject: Trying to change output of tmap References: <200307291429.02190.henrikki.almusa@helsinki.fi> Message-ID: <3F26823B.2010505@ebi.ac.uk> Henrikki Almusa wrote: > Hello, > > I'm trying to make program "tmap" to print emboss report format out instead of > its own report. But i have not succeeded in doing this. There is two > different problems. I haven't changed much in the code since it also prints > out graphics and I don't want to break that ability. > > First is that it currently does a segfault. I've used printf to find out where > and it seems that this line: > > ajSeqAssName (seq,ajSeqsetName(seqset,j)); > > does it. However i do not understand how that goes wrong. I've included the > current (dumping) version of my patch. You must initialize seq before defining it (make it NULL when declared, and call ajSeqNew to create it). The same applies to the feature table, and the the 'tmp' string. > Second problem would be making featuretable for whole sequence set instead of > one. Tricky. I can do it by making a new function to calculate the consensus frmo the sequence set. The code is already in ajalign.c and in prettyplot.c. Assume we will be cleaning it up a little before the next release. Also, assume there will be a report version of tmap (with credit to you for part of the code) in the next release. One more point: You should also define the fields for the report, and create tagged values for the transmemrane segment number. The lines you need are: tmap.acd: report: outfile [ optional: "Y" default: "tmap.res" rformat: "seqtable" taglist: "int:TM=TransMem" ] tmap.c for (i=1; i<=antal; i++) { seqf=ajFeatNewII (feat,npos[i],cpos[i]); ajFmtPrintS( &tmp,"*TM %2d", i); ajFeatTagAdd (seqf,NULL,tmp); } With this, you should get output that looks like this: #======================================= # # Sequence: OPSD_HUMAN from: 1 to: 348 # HitCount: 7 #======================================= Start End TransMem Sequence 43 69 1 YMFLLIVLGFPINFLTLYVTVQHKKLR 73 97 2 NYILLNLAVADLFMVLGGFTSTLYT 112 140 3 LEGFFATLGGEIALWSLVVLAIERYVVVC 148 176 4 FGENHAIMGVAFTWVMALACAAPPLAGWS 201 229 5 ESFVIYMFVVHFTIPMIIIFFCYGQLVFT 255 275 6 IIMVIAFLICWVPYASVAFYI 282 302 7 NFGPIFMTIPAFFAKSAAIYN #--------------------------------------- #--------------------------------------- Hope this helps, Peter Rice From letondal at pasteur.fr Wed Jul 30 09:46:23 2003 From: letondal at pasteur.fr (Catherine Letondal) Date: Wed, 30 Jul 2003 11:46:23 +0200 Subject: url of Pise has changed Message-ID: <200307300946.h6U9kOBX237467@electre.pasteur.fr> Hi, The url of Pise has changed to: http://www.pasteur.fr/recherche/unites/sis/Pise/ Would it be possible to change it on the EMBOSS Web page (such as: http://www.hgmp.mrc.ac.uk/Software/EMBOSS/interfaces.html)? Thanks a lot in advance, -- Catherine Letondal -- Pasteur Institute Computing Center From gwilliam at hgmp.mrc.ac.uk Wed Jul 30 09:50:48 2003 From: gwilliam at hgmp.mrc.ac.uk (Gary Williams, Tel 01223 494522) Date: Wed, 30 Jul 2003 10:50:48 +0100 Subject: url of Pise has changed References: <200307300946.h6U9kOBX237467@electre.pasteur.fr> Message-ID: <3F2794F8.B58F6C97@hgmp.mrc.ac.uk> Thanks Catherine - done. Is the description of Pise on this page correct? Gary Catherine Letondal wrote: > > Hi, > > The url of Pise has changed to: > http://www.pasteur.fr/recherche/unites/sis/Pise/ > > Would it be possible to change it on the EMBOSS Web page (such as: > http://www.hgmp.mrc.ac.uk/Software/EMBOSS/interfaces.html)? > > Thanks a lot in advance, > > -- > Catherine Letondal -- Pasteur Institute Computing Center -- Gary Williams Tel: +44 1223 494522 Fax: +44 1223 494512 mailto:G.Williams at hgmp.mrc.ac.uk http://www.hgmp.mrc.ac.uk/ Bioinformatics, MRC HGMP, Hinxton, Cambridge, CB10 1SB, UK From letondal at pasteur.fr Wed Jul 30 10:00:28 2003 From: letondal at pasteur.fr (Catherine Letondal) Date: Wed, 30 Jul 2003 12:00:28 +0200 Subject: url of Pise has changed In-Reply-To: Your message of "Wed, 30 Jul 2003 10:50:48 BST." <3F2794F8.B58F6C97@hgmp.mrc.ac.uk> Message-ID: <200307301000.h6UA0SBX243553@electre.pasteur.fr> "Gary Williams, Tel 01223 494522" wrote: > Thanks Catherine - done. > Is the description of Pise on this page correct? Do you mean in the page http://www.hgmp.mrc.ac.uk/Software/EMBOSS/interfaces.html? Yes it is correct. Thanks, -- Catherine Letondal -- Pasteur Institute Computing Center From henrikki.almusa at helsinki.fi Thu Jul 31 14:47:26 2003 From: henrikki.almusa at helsinki.fi (Henrikki Almusa) Date: Thu, 31 Jul 2003 17:47:26 +0300 Subject: Recoder output update Message-ID: <200307311747.26372.henrikki.almusa@helsinki.fi> Hello, I'm updating recoder output to conform into emboss formats, using table. Now there seems to be no hitches and it seems to work fine. I also added an option to use complement strand (it used to be automatical) and put it by default to be no. However there is a few questions i want to check. 1. As far as i could understand recoder doesn't reverse complement the 'AjPSeq seq' element (in main) but uses strings copied out of it. Will this cause any problems with report, as report wants a sequence when it is used (even though at the moment, it doesn't show any bits from sequence it self). Would it better if sequence objects sequence is reverse complemented as well? 2. Recoder used to print the sequences (0-4) into the result file. As this doens't suit well with report (could use tail, don't know which would be better), i changed it to print sequences into extra file. However since i couldn't manage to make proper changes into acd file, it now creates the sequence file even if it would be empty. It should depend from options '-sshow' and '-tshow'. I would like to be pointed into right directions with these. Patch is attached. Thanks. -- Henrikki Almusa -------------- next part -------------- A non-text attachment was scrubbed... Name: recoder.patch Type: text/x-diff Size: 14771 bytes Desc: not available URL: