Last active
July 25, 2017 18:42
-
-
Save nievergeltlab/8055460163dfb7fed3770003bb069c72 to your computer and use it in GitHub Desktop.
Get ambiguous alleles
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
#Assumes data is a table delimited .bim file | |
bimfile=bim_name_here | |
grep -P "A\tT" $bimfile > ambiguous_snps.txt | |
grep -P "T\tA" $bimfile >> ambiguous_snps.txt | |
grep -P "C\tG" $bimfile >> ambiguous_snps.txt | |
grep -P "G\tC" $bimfile >> ambiguous_snps.txt | |
#for metal | |
bimfile=LOOMeur_1_.results | |
grep -P "\ta\tt\t" $bimfile > ambiguous_snps.txt | |
grep -P "\tt\ta\t" $bimfile >> ambiguous_snps.txt | |
grep -P "\tc\tg\t" $bimfile >> ambiguous_snps.txt | |
grep -P "\tg\tc\t" $bimfile >> ambiguous_snps.txt | |
awk '{print $1}' ambiguous_snps.txt > ambiguous_snps2.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment