: scope(a_scope), generator(a_scope)
62starts.
insert(
r->first.GetFrom());
67 returnmake_pair(starts, stops);
70pair<TStarts, set<TSeqRange> >
79pair<bool, bool> trim_by_contig(
false,
false);
93 padding=
min(
padding, ((stop > start ? genomic_length : 0) - (stop - start +1))/2);
101 if(start <= 2 && !is_circular) {
102trim_by_contig.first =
true;
104 if(stop >= genomic_length-3 && !is_circular) {
105trim_by_contig.second =
true;
109start = is_circular ? start + genomic_length : 0;
111 if(stop >= genomic_length) {
112stop = is_circular ? stop - genomic_length : genomic_length-1;
128query_loc->
SetInt(*spl.
GetExons().front()->CreateRowSeq_interval(0, spl));
133 if(seq.size() % 3 != 0) {
146 code->Set().push_back(c_e);
149 const size_tkUnknownState = tbl.
SetCodonState(
'N',
'N',
'N');
155 stringcodon =
"NNN";
166 if(
state== kUnknownState)
171query_loc->
SetInt().SetFrom((k-3)/3);
172query_loc->
SetInt().SetTo((k-3)/3);
174query_loc->
SetInt().SetFrom(k-3);
175query_loc->
SetInt().SetTo(k-1);
184starts[
TSeqRange(mapped_pos, mapped_pos2)] = codon;
193 if(gaps !=
nullptr) {
198region_loc->
SetInt().SetFrom(0);
202region_loc->
SetInt().SetTo(genomic_length-1);
218 id->Assign(*region_loc->
GetId());
222 for(
autos: region_seq) {
228}
else if(gap_end == k) {
229lcl_query_loc->
SetInt().SetFrom(gap_begin);
230lcl_query_loc->
SetInt().SetTo(gap_end-1);
232 automapped_loc = lcl_mapper.
Map(*lcl_query_loc);
245 if(trim_by_contig.first) {
248 if(!gaps->
empty() && gaps->
begin()->GetFrom()==0) {
249gap_stop = gaps->
begin()->GetTo();
254 if(!gaps->
empty() && gaps->
begin()->GetTo()==0) {
255gap_stop = gaps->
begin()->GetFrom();
261 if(trim_by_contig.second) {
262 intgap_start = genomic_length;
264 if(!gaps->
empty() && gaps->rbegin()->GetTo()==genomic_length-1) {
265gap_start = gaps->rbegin()->GetFrom();
270 if(!gaps->
empty() && gaps->rbegin()->GetFrom()==genomic_length-1) {
271gap_start = gaps->rbegin()->GetTo();
279 returnmake_pair(starts, stops);
302 intnext_prod_start = 0;
317cds_ranges.push_back(loc_ci.GetRange());
320cds_ranges.back().SetTo(cds_ranges.back().GetTo()-3);
328 intprod_pos_start = (*exon)->GetProduct_start().AsSeqPos();
331subject_loc->
SetInt(*(*exon)->CreateRowSeq_interval(1, spliced_seg));
338 if(next_prod_start < prod_pos_start) {
339mRNA.append(prod_pos_start - next_prod_start,
'N');
340next_prod_start = prod_pos_start;
343 if((*exon)->IsSetParts()) {
345pair<int, int> chunk =
ChunkSize(**part_it);
346prod_pos_start += chunk.second;
347 if(chunk.first == 0) {
348 if(next_prod_start < prod_pos_start) {
349mRNA.append(prod_pos_start - next_prod_start,
'N');
350next_prod_start = prod_pos_start;
352}
else if(chunk.second > 0) {
353 if(next_prod_start < prod_pos_start) {
354mRNA.append(subject_seq, subj_pos+chunk.second-(prod_pos_start - next_prod_start), prod_pos_start - next_prod_start);
355next_prod_start = prod_pos_start;
358subj_pos += chunk.first;
361mRNA.append(subject_seq);
362next_prod_start += subject_seq.size();
366 if(cds_ranges.front().IsWhole()) {
370 for(
const TSeqRange&range : cds_ranges) {
371 if(range.GetFrom() >= mRNA.size()) {
374cds_seq += mRNA.substr(range.GetFrom(), range.GetLength());
385 switch(chunk.
Which()) {
388 returnmake_pair(
len, 0);
391 returnmake_pair(0,
len);
404 returnmake_pair(
len,
len);
@ eExtreme_Positional
numerical value
@ eExtreme_Biological
5' and 3'
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
CConstRef< objects::CSeq_align > AdjustAlignment(const objects::CSeq_align &align, TSeqRange range, EProductPositionsMode mode=eForceProductFrom0)
void SetFlags(TFeatureGeneratorFlags)
void SetAllowedUnaligned(TSeqPos)
CConstRef< objects::CSeq_align > CleanAlignment(const objects::CSeq_align &align)
Clean an alignment according to our best guess of its biological representation.
static const CTrans_table & GetTransTable(int id)
string GetCDSNucleotideSequence(const CSeq_align &align)
set< TSeqPos > FindStops(const CSeq_align &align)
pair< map< TSeqRange, string >, set< TSeqRange > > FindStartStopRanges(const CSeq_align &align, int padding=0, set< TSignedSeqRange > *gaps=nullptr)
bool HasInternalStops(const CSeq_align &align)
pair< set< TSeqPos >, set< TSeqPos > > FindStartsStops(const CSeq_align &align, int padding=0)
CFeatureGenerator generator
CInternalStopFinder(CScope &scope)
CRef< CSeq_loc > CreateRowSeq_loc(TDim row) const
const CSeq_id & GetSeq_id(TDim row) const
Get seq-id (the first one if segments have different ids).
bool IsOrfStart(int state) const
static int SetCodonState(unsigned char ch1, unsigned char ch2, unsigned char ch3)
static int NextCodonState(int state, unsigned char ch)
bool IsOrfStop(int state) const
iterator_bool insert(const value_type &val)
const_iterator begin() const
const_iterator end() const
CMappedFeat GetCdsOnMrna(const objects::CSeq_id &rna_id, CScope &scope)
static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
const TSeqPos kInvalidSeqPos
Define special value for invalid sequence position.
#define NCBI_USER_THROW(message)
Throw a quick-and-dirty runtime exception of type 'CException' with the given error message and error...
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
#define MSerial_AsnText
I/O stream manipulators â.
ENa_strand GetStrand(void) const
Get the location's strand.
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
CRef< CSeq_loc > Merge(TOpFlags flags, ISynonymMapper *syn_mapper) const
All functions create and return a new seq-loc object.
CPacked_seqint::TRanges TRanges
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
bool IsPartialStop(ESeqLocExtremes ext) const
TSeqPos GetStop(ESeqLocExtremes ext) const
CRef< CSeq_loc > Map(const CSeq_loc &src_loc)
Map seq-loc.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
TSeqPos GetBioseqLength(void) const
TInst_Topology GetInst_Topology(void) const
@ eCoding_Iupac
Set coding to printable coding (Iupacna or Iupacaa)
const CSeq_loc & GetLocation(void) const
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const
Fill the buffer string with the sequence data for the interval [start, stop).
const_iterator begin(void) const
const_iterator end(void) const
CRange< TSeqPos > TSeqRange
typedefs for sequence ranges
CRange< TSignedSeqPos > TSignedSeqRange
static TThisType GetWhole(void)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
TMatch GetMatch(void) const
Get the variant data.
const TProduct_id & GetProduct_id(void) const
Get the Product_id member data.
TDiag GetDiag(void) const
Get the variant data.
TProduct_type GetProduct_type(void) const
Get the Product_type member data.
TMismatch GetMismatch(void) const
Get the variant data.
const TSpliced & GetSpliced(void) const
Get the variant data.
TGenomic_ins GetGenomic_ins(void) const
Get the variant data.
list< CRef< CSpliced_exon > > TExons
const TExons & GetExons(void) const
Get the Exons member data.
list< CRef< CSpliced_exon_chunk > > TParts
bool IsSpliced(void) const
Check if variant Spliced is selected.
TProduct_ins GetProduct_ins(void) const
Get the variant data.
const TSegs & GetSegs(void) const
Get the Segs member data.
E_Choice Which(void) const
Which variant is currently selected.
@ e_Product_ins
insertion in product sequence (i.e. gap in the genomic sequence)
@ e_Diag
both sequences are represented, there is sufficient similarity between product and genomic sequences....
@ e_Genomic_ins
insertion in genomic sequence (i.e. gap in the product sequence)
@ e_Match
both sequences represented, product and genomic sequences match
@ e_Mismatch
both sequences represented, product and genomic sequences do not match
@ eProduct_type_transcript
pair< int, int > ChunkSize(const CSpliced_exon_chunk &chunk)
map< TSeqRange, string > TStarts
int GetGeneticCode(const CBioseq_Handle &bsh)
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4