sanger-pathogens / assembly_improvement

Improve the quality of a denovo assembly by scaffolding and gap filling
Other
56 stars 21 forks source link

Call to SSPACE dies due to invalid config file (expects aligner as second argument) #67

Open coffeetocode opened 7 years ago

coffeetocode commented 7 years ago

It looks like maybe the expected input to SSPACE has changed since assembly_improvement was originally released.

Running against the latest SSPACE (SSPACE-STANDARD-3.0_linux-x86_64) produces errors like:

ERROR: Invalid aligner in library LIB: /data/thesisWGS/AW01/_5AzmruAqQ/AW-1_S1_L001_R1_001.fastq. Should be either 'bowtie', 'bwa' or 'bwasw' -- fatal

(There's a similar error message in the code for GapFiller, but I confirmed that at runtime it's coming from SSPACE by adding debug statements to SSPACE to print the path of the library file it's attempting to process)

The current version of AssemblyImprovement installed from cpan (and also here in git at AssemblyImprovement/Scaffold/SSpace/Config.pm) creates a _scaffolder_config_file that looks like:

$ cat /data/thesisWGS/AW01/8Y4EvoYYIc/KToMu7SX1I/_scaffolder_config_file
LIB /data/thesisWGS/AW01/_5AzmruAqQ/AW-1_S1_L001_R1_001.fastq /data/thesisWGS/AW01/_5AzmruAqQ/AW-1_S1_L001_R2_001.fastq 350 0.3 FR

The first two args are: "LIB" (hardcoded placeholder library name), followed by path to the forward read.

Compare to the current SSPACE example, where the aligner is the second arg:

$ cat ~/tools/SSPACE-STANDARD-3.0_linux-x86_64/example/libraries.txt
lib1 bowtie SRR001665_1.fastq SRR001665_2.fastq 200 0.25 FR

I don't have previous versions of SSPACE to confirm that it changed at some point, but that seems to be the most plausible explanation.

It seems like the most reasonable fix is to add a mapper arg as is used in AssemblyImprovement/FillGaps/GapFiller/Config.pm, also defaulting to "bwa".

I can add a simple pull request to implement that, but I'm hoping someone can shed light on why/when the SSPACE expected params changed so that we don't break backward compatibility.