Skip to content

Commit

Permalink
added impute info
Browse files Browse the repository at this point in the history
  • Loading branch information
RuthEberhardt committed May 15, 2024
1 parent 704ea52 commit e463068
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
17 changes: 17 additions & 0 deletions modules/local/bcftools_impute_info/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
process BCFTOOLS_IMPUTE_INFO {

label 'process_medium'

input:
tuple val(meta), path(vcf), path(csi)

output:
tuple val(meta), path('glimpse_vcf_annotated.vcf.gz'), path('glimpse_vcf_annotated.vcf.gz.csi'), emit: annotated_variants

script:
"""
bcftools +impute-info -Oz -o glimpse_vcf_annotated.vcf.gz ${vcf}
bcftools index glimpse_vcf_annotated.vcf.gz
"""

}
18 changes: 18 additions & 0 deletions modules/local/bcftools_impute_info/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: bcftools_impute_info
description: Run bcftools impute info plugin
keywords:
- bcftools
- impute info
input:
- meta:
type: map
description: sample information
- vcf:
type: file
description: Input VCF file
output:
- out:
type: path
description: Output VCF file
authors:
- "@Ruth Eberhardt"
2 changes: 1 addition & 1 deletion modules/local/split_samples/meta.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: split_samples
description: Split samples in a VCF into batches
keywords:
- cutadapt
- batch samples
input:
- batch_size:
type: var
Expand Down
6 changes: 4 additions & 2 deletions workflows/run_glimpse.nf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ include { BCFTOOLS_INDEX as INDEX_PHASE } from '../modules/nf-core/bcftools/ind
include { BCFTOOLS_INDEX as INDEX_LIGATE } from '../modules/nf-core/bcftools/index/main.nf'
include { BCFTOOLS_MERGE } from '../modules/nf-core/bcftools/merge/main.nf'
include { BCFTOOLS_INDEX as INDEX_MERGE } from '../modules/nf-core/bcftools/index/main.nf'
include { BCFTOOLS_IMPUTE_INFO } from '../modules/local/bcftools_impute_info/main'

workflow RUN_GLIMPSE {

Expand Down Expand Up @@ -58,7 +59,8 @@ workflow RUN_GLIMPSE {
BCFTOOLS_MERGE ( merge_ch, merge_input_2, merge_input_3, params.ref_bed )

INDEX_MERGE ( BCFTOOLS_MERGE.out.merged_variants )



impute_info_ch = BCFTOOLS_MERGE.out.merged_variants.join(INDEX_MERGE.out.csi)
BCFTOOLS_IMPUTE_INFO ( impute_info_ch )

}

0 comments on commit e463068

Please sign in to comment.