Skip to content
Open
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
6 changes: 0 additions & 6 deletions assets/hlahd_software_meta.json

This file was deleted.

11 changes: 11 additions & 0 deletions assets/software_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"hlahd": {
"version": "1.7.1",
"software_md5": "44f0185f514f026fdd709fb34743980a"
},
"hlala": {
"graph": "PRG_MHC_GRCh38_withIMGT",
"graph_url": "https://www.well.ox.ac.uk/downloads/HLA-LA/graphs/PRG_MHC_GRCh38_withIMGT.tar.gz",
"graph_md5": "525a8aa0c7f357bf29fe2c75ef1d477d"
}
}
39 changes: 35 additions & 4 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,20 @@ process {

withName: CHECK_PAIRED {
ext.args = ''
publishDir = [ enabled: false ]
}

withName: FASTQC {
ext.args = '--quiet'
}

withName: YARA_INDEX {
publishDir = [ enabled: false ]
}

withName: YARA_MAPPER {
ext.args = '-e 3'
publishDir = [
path: { "${params.outdir}/yara/${meta.id}" },
mode: params.publish_dir_mode
]
publishDir = [ enabled: false ]
}

withName: OPTITYPE {
Expand All @@ -44,6 +46,10 @@ process {
ext.args2 = "solver=${params.solver}"
}

withName: 'HLAHD_INSTALL' {
publishDir = [ enabled: false ]
}

withName: HLAHD {
ext.args = '-m 50'
publishDir = [
Expand All @@ -53,6 +59,31 @@ process {
]
}

withName: 'HLALA_TYPING' {
ext.args = '--graph PRG_MHC_GRCh38_withIMGT'
publishDir = [
path: { "${params.outdir}/hlala/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
]
}

withName: 'SAMTOOLS_VIEW' {
ext.args = '--output-fmt bam' // Ensure BGZF-compressed BAM output
ext.prefix = { "${meta.id}.hlala" }
publishDir = [
enabled: false
]
}

withName: 'HLALA_DOWNLOAD' {
publishDir = [ enabled: false ]
}

withName: 'SAMTOOLS_COLLATEFASTQ' {
publishDir = [ enabled: false ]
}

withName: CAT_FASTQ {
publishDir = [
path: { params.save_merged_fastq ? "${params.outdir}/fastq" : params.outdir },
Expand Down
33 changes: 33 additions & 0 deletions conf/test_hlala.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running HLA*LA tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines bundled input files and everything required to run a fast and simple test.

Use as follows:
nextflow run nf-core/hlatyping -profile test_hlala,<docker/singularity> --outdir <OUTDIR>

Note: HLA*LA requires a pre-built graph directory. If hlala_graph_dir is not provided,
the tool will attempt to download and build it automatically (requires significant
time and resources on first run).
----------------------------------------------------------------------------------------
*/

process {
resourceLimits = [
cpus: 4,
memory: '15.GB',
time: '6.h'
]
}

params {
config_profile_name = 'HLA*LA Test Profile'
config_profile_description = 'Test dataset with BAM files using HLA*LA'

// Input data - HLA*LA requires pre-aligned BAM files
input = params.pipelines_testdata_base_path + 'hlatyping/samplesheets/samplesheet_bam.csv'
tools = 'hlala'

// HLA*LA graph directory - if not set, graph will be downloaded automatically
}
32 changes: 32 additions & 0 deletions conf/test_optitype_hlala.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running OptiType + HLA*LA tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines bundled input files and everything required to run a fast and simple test.

Use as follows:
nextflow run nf-core/hlatyping -profile test_optitype_hlala,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/

process {
resourceLimits = [
cpus: 4,
memory: '15.GB',
time: '1.h'
]
}

params {
config_profile_name = 'OptiType + HLA*LA Test Profile'
config_profile_description = 'Test dataset with BAM files using both OptiType and HLA*LA'

// Input data - HLA*LA requires pre-aligned BAM files
input = params.pipelines_testdata_base_path + 'hlatyping/samplesheets/samplesheet_bam.csv'
// Parent directory containing the graph (e.g., graphs/PRG_MHC_GRCh38_withIMGT/)
hlala_graph_dir = "${projectDir}/graphs"
tools = 'optitype,hlala'

// OptiType parameters
solver = 'glpk'
}
10 changes: 10 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@
"git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46",
"installed_by": ["modules"]
},
"hlala/preparegraph": {
"branch": "master",
"git_sha": "5e748ff2b0f990949081c9e49792622eb3fe9ee9",
"installed_by": ["modules"]
},
"hlala/typing": {
"branch": "master",
"git_sha": "e753770db613ce014b3c4bc94f6cba443427b726",
"installed_by": ["modules"]
},
"multiqc": {
"branch": "master",
"git_sha": "af27af1be706e6a2bb8fe454175b0cdf77f47b49",
Expand Down
60 changes: 60 additions & 0 deletions modules/local/hlala/download/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
process HLALA_DOWNLOAD {
tag "$graph_name"
label 'process_single'

conda "conda-forge::wget=1.21.4 conda-forge::coreutils=9.5"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/wget:1.21.4' :
'biocontainers/wget:1.21.4' }"

input:
tuple val(graph_name), val(graph_url), val(graph_md5), path(graph_tarball)

output:
path "graphs", emit: graph
path "versions.yml", emit: versions

when:
task.ext.when == null || task.ext.when

script:
def use_local = graph_tarball.name != 'NO_FILE'
"""
if [ "${use_local}" = "true" ]; then
# Use provided tarball
TARBALL="${graph_tarball}"
else
# Download graph
wget -q "${graph_url}" -O ${graph_name}.tar.gz
TARBALL="${graph_name}.tar.gz"
fi

# Verify MD5 checksum
checksum="\$(md5sum "\$TARBALL" | cut -f1 -d' ')"
if [ "\$checksum" != "${graph_md5}" ]; then
echo "Checksum error: expected ${graph_md5}, got \$checksum" >&2
exit 2
fi

# Extract into parent directory structure for HLA*LA --customGraphDir
mkdir -p graphs
tar -xzf "\$TARBALL" -C graphs
[ "${use_local}" = "false" ] && rm "\$TARBALL"

cat <<-END_VERSIONS > versions.yml
"${task.process}":
wget: \$(wget --version 2>&1 | head -1 | sed 's/GNU Wget //;s/ .*//')
END_VERSIONS
"""

stub:
"""
mkdir -p graphs/${graph_name}
touch graphs/${graph_name}/serializedGRAPH

cat <<-END_VERSIONS > versions.yml
"${task.process}":
wget: \$(wget --version 2>&1 | head -1 | sed 's/GNU Wget //;s/ .*//')
END_VERSIONS
"""
}
7 changes: 7 additions & 0 deletions modules/nf-core/hlala/preparegraph/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 85 additions & 0 deletions modules/nf-core/hlala/preparegraph/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions modules/nf-core/hlala/preparegraph/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading