Last active
February 11, 2020 11:06
-
-
Save danielecook/1602d4e90cf6d94ff763209c3a8f9bfb to your computer and use it in GitHub Desktop.
List bams with missing indices / index
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 check_file { | |
if [ ! -s "$1" ] | |
then | |
echo "$1 not found" | |
fi | |
} | |
export -f check_file | |
# List bams with a missing bai index | |
ls -1 *.bam | parallel check_file {}.bai | |
# List bai's with a missing bam | |
ls -1 *.bai | sed 's/.bai//' | parallel check_file {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment