rnaseq icon indicating copy to clipboard operation
rnaseq copied to clipboard

CUSTOM_DUMPSOFTWAREVERSIONS failing to parse collated_versions.yml

Open martinfthomsen opened this issue 1 year ago • 1 comments

Description of the bug

Yet another issue with NFCORE_RNASEQ:RNASEQ:CUSTOM_DUMPSOFTWAREVERSIONS, this time it is trimgalore that fails...

Command error:
  INFO:    Converting SIF file to temporary sandbox...
  Traceback (most recent call last):
    File ".command.sh", line 101, in 
      main()
    File ".command.sh", line 61, in main
      versions_by_process = yaml.load(f, Loader=yaml.BaseLoader) | versions_this_module
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/yaml/__init__.py", line 81, in load
      return loader.get_single_data()
             ^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/yaml/constructor.py", line 49, in get_single_data
      node = self.get_single_node()
             ^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/yaml/composer.py", line 36, in get_single_node
      document = self.compose_document()
                 ^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/yaml/composer.py", line 55, in compose_document
      node = self.compose_node(None, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/yaml/composer.py", line 84, in compose_node
      node = self.compose_mapping_node(anchor)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/yaml/composer.py", line 133, in compose_mapping_node
      item_value = self.compose_node(node, item_key)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/yaml/composer.py", line 84, in compose_node
      node = self.compose_mapping_node(anchor)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/yaml/composer.py", line 127, in compose_mapping_node
      while not self.check_event(MappingEndEvent):
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/yaml/parser.py", line 98, in check_event
      self.current_event = self.state()
                           ^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/yaml/parser.py", line 428, in parse_block_mapping_key
      if self.check_token(KeyToken):
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/yaml/scanner.py", line 116, in check_token
      self.fetch_more_tokens()
    File "/usr/local/lib/python3.12/site-packages/yaml/scanner.py", line 223, in fetch_more_tokens
      return self.fetch_value()
             ^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/yaml/scanner.py", line 577, in fetch_value
      raise ScannerError(None, None,
  yaml.scanner.ScannerError: mapping values are not allowed here
    in "collated_versions.yml", line 14, column 21
  INFO:    Cleaning up image...

I again checked up on the collated_versions.yml file and found the following culprit:

"NFCORE_RNASEQ:RNASEQ:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:TRIMGALORE":
    trimgalore: perl: error while loading shared libraries: libperl.so: cannot open shared object file: No such file or directory
    cutadapt: 3.4

The following container was used: https://depot.galaxyproject.org/singularity/trim-galore:0.6.7--hdfd78af_0

To quick fix the error, I have modified modules/nf-core/trimgalore/main.nf, changing line 70 from: trimgalore: \$(echo \$(trim_galore --version 2>&1) | sed 's/^.*version //; s/Last.*\$//') to trimgalore: \$((trim_galore --version &>/dev/null && trim_galore --version 2>&1 | sed -n 's/^.*version \([0-9.]*\).*$/\1/p') || echo "Error") in order to make it more robust against trim_galore --version failing for some reason. in this case it will just output "Error", and the later CUSTOM_DUMPSOFTWAREVERSIONS script will not fail to parse the YAML file...

Cheers, Martin

Command used and terminal output

No response

Relevant files

No response

System information

No response

martinfthomsen avatar Jan 12 '24 16:01 martinfthomsen

This has been removed in dev

maxulysse avatar Mar 12 '24 09:03 maxulysse

Will be fixed in the next release (v3.15.0) because this process has already been fixed on dev.

drpatelh avatar May 13 '24 11:05 drpatelh