Last active
May 6, 2022 20:17
-
-
Save milescsmith/5ba7578ad380169dc7141c8fb3b215e1 to your computer and use it in GitHub Desktop.
search directory for variant files and find particular snps
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
#! /usr/bin/bash | |
find . \ | |
-type f \ | |
\( -name "*.vcf" -o -name "*.vcf.gz" -o -name "*.bcf" \) \ | |
-printf "%f\n" \ | |
-exec \ | |
sh \ | |
-c | |
"bcftools view \ | |
-H \ | |
--include [email protected] {} \ | |
| cut -f 1-4" \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment