A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/na__irep__to__seqfeat_8cpp_source.html below:

NCBI C++ ToolKit: src/objtools/readers/hgvs/na_irep_to_seqfeat.cpp Source File

18  string

dna_seq = na_seq;

37

lit->SetLength(length);

54  const string

& nucleotide,

59  auto

length = nucleotide.empty() ? 1 : nucleotide.size();

61

nt_literal->SetLength(length);

62  if

(!nucleotide.empty()) {

71  const string

& initial_nt,

72  const string

& final_nt,

76  if

(!initial_nt.empty() &&

77

(initial_nt.size() != final_nt.size())) {

79  string

err_msg =

"Invalid nucleotide substitution."

;

80

err_msg +=

" Reference subsequence and variant subsequence differ in length"

;

87  auto

& var_set = var_ref->SetData().SetSet();

100  if

(final_nt.size() > 1) {

108

var_set.SetVariations().push_back(subvar_ref);

113  if

(initial_nt.empty() &&

120

var_set.SetVariations().push_back(subvar_ref);

130  const auto

& nt_loc = sub.

GetLoc

();

132  const auto

final_nt = sub.

GetFinal

();

155  auto

& var_set = var_ref->SetData().SetSet();

159

var_set.SetVariations().push_back(subvar_ref);

164

var_set.SetVariations().push_back(subvar_ref);

266  const string

& deleted_seq,

267  const string

& inserted_seq,

280  auto

& var_set = var_ref->SetData().SetSet();

284

var_set.SetVariations().push_back(subvar_ref);

289

var_set.SetVariations().push_back(subvar_ref);

311  auto

& var_set = var_ref->SetData().SetSet();

315

var_set.SetVariations().push_back(subvar_ref);

320

var_set.SetVariations().push_back(subvar_ref);

334  const auto

& nt_int = inv.

GetNtint

();

344  auto

& var_set = var_ref->SetData().SetSet();

348

var_set.SetVariations().push_back(subvar_ref);

353

var_set.SetVariations().push_back(subvar_ref);

356  const bool

enforce_assert =

true

;

358

var_set.SetVariations().push_back(subvar_ref);

374  const auto

& replacement_int =

conv

.GetOrigin();

378  if

(start_offset || stop_offset) {

379  string

err_msg =

"Nucleotide conversions with origin intervals that begin or end in an intron are not currently supported."

;

380

err_msg +=

" Please report to variation-services@ncbi.nlm.nih.gov"

;

387  const auto

& nt_loc =

conv

.GetLoc();

392  const CNtIntLimit

& interval_start =

conv

.GetOrigin().GetInt().GetStart();

393  if

(interval_start.

IsSite

()) {

398  if

(interval_start.

IsRange

()) {

427

seq_literal->

SetLength

(raw_seq.size());

447  const auto

& var_type = simple_var.

GetType

();

454  switch

(var_type.Which()) {

464  const auto

& na_sub = var_type.GetNa_sub();

465  const auto

initial_nt = na_sub.GetInitial();

466  const auto

final_nt = na_sub.GetFinal();

467  if

(final_nt == initial_nt) {

473  if

(initial_nt.size() != final_nt.size()) {

497  const auto

& delins = var_type.GetDelins();

499  const auto

& deleted = delins.IsSetDeleted_raw_seq() ?

500

delins.GetDeleted_raw_seq() :

505

delins.GetInserted_seq_info().GetRaw_seq(),

522

var_ref->SetName(var_name);

530  const string

& id_string,

536

seq_feat->SetData().SetVariation(*var_ref);

544

seq_feat->SetLocation(*seq_loc);

555  if

(sequence_variant.IsSetComplex()) {

558

message =

"Chimeras "

;

560

message =

"Mosaics "

;

562

message +=

"are not currently supported."

;

563

message +=

" Please report to variation-services@ncbi.nlm.nih.gov"

;

580  if

(subvariant->IsSpecial()) {

605  const auto

& var_type = simple_var.

GetType

();

607  switch

(var_type.Which()) {

614

var_type.GetNa_identity().GetLoc(),

620

var_type.GetNa_sub().GetLoc(),

626

var_type.GetDup().GetLoc().GetNtloc(),

632

var_type.GetDel().GetLoc().GetNtloc(),

638

var_type.GetIns().GetInt().GetNtint(),

644

var_type.GetDelins().GetLoc().GetNtloc(),

651

var_type.GetInv().GetNtint(),

658

var_type.GetConv().GetLoc(),

664

var_type.GetRepeat().GetLoc().GetNtloc(),

697  if

(!nt_loc.

IsInt

()) {

723

seq_loc->SetEmpty().Assign(seq_id);

728

seq_loc->SetPnt().SetPoint(site_index);

729

seq_loc->SetPnt().SetId().Assign(seq_id);

730

seq_loc->SetPnt().SetStrand(strand);

757

seq_loc->SetEmpty().Assign(seq_id);

763

seq_loc->SetPnt().SetPoint(site_index);

764

seq_loc->SetPnt().SetId().Assign(seq_id);

765

seq_loc->SetPnt().SetStrand(strand);

772  if

(fuzz.NotNull()) {

773

seq_loc->SetPnt().SetFuzz(*fuzz);

817

seq_loc->SetInt().SetId().Assign(seq_id);

835  if

( (know_start && know_stop) && (start_index > stop_index) ) {

836  string

err_msg =

"Reversed interval limits"

;

838  swap

(start_index, stop_index);

842

seq_loc->SetInt().SetFrom(start_index);

859

seq_loc->SetInt().SetFuzz_from(*fuzz_from);

873

seq_loc->SetInt().SetTo(stop_index);

890

seq_loc->SetInt().SetFuzz_to(*fuzz_to);

904

seq_loc->SetInt().SetStrand(strand);

932  if

(know_start && know_stop) {

933

int_fuzz->SetRange().SetMin(start_index);

934

int_fuzz->SetRange().SetMax(stop_index);

936  else if

(!know_start && know_stop) {

939  else if

(know_start && !know_stop) {

957  if

(nt_limit.

IsSite

()) {

982  if

(!nt_site.GetBase().IsVal()) {

999  if

(!bioseq_handle) {

1007  for

(

CFeat_CI

it(bioseq_handle, selector); it; ++it) {

1008  const auto

& mapped_feat = *it;

1009  if

(mapped_feat.GetData().IsCdregion()) {

1013

coding_seq = mapped_feat.GetSeq_feat();

1017  if

(coding_seq.

IsNull

()) {

1074  if

(site_index == 0 ) {

1081  if

(site_index >

offset

) {

1084

site_index =

offset

- site_index;

1099

site_index = site_index-1 +

offset

;

1112

delta_item.

SetSeq

().SetLiteral().SetLength(length);

1113  if

(multiplier != 1) {

1123

delta_item.

SetSeq

().SetLiteral().SetLength(0);

1127

delta_item.

SetSeq

().SetLiteral().SetFuzz().SetLim(fuzz_lim);

1139  bool

fuzzy =

false

;

1184  "Base points in intronic fuzzy location must be equal"

);

1199

delta_item->SetSeq().SetLiteral().SetLength(offset_length);

1211

delta_item->SetSeq().SetLiteral().SetLength(offset_length);

1233  if

((start_offset && stop_offset) &&

1234

((start_offset^stop_offset) < 0)) {

1236  "Offsets in intronic fuzzy location cannot differ in sign"

);

1240  if

(start_offset >= 0) {

1241

delta_item->SetSeq().SetLiteral().SetLength(start_offset);

1242

delta_item->SetSeq().SetLiteral().SetFuzz().SetRange().SetMin(start_offset);

1244  else if

(start_offset < 0) {

1245

delta_item->SetSeq().SetLiteral().SetFuzz().SetRange().SetMax(-start_offset);

1248  if

(stop_offset <= 0) {

1249

delta_item->SetSeq().SetLiteral().SetLength(-stop_offset);

1250

delta_item->SetSeq().SetLiteral().SetFuzz().SetRange().SetMin(-stop_offset);

1251

}

else if

(stop_offset > 0) {

1252

delta_item->SetSeq().SetLiteral().SetFuzz().SetRange().SetMax(stop_offset);

1255  if

(start_offset < 0 || stop_offset < 0) {

1256

delta_item->SetMultiplier(-1);

1302  else if

(nt_loc.

IsInt

()) {

1305  return

start_offset;

1313  if

(nt_loc.

IsInt

()) {

@ eExtreme_Biological

5' and 3'

static CRef< CDelta_item > CreateSSR(const CCount &count, CRef< CSeq_literal > seq_literal)

const CVariation_ref::EMethod_E m_MethodUnknown

CRef< CIdResolver > m_IdResolver

CIUPACna x_CreateIUPACna(const string &na_seq) const

CRef< CVariation_ref > x_CreateSubstVarref(const CNaSub &sub, CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown) const

Return a CVariation_ref describing a nucleotide substituion (SNP or MNP)

CRef< CVariation_ref > x_CreateConversionVarref(const CConversion &conv, CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown) const

CRef< CVariation_ref > x_CreateSSRVarref(const CRepeat &ssr, CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown) const

CRef< CVariation_ref > x_CreateVarref(const string &var_name, const CSimpleVariant &simple_var) const

Return the top-level CVariation_ref object appearing in the variant Seq-feat.

CRef< CVariation_ref > x_CreateNaIdentityVarref(const CNaIdentity &identity, CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown) const

Return a CVariation_ref describing a "no-change" variant.

bool x_LooksLikePolymorphism(const CDelins &delins) const

CRef< CSeq_feat > x_CreateSimpleVariantFeat(const string &var_name, const string &identifier, const CSequenceVariant::TSeqtype &seq_type, const CSimpleVariant &simple_var) const

Return a CSeq_feat for "simple" NA variants.

CRef< CVariation_ref > x_CreateDeletionVarref(const CDeletion &del, CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown) const

CRef< CVariation_ref > x_CreateInversionVarref(const CInversion &inv, CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown) const

CRef< CVariation_ref > x_CreateDuplicationVarref(const CDuplication &dup, CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown) const

CRef< CSeq_literal > x_CreateNtSeqLiteral(const string &raw_seq) const

Return a CSeq_literal encapsulating a known nucleotide sequence.

CRef< CSeq_feat > CreateSeqfeat(const CVariantExpression &variant_expr) const

CRef< CVariation_ref > x_CreateDelinsVarref(const CDelins &delins, CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown) const

CRef< CVariation_ref > x_CreateInsertionVarref(const CInsertion &ins, CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown) const

CSeq_id_Handle GetAccessionVersion(const string &identifier) const

static void x_SetDeltaItemOffset(TSeqPos length, const CDelta_item::TMultiplier multiplier, bool fuzzy, CDelta_item &delta_item)

static CRef< CDelta_item > GetStartIntronOffset(const CNtLocation &nt_loc)

static CRef< CDelta_item > GetStopIntronOffset(const CNtLocation &nt_loc)

static CRef< CDelta_item > GetIntronOffset(const CNtSite &nt_site)

static const CSeq_feat & x_GetCDS(const CSeq_id &seq_id, CScope &scope)

static bool x_ComputeSiteIndex(const CSeq_id &seq_id, const CNtIntLimit &nt_limit, const CSequenceVariant::TSeqtype &seq_type, CScope &scope, TSeqPos &site_index)

Attempt to translate a nucleotide interval limit in the intermediate variant representation into a re...

static CRef< CSeq_loc > CreateSeqloc(const CSeq_id &seq_id, const CSimpleVariant &simple_var, const CSequenceVariant::TSeqtype &seq_type, CScope &scope)

Construct the CSeq_loc for a "simple" variant.

static CRef< CInt_fuzz > x_CreateIntFuzz(const CSeq_id &seq_id, const CNtSiteRange &nt_range, const CSequenceVariant::TSeqtype &seq_type, CScope &scope)

static CRef< CSeq_loc > x_CreateSeqloc(const CSeq_id &seq_id, const CNtSite &nt_site, const CSequenceVariant::TSeqtype &seq_type, CScope &scope)

Construct the CSeq_loc object for a given Seq-id and nucleotide site in the intermediate rerpresentat...

static ENa_strand x_GetStrand(const CNtInterval &nt_int)

namespace ncbi::objects::

unsigned int TSeqPos

Type for sequence locations and lengths.

int TSignedSeqPos

Type for signed sequence position.

const TSeqPos kInvalidSeqPos

Define special value for invalid sequence position.

void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)

#define ERR_POST(message)

Error posting with file, line number information but without error codes.

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

void Warning(CExceptionArgs_Base &args)

CConstRef< CSeq_id > GetSeqId(void) const

TSeqPos GetStart(ESeqLocExtremes ext) const

Return start and stop positions of the seq-loc.

TSeqPos GetStop(ESeqLocExtremes ext) const

CBioseq_Handle GetBioseqHandle(const CSeq_id &id)

Get bioseq handle by seq-id.

SAnnotSelector & SetResolveTSE(void)

SetResolveTSE() is equivalent to SetResolveMethod(eResolve_TSE).

SAnnotSelector & IncludeFeatType(TFeatType type)

Include feature type in the search.

bool IsNull(void) const THROWS_NONE

Check if pointer is null – same effect as Empty().

CRef< C > Ref(C *object)

Helper functions to get CRef<> and CConstRef<> objects.

bool NotNull(void) const THROWS_NONE

Check if pointer is not null – same effect as NotEmpty().

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define END_SCOPE(ns)

End the previously defined scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

#define BEGIN_SCOPE(ns)

Define a new scope.

static string & ReplaceInPlace(string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)

Replace occurrences of a substring within a string.

static string & ToUpper(string &str)

Convert string to upper case – string& version.

@ eLim_other

something else

@ eLim_tl

space to left of position

@ eLim_tr

space to right of position

const TLocation & GetLocation(void) const

Get the Location member data.

ENa_strand

strand of nucleic acid

void SetLength(TLength value)

Assign a value to Length data member.

void SetSeq_data(TSeq_data &value)

Assign a value to Seq_data data member.

const TStart & GetStart(void) const

Get the Start member data.

ESpecialVariant

Access to ESpecialVariant's attributes (values, names) as defined in spec.

bool IsUnknown(void) const

Check if variant Unknown is selected.

bool IsSetRaw_seq(void) const

Check if a value has been assigned to Raw_seq data member.

bool IsMinus_unknown(void) const

Check if variant Minus_unknown is selected.

const TSequence_variant & GetSequence_variant(void) const

Get the Sequence_variant member data.

TSize GetSize(void) const

Get the Size member data.

const TRaw_seq & GetRaw_seq(void) const

Get the Raw_seq member data.

bool IsSetBase(void) const

Check if a value has been assigned to Base data member.

bool IsSetRaw_seq(void) const

can optionally specify the sequence duplicated sequence Check if a value has been assigned to Raw_seq...

const TSeqinfo & GetSeqinfo(void) const

Get the Seqinfo member data.

const TStart & GetStart(void) const

Get the Start member data.

bool IsSetNucleotide(void) const

Check if a value has been assigned to Nucleotide data member.

const TRange & GetRange(void) const

Get the variant data.

bool IsSetSize(void) const

optionall specify the size of the inverted sequence Check if a value has been assigned to Size data m...

bool IsSetStart(void) const

Check if a value has been assigned to Start data member.

bool IsSite(void) const

Check if variant Site is selected.

const TInt & GetInt(void) const

Get the variant data.

const TLoc & GetLoc(void) const

Get the Loc member data.

bool IsInt(void) const

Check if variant Int is selected.

const TCount & GetCount(void) const

Get the Count member data.

const TOffset & GetOffset(void) const

Get the Offset member data.

bool IsRaw_seq(void) const

Check if variant Raw_seq is selected.

const TLoc & GetLoc(void) const

Get the Loc member data.

const TRange & GetRange(void) const

Get the variant data.

const TRaw_seq & GetRaw_seq(void) const

Get the Raw_seq member data.

TFuzzy GetFuzzy(void) const

Get the Fuzzy member data.

const TSite & GetSite(void) const

Get the variant data.

bool IsSetRaw_seq(void) const

can optionally specify the deleted sequence Check if a value has been assigned to Raw_seq data member...

const TDeleted_raw_seq & GetDeleted_raw_seq(void) const

Get the Deleted_raw_seq member data.

const TNucleotide & GetNucleotide(void) const

Get the Nucleotide member data.

const TSeqid & GetSeqid(void) const

Get the Seqid member data.

const TLoc & GetLoc(void) const

Get the Loc member data.

const TLoc & GetLoc(void) const

Get the Loc member data.

bool IsRange(void) const

Check if variant Range is selected.

const TInput_expr & GetInput_expr(void) const

Get the Input_expr member data.

const TNtint & GetNtint(void) const

Get the variant data.

const TSubvariants & GetSubvariants(void) const

Get the Subvariants member data.

bool IsVal(void) const

Check if variant Val is selected.

TSeqtype GetSeqtype(void) const

Get the Seqtype member data.

TSeqtype GetSeqtype(void) const

Get the Seqtype member data.

const TBase & GetBase(void) const

Get the Base member data.

TFuzzy GetFuzzy(void) const

Get the Fuzzy member data.

TStrand_minus GetStrand_minus(void) const

Get the Strand_minus member data.

bool IsSetFuzzy(void) const

Check if a value has been assigned to Fuzzy data member.

const TInitial & GetInitial(void) const

Get the Initial member data.

const TRaw_seq & GetRaw_seq(void) const

Get the variant data.

bool IsSetDeleted_raw_seq(void) const

can optionally specify the deleted sequence Check if a value has been assigned to Deleted_raw_seq dat...

const TSite & GetSite(void) const

Get the variant data.

const TRaw_seq & GetRaw_seq(void) const

Get the variant data.

const TReference_id & GetReference_id(void) const

Get the Reference_id member data.

TFuzzy_offset GetFuzzy_offset(void) const

Get the Fuzzy_offset member data.

TVal GetVal(void) const

Get the variant data.

bool IsSite(void) const

Check if variant Site is selected.

bool IsSetRaw_seq(void) const

Used if ntloc is a site, not an interval Check if a value has been assigned to Raw_seq data member.

const TType & GetType(void) const

Get the Type member data.

bool IsThree_prime(void) const

Check if variant Three_prime is selected.

bool IsSetUtr(void) const

Check if a value has been assigned to Utr data member.

bool IsSetFuzzy(void) const

TRUE implies HGVS subexpression of the form (base + offset), Check if a value has been assigned to Fu...

const TLoc & GetLoc(void) const

Get the Loc member data.

bool IsFive_prime(void) const

Check if variant Five_prime is selected.

const TStop & GetStop(void) const

Get the Stop member data.

bool IsRange(void) const

Check if variant Range is selected.

bool IsSetOffset(void) const

Check if a value has been assigned to Offset data member.

const TRaw_seq & GetRaw_seq(void) const

Get the Raw_seq member data.

const TInt & GetInt(void) const

Get the Int member data.

bool IsSetStop(void) const

Check if a value has been assigned to Stop data member.

const TRaw_seq & GetRaw_seq(void) const

Get the Raw_seq member data.

const TFinal & GetFinal(void) const

Get the Final member data.

TVal GetVal(void) const

Get the variant data.

const TNtint & GetNtint(void) const

Get the Ntint member data.

bool IsSetFuzzy_offset(void) const

TRUE implies HGVS subexpression of the form base+(offset) Check if a value has been assigned to Fuzzy...

const TLoc & GetLoc(void) const

Get the Loc member data.

bool IsVal(void) const

Check if variant Val is selected.

const TStop & GetStop(void) const

Get the Stop member data.

const TNtloc & GetNtloc(void) const

Get the variant data.

const TInserted_seq_info & GetInserted_seq_info(void) const

Get the Inserted_seq_info member data.

const TUtr & GetUtr(void) const

Get the Utr member data.

@ eVariantSeqType_n

non-coding rna

@ eVariantSeqType_g

genomic

@ eVariantSeqType_m

mitochondrial

@ eVariantSeqType_c

coding

@ e_Repeat

short-sequence repeat (ssr)

void SetSeq(TSeq &value)

Assign a value to Seq data member.

void SetAction(TAction value)

Assign a value to Action data member.

void SetMultiplier(TMultiplier value)

Assign a value to Multiplier data member.

@ eMethod_E_computational

@ eAction_offset

go downstream by distance specified by multiplier (upstream if < 0), in genomic context.

@ eData_set_type_package

set represents a package of observations at a given location, generally containing asserted + referen...

USING_SCOPE(NHgvsTestUtils)

Int4 delta(size_t dimension_, const Int4 *score_)

CRef< CSeq_feat > g_NormalizeVariationSeqfeat(const CSeq_feat &feat, CScope *scope)

CRef< CSeq_feat > g_CreateSpecialSeqfeat(ESpecialVariant variant, const CSeq_id &seq_id, string hgvs_expression)

CRef< CVariation_ref > g_CreateSNV(const CSeq_data &nucleotide, CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown, CRef< CDelta_item > offset=null)

CRef< CVariation_ref > g_CreateIdentity(CRef< CSeq_literal > seq_literal, CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown, CRef< CDelta_item > start_offset=null, CRef< CDelta_item > stop_offset=null, bool enforce_assert=false)

CRef< CVariation_ref > g_CreateMicrosatellite(CRef< CDelta_item > repeat_info, CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown, CRef< CDelta_item > start_offset=null, CRef< CDelta_item > stop_offset=null)

CRef< CVariation_ref > g_CreateInsertion(CSeq_literal &insertion, CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown, CRef< CDelta_item > start_offset=null, CRef< CDelta_item > stop_offset=null)

CRef< CVariation_ref > g_CreateDelins(CSeq_literal &insertion, CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown, CRef< CDelta_item > start_offset=null, CRef< CDelta_item > stop_offset=null)

CRef< CVariation_ref > g_CreateInversion(CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown, CRef< CDelta_item > start_offset=null, CRef< CDelta_item > stop_offset=null)

CRef< CVariation_ref > g_CreateDeletion(CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown, CRef< CDelta_item > start_offset=null, CRef< CDelta_item > stop_offset=null)

CRef< CVariation_ref > g_CreateConversion(const CSeq_loc &interval, CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown, CRef< CDelta_item > start_offset=null, CRef< CDelta_item > stop_offset=null)

CRef< CVariation_ref > g_CreateMNP(const CSeq_data &nucleotide, TSeqPos length, CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown, CRef< CDelta_item > offset=null)

CRef< CVariation_ref > g_CreateDuplication(CVariation_ref::EMethod_E method=CVariation_ref::eMethod_E_unknown, CRef< CDelta_item > start_offset=null, CRef< CDelta_item > stop_offset=null)


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