StochHMM
v0.34
Flexible Hidden Markov Model C++ Library and Application
|
#include <seqTracks.h>
Public Member Functions | |
seqTracks () | |
Create an empty initialized seqTrack. | |
seqTracks (model &, std::string &) | |
seqTracks (model &, std::string &, SeqFileFormat) | |
seqTracks (model &, std::string &, SeqFileFormat, TrackFuncs *) | |
seqTracks (model &, std::vector< std::string > &, SeqFileFormat, SeqFilesType) | |
seqTracks (model &, std::vector< std::string > &, SeqFileFormat, SeqFilesType, TrackFuncs *) | |
seqTracks (models &, std::string &, SeqFileFormat, pt2Attrib *) | |
seqTracks (models &, std::string &, SeqFileFormat, pt2Attrib *, TrackFuncs *) | |
seqTracks (models &, std::vector< std::string > &, SeqFileFormat, SeqFilesType, pt2Attrib *) | |
seqTracks (models &, std::vector< std::string > &, SeqFileFormat, SeqFilesType, pt2Attrib *, TrackFuncs *) | |
~seqTracks () | |
Destroy seqTracks. | |
bool | loadSeqs (model &, std::string &) |
bool | loadSeqs (model &, std::string &, SeqFileFormat) |
bool | loadSeqs (model &, std::string &, SeqFileFormat, TrackFuncs *) |
bool | loadSeqs (model &, std::vector< std::string > &, SeqFileFormat, SeqFilesType) |
bool | loadSeqs (model &, std::vector< std::string > &, SeqFileFormat, SeqFilesType, TrackFuncs *) |
bool | loadSeqs (models &, std::string &, SeqFileFormat, pt2Attrib *, TrackFuncs *) |
bool | loadSeqs (models &, std::string &, SeqFileFormat) |
bool | loadSeqs (models &, std::vector< std::string > &, SeqFileFormat, SeqFilesType, pt2Attrib *, TrackFuncs *) |
bool | loadSeqs (models &, std::vector< std::string > &, SeqFileFormat, SeqFilesType) |
bool | loadSeqs (models &, std::vector< std::string > &, SeqFileFormat, SeqFilesType, pt2Attrib *) |
void | setAttribFunc (pt2Attrib *func) |
Sets the function to evaluate the which model to use with a particular sequence. | |
void | setTrackFunc (TrackFuncs *func) |
Sets a trackfunction that will be evaluated to generate a necessary track for the model. | |
void | setNumImportJobs (size_t value) |
void | setTrackFilename (std::string &, std::string &) |
bool | getNext () |
Get the next sequence job. | |
bool | importJobs () |
Get a job and Add to the queue. | |
seqJob * | getJob () |
sequence * | getFasta (int) |
sequence * | getFastq (int) |
sequence * | getReal (int) |
size_t | size (void) |
size_t | getTrackCount () |
void | print () |
Print the seqTracks to stdout. | |
void | getInformation () |
float | remainingSeqs () |
Private Member Functions | |
ExDefSequence * | getExDef (int, int) |
bool | _loadFASTA (std::string &, SeqFilesType) |
bool | _loadFASTA (std::vector< std::string > &, SeqFilesType) |
bool | _loadFASTQ (std::string &, SeqFilesType) |
bool | _loadFASTQ (std::vector< std::string > &, SeqFilesType) |
bool | _initImportTrackInfo (void) |
void | _reset () |
void | _init () |
bool | _open () |
bool | _close () |
Private Attributes | |
std::vector< std::ifstream * > | filehandles |
std::vector< std::string > | seqFilenames |
size_t | numImportJobs |
bool | good |
TrackFuncs * | trackFunctions |
pt2Attrib * | attribModelFunc |
int | TrackToUseForAttrib |
stateInfo * | info |
std::vector< std::pair< int, trackType > > | importTracks |
std::vector< ppTrack > | postprocessTracks |
models * | hmms |
model * | hmm |
tracks * | modelTracks |
SeqFileFormat | seqFormat |
SeqFilesType | fileType |
size_t | trackCount |
stringList | input |
std::queue< seqJob * > | jobQueue |
size_t | jobs |
int | exit_thread |
Definition at line 90 of file seqTracks.h.
StochHMM::seqTracks::seqTracks | ( | ) |
Create an empty initialized seqTrack.
Definition at line 34 of file seqTracks.cpp.
References _init().
StochHMM::seqTracks::seqTracks | ( | model & | mdl, |
std::string & | filename | ||
) |
Create, initialize, and start loading sequence file
mdl | Single model |
filename | Sequence File filename |
format | Sequence file Format (FASTA or FASTQ) |
Definition at line 45 of file seqTracks.cpp.
References _init(), StochHMM::FASTA, and loadSeqs().
StochHMM::seqTracks::seqTracks | ( | model & | mdl, |
std::string & | filename, | ||
SeqFileFormat | format | ||
) |
Create, initialize, and start loading sequence file
mdl | Single model |
filename | Sequence File filename |
format | Sequence file Format (FASTA or FASTQ) |
Definition at line 58 of file seqTracks.cpp.
References _init(), and loadSeqs().
StochHMM::seqTracks::seqTracks | ( | model & | mdl, |
std::string & | filename, | ||
SeqFileFormat | format, | ||
TrackFuncs * | trFunc | ||
) |
Create, initialize, and start loading sequence file
mdl | Single model |
filename | Sequence File filename |
format | Sequence file Format (FASTA or FASTQ) |
trFunc | TrackFunc* functions to create tracks based on imported sequences |
Definition at line 71 of file seqTracks.cpp.
References _init(), and loadSeqs().
StochHMM::seqTracks::seqTracks | ( | model & | mdl, |
std::vector< std::string > & | filenames, | ||
SeqFileFormat | format, | ||
SeqFilesType | type | ||
) |
Create, initialize, and start loading sequence file
mdl | Single model |
filenames | List of Sequence File filenames |
format | Sequence file Format (FASTA or FASTQ) |
type | Single track per file (SINGLE) or multiple tracks per file (MULTI) |
Definition at line 88 of file seqTracks.cpp.
References _init(), and loadSeqs().
StochHMM::seqTracks::seqTracks | ( | model & | mdl, |
std::vector< std::string > & | filenames, | ||
SeqFileFormat | format, | ||
SeqFilesType | type, | ||
TrackFuncs * | trFunc | ||
) |
Create, initialize, and start loading sequence file
mdl | Single Model |
filenames | List of Sequence File filenames |
format | Sequence file Format (FASTA or FASTQ) |
type | Single track per file (SINGLE) or multiple tracks per file (MULTI) |
trFunc | TrackFunc* functions to create tracks based on imported sequences |
Definition at line 103 of file seqTracks.cpp.
References _init(), and loadSeqs().
StochHMM::seqTracks::seqTracks | ( | models & | mdls, |
std::string & | filename, | ||
SeqFileFormat | format, | ||
pt2Attrib * | attribFunc | ||
) |
Create, initialize, and start loading sequence file
mdls | Multiple models |
filename | Sequence File filename |
format | Sequence file Format (FASTA or FASTQ) |
attribFunc | pt2Attrib function to choose model based on sequence attributes |
Definition at line 121 of file seqTracks.cpp.
References _init(), and loadSeqs().
StochHMM::seqTracks::seqTracks | ( | models & | mdls, |
std::string & | filename, | ||
SeqFileFormat | format, | ||
pt2Attrib * | attribFunc, | ||
TrackFuncs * | trFunc | ||
) |
Create, initialize, and start loading sequence file
mdls | Multiple models |
filename | Sequence File filename |
format | Sequence file Format (FASTA or FASTQ) |
attribFunc | pt2Attrib function to choose model based on sequence attributes |
trFunc | TrackFunc* functions to create tracks based on imported sequences |
Definition at line 136 of file seqTracks.cpp.
References _init(), and loadSeqs().
StochHMM::seqTracks::seqTracks | ( | models & | mdls, |
std::vector< std::string > & | filenames, | ||
SeqFileFormat | format, | ||
SeqFilesType | type, | ||
pt2Attrib * | attribFunc | ||
) |
Create, initialize, and start loading sequence file
mdls | Multiple models |
filenames | List of Sequence File filenames |
format | Sequence file Format (FASTA or FASTQ) |
type | Single track per file (SINGLE) or multiple tracks per file (MULTI) |
attribFunc | pt2Attrib function to choose model based on sequence attributes |
Definition at line 153 of file seqTracks.cpp.
References _init(), and loadSeqs().
StochHMM::seqTracks::seqTracks | ( | models & | mdls, |
std::vector< std::string > & | filenames, | ||
SeqFileFormat | format, | ||
SeqFilesType | type, | ||
pt2Attrib * | attribFunc, | ||
TrackFuncs * | trFunc | ||
) |
Create, initialize, and start loading sequence file
mdls | Multiple models |
filenames | List of Sequence File filenames |
format | Sequence file Format (FASTA or FASTQ) |
type | Single track per file (SINGLE) or multiple tracks per file (MULTI) |
attribFunc | pt2Attrib function to choose model based on sequence attributes |
trFunc | TrackFunc* functions to create tracks based on imported sequences |
Definition at line 169 of file seqTracks.cpp.
References _init(), and loadSeqs().
StochHMM::seqTracks::~seqTracks | ( | ) |
Destroy seqTracks.
Definition at line 180 of file seqTracks.cpp.
References attribModelFunc, filehandles, hmms, jobQueue, and trackFunctions.
|
private |
Definition at line 971 of file seqTracks.cpp.
References filehandles, fileType, importTracks, seqFilenames, and StochHMM::SINGLE_TRACK.
Referenced by getJob(), and importJobs().
|
private |
Definition at line 202 of file seqTracks.cpp.
References attribModelFunc, exit_thread, StochHMM::FASTA, fileType, good, hmm, hmms, jobs, numImportJobs, seqFormat, StochHMM::SINGLE_TRACK, and trackFunctions.
Referenced by seqTracks().
|
private |
Definition at line 622 of file seqTracks.cpp.
References StochHMM::ppTrack::func, StochHMM::track::getAlphaType(), StochHMM::model::getTrack(), StochHMM::track::getTrackFunction(), StochHMM::model::getTrackIter(), StochHMM::model::getTracks(), StochHMM::track::getTrackToUse(), hmm, hmms, importTracks, StochHMM::track::isTrackFuncDefined(), modelTracks, postprocessTracks, StochHMM::model::track_size(), trackCount, StochHMM::ppTrack::trackNumber, and StochHMM::ppTrack::trackToUse.
Referenced by loadSeqs().
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 890 of file seqTracks.cpp.
References filehandles, fileType, good, importTracks, seqFilenames, and StochHMM::SINGLE_TRACK.
Referenced by getJob(), importJobs(), and loadSeqs().
|
private |
Definition at line 227 of file seqTracks.cpp.
References exit_thread, StochHMM::FASTA, filehandles, fileType, good, hmm, hmms, importTracks, seqFilenames, seqFormat, and StochHMM::SINGLE_TRACK.
Referenced by loadSeqs().
|
private |
sequence* StochHMM::seqTracks::getFasta | ( | int | ) |
sequence* StochHMM::seqTracks::getFastq | ( | int | ) |
void StochHMM::seqTracks::getInformation | ( | ) |
seqJob * StochHMM::seqTracks::getJob | ( | ) |
Get the next sequence(s) and model from the job queue *If the number of jobs falls below MIN_JOBS/2 then refill the queue *Else give pointer to the next job in the queue
Definition at line 577 of file seqTracks.cpp.
References _close(), _open(), fileType, getNext(), good, importTracks, jobQueue, jobs, numImportJobs, seqFilenames, and StochHMM::SINGLE_TRACK.
Referenced by main().
bool StochHMM::seqTracks::getNext | ( | ) |
Get the next sequence job.
Definition at line 696 of file seqTracks.cpp.
References StochHMM::sequences::addSeq(), attribModelFunc, StochHMM::sequence::exDefDefined(), StochHMM::FASTA, filehandles, fileType, StochHMM::model::getDistanceToAttrib(), StochHMM::sequence::getExDef(), StochHMM::sequence::getFasta(), StochHMM::sequence::getFastq(), StochHMM::sequences::getLength(), StochHMM::sequence::getReal(), StochHMM::sequences::getUndigitized(), good, hmm, StochHMM::seqJob::hmm, hmms, importTracks, info, jobQueue, jobs, StochHMM::min(), modelTracks, postprocessTracks, StochHMM::REAL, seqFilenames, seqFormat, StochHMM::seqJob::set, StochHMM::sequences::setExDef(), StochHMM::sequences::setLength(), StochHMM::seqJob::setSeqFilename(), StochHMM::SINGLE_TRACK, StochHMM::models::size(), SIZE_MAX, trackCount, and TrackToUseForAttrib.
Referenced by getJob(), and importJobs().
sequence* StochHMM::seqTracks::getReal | ( | int | ) |
|
inline |
bool StochHMM::seqTracks::importJobs | ( | ) |
Get a job and Add to the queue.
Definition at line 677 of file seqTracks.cpp.
References _close(), _open(), getNext(), good, importTracks, jobs, numImportJobs, and seqFilenames.
Referenced by loadSeqs().
bool StochHMM::seqTracks::loadSeqs | ( | model & | mod, |
std::string & | seqFile | ||
) |
Load the fasta sequence file
mod | Model to be used |
seqFile | Fasta sequence filename |
Definition at line 261 of file seqTracks.cpp.
References StochHMM::FASTA.
Referenced by import_sequence(), loadSeqs(), and seqTracks().
bool StochHMM::seqTracks::loadSeqs | ( | model & | mod, |
std::string & | seqFile, | ||
SeqFileFormat | format | ||
) |
Load the fasta sequence file
mod | Model to be used |
seqFile | Fasta sequence filename |
Definition at line 269 of file seqTracks.cpp.
References loadSeqs().
bool StochHMM::seqTracks::loadSeqs | ( | model & | mod, |
std::string & | seqFile, | ||
SeqFileFormat | format, | ||
TrackFuncs * | trFuncs | ||
) |
Load the fasta sequence file
mod | Model to be used |
seqFile | Sequence filename |
Definition at line 277 of file seqTracks.cpp.
References _initImportTrackInfo(), _open(), _reset(), filehandles, fileType, StochHMM::model::getStateInfo(), hmm, importJobs(), importTracks, info, StochHMM::MULTI_TRACK, seqFilenames, seqFormat, StochHMM::SINGLE_TRACK, and trackFunctions.
bool StochHMM::seqTracks::loadSeqs | ( | model & | mod, |
std::vector< std::string > & | seqFiles, | ||
SeqFileFormat | format, | ||
SeqFilesType | type | ||
) |
Load the fasta sequence files
mod | Model to be used |
seqFile | Fasta sequence filenames |
type | SINGLE track per file or MULTI tracks per file |
Definition at line 315 of file seqTracks.cpp.
References loadSeqs().
bool StochHMM::seqTracks::loadSeqs | ( | model & | mod, |
std::vector< std::string > & | seqFiles, | ||
SeqFileFormat | format, | ||
SeqFilesType | type, | ||
TrackFuncs * | trFuncs | ||
) |
Load the fasta sequence files
mod | Model to be used |
seqFile | Fasta sequence filenames |
type | SINGLE track per file or MULTI tracks per file |
trFuncs | Track Functions to create tracks using imported seqs |
Definition at line 325 of file seqTracks.cpp.
References _initImportTrackInfo(), _open(), _reset(), filehandles, fileType, StochHMM::model::getStateInfo(), hmm, importJobs(), importTracks, info, seqFilenames, seqFormat, StochHMM::SINGLE_TRACK, and trackFunctions.
bool StochHMM::seqTracks::loadSeqs | ( | models & | mModels, |
std::string & | seqFile, | ||
SeqFileFormat | format, | ||
pt2Attrib * | attribFunc, | ||
TrackFuncs * | trFuncs | ||
) |
Load the fasta sequence file
mModels | Models to be used |
seqFile | Sequence filename |
format | Sequence File Format |
attribFunc | Pointer to Attribute calculation function |
trFuncs | Pointer to Track Functions |
Definition at line 405 of file seqTracks.cpp.
References _initImportTrackInfo(), _open(), _reset(), attribModelFunc, filehandles, fileType, StochHMM::models::getModel(), StochHMM::model::getStateInfo(), hmms, importJobs(), importTracks, info, StochHMM::MULTI_TRACK, seqFilenames, seqFormat, StochHMM::SINGLE_TRACK, and trackFunctions.
bool StochHMM::seqTracks::loadSeqs | ( | models & | mModels, |
std::string & | seqFile, | ||
SeqFileFormat | format | ||
) |
Load the fasta sequence file
mModels | Models to be used |
seqFile | Fasta sequence filename |
Definition at line 467 of file seqTracks.cpp.
References loadSeqs().
bool StochHMM::seqTracks::loadSeqs | ( | models & | mModels, |
std::vector< std::string > & | seqFiles, | ||
SeqFileFormat | format, | ||
SeqFilesType | type, | ||
pt2Attrib * | attribFunc, | ||
TrackFuncs * | trFuncs | ||
) |
Load the fasta sequence files
mModels | Models to be used |
seqFiles | Fasta sequence filenames |
Definition at line 480 of file seqTracks.cpp.
References _initImportTrackInfo(), _open(), _reset(), attribModelFunc, filehandles, fileType, StochHMM::models::getModel(), StochHMM::model::getStateInfo(), hmms, importJobs(), importTracks, info, seqFilenames, seqFormat, StochHMM::SINGLE_TRACK, and trackFunctions.
bool StochHMM::seqTracks::loadSeqs | ( | models & | mModels, |
std::vector< std::string > & | seqFiles, | ||
SeqFileFormat | format, | ||
SeqFilesType | type | ||
) |
Load the fasta sequence files
mModels | Models to be used |
seqFiles | Fasta sequence filenames |
Definition at line 561 of file seqTracks.cpp.
References loadSeqs().
bool StochHMM::seqTracks::loadSeqs | ( | models & | mModels, |
std::vector< std::string > & | seqFiles, | ||
SeqFileFormat | format, | ||
SeqFilesType | type, | ||
pt2Attrib * | attribFunc | ||
) |
Load the fasta sequence files
mModels | Models to be used |
seqFiles | Fasta sequence filenames |
Definition at line 569 of file seqTracks.cpp.
References loadSeqs().
void StochHMM::seqTracks::print | ( | ) |
|
inline |
Definition at line 173 of file seqTracks.h.
References importTracks, and seqFilenames.
|
inline |
Sets the function to evaluate the which model to use with a particular sequence.
Definition at line 150 of file seqTracks.h.
References attribModelFunc.
|
inline |
void StochHMM::seqTracks::setTrackFilename | ( | std::string & | , |
std::string & | |||
) |
|
inline |
Sets a trackfunction that will be evaluated to generate a necessary track for the model.
Definition at line 153 of file seqTracks.h.
References trackFunctions.
|
inline |
|
private |
Definition at line 186 of file seqTracks.h.
Referenced by _init(), getNext(), loadSeqs(), setAttribFunc(), and ~seqTracks().
|
private |
Definition at line 215 of file seqTracks.h.
|
private |
Definition at line 180 of file seqTracks.h.
Referenced by _close(), _open(), _reset(), getNext(), loadSeqs(), and ~seqTracks().
|
private |
Definition at line 202 of file seqTracks.h.
Referenced by _close(), _init(), _open(), _reset(), getJob(), getNext(), and loadSeqs().
|
private |
Definition at line 183 of file seqTracks.h.
Referenced by _init(), _open(), _reset(), getJob(), getNext(), and importJobs().
|
private |
Definition at line 198 of file seqTracks.h.
Referenced by _init(), _initImportTrackInfo(), _reset(), getNext(), and loadSeqs().
|
private |
Definition at line 197 of file seqTracks.h.
Referenced by _init(), _initImportTrackInfo(), _reset(), getNext(), loadSeqs(), and ~seqTracks().
|
private |
Definition at line 193 of file seqTracks.h.
Referenced by _close(), _initImportTrackInfo(), _open(), _reset(), getJob(), getNext(), importJobs(), loadSeqs(), and remainingSeqs().
|
private |
Definition at line 191 of file seqTracks.h.
Referenced by getNext(), and loadSeqs().
|
private |
Definition at line 209 of file seqTracks.h.
|
private |
Definition at line 213 of file seqTracks.h.
Referenced by getJob(), getNext(), print(), size(), and ~seqTracks().
|
private |
Definition at line 214 of file seqTracks.h.
Referenced by _init(), getJob(), getNext(), and importJobs().
|
private |
Definition at line 199 of file seqTracks.h.
Referenced by _initImportTrackInfo(), and getNext().
|
private |
Definition at line 182 of file seqTracks.h.
Referenced by _init(), getJob(), importJobs(), and setNumImportJobs().
|
private |
Definition at line 194 of file seqTracks.h.
Referenced by _initImportTrackInfo(), and getNext().
|
private |
Definition at line 181 of file seqTracks.h.
Referenced by _close(), _open(), _reset(), getJob(), getNext(), importJobs(), loadSeqs(), and remainingSeqs().
|
private |
Definition at line 201 of file seqTracks.h.
Referenced by _init(), _reset(), getNext(), and loadSeqs().
|
private |
Definition at line 208 of file seqTracks.h.
Referenced by _initImportTrackInfo(), getNext(), and getTrackCount().
|
private |
Definition at line 185 of file seqTracks.h.
Referenced by _init(), loadSeqs(), setTrackFunc(), and ~seqTracks().
|
private |
Definition at line 189 of file seqTracks.h.
Referenced by getNext().