| Trees | Indices | Help |
|
|---|
|
|
object --+
|
_base._BaseSearchObject --+
|
_base._BaseHSP --+
|
HSPFragment
Class representing a contiguous alignment of hit-query sequence.
HSPFragment forms the core of any parsed search output file. Depending on
the search output file format, it may contain the actual query and/or hit
sequences that produces the search hits. These sequences are stored as
SeqRecord objects (see SeqRecord):
>>> from Bio import SearchIO
>>> qresult = SearchIO.parse('Blast/mirna.xml', 'blast-xml').next()
>>> fragment = qresult[0][0][0] # first hit, first hsp, first fragment
>>> print fragment
Query: 33211 mir_1
Hit: gi|262205317|ref|NR_030195.1| Homo sapiens microRNA 520b (MIR520...
Query range: [0:61] (1)
Hit range: [0:61] (1)
Fragments: 1 (61 columns)
Query - CCCTCTACAGGGAAGCGCTTTCTGTTGTCTGAAAGAAAAGAAAGTGCTTCCTTTTAGAGGG
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hit - CCCTCTACAGGGAAGCGCTTTCTGTTGTCTGAAAGAAAAGAAAGTGCTTCCTTTTAGAGGG
# the query sequence is a SeqRecord object
>>> fragment.query.__class__
<class 'Bio.SeqRecord.SeqRecord'>
>>> print fragment.query
ID: 33211
Name: aligned query sequence
Description: mir_1
Number of features: 0
Seq('CCCTCTACAGGGAAGCGCTTTCTGTTGTCTGAAAGAAAAGAAAGTGCTTCCTTT...GGG', DNAAlphabet())
# the hit sequence is a SeqRecord object as well
>>> fragment.hit.__class__
<class 'Bio.SeqRecord.SeqRecord'>
>>> print fragment.hit
ID: gi|262205317|ref|NR_030195.1|
Name: aligned hit sequence
Description: Homo sapiens microRNA 520b (MIR520B), microRNA
Number of features: 0
Seq('CCCTCTACAGGGAAGCGCTTTCTGTTGTCTGAAAGAAAAGAAAGTGCTTCCTTT...GGG', DNAAlphabet())
# when both query and hit are present, we get a MultipleSeqAlignment object
>>> fragment.aln.__class__
<class 'Bio.Align.MultipleSeqAlignment'>
>>> print fragment.aln
DNAAlphabet() alignment with 2 rows and 61 columns
CCCTCTACAGGGAAGCGCTTTCTGTTGTCTGAAAGAAAAGAAAG...GGG 33211
CCCTCTACAGGGAAGCGCTTTCTGTTGTCTGAAAGAAAAGAAAG...GGG gi|262205317|ref|NR_030195.1|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
hit Hit sequence as a SeqRecord object, defaults to None |
|||
|
query Query sequence as a SeqRecord object, defaults to None |
|||
|
aln Query-hit alignment as a MultipleSeqAlignment object,... |
|||
|
alphabet Alphabet object used in the fragment's sequences and alignment,... |
|||
|
aln_span The number of alignment columns covered by the fragment |
|||
|
hit_description Hit sequence description |
|||
|
query_description Query sequence description |
|||
|
hit_id Hit sequence ID |
|||
|
query_id Query sequence ID |
|||
|
hit_features Hit sequence features |
|||
|
query_features Query sequence features |
|||
|
hit_strand Hit sequence strand, defaults to None |
|||
|
query_strand Query sequence strand, defaults to None |
|||
|
hit_frame Hit sequence reading frame, defaults to None |
|||
|
query_frame Query sequence reading frame, defaults to None |
|||
|
hit_start Hit sequence start coordinate, defaults to None |
|||
|
query_start Query sequence start coordinate, defaults to None |
|||
|
hit_end Hit sequence start coordinate, defaults to None |
|||
|
query_end Query sequence end coordinate, defaults to None |
|||
|
hit_span The number of residues covered by the hit sequence |
|||
|
query_span The number of residues covered by the query sequence |
|||
|
hit_range Tuple of hit start and end coordinates |
|||
|
query_range Tuple of query start and end coordinates |
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
repr(x)
|
str(x)
|
Checks the given sequence for attribute setting Arguments: seq -- String or SeqRecord to check seq_type -- String of sequence type, must be 'hit' or 'query' |
|
|||
hitHit sequence as a SeqRecord object, defaults to None |
queryQuery sequence as a SeqRecord object, defaults to None
|
alnQuery-hit alignment as a MultipleSeqAlignment object, defaults to None
|
alphabetAlphabet object used in the fragment's sequences and alignment, defaults to single_letter_alphabet
|
aln_spanThe number of alignment columns covered by the fragment
|
hit_descriptionHit sequence description
|
query_descriptionQuery sequence description
|
hit_idHit sequence ID
|
query_idQuery sequence ID
|
hit_featuresHit sequence features
|
query_featuresQuery sequence features
|
hit_strandHit sequence strand, defaults to None
|
query_strandQuery sequence strand, defaults to None
|
hit_frameHit sequence reading frame, defaults to None
|
query_frameQuery sequence reading frame, defaults to None
|
hit_startHit sequence start coordinate, defaults to None
|
query_startQuery sequence start coordinate, defaults to None
|
hit_endHit sequence start coordinate, defaults to None
|
query_endQuery sequence end coordinate, defaults to None
|
hit_spanThe number of residues covered by the hit sequence
|
query_spanThe number of residues covered by the query sequence
|
hit_rangeTuple of hit start and end coordinates
|
query_rangeTuple of query start and end coordinates
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue Feb 5 18:02:51 2013 | http://epydoc.sourceforge.net |