MCPcopy Create free account
hub / github.com/OpenGene/fastplong / initWriterForSplit

Method initWriterForSplit

src/threadconfig.cpp:72–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70
71
72void ThreadConfig::initWriterForSplit() {
73 if(mOptions->out.empty())
74 return ;
75
76 // use 1-based naming
77 string num = to_string(mWorkingSplit + 1);
78 // padding for digits like 0001
79 if(mOptions->split.digits > 0){
80 while(num.size() < mOptions->split.digits)
81 num = "0" + num;
82 }
83
84 string filename1 = joinpath(dirname(mOptions->out), num + "." + basename(mOptions->out));
85 initWriter(filename1);
86}
87
88void ThreadConfig::markProcessed(long readNum) {
89 mCurrentSplitReads += readNum;

Callers 1

initConfigMethod · 0.80

Calls 4

joinpathFunction · 0.85
dirnameFunction · 0.85
basenameFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected