Reomve the first occurance of overalapping variants from VCF file
0
0
Entering edit mode
8 days ago
Frieda ▴ 60

Are there any tools where I could keep the first occurrence of overlapping variants from a VCF file while removing the rest?

example:

#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  HG002
NC_000001.11    604358  TEST_REMOVE_OVERLAPPING_VARIANTS    CAGA    C   .   PASS    .   GT  1/1
NC_000001.11    604361  TEST_REMOVE_OVERLAPPING_VARIANTS    AAGT    A   .   PASS    .   GT  1/1

output:

#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  HG002
NC_000001.11    604358  TEST_REMOVE_OVERLAPPING_VARIANTS    CAGA    C   .   PASS    .   GT  1/1
vcf vcftools • 195 views
ADD COMMENT
0
Entering edit mode

A hint

I don't know what is overlap variant but if you want keep first occurrence a row by first column (in any tab delimited file) you can use:

sort -u -k1,1 yourfile
ADD REPLY
0
Entering edit mode

That would just keep one variant per chromosome.

ADD REPLY
0
Entering edit mode

Oh... I think it's a little more complicated! Can you explain the problem?

ADD REPLY

Login before adding your answer.

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