Last active
February 21, 2019 00:18
-
-
Save danielecook/e9e0a9c4a8295b08e3fda04e1217145c to your computer and use it in GitHub Desktop.
Compare hashes of bam files
This file contains hidden or 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
function samtools_md5() { | |
md5=`samtools view ${1} | tr '\t' '\n' | sort | md5sum` | |
echo -e "${md5}\t${1}" | |
} | |
export -f samtools_md5 | |
parallel --verbose -j 10 samtools_md5 {} ::: `ls *.bam` > hashes.txt | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment