Skip to content

Commit

Permalink
Merge pull request #161 from LouisLeNezet/config
Browse files Browse the repository at this point in the history
Update VCF_SPLIT_BCFTOOLS
  • Loading branch information
LouisLeNezet authored Nov 23, 2024
2 parents c8e73e8 + d3aac0c commit e58c7e6
Show file tree
Hide file tree
Showing 22 changed files with 543 additions and 155 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Special thanks to [Matthias Hörtenhuber](https://github.com/mashehu) and [Mazza
- [#117](https://github.com/nf-core/phaseimpute/pull/117) - Fix directories in CSV.
- [#151](https://github.com/nf-core/phaseimpute/pull/151) - Fix `Type not supported: class org.codehaus.groovy.runtime.GStringImpl` error due to `String` test in `getFileExtension()`.
- [#153](https://github.com/nf-core/phaseimpute/pull/153) - Fix getFileExtension function. Fix image in `usage.md`. Fix small warnings and errors with updated language server. `def` has been added when necessary, `:` use instead of `,` in assertions, `_` added to variables not used in closures, `for` loop replaced by `.each{}`, remove unused code / input.
- [#161](https://github.com/nf-core/phaseimpute/pull/161) - Fix `VCF_SPLIT_BCFTOOLS` when only one sample present by updating `BCFTOOLS_PLUGINSPLIT` and adding `BCFTOOLS_QUERY` to get truth samples names for renaming the resulting files.

### `Dependencies`

Expand Down
1 change: 0 additions & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ process {
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_SPLIT_BCFTOOLS:BCFTOOLS_PLUGINSPLIT' {
tag = { "${meta.id} Batch ${meta.batch} ${meta.tools}" }
ext.args = ["--output-type z", "--write-index=tbi"].join(' ')
ext.prefix = { "${meta.id}_${meta.batch}" }
publishDir = [
path: { "${params.outdir}/imputation/${meta.tools}/samples/" },
mode: params.publish_dir_mode,
Expand Down
25 changes: 17 additions & 8 deletions conf/steps/validation.config
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,30 @@ process {
ext.args = ["--ligate", "--output-type z", "--write-index=tbi"].join(' ')
}

// Compute sample files for renaming
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BCFTOOLS_QUERY' {
tag = { "${meta.id} Batch ${meta.batch} ${meta.tools}" }
ext.args = '--list-samples'
publishDir = [enabled: false]
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:GAWK' {
tag = { "${meta.id} Batch ${meta.batch} ${meta.tools}" }
ext.prefix = { "${meta.id}_samples"}
ext.args2 = "'BEGIN { OFS = \"\\t\" } { print \$1, \"-\", \$1\".truth\" }'"
publishDir = [enabled: false]
}

// Split by samples
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:SPLIT_TRUTH:.*' {
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:SPLIT_TRUTH:BCFTOOLS_PLUGINSPLIT' {
ext.args = ["--output-type z", "--write-index=tbi"].join(' ')
publishDir = [
path: { "${params.outdir}/validation/samples" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:SPLIT_TRUTH:BCFTOOLS_PLUGINSPLIT' {
ext.args = ["--output-type z", "--write-index=tbi"].join(' ')
ext.prefix = { "${meta.id}" }
ext.suffix = ".truth"
}

// Validation subworkflow
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_CONCORDANCE_GLIMPSE2:.*' {
publishDir = [
Expand Down Expand Up @@ -106,6 +115,6 @@ process {
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_CONCORDANCE_GLIMPSE2:GAWK' {
ext.args2 = "'(NR == 1) || (FNR > 1)'" // Skip header line
ext.suffix = { "txt" }
tag = {"Test Quality"}
tag = {"${meta.id}"}
}
}
7 changes: 6 additions & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@
},
"bcftools/pluginsplit": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"git_sha": "14c910af1f9c20c65e5df9325a1e4d3939d524d1",
"installed_by": ["modules"],
"patch": "modules/nf-core/bcftools/pluginsplit/bcftools-pluginsplit.diff"
},
"bcftools/query": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"bcftools/stats": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
Expand Down
45 changes: 9 additions & 36 deletions modules/nf-core/bcftools/pluginsplit/bcftools-pluginsplit.diff

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 10 additions & 27 deletions modules/nf-core/bcftools/pluginsplit/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 31 additions & 7 deletions modules/nf-core/bcftools/pluginsplit/tests/main.nf.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 36 additions & 15 deletions modules/nf-core/bcftools/pluginsplit/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions modules/nf-core/bcftools/query/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e58c7e6

Please sign in to comment.