3

I have data in Plink format. I removed Indels using --snps-only command in Plink, but still some snps are as below:

rs58119544;rs5746975    0   16915280    T   A

I wonder, how i can get rid of these snps? the correct should be single snps without this (;) sign. Any idea to fix it please?

  • Hello, I have been trying to figure out what is plink format and it seems that it does not really exist. There are a lot of plink-flavoured formats. Could you [edit] your question and be more specific? Maybe it would be also useful if you would write why are the lines with ";" a problem. If you just want to keep lines without semicolon, you can just do grep -v ";" my_plink_file > filtered_plink_file. – Kamil S Jaron Feb 18 '18 at 15:19

1 Answers1

1

Use grep to get SNPs that have ";" in the name:

>$ grep ";" myMap.txt | cut -f1 -d" " > myBadSNPs.txt

Then use plink with --exclude :

plink --file myFile
--exclude myBadSNPs.txt
--out myFileFiltered
zx8754
  • 1,042
  • 8
  • 22