Oshlack/JAFFA

FASTA file not found when specifying outputName (JAFFA direct)

Rmulet opened this issue · 1 comments

Hi,

I encountered a minor issue when I ran JAFFA direct with the following parameters:

JAFFA/tools/bin/bpipe run -n 15 -p outputName=5360r_jaffa_results -p jaffa_output=jaffa/

The pipeline was interrupted because the "jaffa_results.fasta" file was not found. I believe the problem is that the script get_fusion_seqs.bash takes an optional second argument with the output name, but it is not provided in the compile_all_results stage within the JAFFA_stages.groovy file. However, the function get_fusion_seq() doesn't behave as suggested in the USAGE and the ${outputName} isn't recognized if it is provided with a space in between. What it does is to tokenize the line from the fusion file and assume the last field is the name. Therefore, a quick solution would be as follows:

while read line; do $get_fusion_seqs $line,${outputName}; done < ${outputName}.csv;

Alternatively, get_fusion_seq() can be modified to behave as indicated in the USAGE by tokenizing $1 and using $2 as the outputName. I find this is a bit more elegant because it will also work if the CSV file is empty.

Although it's easy enough to solve, I thought it may save people headaches in the future :)

Thank you for this very detailed information, which includes a fix!
I've rewritten part of the code, including the get_fusion_seq() script to address this issue as well as a couple of others that were reported in recent weeks. These will go into the master branch today, and be part of version 2.3 when we do the next release.