Removing sites/reads from BGZIp VCf
1
0
Entering edit mode
6.9 years ago
ali • 0

I have a vcf compressed and indexed (.vcf.gz and .tbi)

 

I have a list of sites that I need to remove from this file (delete forever) while having the other information.

Eg:

chr8 pos:125907085:125907085

what would be the best way to go about this?

vcf remove tabix delete filter • 1.8k views
ADD COMMENT
3
Entering edit mode
6.9 years ago
gunzip -c file.vcf.gz |\
awk -F '\t' '!($1=="chr8" && int($2)==125907085))' > out.vcf && \
bgzip out.vcf && \
tabix -p vcf out.vcf.gz
ADD COMMENT
0
Entering edit mode

is there a more optimal way of achieving this, lets say i have like 100 positions to remove

eg:

chr1 start-end

chr8 start-end

ADD REPLY
0
Entering edit mode
ADD REPLY

Login before adding your answer.

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