Skip to content

Commit

Permalink
Update sviper and print sviper header to log.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuak94 committed Dec 1, 2019
1 parent 343fc21 commit 4471d67
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion SViper
4 changes: 2 additions & 2 deletions src/alignment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ bool AlignmentManager::load()
++splitReadCount;
}
}

optionManager->setShortReadLength(running_sum / 1000000);
if (!this->isLongRead)
optionManager->setShortReadLength(static_cast<int>(std::round(running_sum / 1000000)));

// dataset contains small number of reads
if (this->maxAbInsSize < 0 && this->readsForMedInsEst.size() != 0)
Expand Down
6 changes: 3 additions & 3 deletions src/calloption.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class CallOptionManager : seqan3::argument_parser
int32_t priMethod;
int32_t filterMethod;
uint32_t threadCount{std::thread::hardware_concurrency()};
unsigned shortReadLength{0};
int shortReadLength{0};
bool writeBreakpoint{false};
bool reportFilteredResult{false};
bool skipRankAggregation{false};
Expand Down Expand Up @@ -124,8 +124,8 @@ class CallOptionManager : seqan3::argument_parser
bool getUseRankAggregation(void) { return !skipRankAggregation; }
void setMinVote(int v) { this->minVote = v;}
bool getPolishing(void) {return !skipPolishing; }
void setShortReadLength(uint32_t average) { this->shortReadLength = average; }
uint32_t getShortReadLength() { return this->shortReadLength; }
void setShortReadLength(int average) { this->shortReadLength = average; }
int getShortReadLength() { return this->shortReadLength; }

// for split-read
double getMinSplitReadSupport(void) { return minSplitReadSupport; }
Expand Down
5 changes: 3 additions & 2 deletions src/vaquita.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ int callMain(int argc, char const ** argv)

// Loading & extraction
RUN_IF(doShortReads, result, "SHORT READ EVIDENCE EXTRACTION", alnMgr.load()); // TODO: segmentation fault if fails (need fix)
printTimeMessage("Estimated short read length is " + std::to_string(oMgr.getShortReadLength()));
if (doShortReads) printTimeMessage("Estimated short read length is " + std::to_string(oMgr.getShortReadLength()));
if (!result && !doLongReads) return 3;
RUN_IF(doLongReads, result, "LONG READ EVIDENCE EXTRACTION", alnMgrLR.load());
if (!result) return 3;
Expand Down Expand Up @@ -159,7 +159,7 @@ int callMain(int argc, char const ** argv)
options.mean_coverage_of_short_reads = avg_read_depth;
options.mean_insert_size_of_short_reads = alnMgr.getInsMedian();
options.stdev_insert_size_of_short_reads = alnMgr.getInsSD();
options.length_of_short_reads = static_cast<int>(oMgr.getShortReadLength());
options.length_of_short_reads = oMgr.getShortReadLength();
sviper::input_output_information info{options};
bpMgrLR.getReadDepth()->longReadDepthCalc();
int lr_depth = static_cast<int>(std::round(bpMgrLR.getReadDepth()->getMedianDepth()));
Expand All @@ -170,6 +170,7 @@ int callMain(int argc, char const ** argv)
!sviper::open_file_success(info.log_file, (info.cmd_options.output_prefix + ".log").c_str()))
return 1;

sviper::print_log_header(options, info.log_file);
// Prepare file hangles for parallel computing
// -------------------------------------------------------------------------
RUN(result, "SViper: PREP PARALLEL PROCESSING", sviper::prep_file_handles(info));
Expand Down

0 comments on commit 4471d67

Please sign in to comment.