Skip to content

Commit

Permalink
Default max coverage to 50x for hifi datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
skoren authored and brianwalenz committed Feb 25, 2020
1 parent d521766 commit 7ce4846
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/pipelines/canu.pl
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,6 @@
# Fail if any thing flagged an error condition;

configureAssembler(); # Set job sizes and etc bases on genomeSize and hosts available.
checkParameters(); # Check all parameters (except error rates) are valid and consistent.
printHelp(); # And one final last chance to fail.

# Make space for us to work in, and move there.

Expand Down Expand Up @@ -627,6 +625,7 @@
setGlobalIfUndef("utgErrorRate", 0.010);
setGlobalIfUndef("cnsErrorRate", 0.050);
setGlobalIfUndef("homoPolyCompress", 1);
setGlobalIfUndef("maxInputCoverage", 50);
setGlobalIfUndef("batOptions", "-eg 0.0003 -sb 0.01 -dg 0 -db 3 -dr 0 -ca 50 -cp 5");
}

Expand All @@ -643,6 +642,9 @@
$mode = "assemble" if ($numCorTri > 0);
}

checkParameters(); # Check all parameters (except error rates) are valid and consistent.
printHelp(); # And one final last chance to fail.

################################################################################

# Go!
Expand Down
8 changes: 5 additions & 3 deletions src/pipelines/canu/Defaults.pm
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ sub setDefaults () {
setDefault("maxThreads", undef, "Maximum number of compute threads to use by any component of the assembler");

setDefault("minInputCoverage", 10, "Stop if input coverage is too low; default 10");
setDefault("maxInputCoverage", 200, "If input coverage is high, downsample to something reasonable; default 200");
setDefault("maxInputCoverage", undef, "If input coverage is high, downsample to something reasonable; default 200");

##### Stopping conditions

Expand Down Expand Up @@ -1556,7 +1556,10 @@ sub checkParameters () {
print STDERR "-- WARNING: 'readSamplingCoverage' will be removed in the next release.\n";
print STDERR "--\n";

setGlobal("maxInputCoverage", getGlobal("readSamplingBias"));
setGlobal("maxInputCoverage", getGlobal("readSamplingCoverage"));
}
if (!defined(getGlobal("maxInputCoverage"))) {
setGlobal("maxInputCoverage", 200);
}
if (getGlobal("maxInputCoverage") eq "all") {
setGlobal("maxInputCoverage", 0);
Expand All @@ -1574,7 +1577,6 @@ sub checkParameters () {
addCommandLineError("ERROR: stopOnLowCoverage ($minc) must be less than maxInputCoverage ($maxc).\n");
}


if ((getGlobal("saveOverlaps") ne "0") &&
(getGlobal("saveOverlaps") ne "1")) {
addCommandLineError("ERROR: Invalid 'saveOverlaps' specified (" . getGlobal("saveOverlaps") . "); must be 'true' or 'false'\n");
Expand Down

0 comments on commit 7ce4846

Please sign in to comment.