Entering edit mode
22 months 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
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:
That would just keep one variant per chromosome.
Oh... I think it's a little more complicated! Can you explain the problem?