Skip to content

Commit

Permalink
fix sample name
Browse files Browse the repository at this point in the history
  • Loading branch information
kubranarci committed Jun 27, 2024
1 parent d7be511 commit c9b2298
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }}
pip install nf-core
- name: Run nf-core lint
env:
Expand Down
10 changes: 9 additions & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ process {
mode: params.publish_dir_mode
]
}
withName: BCFTOOLS_VIEW_SUBSET {
ext.prefix = { vcf.baseName }
ext.args = {"--output-type z --samples 'QUERY'" }
publishDir = [
path: {"${params.outdir}/${meta.id}/test"},
pattern: "*{.test}",
mode: params.publish_dir_mode
]
}
withName: SURVIVOR_STATS {
ext.prefix = {"${meta.id}.${meta.vartype}"}
publishDir = [
Expand Down Expand Up @@ -149,7 +158,6 @@ process {
}
withName: "RTGTOOLS_VCFEVAL" {
ext.prefix = {"${meta.id}.${params.sample}.${meta.vartype}"}
ext.args = {params.preprocess.contains("prepy") ? "--sample 'truthHG002,QUERY'" : "" }
//ext.args = {"--ref-overlap --all-record --output-mode ga4gh"}
ext.when = { params.method.split(',').contains('rtgtools') }
publishDir = [
Expand Down
19 changes: 18 additions & 1 deletion subworkflows/local/small_germline_benchmark.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ params.options = [:]
include { RTGTOOLS_FORMAT } from '../../modules/nf-core/rtgtools/format/main' addParams( options: params.options )
include { RTGTOOLS_VCFEVAL } from '../../modules/nf-core/rtgtools/vcfeval/main' addParams( options: params.options )
include { HAPPY_HAPPY } from '../../modules/nf-core/happy/happy/main' addParams( options: params.options )
include { BCFTOOLS_VIEW as BCFTOOLS_VIEW_SUBSET } from '../../modules/nf-core/bcftools/view/main' addParams( options: params.options )

workflow SMALL_GERMLINE_BENCHMARK {
take:
Expand All @@ -33,11 +34,27 @@ workflow SMALL_GERMLINE_BENCHMARK {
versions = versions.mix(RTGTOOLS_FORMAT.out.versions)
sdf = RTGTOOLS_FORMAT.out.sdf
}
test_ch = input_ch.map { it -> tuple(it[0], it[1], [2]) }
if (params.preprocess.contains("prepy")){
//
// MODULE: BCFTOOLS_VIEW
//
BCFTOOLS_VIEW_SUBSET(
input_ch.map { it -> tuple(it[0], it[1], it[2]) },
[],[],[]
)
versions = versions.mix(BCFTOOLS_VIEW_SUBSET.out.versions)

BCFTOOLS_VIEW_SUBSET.out.vcf.map{it -> tuple(it[0], it[1], [])}.set{test_ch}
}

truth_ch = input_ch.map { it -> tuple(it[0], it[3], it[4], it[5], []) }

//
// MODULE: RTGTOOLS_VCFEVAL
//
RTGTOOLS_VCFEVAL(
input_ch.map { it -> tuple(it[0], it[1], it[2], it[3], it[4], it[5], []) },
test_ch.join(truth_ch),
sdf
)
versions = versions.mix(RTGTOOLS_VCFEVAL.out.versions)
Expand Down
4 changes: 4 additions & 0 deletions subworkflows/local/sv_germline_benchmark.nf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ workflow SV_GERMLINE_BENCHMARK {
fasta,
fai
)
versions = versions.mix(TRUVARI_PHAB.out.versions)
}
//
// MODULE: TRUVARI_BENCH
Expand Down Expand Up @@ -112,9 +113,12 @@ workflow SV_GERMLINE_BENCHMARK {
TABIX_BGZIP_QUERY(
input_ch.map{it -> tuple(it[0], it[1])}
)
versions = versions.mix(TABIX_BGZIP_QUERY.out.versions)

TABIX_BGZIP_TRUTH(
input_ch.map{it -> tuple(it[0], it[3])}
)
versions = versions.mix(TABIX_BGZIP_TRUTH.out.versions)
bed = input_ch.map{it -> tuple(it[0], it[5])}

//
Expand Down
2 changes: 2 additions & 0 deletions subworkflows/local/vcf_variant_deduplication.nf
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ workflow VCF_VARIANT_DEDUPLICATION {
BCFTOOLS_SORT(
BCFTOOLS_DEDUP.out.vcf
)
versions = versions.mix(BCFTOOLS_SORT.out.versions)

TABIX_TABIX(
BCFTOOLS_SORT.out.vcf
)
versions = versions.mix(TABIX_TABIX.out.versions)

BCFTOOLS_SORT.out.vcf.join(TABIX_TABIX.out.tbi, by:0)
.set{ch_vcf}
Expand Down

0 comments on commit c9b2298

Please sign in to comment.