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

NCBI C++ ToolKit: src/objtools/writers/vcf_writer.cpp Source File

73  const

list< CRef< CAnnotdesc > > descrs = annot.

GetDesc

().

Get

();

74

list< CRef< CAnnotdesc > >::const_iterator cit = descrs.begin();

76  while

( cit != descrs.end() ) {

79  if

( ! pDesc->IsUser() ) {

82  if

( ! pDesc->GetUser().IsSetType() ) {

85  if

( ! pDesc->GetUser().GetType().IsStr() ) {

88  if

( pDesc->GetUser().GetType().GetStr() ==

"vcf-meta-info"

) {

124

annot->

Assign

(orig_annot);

183  if

( !pVcfMetaInfo || !pVcfMetaInfo->

HasField

(

"genotype-headers"

) ) {

199  if

( !pVcfMetaInfo ) {

205  for

(CUser_field::C_Data::TStrs::const_iterator cit = directives.begin();

206

cit != directives.end(); ++cit ) {

207  m_Os

<<

"##"

<< *cit <<

'\n'

;

221

cit != desc.

Get

().end(); ++cit )

223  if

( (*cit)->IsCreate_date() ) {

224  const CDate

& date = (*cit)->GetCreate_date();

225  if

( date.

IsStd

() ) {

226

date.

GetDate

( &datestr,

"%4Y%2M%2D"

);

232  m_Os

<<

"##fileformat=VCFv4.1" 234  if

( ! datestr.empty() ) {

235  m_Os

<<

"##filedate="

<< datestr <<

'\n'

;

237  m_Os

<<

"##INFO=<ID=DB,Number=0,Type=Flag,Description=\"dbSNP Membership\">" 239  m_Os

<<

"##INFO=<ID=H2,Number=0,Type=Flag,Description=\"Hapmap2 Membership\">" 241  m_Os

<<

"##INFO=<ID=H3,Number=0,Type=Flag,Description=\"Hapmap3 Membership\">" 243  m_Os

<<

"##INFO=<ID=RL,Number=1,Type=String,Description=\"Resource Link\">" 245  m_Os

<<

"##INFO=<ID=FBV,Number=1,Type=String,Description=\"Frequency Based Validation\">" 247  m_Os

<<

"##INFO=<ID=GTP,Number=1,Type=String,Description=\"Genotype\">" 249  m_Os

<<

"##INFO=<ID=QC,Number=1,Type=String,Description=\"Quality Check\">" 259  m_Os

<<

"#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO"

;

269  m_Os

<<

'\t'

<< *cit;

288  if

(range.IsWhole()) {

316  int

current_type = inst.

GetType

();

318

rtype = current_type;

320

&& inst.

GetDelta

().front()->GetSeq().IsLiteral()

321

&& inst.

GetDelta

().front()->GetSeq().GetLiteral().IsSetSeq_data()

322

&& inst.

GetDelta

().front()->GetSeq().GetLiteral().GetSeq_data().IsIupacna())

324  string a

= inst.

GetDelta

().front()->GetSeq().GetLiteral().GetSeq_data().GetIupacna().Get();

340

alt_types.push_back(current_type);

369  "Processing terminated by user"

);

385  if

( (*inst)->IsSetData() && (*inst)->GetData().IsInstance() ) {

408  if

(loc.IsSetStrand())

409

strand = loc.GetStrand();

410  const CSeq_id

*seq_id = loc.GetId();

437  if

(anchor.empty()) {

438  string msg

=

"Missing sequence data"

;

490  for

(CSeq_feat::TExts::const_iterator uo = mf.

GetExts

().begin(); uo != mf.

GetExts

().end(); ++uo)

492  if

((*uo)->IsSetType() && (*uo)->GetType().IsStr() && (*uo)->GetType().GetStr() ==

"VCF_COLUMN_1_ID" 493

&& (*uo)->IsSetData() && !(*uo)->GetData().empty() && (*uo)->GetData().front()->IsSetData() && (*uo)->GetData().front()->GetData().IsStr())

495  id

= (*uo)->GetData().front()->GetData().GetStr();

580  const unsigned int

start,

582  const string

&anchor,

594  m_Os

<< anchor << ref;

596  m_Os

<< ref << anchor;

616  const unsigned int

start,

618  const string

&anchor,

619  const

list<int>& alt_types,

620  const

vector<string> &alt

629  for

(

auto

alt_type : alt_types) {

635  const string

alt_string = alt[index++];

640  m_Os

<< anchor << alt_string;

642  m_Os

<< alt_string << anchor;

652  if

(!anchor.empty()) {

695

vector<string> filters;

706  if

( ! filters.empty() ) {

724

vector<string> infos;

730  if

(db ==

"dbsnp"

) {

731

infos.push_back(

"DB"

);

733  if

(db ==

"hapmap2"

) {

734

infos.push_back(

"H2"

);

736  if

(db ==

"hapmap3"

) {

737

infos.push_back(

"H3"

);

742  const

vector<CRef<CDbtag> >& refs = mf.

GetDbxref

();

744  for

( vector<

CRef<CDbtag>

>::const_iterator cit = refs.begin();

745

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

747  const CDbtag

& ref = **cit;

749  if

(!pmids.empty()) {

756  if

(!pmids.empty()) {

758

infos.push_back(

string

(

"PMID="

)+pmids);

765

infos.push_back(

string

(

"AF="

) +

770  if

(rl & VP::eResource_link_preserved) {

771

infos.push_back(

"PM"

);

773  if

(rl & VP::eResource_link_provisional) {

774

infos.push_back(

"TPA"

);

776  if

(rl & VP::eResource_link_has3D) {

777

infos.push_back(

"S3D"

);

779  if

(rl & VP::eResource_link_submitterLinkout) {

780

infos.push_back(

"SLO"

);

782  if

(rl & VP::eResource_link_clinical) {

783

infos.push_back(

"CLN"

);

785  if

(rl & VP::eResource_link_genotypeKit) {

786

infos.push_back(

"HD"

);

791  if

(gl & VP::eGene_location_near_gene_5) {

792

infos.push_back(

"R5"

);

794  if

(gl & VP::eGene_location_near_gene_3) {

795

infos.push_back(

"R3"

);

797  if

(gl & VP::eGene_location_intron) {

798

infos.push_back(

"INT"

);

800  if

(gl & VP::eGene_location_donor) {

801

infos.push_back(

"DSS"

);

803  if

(gl & VP::eGene_location_acceptor) {

804

infos.push_back(

"ASS"

);

806  if

(gl & VP::eGene_location_utr_5) {

807

infos.push_back(

"U5"

);

809  if

(gl & VP::eGene_location_utr_3) {

810

infos.push_back(

"U3"

);

816  if

(effect & VP::eEffect_synonymous) {

817

infos.push_back(

"SYN"

);

819  if

(effect & VP::eEffect_stop_gain) {

820

infos.push_back(

"NSN"

);

822  if

(effect & VP::eEffect_missense) {

823

infos.push_back(

"NSM"

);

825  if

(effect & VP::eEffect_frameshift) {

826

infos.push_back(

"NSF"

);

832  if

(fbv & VP::eFrequency_based_validation_is_mutation) {

833

infos.push_back(

"MUT"

);

835  if

(fbv & VP::eFrequency_based_validation_above_5pct_all) {

836

infos.push_back(

"G3"

);

838  if

(fbv & VP::eFrequency_based_validation_above_5pct_1plus) {

839

infos.push_back(

"G5"

);

841  if

(fbv & VP::eFrequency_based_validation_validated) {

842

infos.push_back(

"VLD"

);

853  if

(

gt

& VP::eGenotype_has_genotypes) {

854

infos.push_back(

"GNO"

);

860  if

(qc & VP::eQuality_check_contig_allele_missing) {

861

infos.push_back(

"NOC"

);

863  if

(qc & VP::eQuality_check_withdrawn_by_submitter) {

864

infos.push_back(

"WTD"

);

866  if

(qc & VP::eQuality_check_non_overlapping_alleles) {

867

infos.push_back(

"NOV"

);

869  if

(qc & VP::eQuality_check_genotype_conflict) {

870

infos.push_back(

"GCF"

);

876

list<CRef<CDbtag> >::const_iterator cit;

877  for

(cit = oids.begin(); cit != oids.end(); ++cit) {

878  const CDbtag

& dbtag = **cit;

890

infos.push_back(

"PH3"

);

892  else if

(

id

== 28889) {

893

infos.push_back(

"KGPhase1"

);

906

vector<string> extraInfos;

909  for

(vector<string>::const_iterator cit = extraInfos.begin();

910

cit != extraInfos.end();

913

vector<string>::iterator fit =

914

std::find(infos.begin(), infos.end(),

value

);

915  if

(fit == infos.end()) {

916

infos.push_back(

value

);

952  m_Os

<<

"\t"

<< values;

static CRef< CScope > m_Scope

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.

@ eExtreme_Positional

numerical value

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.

void GetDate(string *label, bool year_only=false) const

Append a standardized string representation of the date to the label.

EDbtagType GetType(void) const

CSeq_feat_EditHandle –.

CConstRef< CUser_field > GetFieldRef(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const

bool HasField(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const

Verify that a named field exists.

const CUser_field & GetField(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const

Access a named field in this user object.

static void NormalizeVariation(CVariation &var, ETargetContext target_ctxt, CScope &scope)

bool x_WriteFeaturePos(const CMappedFeat &, unsigned int start, const int type)

bool x_WriteHeader(const CSeq_annot &)

bool x_WriteData(const CSeq_annot &)

bool x_WriteFeatureAlt(const unsigned int start, const int type, const string &anchor, const list< int > &alt_types, const vector< string > &alt)

vector< string > m_GenotypeHeaders

virtual SAnnotSelector & SetAnnotSelector(void) override

bool x_WriteFeatureQual(const CMappedFeat &)

bool x_WriteFeatureGenotypeData(const CMappedFeat &)

bool x_WriteInit(const CSeq_annot &)

bool xWriteFeature(CFeat_CI feat_it) override

bool x_WriteFeatureRef(const unsigned int start, const int type, const string &anchor, const string &ref)

bool WriteAnnot(const CSeq_annot &, const string &="", const string &="") override

Write a raw Seq-annot to the internal output stream.

bool x_WriteFeature(const CMappedFeat &)

bool x_WriteFeatureId(const CMappedFeat &)

bool x_WriteFeatureFilter(const CMappedFeat &)

bool x_WriteFeatureChrom(const CMappedFeat &)

bool x_WriteFeatureInfo(const CMappedFeat &)

void x_GetTypeRefAlt(const CVariation_inst &inst, int &rtype, string &ref, list< int > &alt_types, vector< string > &alt)

bool x_WriteMeta(const CSeq_annot &)

bool x_WriteMetaCreateNew(const CSeq_annot &)

CVcfWriter(CScope &, CNcbiOstream &, TFlags=fNormal)

Defines and provides stubs for a general interface to a variety of file formatters.

virtual const CRange< TSeqPos > & GetRange(void) const

bool GetBestId(CSeq_id_Handle idh, CScope &scope, string &best_id) const

unique_ptr< SAnnotSelector > m_Selector

virtual SAnnotSelector & SetAnnotSelector(void)

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

static const column_t columns[]

#define ERR_POST(message)

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

void Error(CExceptionArgs_Base &args)

#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)

virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)

Set object to copy of another one.

void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const

Append a label for this Seq-id to the supplied string.

string GetLabel(const CSeq_id &id)

CBioseq_Handle GetBioseqHandle(const CSeq_id &id)

Get bioseq handle by seq-id.

CSeq_annot_Handle AddSeq_annot(CSeq_annot &annot, TPriority pri=kPriority_Default, EExist action=eExist_Throw)

Add Seq-annot, return its CSeq_annot_Handle.

CSeq_annot_Handle GetSeq_annotHandle(const CSeq_annot &annot, EMissing action=eMissing_Default)

const CSeq_feat::TExts & GetExts(void) const

bool IsSetDbxref(void) const

const CSeqFeatData & GetData(void) const

const CUser_object & GetExt(void) const

bool IsSetExts(void) const

CConstRef< CSeq_feat > GetOriginalSeq_feat(void) const

const CSeq_feat::TDbxref & GetDbxref(void) const

void Replace(const CSeq_feat &new_feat) const

Replace the feature with new Seq-feat object.

bool IsSetExt(void) const

CSeqVector GetSeqVector(EVectorCoding coding, ENa_strand strand=eNa_strand_plus) const

Get sequence: Iupacna or Iupacaa if use_iupac_coding is true.

@ eCoding_Iupac

Set coding to printable coding (Iupacna or Iupacaa)

const CSeq_loc & GetLocation(void) const

TRange GetTotalRange(void) const

const CSeq_feat_Handle & GetSeq_feat_Handle(void) const

Get original feature handle.

SAnnotSelector & SetSortOrder(ESortOrder sort_order)

Set sort order of annotations.

@ eSortOrder_None

do not sort annotations for faster retrieval

void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const

Fill the buffer string with the sequence data for the interval [start, stop).

bool NotEmpty(void) const

TThisType IntersectionWith(const TThisType &r) const

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

IO_PREFIX::ostream CNcbiOstream

Portable alias for ostream.

static string DoubleToString(double value, int precision=-1, TNumToStringFlags flags=0)

Convert double to string.

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 string IntToString(int value, TNumToStringFlags flags=0, int base=10)

Convert int to string.

static string Join(const TContainer &arr, const CTempString &delim)

Join strings using the specified delimiter.

static string UIntToString(unsigned int value, TNumToStringFlags flags=0, int base=10)

Convert UInt to string.

static string & ToLower(string &str)

Convert string to lower case – string& version.

@ fSplit_MergeDelimiters

Merge adjacent delimiters.

static const char label[]

const TStr & GetStr(void) const

Get the variant data.

bool IsStr(void) const

Check if variant Str is selected.

bool IsSetDb(void) const

name of database or system Check if a value has been assigned to Db data member.

bool IsSetType(void) const

type of object within class Check if a value has been assigned to Type data member.

bool IsStd(void) const

Check if variant Std is selected.

const TTag & GetTag(void) const

Get the Tag member data.

const TStrs & GetStrs(void) const

Get the variant data.

bool IsId(void) const

Check if variant Id is selected.

const TData & GetData(void) const

Get the Data member data.

bool CanGetTag(void) const

Check if it is safe to call GetTag method.

bool IsSetTag(void) const

appropriate tag Check if a value has been assigned to Tag data member.

const TFields & GetFields(void) const

Get the variant data.

const TDb & GetDb(void) const

Get the Db member data.

const TStr & GetStr(void) const

Get the variant data.

TReal GetReal(void) const

Get the variant data.

const TType & GetType(void) const

Get the Type member data.

vector< CStringUTF8 > TStrs

TId GetId(void) const

Get the variant data.

const TVariation & GetVariation(void) const

Get the variant data.

ENa_strand

strand of nucleic acid

const Tdata & Get(void) const

Get the member data.

const TDesc & GetDesc(void) const

Get the Desc member data.

bool IsSetDesc(void) const

used only for stand alone Seq-annots Check if a value has been assigned to Desc data member.

bool IsSet(void) const

Check if a value has been assigned to data member.

TType GetType(void) const

Get the Type member data.

const TInstance & GetInstance(void) const

Get the variant data.

bool IsSetFrequency_based_validation(void) const

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

const TVariant_prop & GetVariant_prop(void) const

Get the Variant_prop member data.

bool IsSetResource_link(void) const

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

TFrequency_based_validation GetFrequency_based_validation(void) const

Get the Frequency_based_validation member data.

E_Choice Which(void) const

Which variant is currently selected.

TGenotype GetGenotype(void) const

Get the Genotype member data.

const TSet & GetSet(void) const

Get the variant data.

bool IsSetDelta(void) const

Sequence that replaces the location, in biological order.

bool IsSetVariant_prop(void) const

variant properties bit fields Check if a value has been assigned to Variant_prop data member.

bool IsSetOther_ids(void) const

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

TEffect GetEffect(void) const

Get the Effect member data.

const TId & GetId(void) const

Get the Id member data.

const TDelta & GetDelta(void) const

Get the Delta member data.

const TData & GetData(void) const

Get the Data member data.

TResource_link GetResource_link(void) const

Get the Resource_link member data.

bool IsSetId(void) const

ids (i.e., SNP rsid / ssid, dbVar nsv/nssv) expected values include 'dbSNP|rs12334',...

TAllele_frequency GetAllele_frequency(void) const

Get the Allele_frequency member data.

TQuality_check GetQuality_check(void) const

Get the Quality_check member data.

bool IsSetEffect(void) const

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

bool IsSetGenotype(void) const

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

const TOther_ids & GetOther_ids(void) const

Get the Other_ids member data.

bool IsSetQuality_check(void) const

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

bool IsSetAllele_frequency(void) const

NOTE: 'allele-frequency' here refers to the minor allele frequency of the default population Check if...

TGene_location GetGene_location(void) const

Get the Gene_location member data.

bool IsSetGene_location(void) const

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

const TVariations & GetVariations(void) const

Get the Variations member data.

@ eType_snv

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

@ eType_mnp

delta=[morph of length >1]

@ eType_delins

delta=[del, ins]

@ eType_identity

delta=[]

@ e_Instance

actual sequence-edit at feat.location

constexpr bool empty(list< Ts... >) noexcept

const GenericPointer< typename T::ValueType > T2 value

void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

CConstRef< CUser_object > s_GetVcfMetaInfo(const CSeq_annot &annot)


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