<p>Use <em>grep</em> to get SNPs that have <code>";"</code> in the name:</p>

<pre><code>&gt;$ grep ";" myMap.txt | cut -f1 -d" " &gt; myBadSNPs.txt
</code></pre>

<p>Then use plink with <a href="https://www.cog-genomics.org/plink/1.9/filter#snp" rel="nofollow noreferrer">--exclude</a> :</p>

<pre><code>plink --file myFile
--exclude myBadSNPs.txt
--out myFileFiltered
</code></pre>

CC BY-SA 3.0
2018-02-16T15:43:49.977Z
2018-02-16T15:43:49.977Z
zx8754
<p>I have data in Plink format. I removed Indels using --snps-only command in Plink, but still some snps are as below:</p>

<pre><code>rs58119544;rs5746975    0   16915280    T   A
</code></pre>

<p>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?</p>

CC BY-SA 3.0
2018-02-18T15:19:08.420Z
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](https://www.cog-genomics.org/plink2/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
<plink>
removing indels in plink
# removing indels in plink

(Asked by: username_0 on 2018-02-16)

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?

**Tags:** plink
> **Comments:**
> **username_1**: 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](https://www.cog-genomics.org/plink2/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`.  

---

## 1 answers

### Answer by username_2 on 2018-02-16. Score: 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


---

