Ymir  .9
Fast\C++toolforcomputationofassemblingprobabilities,statisticalinferenceofassemblingstatisticalmodelandgenerationofartificialsequencesofT-cellreceptorsdata.
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ymir::RepertoireParser< Aligner > Class Template Reference

Parser for text files with repertoire data. By default it's MiTCR parser. To make new parsers inherit from this class and rewrite virtual private method "parseRepertoire". More...

#include <parser.h>

Public Types

typedef Json::Value ParserConfig
 Parameters of this parser: parser's name, names of the columns, separators, sequences and other.
 

Public Member Functions

bool open (const std::string &filepath, const VDJRecombinationGenes &gene_segments, SequenceType seq_type, Recombination recomb, AlignmentColumnOptions opts=AlignmentColumnOptions().setV(AlignmentColumnOptions::USE_PROVIDED).setJ(AlignmentColumnOptions::USE_PROVIDED).setD(AlignmentColumnOptions::OVERWRITE), VDJAlignerParameters params=VDJAlignerParameters())
 Parse text file with sequence alignment data and return constructed Cloneset. More...
 
bool parse (Cloneset *cloneset, size_t max_clonotype_count=(size_t)-1)
 
bool openAndParse (const std::string &filepath, Cloneset *cloneset, const VDJRecombinationGenes &gene_segments, SequenceType seq_type, Recombination recomb, AlignmentColumnOptions opts=AlignmentColumnOptions().setV(AlignmentColumnOptions::USE_PROVIDED).setJ(AlignmentColumnOptions::USE_PROVIDED).setD(AlignmentColumnOptions::OVERWRITE), VDJAlignerParameters params=VDJAlignerParameters())
 

Protected Member Functions

void parseRepertoire (ClonotypeVector &vec, size_t max_clonotype_count)
 
template<GeneSegments GENE>
void parseSegment (stringstream &symbol_stream, const string &segment_word, vector< seg_index_t > &segvec, const GeneSegmentAlphabet &gsa, size_t line_num, char segment_sep, string &temp_str)
 
void parseAlignment (stringstream &symbol_stream, const string &segment_word, const vector< seg_index_t > &segvec, GeneSegments gene, const GeneSegmentAlphabet &gsa, size_t line_num, char segment_sep, char internal_sep, string &temp_str, stringstream &temp_stream)
 
std::string get_prefix (const string &filename) const
 

Protected Attributes

std::ifstream _stream
 
VDJRecombinationGenes _genes
 
Recombination _recomb
 
AlignmentColumnOptions _opts
 
SequenceType _seq_type
 
RepertoireParserStatistics _stats
 
Aligner _aligner
 
bool _status
 
bool _read_header
 

Detailed Description

template<typename Aligner>
class ymir::RepertoireParser< Aligner >

Parser for text files with repertoire data. By default it's MiTCR parser. To make new parsers inherit from this class and rewrite virtual private method "parseRepertoire".

Member Function Documentation

template<typename Aligner >
bool ymir::RepertoireParser< Aligner >::open ( const std::string &  filepath,
const VDJRecombinationGenes gene_segments,
SequenceType  seq_type,
Recombination  recomb,
AlignmentColumnOptions  opts = AlignmentColumnOptions().setV(AlignmentColumnOptions::USE_PROVIDED).setJ(AlignmentColumnOptions::USE_PROVIDED).setD(AlignmentColumnOptions::OVERWRITE),
VDJAlignerParameters  params = VDJAlignerParameters() 
)
inline

Parse text file with sequence alignment data and return constructed Cloneset.

Parse all lines in the file and return a repertoire. If no alignments found or any of align_* parameters is true, create alignment using input aligner from function loadFile().

Parameters
filepathPath to a file with sequences.
gene_segmentsAlphabets of gene segments.
seq_type
recomb
optsWhat action to do with columns with V, D and J alignments.
Returns
True if found has been successfully processed, false otherwise.
template<typename Aligner >
bool ymir::RepertoireParser< Aligner >::parse ( Cloneset cloneset,
size_t  max_clonotype_count = (size_t)-1 
)
inline
Parameters
clonesetPointer to clonal repertoire object to which data will be uploaded.

The documentation for this class was generated from the following file: