Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ichorcna to v0.5.1 and nf-test #6079

Merged
merged 37 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6f2ed6c
Module: ichorcna/run updated to v0.5.0
Jan 23, 2023
b022f23
Merge branch 'master' into ichorcna_run_update
adamrtalbot Jan 31, 2023
d79ec89
ichorcna/run gc_wig not optional
Feb 1, 2023
1238f43
ichorcna/run centromere put above other parameters as it is more impo…
Feb 1, 2023
22fc171
ichorcna correct test URLS
Feb 1, 2023
c844b34
Merge branch 'master' into ichorcna_run_update
Feb 1, 2023
f4cf5b0
Merge branch 'master' into ichorcna_run_update
adamrtalbot Mar 7, 2023
dac917c
Merge branch 'master' into ichorcna_run_update
adamrtalbot Mar 7, 2023
b3c53c2
fix meta.yml and change the name to normal_background
adamrtalbot Mar 7, 2023
3046d63
Merge branch 'master' into ichorcna_run_update
adamrtalbot Mar 7, 2023
b214ad1
[automated] Fix linting with Prettier
nf-core-bot Mar 7, 2023
2c5163b
Merge branch 'master' into ichorcna_run_update
SPPearce Oct 2, 2023
72a5df5
Merge branch 'master' into ichorcna_run_update
SPPearce Dec 6, 2023
7a784f6
Update environment to 0.5.0
SPPearce Dec 6, 2023
086d952
createpon test
SPPearce Dec 6, 2023
53b58fc
Swap to nftest and test 0.5.1 docker
SPPearce Aug 1, 2024
4c918eb
Merge remote-tracking branch 'origin/master' into ichorcna_run_update
SPPearce Aug 1, 2024
7ee71af
Remove from tests
SPPearce Aug 1, 2024
ad12f49
Reset test.yml
SPPearce Aug 1, 2024
2ac8df1
Merge branch 'master' into ichorcna_run_update
SPPearce Aug 1, 2024
9007289
Update output channels and snapshot
SPPearce Aug 1, 2024
fee779d
Update snap and meta
SPPearce Aug 2, 2024
1ac0608
Merge branch 'master' into ichorcna_run_update
SPPearce Aug 2, 2024
e24d86f
Update PoN
SPPearce Aug 3, 2024
91cc4e5
Merge branch 'master' into ichorcna_run_update
SPPearce Aug 5, 2024
972fa68
Add stub and additional asserts to PoN
SPPearce Aug 6, 2024
9ad450b
change output directory of bclconvert & bcl2fastq (#6112)
atrigila Aug 5, 2024
15219ce
Updated test data paths batch 11 (#6085)
GallVp Aug 5, 2024
477185d
Updated test data paths batch 17 (#6103)
GallVp Aug 5, 2024
e54e6ea
Updated test data paths batch 19 (#6105)
GallVp Aug 6, 2024
b682710
chore(deps): update actions/setup-java digest to 6a0805f (#6114)
renovate[bot] Aug 6, 2024
91417ac
Updated test data paths batch 18 (#6104)
GallVp Aug 6, 2024
8f917d7
Bump chromap version to chromap modules (#6113)
JoseEspinosa Aug 6, 2024
3a2255f
Add stub, nf-tests and bump version 3.5.5 to deeptools modules (#6109)
JoseEspinosa Aug 6, 2024
2f7bd22
Bracken bug fix (#6119)
egreenberg7 Aug 6, 2024
3973ad4
Add nf-test to krakentools/combinekreports (#6120)
LilyAnderssonLee Aug 6, 2024
75a45d5
Merge branch 'master' into ichorcna_run_update
SPPearce Aug 7, 2024
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
2 changes: 1 addition & 1 deletion modules/nf-core/ichorcna/createpon/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- bioconda::r-ichorcna=0.3.2
- bioconda::r-ichorcna=0.5.1
90 changes: 64 additions & 26 deletions modules/nf-core/ichorcna/createpon/main.nf
Original file line number Diff line number Diff line change
@@ -1,47 +1,85 @@
process ICHORCNA_CREATEPON {
label 'process_low'

// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/r-ichorcna:0.3.2--r41hdfd78af_0' :
'biocontainers/r-ichorcna:0.3.2--r41hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/r-ichorcna:0.5.1--r43hdfd78af_0' :
'biocontainers/r-ichorcna:0.5.1--r43hdfd78af_0' }"

input:
path wigs
path gc_wig
path map_wig
path centromere
path rep_time_wig
path exons

output:
path "*.rds" , emit: rds
path "*.txt" , emit: txt
path "versions.yml" , emit: versions
path "${prefix}*.rds", emit: rds
path "${prefix}*.txt", emit: txt
path "versions.yml" , emit: versions

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

script:
def args = task.ext.args ?: ''
def centro = centromere ? "--centromere ${centromere}" : ''
def prefix = task.ext.prefix ?: "PoN"
def VERSION = '0.3.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "PoN"
def map = map_wig ? "mapWig='${map_wig}'," : 'mapWig=NULL,'
def centro = centromere ? "centromere='${centromere}'," : ''
def rep = rep_time_wig ? "repTimeWig='${rep_time_wig}'," : 'repTimeWig=NULL,'
def exons = exons ? "exons.bed='${exons}'," : ''

"""
#!/usr/bin/env Rscript
library("ichorCNA")
library("yaml")

write.table(strsplit("${wigs}"," ")[[1]],"filelist.txt", row.names = FALSE, col.names = FALSE)

createPanelOfNormals(
gcWig='${gc_wig}',
${map}
${rep}
filelist = "filelist.txt",
outfile = "${prefix}",
${exons}
${centro}
$args
)

### Make Versions YAML for NF-Core ###
versions = list()
versions["r"] <- paste(R.Version()\$major, R.Version()\$minor, sep=".")
versions["ichorCNA"] <- paste(packageVersion("ichorCNA"), sep=".")

yaml_str <- as.yaml(
list(
"${task.process}" = versions
)
)
writeLines(yaml_str, file("versions.yml"))
"""
echo ${wigs} | tr " " "\\n" > wig_files.txt

createPanelOfNormals.R \\
--filelist wig_files.txt \\
--gcWig ${gc_wig} \\
--mapWig ${map_wig} \\
${centro} \\
${args} \\
--outfile ${prefix}

rm wig_files.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
ichorcna: $VERSION
END_VERSIONS

stub:
prefix = task.ext.prefix ?: "PoN"
"""
#!/usr/bin/env Rscript
library("yaml")

file.create("${prefix}.rds")
file.create("${prefix}.txt")

### Make Versions YAML for NF-Core ###
versions = list()
versions["r"] <- paste(R.Version()\$major, R.Version()\$minor, sep=".")
versions["ichorCNA"] <- paste(packageVersion("ichorCNA"), sep=".")

yaml_str <- as.yaml(
list(
"${task.process}" = versions
)
)
writeLines(yaml_str, file("versions.yml"))
"""
}
9 changes: 9 additions & 0 deletions modules/nf-core/ichorcna/createpon/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ input:
type: file
description: Text file giving centromere locations of each genome, to exclude these windows
pattern: "*.{txt}"
- rep_time_wig:
type: file
description: Replication/timing .wig file.
pattern: "*.{wig}"
- exons:
type: file
description: BED file for exon regions to annotate CNA regions.
pattern: "*.{bed}"

output:
- versions:
type: file
Expand Down
96 changes: 96 additions & 0 deletions modules/nf-core/ichorcna/createpon/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
nextflow_process {

name "Test Process ICHORCNA_CREATEPON"
script "../main.nf"
process "ICHORCNA_CREATEPON"

tag "modules"
tag "modules_nfcore"
tag "ichorcna"
tag "ichorcna/createpon"

test("hg19 - one file") {

when {
process {
"""
input[0] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/MBC_315.ctDNA.reads.wig", checkIfExists: true)
input[1] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/gc_hg19_1000kb.wig", checkIfExists: true)
input[2] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/map_hg19_1000kb.wig", checkIfExists: true)
input[3] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt", checkIfExists: true)
input[4] = []
input[5] = []
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.rds[0]).name,
file(process.out.txt[0]).name,
process.out.versions
).match() }
)
}

}


test("hg19 - two files") {

when {
process {
"""
input[0] = [ file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/MBC_315.ctDNA.reads.wig", checkIfExists: true),
file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/MBC_315_T2.ctDNA.reads.wig", checkIfExists: true)
]
input[1] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/gc_hg19_1000kb.wig", checkIfExists: true)
input[2] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/map_hg19_1000kb.wig", checkIfExists: true)
input[3] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt", checkIfExists: true)
input[4] = []
input[5] = []
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.rds[0]).name,
file(process.out.txt[0]).name,
process.out.versions
).match() }
)
}
}

test("stub") {
options "-stub"
when {
process {
"""
input[0] = []
input[1] = []
input[2] = []
input[3] = []
input[4] = []
input[5] = []
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.rds[0]).name,
file(process.out.txt[0]).name,
process.out.versions
).match() }
)
}
}
}
44 changes: 44 additions & 0 deletions modules/nf-core/ichorcna/createpon/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"hg19 - one file": {
"content": [
"PoN_median.rds",
"PoN_median.txt",
[
"versions.yml:md5,59dbc83520b9e00a736f49ed2513657a"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-08-06T14:23:09.884294332"
},
"stub": {
"content": [
"PoN.rds",
"PoN.txt",
[
"versions.yml:md5,59dbc83520b9e00a736f49ed2513657a"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-08-06T14:25:38.594727235"
},
"hg19 - two files": {
"content": [
"PoN_median.rds",
"PoN_median.txt",
[
"versions.yml:md5,59dbc83520b9e00a736f49ed2513657a"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-08-06T14:23:29.496424481"
}
}
2 changes: 2 additions & 0 deletions modules/nf-core/ichorcna/createpon/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ichorcna/createpon:
- "modules/nf-core/ichorcna/createpon/**"
2 changes: 1 addition & 1 deletion modules/nf-core/ichorcna/run/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- bioconda::r-ichorcna=0.3.2
- bioconda::r-ichorcna=0.5.1
Loading
Loading