Created
April 15, 2019 16:32
-
-
Save tkrahn/484cb64430d5c4cea8a2b86c105318b3 to your computer and use it in GitHub Desktop.
Extracting mtDNA FASTA file from WGS BAM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mtDNA allele calling $ FASTA file generation | |
samtools mpileup -r chrM -u -C 50 -v -f ${REF} ${BAMFILE_SORTED} | bcftools call -O z -v -m -P 0 > chrM_${VCF_FILE}.gz | |
tabix chrM_${VCF_FILE}.gz | |
samtools faidx $REF chrM | bcftools consensus chrM_${VCF_FILE}.gz -o ${YSEQID}_mtDNA.fasta |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment