How to extract unique regions using Tabix
0
0
Entering edit mode
2.7 years ago

I'm using the following to extract regions of a sample in the genome vcf file from gnomad. But im unable to extract the unique regions. is there a way to get the unique region?

tabix -h -R bedfile.bed gnomad.genomes.v3.2.1.hgdp_tgp.chr1.vcf.bgz | perl vcftools -c   samplename > out.vcf
bed tabix • 1.0k views
ADD COMMENT
0
Entering edit mode

what is a "unique region" ?

ADD REPLY
0
Entering edit mode

by unique i meant the same as what bedtools -u option does i.e to report atleast one overlap

ADD REPLY
0
Entering edit mode

that's still not clear to me. Give us an example.

ADD REPLY
0
Entering edit mode

1) tabix -h -R bedfile.bed gnomad.genomes.v3.2.1.hgdp_tgp.chr1.vcf.bgz | perl vcftools -c samplename > out.vcf

I am using the above command to extract a certain region from "bedfile.bed" and pipe it to obtain the required sample from the vcf file using vcftools.

After this step im using the below command just to extract the unique regions, because Step1) give me same positions repeatedly. I just want the unique overlap.But even after running command 2) im getting the same results. Im unable to get the unique ones. So i was wondering what could be the reson for the same and also a wrok around to obtain the unique regions

2) bedtools/intersectBed -u --header -a file1.vcf -b bedfile.bed > output.vcf

ADD REPLY

Login before adding your answer.

Traffic: 1623 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