File tree Expand file tree Collapse file tree 5 files changed +229
-0
lines changed
modules/nf-core/pcgr/getref Expand file tree Collapse file tree 5 files changed +229
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
3+ channels :
4+ - conda-forge
5+ - bioconda
6+ dependencies :
7+ - conda-forge::coreutils=9.5
8+ - conda-forge::gzip=1.14
9+ - conda-forge::tar=1.35
10+ - conda-forge::curl=8.16.0
Original file line number Diff line number Diff line change 1+ process PCGR_GETREF {
2+ tag " ${ meta.id} "
3+ label ' process_single'
4+
5+ conda " ${ moduleDir} /environment.yml"
6+ container " ${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
7+ ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/51/517cc3a46129fc586191412f29246889124f4654640a53230aa203a2bcc1d7dc/data'
8+ : 'community.wave.seqera.io/library/coreutils_curl_gzip_tar:17a6ea9a6766c02a'} "
9+
10+ input:
11+ tuple val(meta), val(bundleversion), val(genome)
12+
13+ output:
14+ tuple val(meta), path(" ${ bundleversion} " ), emit: pcgrref
15+ path " versions.yml" , emit: versions
16+
17+ when:
18+ task. ext. when == null || task. ext. when
19+
20+ script:
21+ def bundle = " pcgr_ref_data.${ bundleversion} .${ genome} .tgz"
22+ """
23+ curl -O https://insilico.hpc.uio.no/pcgr/${ bundle}
24+ gzip -dc ${ bundle} | tar xvf -
25+
26+ mkdir ${ bundleversion}
27+ mv data/ ${ bundleversion}
28+
29+ cat <<-END_VERSIONS > versions.yml
30+ "${ task.process} ":
31+ curl: \$ (curl --version | head -1 | cut -d ' ' -f 2)
32+ tar: \$ (tar --version | head -1 | cut -d ' ' -f 4)
33+ gzip: \$ (gzip --version | head -1 | cut -d ' ' -f 2)
34+ END_VERSIONS
35+ """
36+
37+ stub:
38+ """
39+ mkdir ${ bundleversion}
40+
41+ cat <<-END_VERSIONS > versions.yml
42+ "${ task.process} ":
43+ curl: \$ (curl --version | head -1 | cut -d ' ' -f 2)
44+ tar: \$ (tar --version | head -1 | cut -d ' ' -f 4)
45+ gzip: \$ (gzip --version | head -1 | cut -d ' ' -f 2)
46+ END_VERSIONS
47+ """
48+ }
Original file line number Diff line number Diff line change 1+ # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
2+ name : " pcgr_getref"
3+ description : Get reference to run Personal Cancer Genome Reporter (PCGR)
4+ keywords :
5+ - cancer
6+ - reference
7+ - pcgr
8+ - mtb
9+ tools :
10+ - pcgr :
11+ description : " The Personal Cancer Genome Reporter (PCGR) is a stand-alone software package for functional annotation and translation of individual tumor genomes for precision cancer medicine"
12+ homepage : " https://sigven.github.io/pcgr/index.html"
13+ documentation : " https://sigven.github.io/pcgr/articles/running.html"
14+ tool_dev_url : " https://github.com/sigven/pcgr/"
15+ doi : " 10.1093/bioinformatics/btx817"
16+ licence : ["MIT"]
17+ identifier : " "
18+
19+ input :
20+ - - meta :
21+ type : map
22+ description : |
23+ Groovy Map containing sample information
24+ e.g. `[ id:'sample1' ]`
25+ - bundleversion :
26+ type : string
27+ description : PCGR reference data bundle version
28+ pattern : " *[0-9]*"
29+ ontologies : []
30+ - genome :
31+ type : string
32+ description : PCGR reference genome version
33+ pattern : " grch37|grch38"
34+ ontologies : []
35+
36+ output :
37+ pcgrref :
38+ - - meta :
39+ type : map
40+ description : |
41+ Groovy Map containing sample information
42+ e.g. `[ id:'sample1' ]`
43+ - " ${bundleversion} " :
44+ type : directory
45+ description : PCGR reference data directory
46+ pattern : " {bundleversion}/"
47+ ontologies : []
48+ versions :
49+ - " versions.yml " :
50+ type : file
51+ description : File containing software versions
52+ pattern : " versions.yml"
53+ ontologies :
54+ - edam : " http://edamontology.org/format_3750" # YAML
55+
56+ authors :
57+ - " @famosab"
58+ maintainers :
59+ - " @famosab"
Original file line number Diff line number Diff line change 1+ nextflow_process {
2+
3+ name "Test Process PCGR_GETREF"
4+ script "../main.nf"
5+ process "PCGR_GETREF"
6+
7+ tag "modules"
8+ tag "modules_nfcore"
9+ tag "pcgr"
10+ tag "pcgr/getref"
11+
12+ // test("human - 20250314 - grch38") {
13+
14+ // when {
15+ // process {
16+ // """
17+ // input[0] = [
18+ // [ id:'test' ],
19+ // '20250314',
20+ // 'grch38'
21+ // ]
22+ // """
23+ // }
24+ // }
25+
26+ // then {
27+ // assert process.success
28+ // assertAll(
29+ // { assert snapshot(
30+ // process.out,
31+ // path(process.out.versions[0]).yaml
32+ // ).match() }
33+ // )
34+ // }
35+
36+ // }
37+
38+ test("human - 20250314 - grch38 - stub") {
39+
40+ options "-stub"
41+
42+ when {
43+ process {
44+ """
45+ input[0] = [
46+ [ id:'test' ],
47+ '20250314',
48+ 'grch38'
49+ ]
50+ """
51+ }
52+ }
53+
54+ then {
55+ assert process.success
56+ assertAll(
57+ { assert snapshot(
58+ process.out,
59+ path(process.out.versions[0]).yaml
60+ ).match() }
61+ )
62+ }
63+
64+ }
65+
66+ }
Original file line number Diff line number Diff line change 1+ {
2+ " human - 20250314 - grch38 - stub" : {
3+ " content" : [
4+ {
5+ " 0" : [
6+ [
7+ {
8+ " id" : " test"
9+ },
10+ [
11+
12+ ]
13+ ]
14+ ],
15+ " 1" : [
16+ " versions.yml:md5,25b668e4db59e455ba5a5b1fde55dc76"
17+ ],
18+ " pcgrref" : [
19+ [
20+ {
21+ " id" : " test"
22+ },
23+ [
24+
25+ ]
26+ ]
27+ ],
28+ " versions" : [
29+ " versions.yml:md5,25b668e4db59e455ba5a5b1fde55dc76"
30+ ]
31+ },
32+ {
33+ " PCGR_GETREF" : {
34+ " curl" : " 8.16.0" ,
35+ " tar" : 1.35 ,
36+ " gzip" : 1.14
37+ }
38+ }
39+ ],
40+ " meta" : {
41+ " nf-test" : " 0.9.3" ,
42+ " nextflow" : " 25.04.8"
43+ },
44+ " timestamp" : " 2025-10-29T14:11:26.824317"
45+ }
46+ }
You can’t perform that action at this time.
0 commit comments