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

AMP screening doesn't run when only a single tool is enabled #444

Closed
amizeranschi opened this issue Jan 28, 2025 · 4 comments · Fixed by #428
Closed

AMP screening doesn't run when only a single tool is enabled #444

amizeranschi opened this issue Jan 28, 2025 · 4 comments · Fixed by #428
Labels
bug Something isn't working

Comments

@amizeranschi
Copy link

Testing the latest dev version, the AMP subworkflow is failing when only one tool is enabled. The following command reproduces the error:

nextflow pull nf-core/funcscan -r dev

nextflow run nf-core/funcscan -r 640992df1213c6f7b48514aac65790ee3e59f0d2 \
-profile docker,test \
--run_amp_screening \
--amp_skip_ampir \
--amp_skip_amplify \
--amp_cutoff 0.4 \
--save_db \
--outdir test-funcscan

And this is the error:

ERROR ~ Error executing process > 'NFCORE_FUNCSCAN:FUNCSCAN:AMP:AMPCOMBI2_PARSETABLES (sample_2)'

Caused by:
  Missing output file(s) `sample_2/contig_gbks/` expected by process `NFCORE_FUNCSCAN:FUNCSCAN:AMP:AMPCOMBI2_PARSETABLES (sample_2)`


Command executed:

  ampcombi parse_tables \
      --path_list 'sample_2.macrel.prediction' \
      --faa sample_2_pyrodigal.faa \
      --gbk sample_2_pyrodigal.gbk \
      --sample_list sample_2 \
      --amp_database DRAMP \
      --amp_database_dir amp_DRAMP_database \
       \
      --aminoacid_length 120 --db_evalue 5 --amp_cutoff 0.6 --ampir_file .ampir.tsv --amplify_file .amplify.tsv --macrel_file .macrel.prediction --hmmsearch_file .hmmer_hmmsearch.txt --ampgram_file '.tsv' --amptransformer_file '.txt' --neubi_file '.fasta' --log TRUE --hmm_evalue 0.06 --window_size_stop_codon 60 --window_size_transporter 11 \
      --threads 4
  
  cat <<-END_VERSIONS > versions.yml
  "NFCORE_FUNCSCAN:FUNCSCAN:AMP:AMPCOMBI2_PARSETABLES":
      ampcombi: $(ampcombi --version | sed 's/ampcombi //')
  END_VERSIONS

Command exit status:
  0

Command output:
  Success: 'ampcombi parse_tables' completed successfully ! Now run ampcombi complete !

Work dir:
  /home/ubuntu/work/13/797b8689104e7223dd481e32307d75

The following warning is also shown. This seems to be a separate issue, so I'll open a separate report for it.

WARN: The following invalid input values have been detected:

* --amp_cutoff: 0.4
@amizeranschi amizeranschi added the bug Something isn't working label Jan 28, 2025
@jasmezz
Copy link
Collaborator

jasmezz commented Jan 31, 2025

Will be fixed in #428

@Darcy220606 Darcy220606 linked a pull request Feb 2, 2025 that will close this issue
11 tasks
@jasmezz
Copy link
Collaborator

jasmezz commented Feb 6, 2025

Update from my side: I can reproduce the error and it occurs in these cases:

  • if only 1 AMP tool is executed
  • if multiple tools are executed but only 1 tool could identify any AMPs
  • if multiple tools are executed but no tool could identify any AMPs

Example output if two tools are executed (ampir and macrel), both their output files are handed to ampcombi/parsetables correctly, but contain no AMP hits. The missing AMPs apparently cause the parsetables module to crash:

Caused by:
  Missing output file(s) `sample_2/contig_gbks/` expected by process `NFCORE_FUNCSCAN:FUNCSCAN:AMP:AMPCOMBI2_PARSETABLES (sample_2)`


Command executed:

  ampcombi parse_tables \
      --path_list 'sample_2.ampir.tsv' 'sample_2.macrel.prediction' \
      --faa sample_2_pyrodigal.faa \
      --gbk sample_2_pyrodigal.gbk \
      --sample_list sample_2 \
      --amp_database DRAMP \
      --amp_database_dir amp_DRAMP_database \
       \
      --aminoacid_length 120 --db_evalue 5 --amp_cutoff 0.6 --ampir_file .ampir.tsv --amplify_file .amplify.tsv --macrel_file .macrel.prediction --hmmsearch_file .hmmer_hmmsearch.txt --ampgram_file '.tsv' --amptransformer_file '.txt' --neubi_file '.fasta' --log TRUE --hmm_evalue 0.06 --window_size_stop_codon 60 --window_size_transporter 11 \
      --threads 4

It occurs not only on dev branch, but also on the current add_interproscan_to_amp branch which is supposed to fix it. So it probably has to be fixed upstream in AMPcombi, @Darcy220606?

@Darcy220606
Copy link
Contributor

Darcy220606 commented Feb 10, 2025

Thank you for detecting and reporting the problem @amizeranschi 💚

It seems the error is after all caused by the output declaration in the nf-core module for ampcombi2/parsetables.

AMPcombi itself handles samples with no AMPs predicted and reports that in the sample log file in the sample directory. The issue is as Jasmin and yourself reported Missing output file(s) sample_2/contig_gbks/expected by processNFCORE_FUNCSCAN:FUNCSCAN:AMP:AMPCOMBI2_PARSETABLES (sample_2)`` because in the module it expects all output files in the output directory therefore the sample output directory files must all be optional.

Ive fixed that in nf-core/modules#7458. Once that PR is merged and the module updated in the pipeline this error should be fixed.

Image

@Darcy220606
Copy link
Contributor

Darcy220606 commented Feb 11, 2025

This has been addressed and solved in #428

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

Successfully merging a pull request may close this issue.

3 participants