Question: plink/GCTA: How to remove multiple SNPs and a range around them
0
gravatar for gunnhelenmoen
10 months ago by
gunnhelenmoen0 wrote:

Hi!

I have a list of around 200 SNPs that I wan't to remove from my plink file. I also want to remove about 1 MB around each of these SNPs. My problem is: using the --exclude flag only removes the SNPs using --exclude-snp and --window allow me to remove the SNP and the window

I would also be open to using GCTA and the --exclude-region-snp if that can be changed to removing more than on SNP region.

Thanks.

gcta plink snp genome • 386 views
ADD COMMENTlink modified 10 months ago by chrchang5237.4k • written 10 months ago by gunnhelenmoen0
1
gravatar for chrchang523
10 months ago by
chrchang5237.4k
United States
chrchang5237.4k wrote:

While it may be possible to do this with plink alone, that involves some obscure functionality (--make-set-border, --gene-all, ...). I recommend creating a BED file (https://genome.ucsc.edu/FAQ/FAQformat.html#format1 ) with the positions of your variants, using bedtools or a short script to add 1 MB windows, and then plink --bfile ... --exclude range <windowed BED filename> --make-bed to perform the filtering operation; each step of this workflow is more likely to come up in the future.

Note that BED files are supposed to use 0-based interval coordinates, instead of the 1-based coordinates in VCF and .bim files. However, the difference doesn't really matter when we're talking about 1 MB windows.

ADD COMMENTlink written 10 months ago by chrchang5237.4k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1043 users visited in the last hour