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/gvf__reader_8cpp_source.html below:

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

55 #define NCBI_USE_ERRCODE_X Objtools_Rd_RepMask 78  const string

& strGff )

90  "Mandatory attribute ID missing."

);

99  "Mandatory attribute Reference_seq and/or Variant_seq missing."

);

107  const string

& strGffType,

108  const string

& strRawAttributes )

113  for

(

size_t

u=0; u <

attributes

.size(); ++u ) {

124  if

( strKey.empty() && strValue.empty() ) {

130  if

( strKey ==

"Dbxref"

) {

154  const string

& title,

194  for

(

const auto

& lineData: readerData) {

195  const auto

& line = lineData.mData;

260

annot.

SetData

().SetFtable().push_back( pFeature );

287

pLocation->

SetInt

().SetId(*pId);

296

list<string> range_borders;

301  if

( range_borders.size() != 2 ) {

305  "Bad Start_range attribute: Start_range="

+ strRange +

"."

);

309  if

( range_borders.back() ==

"."

) {

313  else if

( range_borders.front() ==

"."

) {

320

pLocation->

SetInt

().SetFuzz_from().SetRange().SetMin( lower-1 );

321

pLocation->

SetInt

().SetFuzz_from().SetRange().SetMax( upper-1 );

324  catch

( std::exception& ) {

328  "Bad Start_range attribute: Start_range="

+ strRange +

"."

);

334

range_borders.clear();

338  if

( range_borders.size() != 2 ) {

342  "Bad End_range attribute: End_range="

+ strRange +

"."

);

346  if

( range_borders.back() ==

"."

) {

350  else if

( range_borders.front() ==

"."

) {

357

pLocation->

SetInt

().SetFuzz_to().SetRange().SetMin( lower-1 );

358

pLocation->

SetInt

().SetFuzz_to().SetRange().SetMax( upper-1 );

361  catch

(std::exception&) {

365  "Bad End_range attribute: End_range="

+ strRange +

"."

);

382

pLocation->

SetPnt

().SetId(*pId);

383  if

(record.

Type

() ==

"insertion"

) {

394  string

strRangeLower, strRangeUpper;

395  bool

hasLower = record.

GetAttribute

(

"Start_range"

, strRangeLower);

396  bool

hasUpper = record.

GetAttribute

(

"End_range"

, strRangeUpper);

397  if

(hasLower && hasUpper && strRangeLower != strRangeUpper) {

401  "Bad range attribute: Conflicting fuzz ranges for single point location."

);

404  if

(!hasLower && !hasUpper) {

409

strRangeLower = strRangeUpper;

415  if

(

bounds

.size() != 2) {

419  "Bad range attribute: XXX_range="

+ strRangeLower +

"."

);

423  if

(

bounds

.back() ==

"."

) {

427  else if

(

bounds

.front() ==

"."

) {

434

pLocation->

SetPnt

().SetFuzz().SetRange().SetMin(lower-1);

435

pLocation->

SetPnt

().SetFuzz().SetRange().SetMax(upper-1);

438  catch

(std::exception&) {

442  "Bad range attribute: XXX_range="

+ strRangeLower +

"."

);

453  return

(nameAttr.find(

"ssv"

) != string::npos);

460  if

( record.GetAttribute(

"Name"

, name ) ) {

480  if

( strType ==

"snv"

) {

485  else if

(strType ==

"insertion"

||

486

strType ==

"alu_insertion"

||

487

strType ==

"line1_insertion"

||

488

strType ==

"sva_insertion"

||

489

strType ==

"mobile_element_insertion"

||

490

strType ==

"mobile_sequence_insertion"

||

491

strType ==

"novel_sequence_insertion"

) {

496  else if

(strType ==

"deletion"

||

497

strType ==

"alu_deletion"

||

498

strType ==

"line1_deletion"

||

499

strType ==

"sva_deletion"

||

500

strType ==

"herv_deletion"

||

501

(strType ==

"mobile_element_deletion"

&&

507  else if

(strType ==

"indel"

) {

512  else if

(strType ==

"inversion"

) {

518  else if

(strType ==

"tandem_duplication"

) {

523  else if

(strType ==

"translocation"

||

524

strType ==

"interchromosomal_translocation"

||

525

strType ==

"intrachromosomal_translocation"

) {

531  else if

(strType ==

"complex"

||

532

strType ==

"complex_substitution"

||

533

strType ==

"complex_chromosomal_rearrangement"

||

534

strType ==

"complex_sequence_alteration"

) {

539  else if

(strType ==

"unknown"

||

540

strType ==

"other"

||

541

strType ==

"sequence_alteration"

) {

552

feature.

SetData

().SetVariation( *pVariation );

584

pReference->SetData().SetInstance().SetType(

587

pDelta->SetSeq().SetThis();

588

pReference->SetData().SetInstance().SetDelta().push_back(pDelta);

589

pReference->SetData().SetInstance().SetObservation(

591  variation

.SetData().SetSet().SetVariations().push_back(

595  if

( record.

GetAttribute

(

"Variant_seq"

, strAlleles ) ) {

596

list<string> alleles;

600  for

( list<string>::const_iterator cit = alleles.begin();

601

cit != alleles.end(); ++cit )

604  if

(allele ==

"-"

) {

605

pReference->SetVariant_prop().SetAllele_state(

606

(alleles.size() == 1) ?

609

pReference->SetData().SetInstance().SetObservation(

618  if

(alleles.size() == 1) {

619

pAllele->SetVariant_prop().SetAllele_state(

623

pAllele->SetVariant_prop().SetAllele_state(

628

pDelta->SetSeq().SetLiteral().SetLength(

629  static_cast<TSeqPos>

(allele.size()));

630

pDelta->SetSeq().SetLiteral().SetSeq_data().SetIupacna().Set(allele);

632

pAllele->SetData().SetInstance().SetDelta().push_back(pDelta);

634

pAllele->SetData().SetInstance().SetObservation(

637  variation

.SetData().SetSet().SetVariations().push_back(

665  if

( strType ==

"cnv"

||

666

strType ==

"copy_number_variation"

) {

670  if

( strType ==

"gain"

||

671

strType ==

"copy_number_gain"

||

672

strType ==

"duplication"

) {

676  if

( strType ==

"loss"

||

677

strType ==

"copy_number_loss"

||

678

(strType ==

"mobile_element_deletion"

&& !

xIsDbvarCall

(nameAttr)) ) {

682  if

( strType ==

"loss_of_heterozygosity"

) {

686

pConsequence->SetLoss_of_heterozygosity();

687  variation

.SetConsequence().push_back( pConsequence );

694  "Bad data line: Unknown type \""

+ strType +

"\"."

);

706

CVariation_ref::C_Data::C_Set::eData_set_type_package );

868  variation

.SetId().SetTag().SetStr(

id

);

882  variation

.SetParent_id().SetTag().SetStr(

id

);

910  if

( record.

GetAttribute

(

"Genotype"

, strGenotype ) ) {

913  variation

.SetVariant_prop().SetAllele_state( it->second );

916  variation

.SetVariant_prop().SetAllele_state(

921  if

( record.

GetAttribute

(

"validated"

, strValidated ) ) {

922  if

( strValidated ==

"1"

) {

923  variation

.SetVariant_prop().SetOther_validation(

true

);

925  if

( strValidated ==

"0"

) {

926  variation

.SetVariant_prop().SetOther_validation(

false

);

940  if

(!record.

GetAttribute

(

"Reference_seq"

, strReference)) {

943

pReference->SetData().SetInstance().SetType(

946

pDelta->SetSeq().SetLiteral().SetLength(

947  static_cast<TSeqPos>

(strReference.size()));

948

pDelta->SetSeq().SetLiteral().SetSeq_data().SetIupacna().Set(

950

pReference->SetData().SetInstance().SetDelta().push_back(pDelta);

951

pReference->SetData().SetInstance().SetObservation(

953  variation

.SetData().SetSet().SetVariations().push_back(

957  if

(!record.

GetAttribute

(

"Variant_seq"

, strAlleles)) {

960

list<string> alleles;

964  for

( list<string>::const_iterator cit = alleles.begin();

965

cit != alleles.end(); ++cit )

968  if

(allele == strReference) {

969

pReference->SetVariant_prop().SetAllele_state(

970

(alleles.size() == 1) ?

973

pReference->SetData().SetInstance().SetObservation(

979

pAllele->SetVariant_prop().SetAllele_state(

980

(alleles.size() == 1) ?

984

pDelta->SetSeq().SetThis();

986

pAllele->SetData().SetInstance().SetDelta().push_back(pDelta);

989

pAllele->SetData().SetInstance().SetObservation(

992  variation

.SetData().SetSet().SetVariations().push_back(

1004  string

strReference;

1006  if

(record.

GetAttribute

(

"Reference_seq"

, strReference)) {

1007

pReference->SetData().SetInstance().SetType(

1010

pDelta->SetSeq().SetLiteral().SetLength(

1011  static_cast<TSeqPos>

(strReference.size()));

1012

pDelta->SetSeq().SetLiteral().SetSeq_data().SetIupacna().Set(

1014

pReference->SetData().SetInstance().SetDelta().push_back(pDelta);

1015

pReference->SetData().SetInstance().SetObservation(

1017  variation

.SetData().SetSet().SetVariations().push_back(

1022  if

( record.

GetAttribute

(

"Variant_seq"

, strAlleles ) ) {

1023

list<string> alleles;

1027  for

( list<string>::const_iterator cit = alleles.begin();

1028

cit != alleles.end(); ++cit )

1030  string

allele(*cit);

1032  if

(allele == strReference) {

1033

pReference->SetVariant_prop().SetAllele_state(

1034

(alleles.size() == 1) ?

1037

pReference->SetData().SetInstance().SetObservation(

1042  if

(alleles.size() == 1) {

1043

pAllele->SetVariant_prop().SetAllele_state(

1047

pAllele->SetVariant_prop().SetAllele_state(

1050

vector<string> replaces;

1051

replaces.push_back(*cit);

1053

pAllele->SetData().SetInstance().SetObservation(

1055

pAllele->SetData().SetInstance().SetType(

1057  variation

.SetData().SetSet().SetVariations().push_back(

1071  string

strAttribute;

1074

ext.

SetType

().SetStr(

"GvfAttributes"

);

1077  if

( record.

Source

() !=

"."

) {

1087  if

( cit->first ==

"Start_range"

) {

1090  if

( cit->first ==

"End_range"

) {

1093  if

( cit->first ==

"validated"

) {

1097  string

strAttribute;

1098  if

( ! record.

GetAttribute

( cit->first, strAttribute ) ) {

1102  "Suspicious data line: Funny attribute \""

+ cit->first +

"\"."

);

1106  if

( cit->first ==

"ID"

) {

1107

ext.

AddField

(

"id"

, strAttribute );

1110  if

( cit->first ==

"Parent"

) {

1111

ext.

AddField

(

"parent"

, strAttribute );

1114  if

( cit->first ==

"Variant_reads"

) {

1115

ext.

AddField

(

"variant-reads"

, strAttribute );

1118  if

( cit->first ==

"Variant_effect"

) {

1119

ext.

AddField

(

"variant-effect"

, strAttribute );

1122  if

( cit->first ==

"Total_reads"

) {

1123

ext.

AddField

(

"total-reads"

, strAttribute );

1126  if

( cit->first ==

"Variant_copy_number"

) {

1127

ext.

AddField

(

"variant-copy-number"

, strAttribute );

1130  if

( cit->first ==

"Reference_copy_number"

) {

1131

ext.

AddField

(

"reference-copy-number"

, strAttribute );

1134  if

( cit->first ==

"Phased"

) {

1135

ext.

AddField

(

"phased"

, strAttribute );

1138  if

( cit->first ==

"Name"

) {

1139

ext.

AddField

(

"name"

, strAttribute );

1142

ext.

AddField

(

string

(

"custom-"

) + cit->first, strAttribute );

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

virtual bool xParseStructuredComment(const CTempString &)

virtual void xAssignAnnotId(CSeq_annot &, const CTempString={})

unsigned int mCurrentFeatureCount

TAttributes::const_iterator TAttrCit

static string xNormalizedAttributeValue(const CTempString &)

TAttributes::iterator TAttrIt

bool GetAttribute(const string &, string &) const

const TAttributes & Attributes() const

bool xSplitGffAttributes(const string &, vector< string > &) const

string x_NormalizedAttributeKey(const string &)

bool AssignFromGff(const string &) override

const string & Source() const

const string & Type() const

ENa_strand Strand() const

const string & Id() const

const string & NormalizedType() const

bool AssignFromGff(const string &) override

bool xAssignAttributesFromGff(const string &, const string &) override

void xProcessData(const TReaderData &, CSeq_annot &) override

bool xVariationMakeEversions(const CGvfReadRecord &, CVariation_ref &)

CRef< CAnnotdesc > m_Pragmas

bool xVariationMakeComplex(const CGvfReadRecord &, CVariation_ref &)

bool xParseStructuredComment(const CTempString &) override

bool xVariationSetInsertions(const CGvfReadRecord &, CVariation_ref &)

bool xVariationMakeCNV(const CGvfReadRecord &, CVariation_ref &)

bool xVariationMakeUnknown(const CGvfReadRecord &, CVariation_ref &)

bool xIsDbvarCall(const string &nameAttr) const

bool xGetNameAttribute(const CGvfReadRecord &record, string &name) const

bool xVariationMakeSNV(const CGvfReadRecord &, CVariation_ref &)

CGvfReader(TReaderFlags uFlags, const string &name="", const string &title="", CReaderListener *=nullptr)

virtual bool xMergeRecord(const CGvfReadRecord &, CSeq_annot &, ILineErrorListener *)

void xGetData(ILineReader &, TReaderData &) override

virtual bool xVariationSetName(const CGvfReadRecord &, CVariation_ref &)

bool xFeatureSetVariation(const CGvfReadRecord &, CSeq_feat &)

bool xParseFeature(const CTempString &, CSeq_annot &, ILineErrorListener *) override

bool xVariationMakeTranslocations(const CGvfReadRecord &, CVariation_ref &)

bool xVariationMakeDeletions(const CGvfReadRecord &, CVariation_ref &)

bool xVariationSetDeletions(const CGvfReadRecord &, CVariation_ref &)

bool xVariationMakeIndels(const CGvfReadRecord &, CVariation_ref &)

bool xFeatureSetLocationPoint(const CGff2Record &, CSeq_feat &)

virtual bool xVariationSetProperties(const CGvfReadRecord &, CVariation_ref &)

bool xFeatureSetLocationInterval(const CGff2Record &, CSeq_feat &)

bool xVariationMakeInsertions(const CGvfReadRecord &, CVariation_ref &)

virtual bool xVariationSetSnvs(const CGvfReadRecord &, CVariation_ref &)

virtual bool xVariationSetId(const CGvfReadRecord &, CVariation_ref &)

void xPostProcessAnnot(CSeq_annot &) override

virtual bool xFeatureSetExt(const CGvfReadRecord &, CSeq_feat &, ILineErrorListener *)

CRef< CSeq_annot > ReadSeqAnnot(ILineReader &, ILineErrorListener *=nullptr) override

Read an object from a given line reader, render it as a single Seq-annot, if possible.

bool xFeatureSetLocation(const CGff2Record &, CSeq_feat &)

bool xVariationMakeInversions(const CGvfReadRecord &, CVariation_ref &)

virtual bool xVariationSetParent(const CGvfReadRecord &, CVariation_ref &)

bool xVariationSetCommon(const CGvfReadRecord &, CVariation_ref &)

Common file reader utility functions.

virtual bool xParseBrowserLine(const CTempString &, CSeq_annot &)

unique_ptr< CReaderMessageHandler > m_pMessageHandler

SeqIdResolver mSeqIdResolve

unsigned int m_uLineNumber

vector< TReaderLine > TReaderData

virtual void xAddConversionInfo(CSeq_annot &, ILineErrorListener *)

virtual void xAssignTrackData(CSeq_annot &)

virtual void xGetData(ILineReader &, TReaderData &)

virtual CRef< CSeq_annot > ReadSeqAnnot(CNcbiIstream &istr, ILineErrorListener *pErrors=nullptr)

Read an object from a given input stream, render it as a single Seq-annot.

namespace ncbi::objects::

CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...

CUser_object & AddField(const string &label, const string &value, EParseField parse=eParse_String)

add a data field to the user object that holds a given value

Abstract base class for lightweight line-by-line reading.

container_type::const_iterator const_iterator

const_iterator begin() const

const_iterator end() const

const_iterator find(const key_type &key) const

static const char * bounds[]

Include a standard set of the NCBI C++ Toolkit most basic headers.

static const struct attribute attributes[]

static void fatal(const char *msg,...)

unsigned int TSeqPos

Type for sequence locations and lengths.

@ eDiag_Error

Error message.

@ eDiag_Warning

Warning message.

void SetStrand(ENa_strand strand)

Set the strand for all of the location's ranges.

CRef< C > Ref(C *object)

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

void Reset(void)

Reset reference object.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)

Split a string using specified delimiters.

static bool SplitInTwo(const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)

Split a string into two pieces using the specified delimiters.

static unsigned int StringToUInt(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to unsigned int.

CTempString substr(size_type pos) const

Obtain a substring from this string, beginning at a given offset.

void SetType(TType &value)

Assign a value to Type data member.

void SetLocation(TLocation &value)

Assign a value to Location data member.

void SetExt(TExt &value)

Assign a value to Ext data member.

void SetData(TData &value)

Assign a value to Data data member.

void SetData(TData &value)

Assign a value to Data data member.

void SetDesc(TDesc &value)

Assign a value to Desc data member.

TUser & SetUser(void)

Select the variant.

@ eType_snv

delta=[morph of length 1] NOTE: this is snV not snP; the latter requires frequency-based validation t...

@ eType_delins

delta=[del, ins]

@ eType_identity

delta=[]

@ eAction_del_at

excise sequence at location if multiplier is specified, delete len(location)*multiplier positions dow...

@ eAction_ins_before

insert seq before the location.start

@ eObservation_variant

inst represent the observed variant at a given position

@ eObservation_asserted

inst represents the asserted base at a position

@ eAllele_state_homozygous

@ eAllele_state_heterozygous

@ eAllele_state_hemizygous

map< string, CVariantProperties::EAllele_state > TAlleleStateMap

const TAlleleStateMap & s_AlleleStateMap()

Lightweight interface for getting lines of data with minimal memory copying.

const struct ncbi::grid::netcache::search::fields::KEY key

const GenericPointer< typename T::ValueType > T2 value

static SLJIT_INLINE sljit_ins lr(sljit_gpr dst, sljit_gpr src)


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