Skip to content

Commit

Permalink
adding support for vcf files named in the format: ${chr}.dose*vcf.gz
Browse files Browse the repository at this point in the history
  • Loading branch information
anand-imcm committed Jul 26, 2024
1 parent 2ccb9b0 commit e20013b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions workflows/tasks/extract_info.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ task extract {
awk -v chr=$chr '$1 == chr' ~{query_variants} > ${chr}_query_subset_variants_list.txt
if [ -f ${chr}_query_subset_variants_list.txt ]; then
if [ -n "~{query_samples}" ] && [ -f ~{query_samples} ]; then
bcftools view --regions-file ${chr}_query_subset_variants_list.txt --samples-file ~{query_samples} ${chr}.dose.vcf.gz > ~{prefix}_${chr}_query_subset.vcf
bcftools view --regions-file ${chr}_query_subset_variants_list.txt --samples-file ~{query_samples} ${chr}.dose*vcf.gz > ~{prefix}_${chr}_query_subset.vcf
else
bcftools view --regions-file ${chr}_query_subset_variants_list.txt ${chr}.dose.vcf.gz > ~{prefix}_${chr}_query_subset.vcf
bcftools view --regions-file ${chr}_query_subset_variants_list.txt ${chr}.dose*vcf.gz > ~{prefix}_${chr}_query_subset.vcf
fi
if [ "~{match_pos_only}" = "false" ]; then
python3 /scripts/filter_vcf.py --query ${chr}_query_subset_variants_list.txt --vcf ~{prefix}_${chr}_query_subset.vcf --out ~{prefix}_${chr}_query_matched_alleles_subset
Expand Down

0 comments on commit e20013b

Please sign in to comment.