Skip to content

Commit d375524

Browse files
committed
Merge branch 'dev' of github.com:nf-cmgg/structural into dev
2 parents d812692 + ef65069 commit d375524

7 files changed

Lines changed: 51 additions & 83 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2929
12. Reworked the annotation structure to a per tool structure. Specify the annotations tools you want to run with `--annotate_tools`. This parameter takes a comma-separated list of tool names (options: `vep`, `vcfanno`, `svannotate`, `strvctvre` or `all` (=> all tools))
3030
13. Updated to nf-core template v3.5.1
3131
14. Removed AnnotSV from the pipeline
32+
15. Removed the `small_variants` field from the samplesheet. Small variant VCFs are no longer used in the pipeline
3233

3334
### `Fixed`
3435

assets/schema_input.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@
3131
"format": "file-path",
3232
"exists": true
3333
},
34-
"small_variants": {
35-
"type": "string",
36-
"pattern": "^\\S+\\.vcf(\\.gz)?$",
37-
"format": "file-path",
38-
"exists": true
39-
},
4034
"sex": {
4135
"type": "string",
4236
"meta": ["sex"],

docs/images/metro_map.svg

Lines changed: 2 additions & 1 deletion
Loading

docs/parameters.md

Lines changed: 34 additions & 36 deletions
Large diffs are not rendered by default.

docs/usage.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ Following table contains all possible values for the samplesheet.
6464
| `family` | The family name of the current sample. All samples in the same family will be merged together at the end of the pipeline. Cannot contain spaces | string | :x: |
6565
| `cram` | Path to the CRAM file to be used by the pipeline for the current sample. | string | :heavy_check_mark: |
6666
| `crai` | Path to the CRAM index file | string | :x: |
67-
| `small_variants` | A VCF containing the SNV (small nucleotide variants) for the current sample to be used by AnnotSV | string | :x: |
6867
| `sex` | The sex of the sample to be used by QDNAseq. Sex will be imputed when missing (Options: `male` or `female`) | string | :x: |
6968

7069
See following samplesheet for a working example of a samplesheet (used by the `test` profile of the pipeline):

subworkflows/local/utils_nfcore_structural_pipeline/main.nf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ workflow PIPELINE_INITIALISATION {
9696
}
9797

9898
def ch_samplesheet = channel.fromList(samplesheetList)
99-
.map { meta, cram, crai, small_variants ->
99+
.map { meta, cram, crai ->
100100
def new_meta = meta + [
101101
family:meta.family ?: meta.sample,
102102
family_count:family_counts[meta.family] ?: 1
103103
]
104-
return [ new_meta, cram, crai, small_variants ]
104+
return [ new_meta, cram, crai ]
105105
}
106106

107107
//

workflows/structural.nf

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -253,71 +253,46 @@ workflow STRUCTURAL {
253253
// Prepare the inputs
254254
//
255255

256-
def ch_deduplicated = ch_samplesheet
257-
.map { meta, _cram, _crai, small_variants ->
258-
[ meta, small_variants ]
259-
}
260-
.groupTuple()
261-
.map { meta, small_variants ->
262-
[ meta, small_variants.find { small_variant -> small_variant != [] } ?: [] ]
263-
}
264-
265256
BAM_PREPARE_SAMTOOLS(
266-
ch_samplesheet.map { meta, cram, crai, _small_variants ->
267-
[ meta, cram, crai ]
268-
},
257+
ch_samplesheet,
269258
ch_fasta,
270259
ch_fai
271260
)
272261
ch_versions = ch_versions.mix(BAM_PREPARE_SAMTOOLS.out.versions)
273262

274263
def ch_input_no_sex = BAM_PREPARE_SAMTOOLS.out.crams
275-
.join(ch_deduplicated, failOnDuplicate:true, failOnMismatch:true)
276264

277265
//
278266
// Determine the gender if needed
279267
//
280268

281-
def ch_input_sex = channel.empty()
269+
def ch_inputs = channel.empty()
282270
if(callers.intersect(sexCallers)) {
283271
def ch_samplegender_input = ch_input_no_sex
284-
.branch { meta, _cram, _crai, _small_variants ->
272+
.branch { meta, _cram, _crai ->
285273
sex: meta.sex
286274
no_sex: !meta.sex
287275
}
288276

289-
def ch_samplegender_multi = ch_samplegender_input.no_sex
290-
.multiMap { meta, cram, crai, small_variants ->
291-
cram: [ meta, cram, crai ]
292-
other: [ meta, small_variants ]
293-
}
294-
295277
NGSBITS_SAMPLEGENDER(
296-
ch_samplegender_multi.cram,
278+
ch_samplegender_input.no_sex,
297279
ch_fasta,
298280
ch_fai,
299281
"xy"
300282
)
301283
ch_versions = ch_versions.mix(NGSBITS_SAMPLEGENDER.out.versions.first())
302284

303-
ch_input_sex = NGSBITS_SAMPLEGENDER.out.tsv
304-
.join(ch_samplegender_multi.cram, failOnDuplicate:true, failOnMismatch:true)
305-
.join(ch_samplegender_multi.other, failOnDuplicate:true, failOnMismatch:true)
306-
.map { meta, tsv, cram, crai, small_variants ->
285+
ch_inputs = NGSBITS_SAMPLEGENDER.out.tsv
286+
.join(ch_samplegender_input.no_sex, failOnDuplicate:true, failOnMismatch:true)
287+
.map { meta, tsv, cram, crai ->
307288
def new_meta = meta + [sex:get_sex(tsv, meta.sample)]
308-
return [ new_meta, cram, crai, small_variants ]
289+
return [ new_meta, cram, crai ]
309290
}
310291
.mix(ch_samplegender_input.sex)
311292
} else {
312-
ch_input_sex = ch_input_no_sex
293+
ch_inputs = ch_input_no_sex
313294
}
314295

315-
def ch_inputs = ch_input_sex
316-
.multiMap { meta, cram, crai, small_variants ->
317-
crams: [ meta, cram, crai ]
318-
small_variants: [ meta, small_variants ]
319-
}
320-
321296
//
322297
// Call the variants
323298
//
@@ -329,7 +304,7 @@ workflow STRUCTURAL {
329304
variant_types.add("sv")
330305

331306
BAM_SV_CALLING(
332-
ch_inputs.crams,
307+
ch_inputs,
333308
ch_fasta,
334309
ch_fai,
335310
ch_manta_config,
@@ -356,7 +331,7 @@ workflow STRUCTURAL {
356331
variant_types.add("cnv")
357332

358333
BAM_CNV_CALLING(
359-
ch_inputs.crams,
334+
ch_inputs,
360335
ch_fasta,
361336
ch_fai,
362337
ch_qdnaseq_male,
@@ -421,7 +396,7 @@ workflow STRUCTURAL {
421396
count_types += 1
422397

423398
BAM_REPEAT_ESTIMATION_EXPANSIONHUNTER(
424-
ch_inputs.crams,
399+
ch_inputs,
425400
ch_fasta,
426401
ch_fai,
427402
ch_catalog

0 commit comments

Comments
 (0)