Question: how to extract all genes from one chromosome simultaneously?
0
gravatar for zwang10
3.7 years ago by
zwang1010
United States
zwang1010 wrote:

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 • 1.2k views
ADD COMMENTlink modified 3.7 years ago by Rohit1.4k • written 3.7 years ago by zwang1010
0
gravatar for Rohit
3.7 years ago by
Rohit1.4k
California
Rohit1.4k wrote:

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 COMMENTlink written 3.7 years ago by Rohit1.4k

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

ADD REPLYlink written 3.6 years ago by 78650
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: 1698 users visited in the last hour