3
$\begingroup$

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?

$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$ Commented Feb 18, 2018 at 15:19

1 Answer 1

1
$\begingroup$

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
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.