void Realigner::SetClipping(int clipping, bool is_forward_strand) { //DVK // These settings are set for a forward strand read switch (clipping) { case 0: // align full strings, no clipping in read or ref start_anywhere_in_ref_ = false; stop_anywhere_in_ref_ = false; soft_clip_left_ = false; soft_clip_right_ = false; break; case 1: // start or end anywhere in ref start_anywhere_in_ref_ = true; stop_anywhere_in_ref_ = true; soft_clip_left_ = false; soft_clip_right_ = false; break; case 2: // semi-global + soft-clip bead end of the read start_anywhere_in_ref_ = true; stop_anywhere_in_ref_ = true; soft_clip_left_ = false; soft_clip_right_ = true; break; case 3: // semi-global + soft-clip key end of the read start_anywhere_in_ref_ = true; stop_anywhere_in_ref_ = true; soft_clip_left_ = true; soft_clip_right_ = false; break; case 4: // semi-global + soft-clip both ends of read start_anywhere_in_ref_ = true; stop_anywhere_in_ref_ = true; soft_clip_left_ = true; soft_clip_right_ = true; break; } // Adjust for read strand SetStrand(is_forward_strand); if (!is_forward_strand) ReverseClipping(); if (verbose_ and debug_) { cout << "Clipping settings for read from the "; if (is_forward_strand) cout << "forward "; else cout << "reverse "; cout << "strand:" << endl << "start_anywhere_in_ref_" << start_anywhere_in_ref_ << endl << "stop_anywhere_in_ref_" << stop_anywhere_in_ref_ << endl << "soft_clip_left_" << soft_clip_left_ << endl << "soft_clip_right_" << soft_clip_right_ << endl << endl; } }
// ---------------------------------------------------------------------------- void CGffFeatureRecord::SetLocation( const CSeq_interval& interval) // ---------------------------------------------------------------------------- { m_pLoc.Reset(new CSeq_loc()); m_pLoc->SetInt().Assign(interval); if ( interval.CanGetFrom() ) { mSeqStart = interval.GetFrom(); } if ( interval.CanGetTo() ) { mSeqStop = interval.GetTo(); } unsigned int seqStart = Location().GetStart(eExtreme_Positional); unsigned int seqStop = Location().GetStop(eExtreme_Positional); string min = NStr::IntToString(seqStart + 1); string max = NStr::IntToString(seqStop + 1); if (Location().IsPartialStart(eExtreme_Biological)) { if (Location().GetStrand() == eNa_strand_minus) { SetAttribute("end_range", max + string(",.")); } else { SetAttribute("start_range", string(".,") + min); } } if (Location().IsPartialStop(eExtreme_Biological)) { if (Location().GetStrand() == eNa_strand_minus) { SetAttribute("start_range", string(".,") + min); } else { SetAttribute("end_range", max + string(",.")); } } if ( interval.IsSetStrand() ) { SetStrand(interval.GetStrand()); } }
void CPacked_seqpnt::FlipStrand(void) { if (IsSetStrand()) { SetStrand(Reverse(GetStrand())); } }
void CSeq_interval::FlipStrand(void) { if (IsSetStrand()) { SetStrand(Reverse(GetStrand())); } }