Package Bio :: Package SearchIO :: Package BlastIO :: Module blast_tab
[hide private]
[frames] | no frames]

Module blast_tab

source code

Bio.SearchIO parser for BLAST+ tab output format, with or without comments.

Classes [hide private]
  BlastTabParser
Parser for the BLAST tabular format.
  BlastTabIndexer
Indexer class for BLAST+ tab output.
  BlastTabWriter
Writer for blast-tab output format.
Functions [hide private]
 
_list_semicol(x) source code
 
_list_diamond(x) source code
 
_compute_gapopen_num(hsp)
Returns the number of gap openings in the given HSP.
source code
 
_augment_blast_hsp(hsp, attr)
Calculates the given HSP attribute, for writing.
source code
Variables [hide private]
  _LONG_SHORT_MAP = {'% hsp coverage': 'qcovhsp', '% identity': ...
  _COLUMN_QRESULT = {'qacc': ('accession', <type 'str'>), 'qaccv...
  _COLUMN_HIT = {'qcovs': ('query_coverage', <type 'float'>), 's...
  _COLUMN_HSP = {'bitscore': ('bitscore', <type 'float'>), 'btop...
  _COLUMN_FRAG = {'frames': ('frames', <type 'str'>), 'length': ...
  _SUPPORTED_FIELDS = set(['bitscore', 'btop', 'evalue', 'frames...
  _DEFAULT_FIELDS = ['qseqid', 'sseqid', 'pident', 'length', 'mi...
  _MIN_QUERY_FIELDS = set(['qacc', 'qaccver', 'qseqid'])
  _MIN_HIT_FIELDS = set(['sacc', 'saccver', 'sseqid'])
  _RE_GAPOPEN = re.compile(r'\w-')
  __package__ = 'Bio.SearchIO.BlastIO'
Variables Details [hide private]

_LONG_SHORT_MAP

Value:
{'% hsp coverage': 'qcovhsp',
 '% identity': 'pident',
 '% positives': 'ppos',
 '% subject coverage': 'qcovs',
 'BTOP': 'btop',
 'alignment length': 'length',
 'bit score': 'bitscore',
 'evalue': 'evalue',
...

_COLUMN_QRESULT

Value:
{'qacc': ('accession', <type 'str'>),
 'qaccver': ('accession_version', <type 'str'>),
 'qgi': ('gi', <type 'str'>),
 'qlen': ('seq_len', <type 'int'>),
 'qseqid': ('id', <type 'str'>)}

_COLUMN_HIT

Value:
{'qcovs': ('query_coverage', <type 'float'>),
 'sacc': ('accession', <type 'str'>),
 'saccver': ('accession_version', <type 'str'>),
 'sallacc': ('accession_all', <function <lambda> at 0x7fa98345fcf8>),
 'sallgi': ('gi_all', <type 'str'>),
 'sallseqid': ('id_all', <function <lambda> at 0x7fa98345fcf8>),
 'salltitles': ('title_all', <function <lambda> at 0x7fa98345fd70>),
 'sblastnames': ('blast_names', <function <lambda> at 0x7fa98345fcf8>)\
...

_COLUMN_HSP

Value:
{'bitscore': ('bitscore', <type 'float'>),
 'btop': ('btop', <type 'str'>),
 'evalue': ('evalue', <type 'float'>),
 'gapopen': ('gapopen_num', <type 'int'>),
 'gaps': ('gap_num', <type 'int'>),
 'mismatch': ('mismatch_num', <type 'int'>),
 'nident': ('ident_num', <type 'int'>),
 'pident': ('ident_pct', <type 'float'>),
...

_COLUMN_FRAG

Value:
{'frames': ('frames', <type 'str'>),
 'length': ('aln_span', <type 'int'>),
 'qend': ('query_end', <type 'int'>),
 'qframe': ('query_frame', <type 'int'>),
 'qseq': ('query', <type 'str'>),
 'qstart': ('query_start', <type 'int'>),
 'send': ('hit_end', <type 'int'>),
 'sframe': ('hit_frame', <type 'int'>),
...

_SUPPORTED_FIELDS

Value:
set(['bitscore',
     'btop',
     'evalue',
     'frames',
     'gapopen',
     'gaps',
     'length',
     'mismatch',
...

_DEFAULT_FIELDS

Value:
['qseqid',
 'sseqid',
 'pident',
 'length',
 'mismatch',
 'gapopen',
 'qstart',
 'qend',
...