Skip to content

Commit

Permalink
Adding a new fast option using wtdbg for unitigging
Browse files Browse the repository at this point in the history
  • Loading branch information
skoren committed Apr 12, 2018
1 parent 628861e commit 7495d09
Showing 1 changed file with 31 additions and 21 deletions.
52 changes: 31 additions & 21 deletions src/pipelines/canu.pl
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,20 @@

if ($arg eq "-fast") {
# All defaults, unless noted.
setGlobal("corOverlapper", "mhap");
setGlobal("obtOverlapper", "mhap"); # Changed
setGlobal("utgOverlapper", "mhap"); # Changed

setGlobal("corRealign", "false");
setGlobal("obtRealign", "false"); # Changed
setGlobal("utgRealign", "true"); # Changed
#if (-e "$bin/minimap2") {
# setGlobal("corOverlapper", "minimap"); # Changed
# setGlobal("obtOverlapper", "minimap"); # Changed
# setGlobal("utgOverlapper", "minimap"); # Changed
#} else {
setGlobal("corOverlapper", "mhap");
setGlobal("obtOverlapper", "mhap"); # Changed
setGlobal("utgOverlapper", "mhap"); # Changed
#}
setGlobal("utgReAlign", "true"); # Changed

if (-e "$bin/wtdbg-1.2.8") {
setGlobal("unitigger", "wtdbg"); # Changed
}
}

if ($arg eq "-accurate") {
Expand Down Expand Up @@ -640,7 +647,7 @@ ($$)

dumpCorrectedReads($asm);

if (setOptions($mode, "trim") eq "trim") {
if (setOptions($mode, "trim") eq "trim") && uc(getGlobal("unitigger")) ne "WTDBG"){
if (getNumberOfBasesInStore($asm, "utg") == 0) {
print STDERR "--\n";
print STDERR "--\n";
Expand Down Expand Up @@ -672,25 +679,27 @@ ($$)
print STDERR "--\n";

if (gatekeeper($asm, "utg", @inputFiles)) {
merylConfigure($asm, "utg");
merylCheck($asm, "utg") foreach (1..getGlobal("canuIterationMax") + 1);
merylProcess($asm, "utg");
if (uc(getGlobal("unitigger")) ne "WTDBG") {
merylConfigure($asm, "utg");
merylCheck($asm, "utg") foreach (1..getGlobal("canuIterationMax") + 1);
merylProcess($asm, "utg");

overlap($asm, "utg");
overlap($asm, "utg");

#readErrorDetection($asm);
#readErrorDetection($asm);

readErrorDetectionConfigure($asm);
readErrorDetectionCheck($asm) foreach (1..getGlobal("canuIterationMax") + 1);
readErrorDetectionConfigure($asm);
readErrorDetectionCheck($asm) foreach (1..getGlobal("canuIterationMax") + 1);

overlapErrorAdjustmentConfigure($asm);
overlapErrorAdjustmentCheck($asm) foreach (1..getGlobal("canuIterationMax") + 1);
overlapErrorAdjustmentConfigure($asm);
overlapErrorAdjustmentCheck($asm) foreach (1..getGlobal("canuIterationMax") + 1);

updateOverlapStore($asm);
updateOverlapStore($asm);
}

unitig($asm);
unitigCheck($asm) foreach (1..getGlobal("canuIterationMax") + 1);

foreach (1..getGlobal("canuIterationMax") + 1) { # Consensus wants to change the script between the first and
consensusConfigure($asm); # second iterations. The script is rewritten in
consensusCheck($asm); # consensusConfigure(), so we need to add that to the loop.
Expand All @@ -699,8 +708,9 @@ ($$)
consensusLoad($asm);
consensusAnalyze($asm);

alignGFA($asm) foreach (1..getGlobal("canuIterationMax") + 1);

if (uc(getGlobal("unitigger")) ne "WTDBG") {
alignGFA($asm) foreach (1..getGlobal("canuIterationMax") + 1);
}
generateOutputs($asm);
}
}
Expand Down

0 comments on commit 7495d09

Please sign in to comment.