Skip to content

Commit

Permalink
Remove unnecessary .view() in subworkflows/nf-core/vcf_phase_shapeit5…
Browse files Browse the repository at this point in the history
… & tests/modules/nf-core/shapeit5/ligate/main.nf (#5280)

* .view() deleted

* Delete unecessary view

* Update licence

* Bcftools view compressed output

* Update licence

---------

Co-authored-by: Dimple Adiwal <[email protected]>
Co-authored-by: Dimple Adiwal <[email protected]>
Co-authored-by: Louis LE NEZET <[email protected]>
  • Loading branch information
4 people authored Mar 20, 2024
1 parent 61f2ea5 commit dcf17cc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions modules/nf-core/shapeit5/ligate/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ tools:
homepage: "https://odelaneau.github.io/shapeit5/"
documentation: "https://odelaneau.github.io/shapeit5/docs/documentation"
tool_dev_url: "https://github.com/odelaneau/shapeit5"
doi: "10.1101/2022.10.19.512867 "
licence: "['MIT']"
doi: "10.1101/2022.10.19.512867"
licence: ["MIT"]
input:
- meta:
type: map
Expand Down
3 changes: 1 addition & 2 deletions subworkflows/nf-core/vcf_phase_shapeit5/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,9 @@ workflow VCF_PHASE_SHAPEIT5 {

ch_ligate_input = SHAPEIT5_PHASECOMMON.out.phased_variant
.join(VCF_INDEX1.out.csi, failOnMismatch:true, failOnDuplicate:true)
.view()
.map{ meta, vcf, csi ->
newmeta = meta + [id: meta.id.split("_")[0..-2].join("_")]
[newmeta, vcf, csi]}.view()
[newmeta, vcf, csi]}
.combine(ch_chunks_number, by:0)
.map{meta, vcf, csi, chunks_num ->
[groupKey(meta, chunks_num), vcf, csi]}
Expand Down
4 changes: 1 addition & 3 deletions tests/modules/nf-core/shapeit5/ligate/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ workflow test_shapeit5_ligate {
phase_input = Channel.of([[ id:'NA12878_1X']])
.combine(BCFTOOLS_VIEW.out.vcf.collect().map{it[1]})
.combine(BCFTOOLS_INDEX.out.csi.collect().map{it[1]})
.combine(sample).view()
.combine(sample)
.combine(region)
.map{ meta, vcf, csi, sample, region ->
[meta + [region: region.replace(":","_")],
Expand All @@ -43,7 +43,6 @@ workflow test_shapeit5_ligate {

phased_variant = SHAPEIT5_PHASECOMMON.output.phased_variant
.map{ meta, vcf -> [meta.subMap(["id"]), vcf]}
.view()

BCFTOOLS_INDEX2 ( phased_variant )

Expand All @@ -55,6 +54,5 @@ workflow test_shapeit5_ligate {
a.getName() <=> b.getName()},
csi]}

ligate_input.view()
SHAPEIT5_LIGATE ( ligate_input )
}
1 change: 1 addition & 0 deletions tests/modules/nf-core/shapeit5/ligate/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
process {
withName: BCFTOOLS_VIEW {
ext.args = [
"-Oz",
"-e 'GT=\"./.\"||GT=\".\"'"
].join(' ')
ext.prefix = { "${meta.id}" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ process {
}
withName: BCFTOOLS_VIEW {
ext.args = [
"-Oz",
"-e 'GT=\"./.\"||GT=\".\"'"
].join(' ')
}
Expand Down

0 comments on commit dcf17cc

Please sign in to comment.