Skip to content

Commit

Permalink
better check for chromosome style (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-mertes committed Nov 23, 2020
1 parent 4b7bd8f commit 593814b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drop/modules/mae-pipeline/MAE/filterSNVs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ $bcftools view $vcf_file | grep -vP "^##INFO=" | awk -F'\t' 'BEGIN {OFS = FS} {
$bcftools index -t $tmp

# compare and correct chromosome format mismatch
bam_chr=$($samtools idxstats ${bam_file} | grep chr | wc -l)
vcf_chr=$($bcftools view $tmp | cut -f1 | grep -v '#' | grep chr | wc -l)
bam_chr=$($samtools idxstats ${bam_file} | cut -f1 | grep "^chr" | wc -l)
vcf_chr=$($bcftools index --stats $tmp | cut -f1 | grep "^chr" | wc -l)

if [ ${vcf_chr} -eq 0 ] && [ ${bam_chr} -ne 0 ]
then
Expand Down

0 comments on commit 593814b

Please sign in to comment.