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

Prokka: contig length too long - add option for --compliant mode #677

Open
audy opened this issue Sep 27, 2024 · 6 comments
Open

Prokka: contig length too long - add option for --compliant mode #677

audy opened this issue Sep 27, 2024 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@audy
Copy link

audy commented Sep 27, 2024

Description of the bug

I am running nf-core/mag 3.0.3 on a sample (ERR4303137) and it fails during the Prokka step.

This looks like it might be a simple fix (adding --compliant --centre-name something) but I'm not sure what the downstream effects will be.

Command used and terminal output

nextflow run main.nf \
  --input input.csv \
  --outdir output-test

Terminal output:

(click to expand)

ERROR ~ Error executing process > 'NFCORE_MAG:MAG:PROKKA (SPAdes-MaxBin2-ERR4303137.013)'

Caused by:
  Process `NFCORE_MAG:MAG:PROKKA (SPAdes-MaxBin2-ERR4303137.013)` terminated with an error exit status (2)


Command executed:

  prokka \
      --metagenome \
      --cpus 2 \
      --prefix SPAdes-MaxBin2-ERR4303137.013 \
       \
       \
      SPAdes-MaxBin2-ERR4303137.013.fa
  
  cat <<-END_VERSIONS > versions.yml
  "NFCORE_MAG:MAG:PROKKA":
      prokka: $(echo $(prokka --version 2>&1) | sed 's/^.*prokka //')
  END_VERSIONS

Command exit status:
  2

Command output:
  (empty)

Command error:
  [21:14:52] You are not telling me who you are!
  [21:14:52] Operating system is linux
  [21:14:52] You have BioPerl 1.7.8
  Argument "1.7.8" isn't numeric in numeric lt (<) at /usr/local/bin/prokka line 259.
  [21:14:52] System has 32 cores.
  [21:14:52] Will use maximum of 2 cores.
  [21:14:52] Annotating as >>> Bacteria <<<
  [21:14:52] Generating locus_tag from 'SPAdes-MaxBin2-ERR4303137.013.fa' contents.
  [21:14:52] Setting --locustag ALGKCLFE from MD5 a504c5fe5e1f9958c5675ed865168409
  [21:14:52] Creating new output folder: SPAdes-MaxBin2-ERR4303137.013
  [21:14:52] Running: mkdir -p SPAdes\-MaxBin2\-ERR4303137\.013
  [21:14:52] Using filename prefix: SPAdes-MaxBin2-ERR4303137.013.XXX
  [21:14:52] Setting HMMER_NCPU=1
  [21:14:52] Writing log to: SPAdes-MaxBin2-ERR4303137.013/SPAdes-MaxBin2-ERR4303137.013.log
  [21:14:52] Command: /usr/local/bin/prokka --metagenome --cpus 2 --prefix SPAdes-MaxBin2-ERR4303137.013 SPAdes-MaxBin2-ERR4303137.013.fa
  [21:14:52] Appending to PATH: /usr/local/bin
  [21:14:52] Looking for 'aragorn' - found /usr/local/bin/aragorn
  [21:14:52] Determined aragorn version is 001002 from 'ARAGORN v1.2.38 Dean Laslett'
  [21:14:52] Looking for 'barrnap' - found /usr/local/bin/barrnap
  [21:14:52] Determined barrnap version is 000009 from 'barrnap 0.9'
  [21:14:52] Looking for 'blastp' - found /usr/local/bin/blastp
  [21:14:52] Determined blastp version is 002012 from 'blastp: 2.12.0+'
  [21:14:52] Looking for 'cmpress' - found /usr/local/bin/cmpress
  [21:14:52] Determined cmpress version is 001001 from '# INFERNAL 1.1.4 (Dec 2020)'
  [21:14:52] Looking for 'cmscan' - found /usr/local/bin/cmscan
  [21:14:52] Determined cmscan version is 001001 from '# INFERNAL 1.1.4 (Dec 2020)'
  [21:14:52] Looking for 'egrep' - found /bin/egrep
  [21:14:52] Looking for 'find' - found /usr/bin/find
  [21:14:52] Looking for 'grep' - found /bin/grep
  [21:14:52] Looking for 'hmmpress' - found /usr/local/bin/hmmpress
  [21:14:52] Determined hmmpress version is 003003 from '# HMMER 3.3.2 (Nov 2020); http://hmmer.org/'
  [21:14:52] Looking for 'hmmscan' - found /usr/local/bin/hmmscan
  [21:14:52] Determined hmmscan version is 003003 from '# HMMER 3.3.2 (Nov 2020); http://hmmer.org/'
  [21:14:52] Looking for 'java' - found /usr/local/bin/java
  [21:14:52] Looking for 'makeblastdb' - found /usr/local/bin/makeblastdb
  [21:14:52] Determined makeblastdb version is 002012 from 'makeblastdb: 2.12.0+'
  [21:14:52] Looking for 'minced' - found /usr/local/bin/minced
  [21:14:52] Determined minced version is 004002 from 'minced 0.4.2'
  [21:14:52] Looking for 'parallel' - found /usr/local/bin/parallel
  [21:14:52] Determined parallel version is 20220222 from 'GNU parallel 20220222'
  [21:14:52] Looking for 'prodigal' - found /usr/local/bin/prodigal
  [21:14:52] Determined prodigal version is 002006 from 'Prodigal V2.6.3: February, 2016'
  [21:14:52] Looking for 'prokka-genbank_to_fasta_db' - found /usr/local/bin/prokka-genbank_to_fasta_db
  [21:14:52] Looking for 'sed' - found /bin/sed
  [21:14:52] Looking for 'tbl2asn' - found /usr/local/bin/tbl2asn
  [21:14:52] Determined tbl2asn version is 025007 from 'tbl2asn 25.7   arguments:'
  [21:14:52] Using genetic code table 11.
  [21:14:52] Loading and checking input file: SPAdes-MaxBin2-ERR4303137.013.fa
  [21:14:53] Contig ID must <= 37 chars long: NODE_37914_length_1491_cov_1063.826602
  [21:14:53] Please rename your contigs OR try '--centre X --compliant' to generate clean contig names.

Relevant files

No response

System information

  • Nextflow 24.04.2
  • Hardware: cloud
  • Executor: TES
  • Container engine: Docker
  • OS: Ubuntu
  • Version of nf-core/mag: 3.0.3
@audy audy added the bug Something isn't working label Sep 27, 2024
@jfy133 jfy133 changed the title Prokka: contig length too long Prokka: contig length too long - add option for --compliant mode Oct 3, 2024
@jfy133
Copy link
Member

jfy133 commented Oct 3, 2024

Hi @audy

Thanks for the report, ugh this comes up so many times with Prokka.

Indeed, in other pipelines were we use this I've added a flag to turn this on. Probably simplest to do the same here. Will get to this ASAP.

Otherwise as a workaround until this is implemented, you can manually add this to a custom config file:

add to e.g. custom.conf

process {
   withName: PROKKA {
       ext.args   = "--metagenome --compliant --centre-name something"
       publishDir = [
           path: { "${params.outdir}/Annotation/Prokka/${meta.assembler}" },
           mode: params.publish_dir_mode,
           saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
       ]
   }
}

And supply the file to your nextflow run command with -c custom.conf.

I also don't know the exact effects will be, my main fear would be that the trimmed contigs name mean they might not be able to be associated with other output, but I guess that's up to the user. I don't think ti'll break the pipeline per se as the Prokka output files are not used elsewhere as far as I know.

@jfy133 jfy133 added enhancement New feature or request good first issue Good for newcomers and removed bug Something isn't working labels Oct 3, 2024
@Thomieh73
Copy link

Hi, I ran into this issue as well, and I used the suggest addition to my config file. I do get an error however.

This is what I added:

withName: PROKKA {
       ext.args   = "--metagenome --compliant --centre-name NVI"
       publishDir = [
           path: { "${params.outdir}/Annotation/Prokka/${meta.assembler}" },
           mode: params.publish_dir_mode,
           saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
       ]
   }

Which is similar to the suggestion, When I run the pipeline I get this error:

ERROR ~ Unknown config attribute `process.withName:PROKKA.params.publish_dir_mode` -- check config file: /cluster/projects/nn10070k/projects/phagedrive/pd_data_control/mag_asm_set-ups/run_20240726/saga_mag.simple.config

 -- Check '.nextflow.log' file for details

Would it help to remove the publishDir from the config set-up?

@jfy133
Copy link
Member

jfy133 commented Oct 15, 2024

YEs, please try that and have just ext.args

@Thomieh73
Copy link

Hi, I needed to change the settings for PROKKA a little bit, because --centre-name was not right. it needed to be --centre.

The bit I added was:

withName: PROKKA {
       ext.args   = "--metagenome --compliant --centre NVI"
    }

and it seems to be running now.

@Thomieh73
Copy link

Yep that solved the issue. for me

@jfy133
Copy link
Member

jfy133 commented Oct 17, 2024

Glad to know it works with that, yes we can add an option wiht that flag!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants