Parsing online blast results using NCBIXML returns 50 alignments per Blast.Record object
0
0
Entering edit mode
6.3 years ago

I would like to ask if it is possible that NCBIXML.parse() function returns Blast record objects (one object for a sequence) which contains a MAXIMUM of 50 alignments?

python parsing biopython NCBIXML • 1.2k views
ADD COMMENT
0
Entering edit mode

Hello aleksanderczeszyk,

could you please go more into details of what you are trying to do and why?

The aligments within the Blast record objects are in a list. So you can use the slice syntax to truncate them (if this is what you like to do.

from Bio.Blast import NCBIXML

with open("blast.xml") as b:
    for record in NCBIXML.parse(b):
            record.alignments = record.alignments[:50]

fin swimmer

ADD REPLY

Login before adding your answer.

Traffic: 1880 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6