Hello Amir. I've cced this to the Jalview discussion list - since that's where 
you'd normally discuss feature requests like this.

On 29/04/2014 17:08, Geoff Barton wrote:
I am new Jalview user. I load my feature to my sequences by Jalview. Then I 
aligned them. How can I export my feature from aligned file. I mean I need to 
have new position of each animo acids in aligned file. Is it possible? If not, 
Please help me how can I do that with other software or programming language?
This isn't something that is built in to Jalview, because we've never needed to 
do this for our own analyses. However, it is very easy to do with a bit of 
scripting.

If you open the Groovy console (from the tools menu), you can copy and paste in 
the following script into the window that opens:

// start script
for (aw in Jalview.getAlignframes())
{
println("Aligned positions for features in alignment "+aw.getTitle());

for (sq in aw.getViewport().getAlignment().getSequences())
{
   for (sf in sq.getDatasetSequence().getSequenceFeatures())
   {
       println([sf.getType(),sf.getDescription(), sq.findIndex(sf.getBegin()), 
sq.findIndex(sf.getEnd())].join("\t")+"\n")
   }
}
}
// end script

Then, hit the Run icon (or press control+R or CMD+R if you are on a mac) and 
the output panel will contain the aligned positions for all the alignment 
windows currently displayed in the Jalview desktop.

Is that what you were wanting to do ?

Jim

The University of Dundee is a registered Scottish Charity, No: SC015096
_______________________________________________
Jalview-discuss mailing list
[email protected]
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-discuss

Reply via email to