Ymir
.9
Fast\C++toolforcomputationofassemblingprobabilities,statisticalinferenceofassemblingstatisticalmodelandgenerationofartificialsequencesofT-cellreceptorsdata.
|
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 |
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".
|
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().
filepath | Path to a file with sequences. |
gene_segments | Alphabets of gene segments. |
seq_type | |
recomb | |
opts | What action to do with columns with V, D and J alignments. |
|
inline |
cloneset | Pointer to clonal repertoire object to which data will be uploaded. |