nf-core / hic

Analysis of Chromosome Conformation Capture data (Hi-C)
https://nf-co.re/hic
MIT License
80 stars 55 forks source link

COOLTOOLS_INSULATION creates invalid software version on Azure Batch #172

Closed adamrtalbot closed 1 year ago

adamrtalbot commented 1 year ago

Description of the bug

When running on Azure Batch, DUMPSOFTWAREVERSIONS fails because the software version of COOLTOOLS_INSULATION is invalid. After getting the file out you can see the software version is an error from matplotlib. We should be able to fix this with better parsing of the software version. I notice it redirects stderr to stdout, we should probably remove this bit to start:

From:

    cat <<-END_VERSIONS > versions.yml
    "${task.process}":
        cooltools: \$(cooltools --version 2>&1 | sed 's/cooltools, version //')
    END_VERSIONS

To something like:

    cat <<-END_VERSIONS > versions.yml
    "${task.process}":
        cooltools: \$(cooltools --version | grep 'cooltools, version ' | sed 's/cooltools, version //')
    END_VERSIONS

Command used and terminal output

nextflow run 'https://github.com/nf-core/hic'
         -name hic-azure-test
         -params-file 'https://api.tower.nf/ephemeral/oJDG39eiTj0oKDAvVnrOcQ.yaml'
         -with-tower
         -r fe4ac656317d24c37e81e7940a526ed9ea812f8e 
         -profile test_full

Relevant files

The software versions YAML file has this block:

"NFCORE_HIC:HIC:TADS:COOLTOOLS_INSULATION":
    cooltools: Matplotlib created a temporary config/cache directory at /tmp/matplotlib-kgw5hr7e because the default path (/home/_azbatchtask_164/.config/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
0.5.1

System information

Nextflow: 23.06.0-edge build 5864 Executor: Azure Batch