[Biopython] fasta-m10 al_start and al_end?

Anne Pajon ap12 at sanger.ac.uk
Fri Oct 23 15:57:53 UTC 2009


Dear,

I am using Biopython to parse a fasta alignment file:

     alignments = AlignIO.parse(open("fastaresults/ 
78_Spneumoniae_ATCC700669/all_bases_435_1055_cds.fres"), "fasta-m10",  
seq_count=2)
     for alignment in alignments:

         record_query = alignment[0]
         record_match = alignment[1]

         print alignment._annotations["sw_score"],  
alignment._annotations["sw_ident"]
	print record_query.annotations["original_length"]
         # print record_query.annotations["al_start"],  
record_query.annotations["al_end"]

I would like to print the start/end of each aligned sequences.

I can see in Bio.AlignIO.FastaIO.next() that sq_len is stored in  
annotations:
	record.annotations["original_length"] = int(query_annotation["sq_len"])
but I cannot find a way of accessing at_start and al_end.

Thanks in advance for your help.
Kind regards,
Anne.
--
Dr Anne Pajon - Pathogen Genomics
Sanger Institute, Wellcome Trust Genome Campus, Hinxton
Cambridge CB10 1SA, United Kingdom
+44 (0)1223 494 798 (office) | +44 (0)7958 511 353 (mobile)



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 



More information about the Biopython mailing list