[BioPython] Problems runing BLAST

Christof Winter winter at biotec.tu-dresden.de
Fri Jan 25 13:02:06 UTC 2008


Bruno Santos wrote:
> I wasn't using any XML file as intermediate, I was parsing the blast results
> directly. But it was really a problem with the databases. Now it's solved.
> 
> My question now is another one, I'm blasting a multifasta file, so I need to
> know which results belongs to which query sequence ID. I Know I can simply
> assume that the blast result is ordered according to the sequences in the
> fasta file, but is any other away to obtain the query ID directly using the
> Blast Record class?

record.query?

Try exploring your Blast Record instance on a Python shell with the dir function:

 >>> record
<Bio.Blast.Record.Blast instance at 0xb78341cc>
 >>> dir(record)
['__doc__', '__init__', '__module__', '_num_letters_in_database', 'alignments', 
'application', 'blast_cutoff', 'database', 'database_length', 
'database_letters', 'database_name', 'database_sequences', 'date', 
'descriptions', 'dropoff_1st_pass', 'effective_database_length', 
'effective_hsp_length', 'effective_query_length', 'effective_search_space', 
'effective_search_space_used', 'expect', 'filter', 'frameshift', 
'gap_penalties', 'gap_trigger', 'gap_x_dropoff', 'gap_x_dropoff_final', 
'gapped', 'hsps_gapped', 'hsps_no_gap', 'hsps_prelim_gapped', 
'hsps_prelim_gapped_attemped', 'ka_params', 'ka_params_gap', 'matrix', 
'multiple_alignment', 'num_good_extends', 'num_hits', 'num_letters_in_database', 
'num_seqs_better_e', 'num_sequences', 'num_sequences_in_database', 
'posted_date', 'query', 'query_id', 'query_length', 'query_letters', 
'reference', 'sc_match', 'sc_mismatch', 'threshold', 'version', 'window_size']

Cheers,
Christof

> 
> Thanks in advance,
> Bruno Santos




More information about the Biopython mailing list