Question: Parsing online blast results using NCBIXML returns 50 alignments per Blast.Record object
gravatar for aleksanderczeszyk
8 months ago by
aleksanderczeszyk0 wrote:

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?

ADD COMMENTlink written 8 months ago by aleksanderczeszyk0

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 REPLYlink written 8 months ago by finswimmer11k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1261 users visited in the last hour