Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions modules/local/utils/msrescore_features/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ process MSRESCORE_FEATURES {
label 'process_high'

container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'oras://ghcr.io/bigbio/quantms-rescoring-sif:0.0.14' :
'ghcr.io/bigbio/quantms-rescoring:0.0.14' }"
'oras://ghcr.io/bigbio/quantms-rescoring-sif:0.0.15' :
'ghcr.io/bigbio/quantms-rescoring:0.0.15' }"

input:
tuple val(meta), path(idxml), path(mzml), path(model_weight), val(search_engine)
Expand Down Expand Up @@ -91,20 +91,6 @@ process MSRESCORE_FEATURES {
}

"""
# Fix for UID-less environments (GitHub Actions, OpenShift, etc.)
# where pwd.getpwuid() fails because the running UID has no /etc/passwd entry.
# Python's getpass.getuser() calls getpwuid() only when USER env var is unset.
if [ -w /etc/passwd ]; then
echo "\${USER:-quantms}:x:\$(id -u):\$(id -g):\${USER:-quantms} user:/tmp:/bin/bash" >> /etc/passwd
fi
export USER="\${USER:-quantms}"
export LOGNAME="\${LOGNAME:-\${USER:-quantms}}"
export LNAME="\${LNAME:-\${USER:-quantms}}"
export USERNAME="\${USERNAME:-\${USER:-quantms}}"
export HOME="\${HOME:-\$PWD}"
export TORCHINDUCTOR_CACHE_DIR="\${TORCHINDUCTOR_CACHE_DIR:-\$PWD/.torchinductor_cache}"
mkdir -p "\$TORCHINDUCTOR_CACHE_DIR"

rescoring msrescore2feature \\
--idxml $idxml \\
--mzml $mzml \\
Expand Down
15 changes: 2 additions & 13 deletions modules/local/utils/msrescore_fine_tuning/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ process MSRESCORE_FINE_TUNING {
label 'process_high'

container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'oras://ghcr.io/bigbio/quantms-rescoring-sif:0.0.14' :
'ghcr.io/bigbio/quantms-rescoring:0.0.14' }"
'oras://ghcr.io/bigbio/quantms-rescoring-sif:0.0.15' :
'ghcr.io/bigbio/quantms-rescoring:0.0.15' }"

input:
tuple val(meta), path(idxml), path(mzml), val(groupkey), path(ms2_model_dir)
Expand Down Expand Up @@ -48,17 +48,6 @@ process MSRESCORE_FINE_TUNING {
}

"""
# Fix for UID-less container environments (e.g. GitHub Actions uid 1001)
Comment thread
ypriverol marked this conversation as resolved.
# Python's getpass.getuser() checks USER env var before calling getpwuid()
if [ -w /etc/passwd ]; then
echo "\${USER:-quantms}:x:\$(id -u):\$(id -g):\${USER:-quantms} user:/tmp:/bin/bash" >> /etc/passwd
fi
export USER="\${USER:-quantms}"
export LOGNAME="\${LOGNAME:-\${USER:-quantms}}"
export HOME="\${HOME:-\$PWD}"
export TORCHINDUCTOR_CACHE_DIR="\${TORCHINDUCTOR_CACHE_DIR:-\$PWD/.torchinductor_cache}"
mkdir -p "\$TORCHINDUCTOR_CACHE_DIR"

rescoring transfer_learning \\
--idxml ./ \\
--mzml ./ \\
Expand Down
14 changes: 2 additions & 12 deletions modules/local/utils/psm_clean/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ process PSM_CLEAN {
label 'process_high'

container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'oras://ghcr.io/bigbio/quantms-rescoring-sif:0.0.13' :
'ghcr.io/bigbio/quantms-rescoring:0.0.13' }"
'oras://ghcr.io/bigbio/quantms-rescoring-sif:0.0.15' :
'ghcr.io/bigbio/quantms-rescoring:0.0.15' }"

input:
tuple val(meta), path(idxml), path(mzml)
Expand All @@ -22,16 +22,6 @@ process PSM_CLEAN {
def prefix = task.ext.prefix ?: "${meta.mzml_id}_clean"

"""
# Fix for UID-less container environments (e.g. GitHub Actions uid 1001)
if [ -w /etc/passwd ]; then
echo "\${USER:-quantms}:x:\$(id -u):\$(id -g):\${USER:-quantms} user:/tmp:/bin/bash" >> /etc/passwd
fi
export USER="\${USER:-quantms}"
export LOGNAME="\${LOGNAME:-\${USER:-quantms}}"
export HOME="\${HOME:-\$PWD}"
export TORCHINDUCTOR_CACHE_DIR="\${TORCHINDUCTOR_CACHE_DIR:-\$PWD/.torchinductor_cache}"
mkdir -p "\$TORCHINDUCTOR_CACHE_DIR"

rescoring psm_feature_clean \\
--idxml $idxml \\
--mzml $mzml \\
Expand Down
14 changes: 2 additions & 12 deletions modules/local/utils/spectrum_features/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ process SPECTRUM_FEATURES {
label 'process_low'

container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'oras://ghcr.io/bigbio/quantms-rescoring-sif:0.0.13' :
'ghcr.io/bigbio/quantms-rescoring:0.0.13' }"
'oras://ghcr.io/bigbio/quantms-rescoring-sif:0.0.15' :
'ghcr.io/bigbio/quantms-rescoring:0.0.15' }"

input:
tuple val(meta), path(id_file), val(search_engine), path(ms_file)
Expand All @@ -19,16 +19,6 @@ process SPECTRUM_FEATURES {
def prefix = task.ext.prefix ?: "${meta.mzml_id}"

"""
# Fix for UID-less container environments (e.g. GitHub Actions uid 1001)
if [ -w /etc/passwd ]; then
echo "\${USER:-quantms}:x:\$(id -u):\$(id -g):\${USER:-quantms} user:/tmp:/bin/bash" >> /etc/passwd
fi
export USER="\${USER:-quantms}"
export LOGNAME="\${LOGNAME:-\${USER:-quantms}}"
export HOME="\${HOME:-\$PWD}"
export TORCHINDUCTOR_CACHE_DIR="\${TORCHINDUCTOR_CACHE_DIR:-\$PWD/.torchinductor_cache}"
mkdir -p "\$TORCHINDUCTOR_CACHE_DIR"

rescoring spectrum2feature \\
--mzml "${ms_file}" \\
--idxml "${id_file}" \\
Expand Down
Loading