Trying to change output of tmap

Peter Rice pmr at ebi.ac.uk
Tue Jul 29 14:18:35 UTC 2003


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




More information about the emboss-dev mailing list