diff --git a/CHANGELOG.md b/CHANGELOG.md
index 90d5cb2159..33cd4faf95 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#597](https://github.com/nf-core/sarek/pull/597) - Added tiddit for tumor variant calling
- [#600](https://github.com/nf-core/sarek/pull/600) - Added description for UMI related params in schema
- [#604](https://github.com/nf-core/sarek/pull/604), [#617](https://github.com/nf-core/sarek/pull/617) - Added full size tests WGS 30x NA12878
+- [#620](https://github.com/nf-core/sarek/pull/620) - Added checks for sex information when running a CNV tools
### Changed
@@ -73,6 +74,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#600](https://github.com/nf-core/sarek/pull/600) - Remove `TODO` in awsfulltest
- [#606](https://github.com/nf-core/sarek/pull/606) - Updated `ASCAT` to version `3.0` as module
- [#608](https://github.com/nf-core/sarek/pull/608) - Prevent candidate VCFs from getting published in manta
+- [#620](https://github.com/nf-core/sarek/pull/620) - `gender` is now `sex` in the samplesheet
### Fixed
diff --git a/assets/schema_input.json b/assets/schema_input.json
index a8e645b5a8..365df554da 100644
--- a/assets/schema_input.json
+++ b/assets/schema_input.json
@@ -17,8 +17,8 @@
"pattern": "^\\S+$",
"errorMessage": "Sample name must be provided and cannot contain spaces"
},
- "gender": {
- "errorMessage": "Gender cannot contain spaces",
+ "sex": {
+ "errorMessage": "Sex cannot contain spaces",
"anyOf": [
{
"type": "string",
diff --git a/conf/modules.config b/conf/modules.config
index cb60e761ba..5615d5d618 100644
--- a/conf/modules.config
+++ b/conf/modules.config
@@ -743,7 +743,7 @@ process{
ploidy: params.ploidy,
printNA: params.wes ? "FALSE" : "TRUE",
readcountthreshold: params.wes ? "50" : "10",
- sex: meta.gender,
+ sex: meta.sex,
//uniquematch: not set
window: params.cf_window ?: ""
],
@@ -926,12 +926,12 @@ process{
withName: 'ASCAT' {
ext.args = {[
- "gender": meta.gender,
+ "gender": meta.sex,
"genomeVersion": params.ascat_genome,
"purity": params.ascat_purity,
"ploidy": params.ploidy,
"minCounts": params.ascat_min_counts,
- "chrom_names": meta.gender == 'XX' ? params.ascat_chromosomes : "c(1:22, 'X', 'Y')",
+ "chrom_names": meta.sex == 'XX' ? params.ascat_chromosomes : "c(1:22, 'X', 'Y')",
"min_base_qual": params.ascat_min_base_qual,
"min_map_qual": params.ascat_min_map_qual
]}
@@ -1002,7 +1002,7 @@ process{
ploidy: params.ploidy,
printNA: params.wes ? "FALSE" : "TRUE",
readcountthreshold: params.wes ? "50" : "10",
- sex: meta.gender,
+ sex: meta.sex,
//uniquematch: not set
window: params.cf_window ?: ""
],
diff --git a/docs/usage.md b/docs/usage.md
index 3a99935d61..33f2726a96 100644
--- a/docs/usage.md
+++ b/docs/usage.md
@@ -53,7 +53,7 @@ Multiple `CSV` files can be specified if the path is enclosed in quotes.
| Column | Description |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `patient` | **Custom patient ID**; designates the patient/subject; must be unique for each patient, but one patient can have multiple samples (e.g. normal and tumor). |
-| `gender` | **Sex chromosomes of the patient**; i.e. XX, XY..., only used for Copy-Number Variation analysis in a tumor/pair
_Optional, Default: `NA`_ |
+| `sex` | **Sex chromosomes of the patient**; i.e. XX, XY..., only used for Copy-Number Variation analysis in a tumor/pair
_Optional, Default: `NA`_ |
| `status` | **Normal/tumor status of sample**; can be `0` (normal) or `1` (tumor).
_Optional, Default: `0`_ |
| `sample` | **Custom sample ID** for each tumor and normal sample; more than one tumor sample for each subject is possible, i.e. a tumor and a relapse; samples can have multiple lanes for which the _same_ ID must be used to merge them later (see also `lane`). Sample IDs must be unique for unique biological samples |
| `lane` | Lane ID, used when the `sample` is multiplexed on several lanes. Must be unique for each lane in the same sample (but does not need to be the original lane name), and must contain at least one character
_Required for `--step_mapping`_ |
@@ -104,10 +104,10 @@ patient1,test_sample,3,test_L003.bam
##### Full samplesheet
-In this example, all possible columns are used. There are 3 read groups for the normal sample, 2 for the tumor sample, 1 for the relapse, including the `gender` and `status` information per patient:
+In this example, all possible columns are used. There are 3 read groups for the normal sample, 2 for the tumor sample, 1 for the relapse, including the `sex` and `status` information per patient:
```console
-patient,gender,status,sample,lane,fastq_1,fastq_2
+patient,sex,status,sample,lane,fastq_1,fastq_2
patient1,XX,0,normal_sample,lane_1,test_L001_1.fastq.gz,test_L001_2.fastq.gz
patient1,XX,0,normal_sample,lane_2,test_L002_1.fastq.gz,test_L002_2.fastq.gz
patient1,XX,0,normal_sample,lane_3,test_L003_1.fastq.gz,test_L003_2.fastq.gz
@@ -117,7 +117,7 @@ patient1,XX,1,relapse_sample,lane_1,test3_L001_1.fastq.gz,test3_L001_2.fastq.gz
```
```console
-patient,gender,status,sample,lane,bam
+patient,sex,status,sample,lane,bam
patient1,XX,0,normal_sample,lane_1,test_L001.bam
patient1,XX,0,normal_sample,lane_2,test_L002.bam
patient1,XX,0,normal_sample,lane_3,test_L003.bam
@@ -148,17 +148,17 @@ The `Sarek`-generated `CSV` file is stored under `results/csv/mapped.csv` if in
##### Full samplesheet
-In this example, all possible columns are used including the `gender` and `status` information per patient:
+In this example, all possible columns are used including the `sex` and `status` information per patient:
```console
-patient,gender,status,sample,bam,bai
+patient,sex,status,sample,bam,bai
patient1,XX,0,test_sample,test_mapped.bam,test_mapped.bam.bai
patient1,XX,1,tumor_sample,test2_mapped.bam,test2_mapped.bam.bai
patient1,XX,1,relapse_sample,test3_mapped.bam,test3_mapped.bam.bai
```
```console
-patient,gender,status,sample,cram,crai
+patient,sex,status,sample,cram,crai
patient1,XX,0,normal_sample,test_mapped.cram,test_mapped.cram.crai
patient1,XX,1,tumor_sample,test2_mapped.cram,test2_mapped.cram.crai
patient1,XX,1,relapse_sample,test3_mapped.cram,test3_mapped.cram.crai
@@ -184,17 +184,17 @@ The `Sarek`-generated `CSV` file is stored under `results/csv/markduplicates_no_
##### Full samplesheet
-In this example, all possible columns are used including the `gender` and `status` information per patient:
+In this example, all possible columns are used including the `sex` and `status` information per patient:
```console
-patient,gender,status,sample,bam,bai
+patient,sex,status,sample,bam,bai
patient1,XX,0,test_sample,test_md.bam,test_md.bam.bai
patient1,XX,1,tumor_sample,test2_md.bam,test2_md.bam.bai
patient1,XX,1,relapse_sample,test3_md.bam,test3_md.bam.bai
```
```console
-patient,gender,status,sample,cram,crai
+patient,sex,status,sample,cram,crai
patient1,XX,0,normal_sample,test_md.cram,test_md.cram.crai
patient1,XX,1,tumor_sample,test2_md.cram,test2_md.cram.crai
patient1,XX,1,relapse_sample,test3_md.cram,test3_md.cram.crai
@@ -220,10 +220,10 @@ The `Sarek`-generated `CSV` file is stored under `results/csv/markduplicates.csv
##### Full samplesheet
-In this example, all possible columns are used including the `gender` and `status` information per patient:
+In this example, all possible columns are used including the `sex` and `status` information per patient:
```console
-patient,gender,status,sample,cram,crai,table
+patient,sex,status,sample,cram,crai,table
patient1,XX,0,test_sample,test_mapped.cram,test_mapped.cram.crai,test.table
patient1,XX,1,tumor_sample,test2_mapped.cram,test2_mapped.cram.crai,test2.table
patient1,XX,1,relapse_sample,test3_mapped.cram,test3_mapped.cram.crai,test3.table
@@ -249,10 +249,10 @@ The `Sarek`-generated `CSV` file is stored under `results/csv/recalibrated.csv`
##### Full samplesheet
-In this example, all possible columns are used including the `gender` and `status` information per patient:
+In this example, all possible columns are used including the `sex` and `status` information per patient:
```console
-patient,gender,status,sample,cram,crai
+patient,sex,status,sample,cram,crai
patient1,XX,0,normal_sample,test_mapped.cram,test_mapped.cram.crai
patient1,XX,1,tumor_sample,test2_mapped.cram,test2_mapped.cram.crai
patient1,XX,1,relapse_sample,test3_mapped.cram,test3_mapped.cram.crai
diff --git a/subworkflows/local/germline_variant_calling.nf b/subworkflows/local/germline_variant_calling.nf
index eee870d3f7..e9e93d1ebc 100644
--- a/subworkflows/local/germline_variant_calling.nf
+++ b/subworkflows/local/germline_variant_calling.nf
@@ -49,7 +49,7 @@ workflow GERMLINE_VARIANT_CALLING {
//If no interval file provided (0) then add empty list
intervals_new = num_intervals == 0 ? [] : intervals
- [[patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:num_intervals],
+ [[patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:num_intervals],
cram, crai, intervals_new]
}
@@ -61,7 +61,7 @@ workflow GERMLINE_VARIANT_CALLING {
bed_new = num_intervals == 0 ? [] : bed_tbi[0]
tbi_new = num_intervals == 0 ? [] : bed_tbi[1]
- [[patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:num_intervals],
+ [[patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:num_intervals],
cram, crai, bed_new, tbi_new]
}
diff --git a/subworkflows/local/mapping_csv.nf b/subworkflows/local/mapping_csv.nf
index 9ffebb53aa..1c0d5ae094 100644
--- a/subworkflows/local/mapping_csv.nf
+++ b/subworkflows/local/mapping_csv.nf
@@ -11,10 +11,10 @@ workflow MAPPING_CSV {
bam_indexed.collectFile(keepHeader: true, skip: 1, sort: true, storeDir: "${params.outdir}/csv") { meta, bam, bai ->
patient = meta.patient
sample = meta.sample
- gender = meta.gender
+ sex = meta.sex
status = meta.status
bam = "${params.outdir}/preprocessing/${sample}/mapped/${bam.name}"
bai = "${params.outdir}/preprocessing/${sample}/mapped/${bai.name}"
- ["mapped.csv", "patient,gender,status,sample,bam,bai\n${patient},${gender},${status},${sample},${bam},${bai}\n"]
+ ["mapped.csv", "patient,sex,status,sample,bam,bai\n${patient},${sex},${status},${sample},${bam},${bai}\n"]
}
}
diff --git a/subworkflows/local/markduplicates_csv.nf b/subworkflows/local/markduplicates_csv.nf
index 7e7916d910..0819153351 100644
--- a/subworkflows/local/markduplicates_csv.nf
+++ b/subworkflows/local/markduplicates_csv.nf
@@ -11,12 +11,12 @@ workflow MARKDUPLICATES_CSV {
cram_markduplicates.collectFile(keepHeader: true, skip: 1, sort: true, storeDir: "${params.outdir}/csv") { meta, file, index ->
patient = meta.patient
sample = meta.sample
- gender = meta.gender
+ sex = meta.sex
status = meta.status
suffix_aligned = params.save_output_as_bam ? "bam" : "cram"
suffix_index = params.save_output_as_bam ? "bam.bai" : "cram.crai"
file = "${params.outdir}/preprocessing/${sample}/markduplicates/${file.baseName}.${suffix_aligned}"
index = "${params.outdir}/preprocessing/${sample}/markduplicates/${index.baseName.minus(".cram")}.${suffix_index}"
- ["markduplicates_no_table.csv", "patient,gender,status,sample,cram,crai\n${patient},${gender},${status},${sample},${file},${index}\n"]
+ ["markduplicates_no_table.csv", "patient,sex,status,sample,cram,crai\n${patient},${sex},${status},${sample},${file},${index}\n"]
}
}
diff --git a/subworkflows/local/pair_variant_calling.nf b/subworkflows/local/pair_variant_calling.nf
index bdd08b4866..7522fce9a7 100644
--- a/subworkflows/local/pair_variant_calling.nf
+++ b/subworkflows/local/pair_variant_calling.nf
@@ -58,7 +58,7 @@ workflow PAIR_VARIANT_CALLING {
//If no interval file provided (0) then add empty list
intervals_new = num_intervals == 0 ? [] : intervals
- [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id: meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:num_intervals],
+ [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id: meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:num_intervals],
normal_cram, normal_crai, tumor_cram, tumor_crai, intervals_new]
}
@@ -70,7 +70,7 @@ workflow PAIR_VARIANT_CALLING {
bed_new = num_intervals == 0 ? [] : bed_tbi[0]
tbi_new = num_intervals == 0 ? [] : bed_tbi[1]
- [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id: meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:num_intervals],
+ [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id: meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:num_intervals],
normal_cram, normal_crai, tumor_cram, tumor_crai, bed_new, tbi_new]
}
@@ -168,7 +168,7 @@ workflow PAIR_VARIANT_CALLING {
bed_new = num_intervals == 0 ? [] : bed_tbi[0]
tbi_new = num_intervals == 0 ? [] : bed_tbi[1]
- [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:num_intervals],
+ [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:num_intervals],
normal_cram, normal_crai, tumor_cram, tumor_crai, vcf, vcf_tbi, bed_new, tbi_new]
}
diff --git a/subworkflows/local/prepare_recalibration_csv.nf b/subworkflows/local/prepare_recalibration_csv.nf
index 430d6a16aa..1cf8b219bc 100644
--- a/subworkflows/local/prepare_recalibration_csv.nf
+++ b/subworkflows/local/prepare_recalibration_csv.nf
@@ -11,13 +11,13 @@ workflow PREPARE_RECALIBRATION_CSV {
cram_table_bqsr.collectFile(keepHeader: true, skip: 1, sort: true, storeDir: "${params.outdir}/csv") { meta, cram, crai, table ->
patient = meta.patient
sample = meta.sample
- gender = meta.gender
+ sex = meta.sex
status = meta.status
suffix_aligned = params.save_output_as_bam ? "bam" : "cram"
suffix_index = params.save_output_as_bam ? "bam.bai" : "cram.crai"
cram = "${params.outdir}/preprocessing/${sample}/markduplicates/${cram.baseName}.${suffix_aligned}"
crai = "${params.outdir}/preprocessing/${sample}/markduplicates/${crai.baseName.minus(".cram")}.${suffix_index}"
table = "${params.outdir}/preprocessing/${sample}/recal_table/${sample}.recal.table"
- ["markduplicates.csv", "patient,gender,status,sample,cram,crai,table\n${patient},${gender},${status},${sample},${cram},${crai},${table}\n"]
+ ["markduplicates.csv", "patient,sex,status,sample,cram,crai,table\n${patient},${sex},${status},${sample},${cram},${crai},${table}\n"]
}
}
diff --git a/subworkflows/local/recalibrate_csv.nf b/subworkflows/local/recalibrate_csv.nf
index ad039128cb..e5068e6928 100644
--- a/subworkflows/local/recalibrate_csv.nf
+++ b/subworkflows/local/recalibrate_csv.nf
@@ -11,10 +11,10 @@ workflow RECALIBRATE_CSV {
cram_recalibrated_index.collectFile(keepHeader: true, skip: 1, sort: true, storeDir: "${params.outdir}/csv") { meta, file, index ->
patient = meta.patient
sample = meta.sample
- gender = meta.gender
+ sex = meta.sex
status = meta.status
file = "${params.outdir}/preprocessing/${sample}/recalibrated/${file.name}"
index = "${params.outdir}/preprocessing/${sample}/recalibrated/${index.name}"
- ["recalibrated.csv", "patient,gender,status,sample,cram,crai\n${patient},${gender},${status},${sample},${file},${index}\n"]
+ ["recalibrated.csv", "patient,sex,status,sample,cram,crai\n${patient},${sex},${status},${sample},${file},${index}\n"]
}
}
diff --git a/subworkflows/local/tumor_variant_calling.nf b/subworkflows/local/tumor_variant_calling.nf
index f9c8b44f07..f02487399e 100644
--- a/subworkflows/local/tumor_variant_calling.nf
+++ b/subworkflows/local/tumor_variant_calling.nf
@@ -50,7 +50,7 @@ workflow TUMOR_ONLY_VARIANT_CALLING {
//If no interval file provided (0) then add empty list
intervals_new = num_intervals == 0 ? [] : intervals
- [[patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:num_intervals],
+ [[patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:num_intervals],
cram, crai, intervals_new]
}
@@ -62,7 +62,7 @@ workflow TUMOR_ONLY_VARIANT_CALLING {
bed_new = num_intervals == 0 ? [] : bed_tbi[0]
tbi_new = num_intervals == 0 ? [] : bed_tbi[1]
- [[patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:num_intervals],
+ [[patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:num_intervals],
cram, crai, bed_new, tbi_new]
}
diff --git a/subworkflows/local/variantcalling_csv.nf b/subworkflows/local/variantcalling_csv.nf
index 911effe0e7..0382126ae0 100644
--- a/subworkflows/local/variantcalling_csv.nf
+++ b/subworkflows/local/variantcalling_csv.nf
@@ -13,6 +13,6 @@ workflow VARIANTCALLING_CSV {
sample = meta.id
variantcaller = meta.variantcaller
vcf = "${params.outdir}/variant_calling/${meta.id}/${variantcaller}/${vcf.getName()}"
- ["variantcalled.csv", "patient,gender,sample,variantcaller,vcf\n${patient},${sample},${variantcaller},${vcf}\n"]
+ ["variantcalled.csv", "patient,sample,variantcaller,vcf\n${patient},${sample},${variantcaller},${vcf}\n"]
}
}
diff --git a/subworkflows/nf-core/gatk4/prepare_recalibration/main.nf b/subworkflows/nf-core/gatk4/prepare_recalibration/main.nf
index d260f53764..254855f8d7 100644
--- a/subworkflows/nf-core/gatk4/prepare_recalibration/main.nf
+++ b/subworkflows/nf-core/gatk4/prepare_recalibration/main.nf
@@ -26,7 +26,7 @@ workflow PREPARE_RECALIBRATION {
//If no interval file provided (0) then add empty list
intervals_new = num_intervals == 0 ? [] : intervals
- [[patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:num_intervals],
+ [[patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:num_intervals],
cram, crai, intervals_new]
}
@@ -37,7 +37,7 @@ workflow PREPARE_RECALIBRATION {
table_to_merge = BASERECALIBRATOR.out.table
.map{ meta, table ->
- new_meta = [patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:meta.num_intervals]
[groupKey(new_meta, meta.num_intervals), table]
}.groupTuple()
@@ -54,7 +54,7 @@ workflow PREPARE_RECALIBRATION {
table_bqsr = table_to_merge.single.mix(GATHERBQSRREPORTS.out.table)
.map{ meta, table ->
// remove no longer necessary fields to make sure joining can be done correctly: num_intervals
- [[patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.sample, data_type:meta.data_type],
+ [[patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.sample, data_type:meta.data_type],
table]
}
diff --git a/subworkflows/nf-core/gatk4/prepare_recalibration_spark/main.nf b/subworkflows/nf-core/gatk4/prepare_recalibration_spark/main.nf
index 4cde8d911e..be868bd015 100644
--- a/subworkflows/nf-core/gatk4/prepare_recalibration_spark/main.nf
+++ b/subworkflows/nf-core/gatk4/prepare_recalibration_spark/main.nf
@@ -26,7 +26,7 @@ workflow PREPARE_RECALIBRATION_SPARK {
//If no interval file provided (0) then add empty list
intervals_new = num_intervals == 0 ? [] : intervals
- [[patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:num_intervals],
+ [[patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:num_intervals],
cram, crai, intervals_new]
}
@@ -37,7 +37,7 @@ workflow PREPARE_RECALIBRATION_SPARK {
table_to_merge = BASERECALIBRATOR_SPARK.out.table
.map{ meta, table ->
- new_meta = [patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:meta.num_intervals]
[groupKey(new_meta, meta.num_intervals), table]
}.groupTuple()
@@ -54,7 +54,7 @@ workflow PREPARE_RECALIBRATION_SPARK {
table_bqsr = table_to_merge.single.mix(GATHERBQSRREPORTS.out.table)
.map{ meta, table ->
// remove no longer necessary fields to make sure joining can be done correctly: num_intervals
- [[patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.sample, data_type:meta.data_type],
+ [[patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.sample, data_type:meta.data_type],
table]
}
diff --git a/subworkflows/nf-core/gatk4/recalibrate/main.nf b/subworkflows/nf-core/gatk4/recalibrate/main.nf
index 8b004d6d8e..297de5b687 100644
--- a/subworkflows/nf-core/gatk4/recalibrate/main.nf
+++ b/subworkflows/nf-core/gatk4/recalibrate/main.nf
@@ -24,7 +24,7 @@ workflow RECALIBRATE {
//If no interval file provided (0) then add empty list
intervals_new = num_intervals == 0 ? [] : intervals
- [[patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:num_intervals],
+ [[patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:num_intervals],
cram, crai, recal, intervals_new]
}
@@ -36,7 +36,7 @@ workflow RECALIBRATE {
ch_cram_recal_out = MERGE_INDEX_CRAM.out.cram_crai.map{ meta, cram, crai ->
// remove no longer necessary fields to make sure joining can be done correctly: num_intervals
- [[patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.id, data_type:meta.data_type],
+ [[patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.id, data_type:meta.data_type],
cram, crai]
}
diff --git a/subworkflows/nf-core/gatk4/recalibrate_spark/main.nf b/subworkflows/nf-core/gatk4/recalibrate_spark/main.nf
index 3ec4e369a3..9afd0d55a4 100644
--- a/subworkflows/nf-core/gatk4/recalibrate_spark/main.nf
+++ b/subworkflows/nf-core/gatk4/recalibrate_spark/main.nf
@@ -24,7 +24,7 @@ workflow RECALIBRATE_SPARK {
//If no interval file provided (0) then add empty list
intervals_new = num_intervals == 0 ? [] : intervals
- [[patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:num_intervals],
+ [[patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:num_intervals],
cram, crai, recal, intervals_new]
}
@@ -36,7 +36,7 @@ workflow RECALIBRATE_SPARK {
ch_cram_recal_out = MERGE_INDEX_CRAM.out.cram_crai.map{ meta, cram, crai ->
// remove no longer necessary fields to make sure joining can be done correctly: num_intervals
- [[patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.id, data_type:meta.data_type],
+ [[patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.id, data_type:meta.data_type],
cram, crai]
}
diff --git a/subworkflows/nf-core/gatk4/single_sample_germline_variant_calling/main.nf b/subworkflows/nf-core/gatk4/single_sample_germline_variant_calling/main.nf
index 6a300c149e..d76405e4c5 100644
--- a/subworkflows/nf-core/gatk4/single_sample_germline_variant_calling/main.nf
+++ b/subworkflows/nf-core/gatk4/single_sample_germline_variant_calling/main.nf
@@ -44,7 +44,7 @@ workflow GATK_SINGLE_SAMPLE_GERMLINE_VARIANT_CALLING{
// Figure out if using intervals or no_intervals
filtered_vcf = FILTERVARIANTTRANCHES.out.vcf.map{ meta, vcf ->
- [[patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals, variantcaller:"haplotypecaller"], vcf]
+ [[patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals, variantcaller:"haplotypecaller"], vcf]
}
ch_versions = ch_versions.mix(CNNSCOREVARIANTS.out.versions)
diff --git a/subworkflows/nf-core/gatk4/tumor_normal_somatic_variant_calling/main.nf b/subworkflows/nf-core/gatk4/tumor_normal_somatic_variant_calling/main.nf
index 9669c616db..2114674534 100644
--- a/subworkflows/nf-core/gatk4/tumor_normal_somatic_variant_calling/main.nf
+++ b/subworkflows/nf-core/gatk4/tumor_normal_somatic_variant_calling/main.nf
@@ -65,7 +65,7 @@ workflow GATK_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING {
mutect2_vcf_branch.intervals
.map{ meta, vcf ->
- new_meta = [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals]
[groupKey(new_meta, meta.num_intervals), vcf]
}.groupTuple(),
@@ -85,7 +85,7 @@ workflow GATK_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING {
mutect2_stats_branch.intervals
.map{ meta, stats ->
- new_meta = [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals]
[groupKey(new_meta, meta.num_intervals), stats]
}.groupTuple())
@@ -101,7 +101,7 @@ workflow GATK_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING {
mutect2_f1r2_branch.intervals
.map{ meta, f1r2 ->
- new_meta = [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals]
[groupKey(new_meta, meta.num_intervals), f1r2]
}.groupTuple(),
@@ -121,7 +121,7 @@ workflow GATK_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING {
GETPILEUPSUMMARIES_TUMOR ( pileup.tumor.map{
meta, cram, crai, intervals ->
- [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id, num_intervals:meta.num_intervals],
+ [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id, num_intervals:meta.num_intervals],
cram, crai, intervals]
},
fasta, fai, dict, germline_resource_pileup, germline_resource_pileup_tbi )
@@ -129,7 +129,7 @@ workflow GATK_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING {
GETPILEUPSUMMARIES_NORMAL ( pileup.normal.map{
meta, cram, crai, intervals ->
- [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.normal_id, num_intervals:meta.num_intervals],
+ [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.normal_id, num_intervals:meta.num_intervals],
cram, crai, intervals]
},
fasta, fai, dict, germline_resource_pileup, germline_resource_pileup_tbi )
@@ -149,7 +149,7 @@ workflow GATK_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING {
GETPILEUPSUMMARIES_NORMAL.out.table
.map{ meta, table ->
- new_meta = [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.normal_id, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.normal_id, num_intervals:meta.num_intervals]
[groupKey(new_meta, meta.num_intervals), table]
}.groupTuple(),
@@ -159,14 +159,14 @@ workflow GATK_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING {
GATHERPILEUPSUMMARIES_NORMAL.out.table,
pileup_table_normal.no_intervals).map{ meta, table ->
- new_meta = [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals]
[new_meta, table]
}
GATHERPILEUPSUMMARIES_TUMOR(
GETPILEUPSUMMARIES_TUMOR.out.table
.map{ meta, table ->
- new_meta = [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id, num_intervals:meta.num_intervals]
[groupKey(new_meta, meta.num_intervals), table]
}.groupTuple(),
@@ -175,7 +175,7 @@ workflow GATK_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING {
gather_table_tumor = Channel.empty().mix(
GATHERPILEUPSUMMARIES_TUMOR.out.table,
pileup_table_tumor.no_intervals).map{ meta, table ->
- new_meta = [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals]
[new_meta, table]
}
@@ -220,7 +220,7 @@ workflow GATK_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING {
contamination_table = CALCULATECONTAMINATION.out.contamination // channel: [ val(meta), [ contamination ] ]
segmentation_table = CALCULATECONTAMINATION.out.segmentation // channel: [ val(meta), [ segmentation ] ]
- filtered_vcf = FILTERMUTECTCALLS.out.vcf.map{ meta, vcf -> [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals, variantcaller:"Mutect2"],
+ filtered_vcf = FILTERMUTECTCALLS.out.vcf.map{ meta, vcf -> [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals, variantcaller:"Mutect2"],
vcf]} // channel: [ val(meta), [ vcf ] ]
filtered_tbi = FILTERMUTECTCALLS.out.tbi // channel: [ val(meta), [ tbi ] ]
filtered_stats = FILTERMUTECTCALLS.out.stats // channel: [ val(meta), [ stats ] ]
diff --git a/subworkflows/nf-core/gatk4/tumor_only_somatic_variant_calling/main.nf b/subworkflows/nf-core/gatk4/tumor_only_somatic_variant_calling/main.nf
index 34975771e9..534c9877db 100644
--- a/subworkflows/nf-core/gatk4/tumor_only_somatic_variant_calling/main.nf
+++ b/subworkflows/nf-core/gatk4/tumor_only_somatic_variant_calling/main.nf
@@ -64,7 +64,7 @@ workflow GATK_TUMOR_ONLY_SOMATIC_VARIANT_CALLING {
MERGE_MUTECT2(
mutect2_vcf_branch.intervals
.map{ meta, vcf ->
- new_meta = [patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals]
[groupKey(new_meta, meta.num_intervals), vcf]
}.groupTuple(),
@@ -82,7 +82,7 @@ workflow GATK_TUMOR_ONLY_SOMATIC_VARIANT_CALLING {
MERGEMUTECTSTATS(
mutect2_stats_branch.intervals
.map{ meta, stats ->
- new_meta = [patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals]
[groupKey(new_meta, meta.num_intervals), stats]
}.groupTuple())
@@ -98,7 +98,7 @@ workflow GATK_TUMOR_ONLY_SOMATIC_VARIANT_CALLING {
Channel.empty().mix(
mutect2_f1r2_branch.intervals
.map{ meta, f1r2 ->
- new_meta = [patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals]
[groupKey(new_meta, meta.num_intervals), f1r2]
}.groupTuple(),
@@ -120,7 +120,7 @@ workflow GATK_TUMOR_ONLY_SOMATIC_VARIANT_CALLING {
GATHERPILEUPSUMMARIES(
GETPILEUPSUMMARIES.out.table
.map{ meta, table ->
- new_meta = [patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals]
[groupKey(new_meta, meta.num_intervals), table]
}.groupTuple(),
@@ -168,7 +168,7 @@ workflow GATK_TUMOR_ONLY_SOMATIC_VARIANT_CALLING {
contamination_table = CALCULATECONTAMINATION.out.contamination // channel: [ val(meta), [ contamination ] ]
segmentation_table = CALCULATECONTAMINATION.out.segmentation // channel: [ val(meta), [ segmentation ] ]
- filtered_vcf = FILTERMUTECTCALLS.out.vcf.map{ meta, vcf -> [[patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals, variantcaller:"Mutect2"]
+ filtered_vcf = FILTERMUTECTCALLS.out.vcf.map{ meta, vcf -> [[patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals, variantcaller:"Mutect2"]
, vcf] } // channel: [ val(meta), [ vcf ] ]
filtered_index = FILTERMUTECTCALLS.out.tbi // channel: [ val(meta), [ tbi ] ]
filtered_stats = FILTERMUTECTCALLS.out.stats // channel: [ val(meta), [ stats ] ]
diff --git a/subworkflows/nf-core/merge_index_cram.nf b/subworkflows/nf-core/merge_index_cram.nf
index 8c17f97155..54bc59cc72 100644
--- a/subworkflows/nf-core/merge_index_cram.nf
+++ b/subworkflows/nf-core/merge_index_cram.nf
@@ -18,7 +18,7 @@ workflow MERGE_INDEX_CRAM {
// Figuring out if there is one or more cram(s) from the same sample
ch_cram_to_merge = ch_cram.map{ meta, cram ->
- [groupKey([patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:meta.num_intervals],
+ [groupKey([patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.sample, data_type:meta.data_type, num_intervals:meta.num_intervals],
meta.num_intervals),
cram]
}.groupTuple()
diff --git a/subworkflows/nf-core/variantcalling/cnvkit/tumoronly/main.nf b/subworkflows/nf-core/variantcalling/cnvkit/tumoronly/main.nf
index 8834c9e79c..560680c692 100644
--- a/subworkflows/nf-core/variantcalling/cnvkit/tumoronly/main.nf
+++ b/subworkflows/nf-core/variantcalling/cnvkit/tumoronly/main.nf
@@ -24,7 +24,7 @@ workflow RUN_CNVKIT_TUMORONLY {
CNVKIT_ANTITARGET(targets.map{ it -> [[id:it[0].baseName], it] })
- CNVKIT_REFERENCE(fasta, targets, CNVKIT_ANTITARGET.out.bed.map{ meta,bed -> [bed]} )
+ CNVKIT_REFERENCE(fasta, targets, CNVKIT_ANTITARGET.out.bed.map{ meta, bed -> [bed]} )
// use reference for calling CNVs
// cram_input needs the fasta reference genome for bam_conversion
diff --git a/subworkflows/nf-core/variantcalling/controlfreec/somatic/main.nf b/subworkflows/nf-core/variantcalling/controlfreec/somatic/main.nf
index 0c88ba8737..2af46aed54 100644
--- a/subworkflows/nf-core/variantcalling/controlfreec/somatic/main.nf
+++ b/subworkflows/nf-core/variantcalling/controlfreec/somatic/main.nf
@@ -30,9 +30,9 @@ workflow RUN_CONTROLFREEC_SOMATIC {
intervals_bed,
[])
- ASSESS_SIGNIFICANCE( FREEC_SOMATIC.out.CNV.join(FREEC_SOMATIC.out.ratio))
- FREEC2BED( FREEC_SOMATIC.out.ratio )
- FREEC2CIRCOS( FREEC_SOMATIC.out.ratio )
+ ASSESS_SIGNIFICANCE(FREEC_SOMATIC.out.CNV.join(FREEC_SOMATIC.out.ratio))
+ FREEC2BED(FREEC_SOMATIC.out.ratio)
+ FREEC2CIRCOS(FREEC_SOMATIC.out.ratio)
MAKEGRAPH(FREEC_SOMATIC.out.ratio.join(FREEC_SOMATIC.out.BAF))
ch_versions = ch_versions.mix(FREEC_SOMATIC.out.versions)
diff --git a/subworkflows/nf-core/variantcalling/controlfreec/tumoronly/main.nf b/subworkflows/nf-core/variantcalling/controlfreec/tumoronly/main.nf
index c7535b10c6..2f1713429e 100644
--- a/subworkflows/nf-core/variantcalling/controlfreec/tumoronly/main.nf
+++ b/subworkflows/nf-core/variantcalling/controlfreec/tumoronly/main.nf
@@ -30,9 +30,9 @@ workflow RUN_CONTROLFREEC_TUMORONLY {
intervals_bed,
[])
- ASSESS_SIGNIFICANCE( FREEC_TUMORONLY.out.CNV.join(FREEC_TUMORONLY.out.ratio))
- FREEC2BED( FREEC_TUMORONLY.out.ratio )
- FREEC2CIRCOS( FREEC_TUMORONLY.out.ratio )
+ ASSESS_SIGNIFICANCE(FREEC_TUMORONLY.out.CNV.join(FREEC_TUMORONLY.out.ratio))
+ FREEC2BED(FREEC_TUMORONLY.out.ratio)
+ FREEC2CIRCOS(FREEC_TUMORONLY.out.ratio)
MAKEGRAPH(FREEC_TUMORONLY.out.ratio.join(FREEC_TUMORONLY.out.BAF))
ch_versions = ch_versions.mix(FREEC_TUMORONLY.out.versions)
diff --git a/subworkflows/nf-core/variantcalling/deepvariant/main.nf b/subworkflows/nf-core/variantcalling/deepvariant/main.nf
index 64c0c7ace3..112ba56fdd 100644
--- a/subworkflows/nf-core/variantcalling/deepvariant/main.nf
+++ b/subworkflows/nf-core/variantcalling/deepvariant/main.nf
@@ -39,7 +39,7 @@ workflow RUN_DEEPVARIANT {
deepvariant_vcf_out.intervals
.map{ meta, vcf ->
- new_meta = [patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals]
[groupKey(new_meta, meta.num_intervals), vcf]
}.groupTuple(),
@@ -49,7 +49,7 @@ workflow RUN_DEEPVARIANT {
deepvariant_gvcf_out.intervals
.map{ meta, vcf ->
- new_meta = [patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals]
[groupKey(new_meta, meta.num_intervals), vcf]
}.groupTuple(),
@@ -60,13 +60,13 @@ workflow RUN_DEEPVARIANT {
MERGE_DEEPVARIANT_GVCF.out.vcf,
deepvariant_gvcf_out.no_intervals)
.map{ meta, vcf ->
- [[patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals, variantcaller:"deepvariant"], vcf]
+ [[patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals, variantcaller:"deepvariant"], vcf]
}
deepvariant_vcf = Channel.empty().mix(
MERGE_DEEPVARIANT_VCF.out.vcf,
deepvariant_vcf_out.no_intervals)
.map{ meta, vcf ->
- [[patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals, variantcaller:"deepvariant"], vcf]
+ [[patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals, variantcaller:"deepvariant"], vcf]
}
ch_versions = ch_versions.mix(MERGE_DEEPVARIANT_GVCF.out.versions)
diff --git a/subworkflows/nf-core/variantcalling/freebayes/main.nf b/subworkflows/nf-core/variantcalling/freebayes/main.nf
index 9441d2f16b..d53f855751 100644
--- a/subworkflows/nf-core/variantcalling/freebayes/main.nf
+++ b/subworkflows/nf-core/variantcalling/freebayes/main.nf
@@ -34,8 +34,8 @@ workflow RUN_FREEBAYES {
bcftools_vcf_out.intervals
.map{ meta, vcf ->
- new_meta = meta.tumor_id ? [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals]
- : [patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals]
+ new_meta = meta.tumor_id ? [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals]
+ : [patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals]
[groupKey(new_meta, meta.num_intervals), vcf]
}.groupTuple(),
dict
@@ -46,7 +46,7 @@ workflow RUN_FREEBAYES {
MERGE_FREEBAYES.out.vcf,
bcftools_vcf_out.no_intervals)
.map{ meta, vcf ->
- [ [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.id, num_intervals:meta.num_intervals, variantcaller:"freebayes"],
+ [ [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.id, num_intervals:meta.num_intervals, variantcaller:"freebayes"],
vcf]
}
diff --git a/subworkflows/nf-core/variantcalling/haplotypecaller/main.nf b/subworkflows/nf-core/variantcalling/haplotypecaller/main.nf
index 2481b74ae3..a49e63b98a 100644
--- a/subworkflows/nf-core/variantcalling/haplotypecaller/main.nf
+++ b/subworkflows/nf-core/variantcalling/haplotypecaller/main.nf
@@ -46,7 +46,7 @@ workflow RUN_HAPLOTYPECALLER {
haplotypecaller_vcf_branch.intervals
.map{ meta, vcf ->
- new_meta = [patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals]
[groupKey(new_meta, new_meta.num_intervals), vcf]
}.groupTuple(),
diff --git a/subworkflows/nf-core/variantcalling/manta/germline/main.nf b/subworkflows/nf-core/variantcalling/manta/germline/main.nf
index 6ae0970c69..7276e88ed2 100644
--- a/subworkflows/nf-core/variantcalling/manta/germline/main.nf
+++ b/subworkflows/nf-core/variantcalling/manta/germline/main.nf
@@ -39,7 +39,7 @@ workflow RUN_MANTA_GERMLINE {
manta_small_indels_vcf.intervals
.map{ meta, vcf ->
- [groupKey([patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals],
+ [groupKey([patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals],
meta.num_intervals),
vcf]
}.groupTuple(),
@@ -49,7 +49,7 @@ workflow RUN_MANTA_GERMLINE {
manta_sv_vcf.intervals
.map{ meta, vcf ->
- [groupKey([patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals],
+ [groupKey([patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals],
meta.num_intervals),
vcf]
@@ -60,7 +60,7 @@ workflow RUN_MANTA_GERMLINE {
manta_diploid_sv_vcf.intervals
.map{ meta, vcf ->
- [groupKey([patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals],
+ [groupKey([patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals],
meta.num_intervals),
vcf]
@@ -73,7 +73,7 @@ workflow RUN_MANTA_GERMLINE {
MERGE_MANTA_DIPLOID.out.vcf,
manta_diploid_sv_vcf.no_intervals)
.map{ meta, vcf ->
- [[patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals, variantcaller:"manta"], vcf]
+ [[patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals, variantcaller:"manta"], vcf]
}
ch_versions = ch_versions.mix(MERGE_MANTA_DIPLOID.out.versions)
diff --git a/subworkflows/nf-core/variantcalling/manta/somatic/main.nf b/subworkflows/nf-core/variantcalling/manta/somatic/main.nf
index a020c8a56d..01704f4682 100644
--- a/subworkflows/nf-core/variantcalling/manta/somatic/main.nf
+++ b/subworkflows/nf-core/variantcalling/manta/somatic/main.nf
@@ -47,7 +47,7 @@ workflow RUN_MANTA_SOMATIC {
MERGE_MANTA_SV(
manta_candidate_small_indels_vcf.intervals.map{ meta, vcf ->
- [groupKey([patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals],
+ [groupKey([patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals],
meta.num_intervals),
vcf]
@@ -57,7 +57,7 @@ workflow RUN_MANTA_SOMATIC {
MERGE_MANTA_SMALL_INDELS(
manta_candidate_sv_vcf.intervals.map{ meta, vcf ->
- [groupKey([patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals],
+ [groupKey([patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals],
meta.num_intervals),
vcf]
@@ -66,9 +66,9 @@ workflow RUN_MANTA_SOMATIC {
MERGE_MANTA_DIPLOID(
manta_diploid_sv_vcf.intervals.map{ meta, vcf ->
- new_meta = [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals]
- [groupKey([patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals],
+ [groupKey([patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals],
meta.num_intervals),
vcf]
@@ -78,7 +78,7 @@ workflow RUN_MANTA_SOMATIC {
MERGE_MANTA_SOMATIC(
manta_somatic_sv_vcf.intervals.map{ meta, vcf ->
- [groupKey([patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals],
+ [groupKey([patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals],
meta.num_intervals),
vcf]
@@ -92,7 +92,7 @@ workflow RUN_MANTA_SOMATIC {
manta_diploid_sv_vcf.no_intervals,
manta_somatic_sv_vcf.no_intervals
).map{ meta, vcf ->
- [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals, variantcaller:"manta"],
+ [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals, variantcaller:"manta"],
vcf]
}
@@ -101,7 +101,7 @@ workflow RUN_MANTA_SOMATIC {
MERGE_MANTA_SMALL_INDELS.out.vcf,
manta_candidate_small_indels_vcf.no_intervals
).map{ meta, vcf ->
- [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id],
+ [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id],
vcf]
}
@@ -109,7 +109,7 @@ workflow RUN_MANTA_SOMATIC {
MERGE_MANTA_SMALL_INDELS.out.tbi,
manta_candidate_small_indels_vcf_tbi.no_intervals
).map{ meta, vcf ->
- [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id],
+ [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id],
vcf]
}
diff --git a/subworkflows/nf-core/variantcalling/manta/tumoronly/main.nf b/subworkflows/nf-core/variantcalling/manta/tumoronly/main.nf
index 8381aa4947..c966a8c498 100644
--- a/subworkflows/nf-core/variantcalling/manta/tumoronly/main.nf
+++ b/subworkflows/nf-core/variantcalling/manta/tumoronly/main.nf
@@ -38,7 +38,7 @@ workflow RUN_MANTA_TUMORONLY {
MERGE_MANTA_SMALL_INDELS(
manta_small_indels_vcf.intervals.map{ meta, vcf ->
- [groupKey([patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals],
+ [groupKey([patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals],
meta.num_intervals),
vcf]
@@ -48,7 +48,7 @@ workflow RUN_MANTA_TUMORONLY {
MERGE_MANTA_SV(
manta_candidate_sv_vcf.intervals.map{ meta, vcf ->
- [groupKey([patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals],
+ [groupKey([patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals],
meta.num_intervals),
vcf]
@@ -58,7 +58,7 @@ workflow RUN_MANTA_TUMORONLY {
MERGE_MANTA_TUMOR(
manta_tumor_sv_vcf.intervals.map{ meta, vcf ->
- [groupKey( [patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals],
+ [groupKey( [patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals],
meta.num_intervals),
vcf]
@@ -71,7 +71,7 @@ workflow RUN_MANTA_TUMORONLY {
MERGE_MANTA_TUMOR.out.vcf,
manta_tumor_sv_vcf.no_intervals
).map{ meta, vcf ->
- [[patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals, variantcaller:"manta"],
+ [[patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals, variantcaller:"manta"],
vcf]
}
diff --git a/subworkflows/nf-core/variantcalling/mpileup/main.nf b/subworkflows/nf-core/variantcalling/mpileup/main.nf
index 1f4ddde3d5..e5b49aed7c 100644
--- a/subworkflows/nf-core/variantcalling/mpileup/main.nf
+++ b/subworkflows/nf-core/variantcalling/mpileup/main.nf
@@ -19,8 +19,8 @@ workflow RUN_MPILEUP {
//Merge mpileup only when intervals and natural order sort them
CAT_MPILEUP(mpileup.intervals
.map{ meta, pileup ->
- new_meta = meta.tumor_id ? [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals] // not annotated, so no variantcaller necessary
- : [patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals]
+ new_meta = meta.tumor_id ? [patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals] // not annotated, so no variantcaller necessary
+ : [patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals]
[groupKey(new_meta, meta.num_intervals), pileup]
}
.groupTuple(sort:true))
diff --git a/subworkflows/nf-core/variantcalling/strelka/single/main.nf b/subworkflows/nf-core/variantcalling/strelka/single/main.nf
index 5459e17fe8..2bf8baa155 100644
--- a/subworkflows/nf-core/variantcalling/strelka/single/main.nf
+++ b/subworkflows/nf-core/variantcalling/strelka/single/main.nf
@@ -29,7 +29,7 @@ workflow RUN_STRELKA_SINGLE {
MERGE_STRELKA(
strelka_vcf.intervals
.map{ meta, vcf ->
- new_meta = [patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals]
+ new_meta = [patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals]
[groupKey(new_meta, meta.num_intervals), vcf]
}.groupTuple(),
@@ -40,7 +40,7 @@ workflow RUN_STRELKA_SINGLE {
strelka_genome_vcf.intervals
.map{ meta, vcf ->
- [groupKey([patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals],
+ [groupKey([patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals],
meta.num_intervals),
vcf]
@@ -54,7 +54,7 @@ workflow RUN_STRELKA_SINGLE {
MERGE_STRELKA.out.vcf,
strelka_vcf.no_intervals)
.map{ meta, vcf ->
- [[patient:meta.patient, sample:meta.sample, status:meta.status, gender:meta.gender, id:meta.sample, num_intervals:meta.num_intervals, variantcaller:"strelka"], vcf]
+ [[patient:meta.patient, sample:meta.sample, status:meta.status, sex:meta.sex, id:meta.sample, num_intervals:meta.num_intervals, variantcaller:"strelka"], vcf]
}
ch_versions = ch_versions.mix(MERGE_STRELKA.out.versions)
diff --git a/subworkflows/nf-core/variantcalling/strelka/somatic/main.nf b/subworkflows/nf-core/variantcalling/strelka/somatic/main.nf
index 7635badbc4..1fcd00267e 100644
--- a/subworkflows/nf-core/variantcalling/strelka/somatic/main.nf
+++ b/subworkflows/nf-core/variantcalling/strelka/somatic/main.nf
@@ -29,7 +29,7 @@ workflow RUN_STRELKA_SOMATIC {
// Only when using intervals
MERGE_STRELKA_SNVS(strelka_vcf_snvs.intervals.map{ meta, vcf ->
- [groupKey([patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals],
+ [groupKey([patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals],
meta.num_intervals),
vcf]
@@ -38,7 +38,7 @@ workflow RUN_STRELKA_SOMATIC {
MERGE_STRELKA_INDELS(strelka_vcf_indels.intervals.map{ meta, vcf ->
- [groupKey([patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals],
+ [groupKey([patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals],
meta.num_intervals),
vcf]
}.groupTuple(),
@@ -52,7 +52,7 @@ workflow RUN_STRELKA_SOMATIC {
strelka_vcf_indels.no_intervals
)
.map{ meta, vcf ->
- [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, gender:meta.gender, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals, variantcaller:"strelka"],
+ [[patient:meta.patient, normal_id:meta.normal_id, tumor_id:meta.tumor_id, sex:meta.sex, id:meta.tumor_id + "_vs_" + meta.normal_id, num_intervals:meta.num_intervals, variantcaller:"strelka"],
vcf]
}
diff --git a/tests/csv/3.0/ascat_somatic.csv b/tests/csv/3.0/ascat_somatic.csv
index a98264a7ba..b7484f28b6 100644
--- a/tests/csv/3.0/ascat_somatic.csv
+++ b/tests/csv/3.0/ascat_somatic.csv
@@ -1,3 +1,3 @@
-patient,gender,status,sample,cram,crai
+patient,sex,status,sample,cram,crai
test3,XX,0,sample3,/mnt/volume/ascat/HG00145.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram,/mnt/volume/ascat/HG00145.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram.crai
test3,XX,1,sample4,/mnt/volume/ascat/HG00146.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram,/mnt/volume/ascat/HG00146.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram.crai
diff --git a/tests/csv/3.0/bam_for_remapping.csv b/tests/csv/3.0/bam_for_remapping.csv
index 9bc47d674f..a37e07bb83 100644
--- a/tests/csv/3.0/bam_for_remapping.csv
+++ b/tests/csv/3.0/bam_for_remapping.csv
@@ -1,2 +1,2 @@
-patient,gender,status,sample,lane,bam,bai
+patient,sex,status,sample,lane,bam,bai
test,XX,0,test,1,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai
diff --git a/tests/csv/3.0/fastq_pair.csv b/tests/csv/3.0/fastq_pair.csv
index 0958c9aff9..2986ebfd1b 100644
--- a/tests/csv/3.0/fastq_pair.csv
+++ b/tests/csv/3.0/fastq_pair.csv
@@ -1,3 +1,3 @@
-patient,gender,status,sample,lane,fastq_1,fastq_2
+patient,sex,status,sample,lane,fastq_1,fastq_2
test,XX,0,test,test_L1,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz
test,XX,1,test2,test_L1,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/fastq/test2_1.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/fastq/test2_2.fastq.gz
diff --git a/tests/csv/3.0/fastq_single.csv b/tests/csv/3.0/fastq_single.csv
index 7e84c751df..2c9c7cb13e 100644
--- a/tests/csv/3.0/fastq_single.csv
+++ b/tests/csv/3.0/fastq_single.csv
@@ -1,2 +1,2 @@
-patient,gender,status,sample,lane,fastq_1,fastq_2
+patient,sex,status,sample,lane,fastq_1,fastq_2
test,XX,0,test,test_L1,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz
diff --git a/tests/csv/3.0/fastq_umi.csv b/tests/csv/3.0/fastq_umi.csv
index e44afb0f14..9c6718c7b7 100644
--- a/tests/csv/3.0/fastq_umi.csv
+++ b/tests/csv/3.0/fastq_umi.csv
@@ -1,2 +1,2 @@
-patient,gender,status,sample,lane,fastq_1,fastq_2
+patient,sex,status,sample,lane,fastq_1,fastq_2
test,XX,0,test,test_L1,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/fastq/test.umi_1.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/fastq/test.umi_2.fastq.gz
diff --git a/tests/csv/3.0/recalibrated.csv b/tests/csv/3.0/recalibrated.csv
index 17d912e966..fbaba2c90d 100644
--- a/tests/csv/3.0/recalibrated.csv
+++ b/tests/csv/3.0/recalibrated.csv
@@ -1,4 +1,4 @@
-patient,gender,status,sample,cram,crai
+patient,sex,status,sample,cram,crai
test,XX,0,sample1,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram.crai
test1,XX,1,sample2,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram.crai
test3,XX,0,sample3,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram.crai
diff --git a/tests/csv/3.0/recalibrated_germline.csv b/tests/csv/3.0/recalibrated_germline.csv
index d4fa1b0055..a7875203a6 100644
--- a/tests/csv/3.0/recalibrated_germline.csv
+++ b/tests/csv/3.0/recalibrated_germline.csv
@@ -1,2 +1,2 @@
-patient,gender,status,sample,cram,crai
+patient,sex,status,sample,cram,crai
test,XX,0,sample1,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram.crai
diff --git a/tests/csv/3.0/recalibrated_somatic.csv b/tests/csv/3.0/recalibrated_somatic.csv
index d7364586ef..4a87b75e4e 100644
--- a/tests/csv/3.0/recalibrated_somatic.csv
+++ b/tests/csv/3.0/recalibrated_somatic.csv
@@ -1,3 +1,3 @@
-patient,gender,status,sample,cram,crai
+patient,sex,status,sample,cram,crai
test3,XX,0,sample3,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram.crai
test3,XX,1,sample4,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram.crai
diff --git a/tests/csv/3.0/recalibrated_tumoronly.csv b/tests/csv/3.0/recalibrated_tumoronly.csv
index 1b453883dc..ae29aa64c5 100644
--- a/tests/csv/3.0/recalibrated_tumoronly.csv
+++ b/tests/csv/3.0/recalibrated_tumoronly.csv
@@ -1,2 +1,2 @@
-patient,gender,status,sample,cram,crai
+patient,sex,status,sample,cram,crai
test1,XX,1,sample2,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram.crai
diff --git a/tests/nextflow.config b/tests/nextflow.config
index 0bfb8c8733..3c70399da2 100644
--- a/tests/nextflow.config
+++ b/tests/nextflow.config
@@ -11,7 +11,7 @@ process {
noisydata: "TRUE",
minexpectedgc: "0",
readcountthreshold: "1",
- sex: meta.gender,
+ sex: meta.sex,
window: "10",
],
"control":[
diff --git a/workflows/sarek.nf b/workflows/sarek.nf
index a2a9c1463f..61e6ed5c7c 100644
--- a/workflows/sarek.nf
+++ b/workflows/sarek.nf
@@ -54,12 +54,14 @@ for (param in checkPathParamList) if (param) file(param, checkIfExists: true)
// Set input, can either be from --input or from automatic retrieval in WorkflowSarek.groovy
ch_input_sample = extract_csv(file(params.input, checkIfExists: true))
+// Fails when wrongfull extension for intervals file
if (params.wes && !params.step == 'annotate') {
if (params.intervals && !params.intervals.endsWith("bed")) exit 1, "Target file specified with `--intervals` must be in BED format"
} else {
if (params.intervals && !params.intervals.endsWith("bed") && !params.intervals.endsWith("interval_list")) exit 1, "Interval file must end with .bed or .interval_list"
}
+// Fails or warns when missing files or params for ascat
if(params.tools && params.tools.contains('ascat')){
if(!params.ascat_alleles){
log.error "No allele files were provided for running ASCAT. Please provide a zip folder with allele files."
@@ -69,18 +71,19 @@ if(params.tools && params.tools.contains('ascat')){
log.error "No loci files were provided for running ASCAT. Please provide a zip folder with loci files."
exit 1
}
+ if(params.ascat_genome!="hg19" && params.ascat_genome!="hg38"){
+ log.error "Parameter ascat_genome must be either hg19 or hg38."
+ exit 1
+ }
if(!params.ascat_loci_gc && !params.ascat_loci_rt){
log.warn("No LogRCorrection performed in ASCAT. For LogRCorrection to run, please provide either loci gc files or both loci gc files and loci rt files.")
}
if(params.wes){
log.warn("Default reference files not suited for running ASCAT on WES data. It's recommended to use the reference files provided here: https://github.com/Wedge-lab/battenberg#required-reference-files")
}
- if(params.ascat_genome!="hg19" && params.ascat_genome!="hg38"){
- log.error "Parameter ascat_genome must be either hg19 or hg38."
- exit 1
- }
}
+// Warns when missing files or params for mutect2
if(params.tools && params.tools.contains('mutect2')){
if(!params.pon){
log.warn("No Panel-of-normal was specified for Mutect2.\nIt is highly recommended to use one: https://gatk.broadinstitute.org/hc/en-us/articles/5358911630107-Mutect2\nFor more information on how to create one: https://gatk.broadinstitute.org/hc/en-us/articles/5358921041947-CreateSomaticPanelOfNormals-BETA-")
@@ -93,6 +96,8 @@ if(params.tools && params.tools.contains('mutect2')){
}
}
+// Fails when missing resources for baserecalibrator
+// Warns when missing resources for haplotypecaller
if(!params.dbsnp && !params.known_indels){
if(!params.skip_tools || params.skip_tools && !params.skip_tools.contains('baserecalibrator')){
log.error "Base quality score recalibration requires at least one resource file. Please provide at least one of `--dbsnp` or `--known_indels`\nYou can skip this step in the workflow by adding `--skip_tools baserecalibrator` to the command."
@@ -103,14 +108,20 @@ if(!params.dbsnp && !params.known_indels){
}
}
-if (params.step == "variant_calling" && !params.tools) {
- log.error "Please specify at least one tool when using `--step variant_calling`.\nhttps://nf-co.re/sarek/parameters#tools"
+// Fails when missing tools for variant_calling or annotate
+if ((params.step == 'variant_calling' || params.step == 'annotate') && !params.tools) {
+ log.error "Please specify at least one tool when using `--step ${params.step}`.\nhttps://nf-co.re/sarek/parameters#tools"
exit 1
}
-if (params.step == "annotation" && !params.tools) {
- log.error "Please specify at least one tool when using `--step annotation`.\nhttps://nf-co.re/sarek/parameters#tools"
- exit 1
+// Fails when missing sex information for CNV tools
+if (params.tools && (params.tools.contains('ascat') || params.tools.contains('controlfreec'))) {
+ ch_input_sample.map{
+ if (it[0].sex == 'NA' ) {
+ log.error "Please specify sex information for each sample in your samplesheet when using '--tools' with 'ascat' or 'controlfreec'.\nhttps://nf-co.re/sarek/usage#input-samplesheet-configurations"
+ exit 1
+ }
+ }
}
// Save AWS IGenomes file containing annotation version
@@ -397,7 +408,7 @@ workflow SAREK {
ch_reads_to_map = FASTP.out.reads.map{ key, reads ->
read_files = reads.sort{ a,b -> a.getName().tokenize('.')[0] <=> b.getName().tokenize('.')[0] }.collate(2)
- [[patient: key.patient, sample:key.sample, gender:key.gender, status:key.status, id:key.id, numLanes:key.numLanes, read_group:key.read_group, data_type:key.data_type, size:read_files.size()],
+ [[patient: key.patient, sample:key.sample, sex:key.sex, status:key.status, id:key.id, numLanes:key.numLanes, read_group:key.read_group, data_type:key.data_type, size:read_files.size()],
read_files]
}.transpose()
}else{
@@ -415,7 +426,7 @@ workflow SAREK {
// update ID when no multiple lanes or splitted fastqs
new_id = meta.size * meta.numLanes == 1 ? meta.sample : meta.id
- [[patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:new_id, numLanes:meta.numLanes, read_group:meta.read_group, data_type:meta.data_type, size:meta.size],
+ [[patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:new_id, numLanes:meta.numLanes, read_group:meta.read_group, data_type:meta.data_type, size:meta.size],
reads]
}
@@ -432,7 +443,7 @@ workflow SAREK {
// read_group: Now in the BAM header
// numLanes: Was only needed for mapping
// size: Was only needed for mapping
- new_meta = [patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.sample, data_type:"bam"]
+ new_meta = [patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.sample, data_type:"bam"]
// Use groupKey to make sure that the correct group can advance as soon as it is complete
// and not stall the workflow until all reads from all channels are mapped
[ groupKey(new_meta, numLanes * size), bam]
@@ -556,7 +567,7 @@ workflow SAREK {
ch_cram_markduplicates_spark,
ch_cram_no_markduplicates_restart).map{ meta, cram, crai ->
//Make sure correct data types are carried through
- [[patient:meta.patient, sample:meta.sample, gender:meta.gender, status:meta.status, id:meta.id, data_type:"cram"], cram, crai]
+ [[patient:meta.patient, sample:meta.sample, sex:meta.sex, status:meta.status, id:meta.id, data_type:"cram"], cram, crai]
}
// CSV should be written for the file actually out out, either CRAM or BAM
@@ -813,7 +824,7 @@ workflow SAREK {
meta.patient = normal[0]
meta.normal_id = normal[1].sample
meta.tumor_id = tumor[1].sample
- meta.gender = normal[1].gender
+ meta.sex = normal[1].sex
meta.id = "${meta.tumor_id}_vs_${meta.normal_id}".toString()
[meta, normal[2], normal[3], tumor[2], tumor[3]]
@@ -989,7 +1000,7 @@ def extract_csv(csv_file) {
def line, numberOfLinesInSampleSheet = 0;
while ((line = reader.readLine()) != null) {numberOfLinesInSampleSheet++}
if (numberOfLinesInSampleSheet < 2) {
- log.error "Sample sheet had less than two lines. The sample sheet must be a csv file with a header, so at least two lines."
+ log.error "Samplesheet had less than two lines. The sample sheet must be a csv file with a header, so at least two lines."
System.exit(1)
}
}
@@ -1017,10 +1028,10 @@ def extract_csv(csv_file) {
if (row.patient) meta.patient = row.patient.toString()
if (row.sample) meta.sample = row.sample.toString()
- // If no gender specified, gender is not considered
- // gender is only mandatory for somatic CNV
- if (row.gender) meta.gender = row.gender.toString()
- else meta.gender = "NA"
+ // If no sex specified, sex is not considered
+ // sex is only mandatory for somatic CNV
+ if (row.sex) meta.sex = row.sex.toString()
+ else meta.sex = 'NA'
// If no status specified, sample is assumed normal
if (row.status) meta.status = row.status.toInteger()
@@ -1039,7 +1050,7 @@ def extract_csv(csv_file) {
meta.numLanes = numLanes.toInteger()
meta.read_group = read_group.toString()
- meta.data_type = "fastq"
+ meta.data_type = 'fastq'
meta.size = 1 // default number of splitted fastq
@@ -1062,7 +1073,7 @@ def extract_csv(csv_file) {
meta.numLanes = numLanes.toInteger()
meta.read_group = read_group.toString()
- meta.data_type = "bam"
+ meta.data_type = 'bam'
meta.size = 1 // default number of splitted fastq
@@ -1079,7 +1090,7 @@ def extract_csv(csv_file) {
def crai = file(row.crai, checkIfExists: true)
def table = file(row.table, checkIfExists: true)
- meta.data_type = "cram"
+ meta.data_type = 'cram'
if (!(params.step == 'mapping' || params.step == 'annotate')) return [meta, cram, crai, table]
else {
@@ -1094,7 +1105,7 @@ def extract_csv(csv_file) {
def bai = file(row.bai, checkIfExists: true)
def table = file(row.table, checkIfExists: true)
- meta.data_type = "bam"
+ meta.data_type = 'bam'
if (!(params.step == 'mapping' || params.step == 'annotate')) return [meta, bam, bai, table]
else {
@@ -1108,11 +1119,11 @@ def extract_csv(csv_file) {
def cram = file(row.cram, checkIfExists: true)
def crai = file(row.crai, checkIfExists: true)
- meta.data_type = "cram"
+ meta.data_type = 'cram'
if (!(params.step == 'mapping' || params.step == 'annotate')) return [meta, cram, crai]
else {
- log.error "Samplesheet contains bam files but step is `$params.step`. Please check your samplesheet or adjust the step parameter.\nhttps://nf-co.re/sarek/usage#input-samplesheet-configurations"
+ log.error "Samplesheet contains cram files but step is `$params.step`. Please check your samplesheet or adjust the step parameter.\nhttps://nf-co.re/sarek/usage#input-samplesheet-configurations"
System.exit(1)
}
@@ -1122,7 +1133,7 @@ def extract_csv(csv_file) {
def bam = file(row.bam, checkIfExists: true)
def bai = file(row.bai, checkIfExists: true)
- meta.data_type = "bam"
+ meta.data_type = 'bam'
if (!(params.step == 'mapping' || params.step == 'annotate')) return [meta, bam, bai]
else {
@@ -1135,8 +1146,8 @@ def extract_csv(csv_file) {
meta.id = meta.sample
def vcf = file(row.vcf, checkIfExists: true)
- meta.data_type = "vcf"
- meta.variantcaller = row.variantcaller ?: ""
+ meta.data_type = 'vcf'
+ meta.variantcaller = row.variantcaller ?: ''
if (params.step == 'annotate') return [meta, vcf]
else {