597
597
# in turn returns a string. Confused?
598
598
$seqstr .= $called_seq->subseq($s,$e)->seq()->seq();
600
# This is dumb, subseq should work on locations...
601
if( $loc->strand == 1 ) {
600
# If guide_strand is defined, assemble the sequence first and revcom later if needed,
601
# if its not defined, apply revcom immediately to proper locations
602
if (defined $self->location->guide_strand) {
602
603
$seqstr .= $called_seq->subseq($loc->start,$loc->end);
605
$seqstr = $called_seq->trunc($loc->start,$loc->end)->revcom->seq() . $seqstr;
605
my $strand = defined ($loc->strand) ? ($loc->strand) : 0;
607
$seqstr .= $called_seq->trunc($loc->start,$loc->end)->revcom->seq;
607
$seqstr .= $called_seq->trunc($loc->start,$loc->end)->revcom->seq();
609
$seqstr .= $called_seq->subseq($loc->start,$loc->end);
614
# Use revcom only after the whole sequence has been assembled
615
my $guide_strand = defined ($self->location->guide_strand) ? ($self->location->guide_strand) : 0;
616
if ($guide_strand == -1) {
617
my $seqstr_obj = Bio::Seq->new(-seq => $seqstr);
618
$seqstr = $seqstr_obj->revcom->seq;
613
621
if (defined($phase)) {
614
622
$seqstr = substr($seqstr, $phase);