Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--host_fasta_bowtie2index path taken for bowtie -S output file #694

Open
MeriamOs opened this issue Oct 16, 2024 · 2 comments
Open

--host_fasta_bowtie2index path taken for bowtie -S output file #694

MeriamOs opened this issue Oct 16, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@MeriamOs
Copy link

MeriamOs commented Oct 16, 2024

Description of the bug

When I run nf-core/mag with the

--host_fasta_bowtie2index "/path/to/references/"

The bowtie log file gives me the following warning

Warning: Output file './references/reference_name' was specified without -S.  This will not work in future Bowtie 2 versions.  Please use -S instead.

It creates an additional file './references/reference_name', directly in the directory I specified with the --host_fasta_bowtie2index parameter.

Bowtie2 doesn't give a direct error, but I assume the rest of the command can't find the -S output. There are no reads written to the mapped.fastq.gz and unmapped.fastq.gz files, resulting in the rest of the pipeline to fail because there are no reads to analyse.

So it actually failed with Prodigal with the following error:

Command executed:

  pigz -cdf MEGAHIT-sample.contigs.fa | prodigal \
      -p meta \
      -f gff \
      -d "sample.fna" \
      -o "sample.gff" \
      -a "sample.faa" \
      -s "sample_all.txt"
  
  pigz -nm sample*
  
  cat <<-END_VERSIONS > versions.yml
  "NFCORE_MAG:MAG:PRODIGAL":
      prodigal: $(prodigal -v 2>&1 | sed -n 's/Prodigal V\(.*\):.*/\1/p')
      pigz: $(pigz -V 2>&1 | sed 's/pigz //g')
  END_VERSIONS

Command exit status:
  18

Command output:
  (empty)

It runs fine when I remove the --host_fasta_bowtie2index parameter.

Command used and terminal output

nextflow run nf-core/mag \
    -r 3.1.0 \
    -profile singularity \
    -c tower.config \
    -with-tower \
    --input "samplesheet.csv" \
    --outdir "/path/to/04-analysis/mag/" \
    --multiqc_title "test_mag" \
    --host_fasta "/path/to/references/reference.fna" \
    --host_fasta_bowtie2index "/path/to/references/" \
    --save_hostremoved_reads \
    --bbnorm \
    --reads_minlength 30 \
    --ancient_dna \
    --refine_bins_dastool \
    --binning_map_mode own \
    --skip_spades \
    --skip_metaeuk \
    --busco_db "/patho/to/busco/bacteria_odb10/" \
    --run_gunc \
    --gunc_db "/path/to/diamond/database/gunc_db_progenomes2.1.dmnd" \
    --postbinning_input both \
    --gtdb_db "/path/to/gtdbtk_220/" \
    --save_assembly_mapped_reads \
    -resume

Relevant files

No response

System information

Nextflow version 24.04.4
nf-core/mag version 3.1.0
Singularity

@MeriamOs MeriamOs added the bug Something isn't working label Oct 16, 2024
@MeriamOs
Copy link
Author

MeriamOs commented Oct 16, 2024

When I go into one of the work directories where the bowtie command gets executed and run

INDEX=`find -L ./ -name "*.rev.1.bt2" | sed "s/\.rev.1.bt2$//"`
[ -z "$INDEX" ] && INDEX=`find -L ./ -name "*.rev.1.bt2l" | sed "s/\.rev.1.bt2l$//"`
[ -z "$INDEX" ] && echo "Bowtie2 index files not found" 1>&2 && exit 1

echo $INDEX

It outputs:

./references/.             ./references/reference_name

So I think the problem lies in that part?

@jfy133
Copy link
Member

jfy133 commented Oct 17, 2024

Hrm, this is a confusing one because:

Warning: Output file './references/reference_name' was specified without -S.  This will not work in future Bowtie 2 versions.  Please use -S instead.

is a deprecation warning not an error...

But agreed it looks like the module is not handling this well with the find command as you've identified.

I want to strip out the local module and use the nf-core one which should+ be using a more recent version of bowtie2 and also more robust, but haven't had time yet. But we should indeed check the new module also handles -S as expeted!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants