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

Missing or corrupted meta map in short reads channel? #476

Closed
prototaxites opened this issue Jul 11, 2023 · 4 comments
Closed

Missing or corrupted meta map in short reads channel? #476

prototaxites opened this issue Jul 11, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@prototaxites
Copy link
Contributor

Description of the bug

Run into the below error a couple of times now on either KRAKEN2 or CENTRIFUGE, which take the short reads channel post-processing as input. The lines they fail at define the prefix, which in all cases should be `${meta.id}$ - at that point, there shouldn't be anything else in the meta map?

The error is sporadic, and I haven't been able to figure out how to trigger it, or what operational sequence of processes have to run to hit it. However, I've only noticed it when testing binning entry, which may or may not be the culprit - as the short read profilers should run sooner here due to skipped preprocessing steps.

-[nf-core/mag] Pipeline completed with errors-
ERROR ~ Error executing process > 'NFCORE_MAG:MAG:CENTRIFUGE (test_minigut-minigut_cf)'

Caused by:
  java.util.NoSuchElementException -- Check script './workflows/../modules/local/centrifuge.nf' at line: 21

Source block:
  def input = meta.single_end ? "-U \"${reads}\"" :  "-1 \"${reads[0]}\" -2 \"${reads[1]}\""
  prefix = task.ext.prefix ?: "${meta.id}"
  """
      centrifuge -x "${db_name}" \
          -p ${task.cpus} \
          --report-file report.txt \
          -S results.txt \
          $input
      centrifuge-kreport -x "${db_name}" results.txt > ${prefix}.centrifuge_kreport.txt
      cat results.txt | cut -f 1,3 > results.krona
  
      cat <<-END_VERSIONS > versions.yml
      "${task.process}":
          centrifuge: \$(centrifuge --version | sed -n 1p | sed 's/^.*centrifuge-class version //')
      END_VERSIONS
      """

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`

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

#473 (comment)

-[nf-core/mag] Pipeline completed with errors-
ERROR ~ Error executing process > 'NFCORE_MAG:MAG:CENTRIFUGE (test_minigut-minigut_cf)'

Caused by:
  java.util.NoSuchElementException -- Check script './workflows/../modules/local/centrifuge.nf' at line: 21

Source block:
  def input = meta.single_end ? "-U \"${reads}\"" :  "-1 \"${reads[0]}\" -2 \"${reads[1]}\""
  prefix = task.ext.prefix ?: "${meta.id}"
  """
      centrifuge -x "${db_name}" \
          -p ${task.cpus} \
          --report-file report.txt \
          -S results.txt \
          $input
      centrifuge-kreport -x "${db_name}" results.txt > ${prefix}.centrifuge_kreport.txt
      cat results.txt | cut -f 1,3 > results.krona
  
      cat <<-END_VERSIONS > versions.yml
      "${task.process}":
          centrifuge: \$(centrifuge --version | sed -n 1p | sed 's/^.*centrifuge-class version //')
      END_VERSIONS
      """

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`

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

#470 (comment)

Command used and terminal output

No response

Relevant files

No response

System information

No response

@prototaxites prototaxites added the bug Something isn't working label Jul 11, 2023
@jfy133
Copy link
Member

jfy133 commented Jul 20, 2023

I think I've identified the problem:

We need to replace all .clone()/.remove() calls with def meta_new = meta - meta.subMap('key')

@jfy133
Copy link
Member

jfy133 commented Jul 20, 2023

Yeah I think this is related: #479

I'm going to go and replace all .clones 😬

thank the lord and saviour of today @robsyme

https://www.youtube.com/watch?v=A357C-ux6Dw&t=879s

@jfy133
Copy link
Member

jfy133 commented Aug 17, 2023

I'm assuming done here: #480

@jfy133 jfy133 closed this as completed Aug 17, 2023
@jfy133
Copy link
Member

jfy133 commented Aug 17, 2023

Please reopen if not

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