Sequence segment pair of BLAT result. Similar to Bio::Blast::Report::Hsp but lacks many methods.
Returns block size (length) of the segment pair. This would be a Bio::Blat specific method.
Returns target (subject, hit) start position. CAUTION: In Blat’s raw result(psl format), first position is 0. To keep compatibility, the parser add 1 to the position.
Returns target (subject, hit) end position. CAUTION: In Blat’s raw result(psl format), first position is 0. To keep compatibility, the parser add 1 to the position.
Creates a new SegmentPair object. It is designed to be called internally from Bio::Blat::Report class. Users shall not use it directly.
# File lib/bio/appl/blat/report.rb, line 199 def initialize(query_len, target_len, strand, blksize, qstart, tstart, qseq, tseq, protein_flag) @blocksize = blksize @qseq = qseq @hseq = hseq @hit_strand = 'plus' w = (protein_flag ? 3 : 1) # 3 means query=protein target=dna case strand when '-' # query is minus strand @query_strand = 'minus' # convert positions @query_from = query_len - qstart @query_to = query_len - qstart - blksize + 1 # To keep compatibility, with other homology search programs, # we add 1 to each position number. @hit_from = tstart + 1 @hit_to = tstart + blksize * w # - 1 + 1 when '+-' # hit is minus strand @query_strand = 'plus' @hit_strand = 'minus' # To keep compatibility, with other homology search programs, # we add 1 to each position number. @query_from = qstart + 1 @query_to = qstart + blksize # - 1 + 1 # convert positions @hit_from = target_len - tstart @hit_to = target_len - tstart - blksize * w + 1 else #when '+', '++' @query_strand = 'plus' # To keep compatibility with other homology search programs, # we add 1 to each position number. @query_from = qstart + 1 @query_to = qstart + blksize # - 1 + 1 @hit_from = tstart + 1 @hit_to = tstart + blksize * w # - 1 + 1 end end
Generated with the Darkfish Rdoc Generator 2.