cgatools::variants::Call Struct Reference

A struct that corresponds to a single line of a Complete Genomics variant file. More...

#include <Call.hpp>

List of all members.

Classes

class  TotalScoreField
class  VarQualityField

Public Types

enum  VarQuality { VAR_QUALITY_EMPTY = 0, VAR_QUALITY_LOW = 1, VAR_QUALITY_HIGH = 2 }

Public Member Functions

 Call ()
 Construct an empty call.
std::string calledSequence (const reference::CrrFile &crr) const
 Returns the called sequence as a string, replacing "=" with the corresponding reference sequence.
std::string refSequence (const reference::CrrFile &crr) const
 Returns the reference sequence as a string, replacing "=" with the corresponding reference sequence.
bool isRefConsistent (const reference::CrrFile &crr) const
 Returns true iff the alleleSeq_ is consistent with the reference.
bool hasNoCalls () const
 Returns true iff this call's sequence sequence contains N or ? characters.
void addFieldParsers (util::DelimitedFile &df, const reference::CrrFile &crr)
 Add fields to parser so that it can parse lines, putting data in this call.
std::ostream & write (std::ostream &out, const reference::CrrFile &crr, const char sep= '\t') const
 Writes the call out, using the given separator charactor.

Static Public Member Functions

static const char * varQualityToString (const VarQuality varQuality)
 Get the string form of varQuality.
static VarQuality parseVarQuality (const char *first, const char *last)
 Parse a varQuality string.
static std::string getHeader (const char separator= '\t')
 Returns header for a call output.

Public Attributes

uint32_t locus_
 The locus column in the variant file.
uint16_t ploidy_
 The ploidy column in the variant file.
uint16_t haplotype_
 The haplotype column in the variant file.
reference::Range range_
 The chromosome, begin, and end columns in the variant file.
std::string varType_
 The varType column in the variant file.
std::string reference_
 The reference column in the variant file.
std::string alleleSeq_
 The alleleSeq column in the variant file.
int32_t varScoreVAF_
 The varScoreVAF column in the variant file.
int32_t varScoreEAF_
 The varScoreEAF column in the variant file.
VarQuality varQuality_
 The varQuality column in the variant file.
std::string hapLink_
 The hapLink column in the variant file.
std::string xRef_
 The xRef column in the variant file.

Static Public Attributes

static const uint16_t ALL_HAPLOTYPES
 The "all" haplotype == [1..ploidy_] haplotypes.
static const uint16_t UNKNOWN_PLOIDY
 Unknown ploidy, normally in no-ref regions on genome.
static const int32_t EMPTY_SCORE
 The in-memory score corresponding to empty score on disk.

Detailed Description

A struct that corresponds to a single line of a Complete Genomics variant file.


Member Function Documentation

void cgatools::variants::Call::addFieldParsers ( util::DelimitedFile df,
const reference::CrrFile crr 
)

Add fields to parser so that it can parse lines, putting data in this call.

std::string cgatools::variants::Call::calledSequence ( const reference::CrrFile crr  )  const

Returns the called sequence as a string, replacing "=" with the corresponding reference sequence.

bool cgatools::variants::Call::hasNoCalls (  )  const

Returns true iff this call's sequence sequence contains N or ? characters.

bool cgatools::variants::Call::isRefConsistent ( const reference::CrrFile crr  )  const

Returns true iff the alleleSeq_ is consistent with the reference.

std::string cgatools::variants::Call::refSequence ( const reference::CrrFile crr  )  const

Returns the reference sequence as a string, replacing "=" with the corresponding reference sequence.


Member Data Documentation

The haplotype column in the variant file.

The value is Call::ALL_HAPLOTYPES if the variant file specifies "all".

The ploidy column in the variant file.

The value is Call::UNKNOWN_PLOIDY if the variant file specifies "?".

The varQuality column in the variant file.

For old var files that have no varQuality, this field gets VAR_QUALITY_EMPTY.

The varScoreEAF column in the variant file.

For older var files that have totalScore instead of varScoreVAF and varScoreEAF, the totalScore is filled into the varScoreEAF column.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated by  doxygen 1.6.2