File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -679,17 +679,21 @@ task run_discordance {
679679
680680 # bcftools call snps while treating each RG as a separate sample
681681 bcftools mpileup \
682- -G readgroups.txt -d 10000 -a "FORMAT/AD" -q 1 -m 2 -Ou \
682+ -G readgroups.txt -d 10000 -a "FORMAT/DP,FORMAT/AD" \
683+ -q 1 -m 2 -Ou \
683684 -f "${reference_fasta} " "${reads_aligned_bam} " \
684685 | bcftools call \
685- -m --ploidy 1 \
686- --threads ` nproc ` \
686+ -P 0 - m --ploidy 1 \
687+ --threads $( nproc ) \
687688 -Ov -o everything.vcf
688689
690+ # mask all GT calls when less than 3 reads
691+ cat everything.vcf | bcftools filter -e 'FMT/DP<3' -S . > filtered.vcf
692+ cat filtered.vcf | bcftools filter -i 'MAC>0' > "${out_basename} .discordant.vcf"
693+
689694 # tally outputs
690695 set +o pipefail # to handle empty grep
691- cat everything.vcf | bcftools filter -i 'MAC=0' | grep -v '^#' | wc -l | tee num_concordant
692- cat everything.vcf | bcftools filter -i 'MAC>0' > "${out_basename} .discordant.vcf"
696+ cat filtered.vcf | bcftools filter -i 'MAC=0' | grep -v '^#' | wc -l | tee num_concordant
693697 cat "${out_basename} .discordant.vcf" | bcftools filter -i 'TYPE="snp"' | grep -v '^#' | wc -l | tee num_discordant_snps
694698 cat "${out_basename} .discordant.vcf" | bcftools filter -i 'TYPE!="snp"' | grep -v '^#' | wc -l | tee num_discordant_indels
695699 }
Original file line number Diff line number Diff line change 99 "assemble_refbased.assembly_length_unambiguous" : 18889 ,
1010 "assemble_refbased.assembly_length" : 18889 ,
1111 "assemble_refbased.replicate_discordant_indels" : 0 ,
12- "assemble_refbased.replicate_discordant_snps" : 7
12+ "assemble_refbased.replicate_discordant_snps" : 0
1313}
You can’t perform that action at this time.
0 commit comments