Skip to content

Commit

Permalink
Remove bcftools header line
Browse files Browse the repository at this point in the history
  • Loading branch information
nakib103 committed Mar 16, 2023
1 parent e33452e commit 6998e7e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nextflow/nf_modules/merge_VCF.nf
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ process mergeVCF {
script:
"""
mkdir -p temp
bcftools concat -a ${ vcfFiles } -Oz -o temp-${ mergedVCF}.vcf.gz
bcftools concat --no-version -a ${ vcfFiles } -Oz -o temp-${ mergedVCF}.vcf.gz
bcftools sort -T temp -Oz temp-${ mergedVCF}.vcf.gz -o ${ mergedVCF}.vcf.gz
bcftools index -t ${ mergedVCF}.vcf.gz
bcftools index -t ${ mergedVCF}.vcf.gz
"""
}
4 changes: 2 additions & 2 deletions nextflow/nf_modules/split_VCF.nf
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ process splitVCF {

script:
"""
bcftools view -r ${chr} ${vcf} -o ${prefix}.${chr}.vcf.gz -O z
bcftools view --no-version -r ${chr} ${vcf} -o ${prefix}.${chr}.vcf.gz -O z
bcftools index -t ${prefix}.${chr}.vcf.gz
if [[ ${bin_size} ]]; then
bcftools query -f'%CHROM\t%POS\n' ${prefix}.${chr}.vcf.gz | split -l ${bin_size}
for file in x*; do
bcftools view -T \${file} -Oz ${prefix}.${chr}.vcf.gz > ${prefix}.${chr}.\${file}.vcf.gz
bcftools view --no-version -T \${file} -Oz ${prefix}.${chr}.vcf.gz > ${prefix}.${chr}.\${file}.vcf.gz
bcftools index -t ${prefix}.${chr}.\${file}.vcf.gz
done
Expand Down

0 comments on commit 6998e7e

Please sign in to comment.