how to extract all genes from one chromosome simultaneously?
1
0
Entering edit mode
8.1 years ago
zwang10 ▴ 30

Hello! I am using plink from https://www.cog-genomics.org/plink2/ I would like to extract all genes from chr1 to different gene files (each file is the data of one gene). I write a loop for --from-bp and --to-bp according to the pos of different gene. Each time I run command (for example)

plink --vcf chr1.vcf.gz --keep keep_indv --chr 1 --from-bp 76291501 --to-bp 76294500 --recode A --maf 0.000000001 --geno 0.2 --out chr1_MSH4.

But I found it is too slow. Each time, plink loads all variants and then extract the gene I want. Is there a way to extract all genes at one time and write them into separate files?

plink • 2.3k views
ADD COMMENT
0
Entering edit mode
8.1 years ago
Rohit ★ 1.5k

It might be better to have all the genes in a bed-files, extract the genes as per their location, and then split the files according to your need. This would involve the use of bedtools getfasta (or) seqtk subseq, followed by split with kent-utils faSplit (or) GenomeThreader splitfasta

ADD COMMENT
0
Entering edit mode

How can we extract all snps associated to a gene from 1000 genome browser using plink???

ADD REPLY

Login before adding your answer.

Traffic: 1780 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6