This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Remove snps with missing names

I pruned the 1000G data with MAF, and some LD filtering. I wonder there are some snps with names as "." (snps indentifiers are as "." dot). Any suggestion how i should remove or pull out that ones?

genetics plink

Use bcftools. There are two ways (copy/pasted from bcftools manual):

 "." to test missing values

Example:

 bcftools view -i 'ID=="."' test.vcf

.

    -n, --novel
        print novel sites only (ID column is ".")

Example :

    bcftools view -n test.vcf

How i can remove these IDs (".") from the the datasets?

are these datasets in VCF format? if not, please post example dataset/records here.

yes, these are in VCF format.

Like cpad0112 said, use bcftools. bcftools view can be used to subset data when the output is redirected to a file.

replace test. vcf with your dataset.vcf

example code:

 bcftools view -n kg.vcf > new.vcf

0 answers

No answers yet.

Log in to answer this question.