PapenfussLab / StructuralVariantAnnotation

R package designed to simplify structural variant analysis
GNU General Public License v3.0
69 stars 14 forks source link

manta somaticSV.vcf as input for StruturalVariantAnnotation #39

Closed brewert2 closed 2 years ago

brewert2 commented 2 years ago

Hello,

I have somatic SV results from manta, which I would love to use to visualize using StructuralVariantAnnotation. When I try to input my vcf straight without any manipulation, it creates the Ideogram but nothing else.

Below is a sample vcf I am using. Do I have to manipulate/filter/reformat this manta somaticSV.vcf prior to StructuralVariantAnnotation? If so, would you please advise the best way to do so?

Thank you

my vcf:

CHROM POS ID REF ALT QUAL FILTER INFO FORMAT sample.Bld Sample.tumor

2 170361340 MantaBND:12610:0:1:0:0:0:1 G [14:31926413[G . MinSomaticScore SVTYPE=BND;MATEID=MantaBND:12610:0:1:0:0:0:0;IMPRECIS E;CIPOS=-88,88;SOMATIC;SOMATICSCORE=27;BND_DEPTH=41;MATE_BND_DEPTH=122 PR 54,1 5,20 3 149484555 MantaBND:9239:5:6:1:0:0:0 A ]17:49909182]A . PASS SVTYPE=BND;MATEID=MantaBND:9239:5:6:1:0:0:1;IMPRECISE;CIPOS=- 87,87;SOMATIC;SOMATICSCORE=61;BND_DEPTH=116;MATE_BND_DEPTH=80 PR 42,1 0,17 5 101886172 MantaBND:23524:0:1:0:0:0:1 A A]12:28336761] . PASS SVTYPE=BND;MATEID=MantaBND:23524:0:1:0:0:0:0;IMPRECISE;CIPOS= -31,32;SOMATIC;SOMATICSCORE=82;BND_DEPTH=33;MATE_BND_DEPTH=176 PR 76,0 10,8 6 29855606 MantaDEL:26252:9:10:0:0:0 G . PASS END=29910318;SVTYPE=DEL;SVLEN=-54712;IMPRECISE;CIPOS=-32,33;CIEND=-21 ,22;SOMATIC;SOMATICSCORE=119 PR 62,0 10,13 6 34605679 MantaBND:27213:0:1:0:0:0:0 G G]17:60165822] . MinSomaticScore SVTYPE=BND;MATEID=MantaBND:27213:0:1:0:0:0:1;IMPRECIS E;CIPOS=-42,43;SOMATIC;SOMATICSCORE=29;BND_DEPTH=40;MATE_BND_DEPTH=20 PR 20,0 5,5 7 138126244 MantaBND:33432:0:1:0:0:0:0 G G]9:34133974] . MinSomaticScore SVTYPE=BND;MATEID=MantaBND:33432:0:1:0:0:0:1;IMPRECIS E;CIPOS=-27,27;SOMATIC;SOMATICSCORE=11;BND_DEPTH=45;MATE_BND_DEPTH=72 PR 27,0 2,4 7 156627183 MantaBND:34234:0:1:0:0:0:0 G [12:93417203[G . PASS SVTYPE=BND;MATEID=MantaBND:34234:0:1:0:0:0:1;IMPRECISE;CIPOS= -36,36;SOMATIC;SOMATICSCORE=61;BND_DEPTH=136;MATE_BND_DEPTH=0 PR 35,0 2,6 8 12522860 MantaBND:18004:10:13:0:0:0:0 C ]11:3602286]C . PASS SVTYPE=BND;MATEID=MantaBND:18004:10:13:0:0:0:1;IMPRECISE;CIPO S=-27,27;SOMATIC;SOMATICSCORE=57;BND_DEPTH=105;MATE_BND_DEPTH=279 PR 119,0 11,8 9 34133974 MantaBND:33432:0:1:0:0:0:1 G G]7:138126244] . MinSomaticScore SVTYPE=BND;MATEID=MantaBND:33432:0:1:0:0:0:0;IMPRECIS E;CIPOS=-23,23;SOMATIC;SOMATICSCORE=11;BND_DEPTH=72;MATE_BND_DEPTH=45 PR 27,0 2,4 11 3602286 MantaBND:18004:10:13:0:0:0:1 G G[8:12522860[ . PASS SVTYPE=BND;MATEID=MantaBND:18004:10:13:0:0:0:0;IMPRECISE;CIPOS=-33,33 ;SOMATIC;SOMATICSCORE=57;BND_DEPTH=279;MATE_BND_DEPTH=105 PR 119,0 11,8

Code I tried to run (using the example in github):

suppressPackageStartupMessages(require(StructuralVariantAnnotation)) suppressPackageStartupMessages(require(VariantAnnotation)) vcf <- VariantAnnotation::readVcf("somaticSV.vcf", "hg19") gr <- breakpointRanges(vcf) partner(gr)

my_bpgr <- breakpointRanges(vcf) my_begr <- breakendRanges(vcf) my_gr <- sort(c(my_begr, my_bpgr)) my_gr[seqnames(my_gr) == "6"]

suppressPackageStartupMessages(require(circlize)) my_bpgr_with_chr_prefix <- my_bpgr seqlevelsStyle(my_bpgr_with_chr_prefix) <- "UCSC" pairs <- breakpointgr2pairs(my_bpgr_with_chr_prefix) circos.initializeWithIdeogram() circos.genomicLink(as.data.frame(S4Vectors::first(pairs)), as.data.frame(S4Vectors::second(pairs)))

circos.clear() dev.off()

d-cameron commented 2 years ago

Unable to reproduce using manta somatic VCF used in the GRIDSS2 manuscript.

library(StructuralVariantAnnotation)
library(circlize)
vcf = readVcf("somaticSV.vcf.gz")
gr <- breakpointRanges(vcf)
seqlevelsStyle(gr) <- "UCSC"
pairs = breakpointgr2pairs(gr)
circos.initializeWithIdeogram()
circos.genomicLink(as.data.frame(S4Vectors::first(pairs)), as.data.frame(S4Vectors::second(pairs)))

The two most likely causes are: 1) you've filtered all your SVs 2) you didn't actually run the circos.genomicLink line (initializeWithIdeogram() will give you an empty circos plot)