4
$\begingroup$

In VCF 4.2, a structural variant (SV) can be described with the BND keyword in SVTYPE. For example, the following example is an insertion (from https://samtools.github.io/hts-specs/VCFv4.2.pdf):

#CHROM    POS ID REF ALT                      QUAL FILTER INFO
2 321682  bnd V  T   ]13 : 123456]AGTNNNNNCAT 6    PASS   SVTYPE=BND;MATEID=bnd U
13 123456 bnd U  C   CAGTNNNNNCA[2 : 321682[  6    PASS   SVTYPE=BND;MATEID=bnd V

The keyword can be used to describe any SV event.

I would like to work out how to find out if an event is an insertion, deletion, duplication, inversion, etc. The algorithm/program will tell me the example above is an insertion.

I'm not able to find a tool that can do the conversion for me.

PS: The program I'm using is GRIDSS. This program would only generate BND in the SVTYPE field. It's not strictly a bug (BND can be used for any SV arrangement), but it's annoying in analysis.

$\endgroup$
  • $\begingroup$ how about 'just' using the INFO/SVTYPEattribute ? $\endgroup$ – Pierre Jul 16 '18 at 12:58
  • $\begingroup$ @Pierre SVTYPE is BND. $\endgroup$ – HelloWorld Jul 16 '18 at 12:59
  • $\begingroup$ @Pierre Some SV programs such as GRIDSS only output BND to the SVTYPE. Otherwise, I would not be here asking. $\endgroup$ – HelloWorld Jul 16 '18 at 12:59
  • 1
    $\begingroup$ @Pierre My above example took from the specification. $\endgroup$ – HelloWorld Jul 16 '18 at 13:02
  • 1
    $\begingroup$ If it uses BND to indicate an insertion, then it is not following the VCF specs since the SVTYPE for insertions should be INS and BND should only be used for break ends. $\endgroup$ – terdon Jul 16 '18 at 13:58
3
$\begingroup$

GRIDSS's author had posted his own solution on Github. The code is:

simpleEventType <- function(gr) {
    return(ifelse(seqnames(gr) != seqnames(partner(gr)), "ITX", # inter-chromosomosal
           ifelse(gr$insLen >= abs(gr$svLen) * 0.7, "INS",
           ifelse(strand(gr) == strand(partner(gr)), "INV",
           ifelse(xor(start(gr) < start(partner(gr)), strand(gr) == "-"), "DEL", "DUP")))))
}
$\endgroup$
  • $\begingroup$ Can you please elaborate on this answer? What's gr? Looks like R, which library should I use for this? $\endgroup$ – Wouter De Coster Feb 27 '19 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.