50 sequences in one line

Posted by user343934 on Stack Overflow See other posts from Stack Overflow or by user343934
Published on 2010-05-22T13:27:51Z Indexed on 2010/05/22 13:30 UTC
Read the original article Hit count: 269

Filed under:

I have Muttiple sequence alignment (clustal) file and i want to read this file and arrange sequences in a such a way that in looks more clear and precise in order.

I am doing this from biopython using AlignIO object. My codes like this

alignment = AlignIO.read("opuntia.aln", "clustal")

print "Number of rows: %i" % len(align)

for record in alignment:

print "%s - %s" % (record.id, record.seq)

My Output-- http://i48.tinypic.com/ae48ew.jpg , it looks messy and long scrolling. What i want to do is print only 50 sequences in each line and continue till the end of alignment file.

I wish to have output like this---http://i45.tinypic.com/4vh5rc.jpg from --http://www.ebi.ac.uk/Tools/clustalw2/, sorry two links are just a text due to my reputation.

Any suggestions, algorithm and sample code is appreciated

Thanks in advance

Br,

© Stack Overflow or respective owner

50 sequences in one line

Posted by user343934 on Stack Overflow See other posts from Stack Overflow or by user343934
Published on 2010-05-22T12:11:59Z Indexed on 2010/05/22 12:30 UTC
Read the original article Hit count: 269

Filed under:
|

I have alignment file and long record in it. Suppose while displaying to an end user i want to show Sequence ID and 50 sequences in each line and continue further till the end of file.

Can anyone suggest me algorithm or example code in python.

Thanks in advance

© Stack Overflow or respective owner

Related posts about alignment