Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(29)  |  Call(29)  |  Derive(0)  |  Import(0)
Returns an iterator a Blast record for each query.

handle - file handle to and XML file to parse
debug - integer, amount of debug information to print

This is a generator function that returns multiple Blast records
objects - one for each query sequence given to blast.  The file
is read incrementally, returning complete records as they are read
in.
(more...)

        def parse(handle, debug=0):
    """Returns an iterator a Blast record for each query.

    handle - file handle to and XML file to parse
    debug - integer, amount of debug information to print

    This is a generator function that returns multiple Blast records
    objects - one for each query sequence given to blast.  The file
    is read incrementally, returning complete records as they are read
    in.

    Should cope with new BLAST 2.2.14+ which gives a single XML file
    for multiple query records.

    Should also cope with XML output from older versions BLAST which
    gave multiple XML files concatenated together (giving a single file
    which strictly speaking wasn't valid XML)."""
    from xml.parsers import expat
    BLOCK = 1024
    MARGIN = 10 # must be at least length of newline + XML start
    XML_START = "
    


src/p/y/pytools-HEAD/blast.py   pytools(Download)
def number_genome_qblast_hits(seqreclist):
    fastastring = ''.join([rec.format('fasta') for rec in seqreclist])
    results_handle = NCBIWWW.qblast('blastn','nr',fastastring,expect=1.,word_size=7,nucl_reward=1,nucl_penalty=-3,hitlist_size=1000)
    blast_records = NCBIXML.parse(results_handle)
 
def number_genome_qblast_protein_hits(sequence):
    results_handle = NCBIWWW.qblast('blastp','nr',sequence,expect=100,word_size=3,hitlist_size=1000)
    blast_records = NCBIXML.parse(results_handle)
    num_hits = sum([len(record.alignments) for record in blast_records])
    return num_hits

src/d/u/DuctApe-0.16.4/ductape/genome/blast.py   DuctApe(Download)
            handle = StringIO(self.out)
 
        self._hits = NCBIXML.parse(handle)
 
    def getHits(self,expect=10.0):

src/m/g/mgtaxa-HEAD/MGT/Proj/CrisprApp.py   mgtaxa(Download)
            out = sys.stdout
        inp = openCompressed(inFile,"r")
        blastRecs = NCBIXML.parse(inp)
        spcnt = defdict(int)
        arr = []

src/o/l/oligotyping-HEAD/Oligotyping/utils/blast.py   oligotyping(Download)
    def get_fancy_results_list(self, blast_results, num_results = 20):
        blast_results_list = []
 
        blast_record = list(NCBIXML.parse(blast_results))[0]
        num_results = len(blast_record.alignments) if len(blast_record.alignments) < num_results else num_results

src/s/e/SeqFindR-0.31/SeqFindR/blast.py   SeqFindR(Download)
    if os.path.isfile(os.path.expanduser(blast_results)):
        hits = []
        for record in NCBIXML.parse(open(blast_results)):
            for align in record.alignments:
                for hsp in align.hsps:

src/b/c/bcbb-HEAD/visualize/blast_conservation_plot.py   bcbb(Download)
            blast_handle.close()
        with open(out_file) as in_handle:
            rec_it = NCBIXML.parse(in_handle)
            return rec_it.next()
 

src/b/i/biopython-1.63/Tests/test_NCBIXML.py   biopython(Download)
        datafile = os.path.join("Blast", filename)
        handle = open(datafile)
        records = NCBIXML.parse(handle)
        record = next(records)
 
        datafile = os.path.join("Blast", filename)
        handle = open(datafile)
        records = NCBIXML.parse(handle)
        record = next(records)
        alignments = record.alignments
 
        handle = open(datafile)
        records = NCBIXML.parse(handle)
        record = next(records)
        alignments = record.alignments
 
        handle = open(datafile)
        records = NCBIXML.parse(handle)
        record = next(records)
        alignments = record.alignments
 
        handle = open(datafile)
        records = NCBIXML.parse(handle)
        record = next(records)
        alignments = record.alignments

src/b/i/biopython-HEAD/Tests/test_NCBIXML.py   biopython(Download)
        datafile = os.path.join("Blast", filename)
        handle = open(datafile)
        records = NCBIXML.parse(handle)
        record = next(records)
 
        datafile = os.path.join("Blast", filename)
        handle = open(datafile)
        records = NCBIXML.parse(handle)
        record = next(records)
        alignments = record.alignments
 
        handle = open(datafile)
        records = NCBIXML.parse(handle)
        record = next(records)
        alignments = record.alignments
 
        handle = open(datafile)
        records = NCBIXML.parse(handle)
        record = next(records)
        alignments = record.alignments
 
        handle = open(datafile)
        records = NCBIXML.parse(handle)
        record = next(records)
        alignments = record.alignments