Question: Somatic Signature only SNV supported
0
11 months ago by
TRASA0
TRASA0 wrote:

Hi

I am using the Bioconductor package SomaticSignatures. Since I am very new to NSG anaysis, I tried to reproduce the example used in the Read.me of the package. However, I run into some problems when extracting the sequence context (Section 4.2). I got the following error message.

Error in mutationContext(sca_vr, BSgenome.Hsapiens.1000genomes.hs37d5) :

Only SNV substitutions are currently supported.

I tried to work around this by subsetting the VRanges object using this:

SNV=isSNV(sca_vr)
sca_vrSNV <- sca_vr[SNV] 

However, using...

sca_motif=mutationContext(sca_vrSNV,BSgenome.Hsapiens.1000genomes.hs37d5)
Error in mutationContext(sca_vrSNV, BSgenome.Hsapiens.1000genomes.hs37d5) :
Only SNV substitutions are currently supported

... still gave me the same error message.
I also verified that the
​isSNV(sca_vrSNV) still return TRUE only.

Has anyone had a similar problem? Or do you see some obvious mistake?

Thanks for the help!

somaticsignatures • 305 views
modified 11 months ago • written 11 months ago by TRASA0

Can you please provide a full, reproducible example of your analysis, including all the code that you ran up to the first error and the output of the sessionInfo command? Thanks.

library(SomaticSignatures)
library(SomaticCancerAlterations)
library(BSgenome.Hsapiens.1000genomes.hs37d5)

And then run following code (including output)

>
> sca_data$study = factor(gsub("(.*)_(.*)", "\\1", toupper(names(sca_data)))) > > sca_data = keepSeqlevels(sca_data, hsAutosomes(), pruning.mode = "coarse") > > sca_vr = VRanges( + seqnames = seqnames(sca_data), + ranges = ranges(sca_data), + ref = sca_data$Reference_Allele,
+   alt = sca_data$Tumor_Seq_Allele2, + sampleNames = sca_data$Patient_ID,
+   seqinfo = seqinfo(sca_data),
+   study = sca_data\$study)
> sca_motif=mutationContext(sca_vr, BSgenome.Hsapiens.1000genomes.hs37d5)
Error in mutationContext(sca_vr, BSgenome.Hsapiens.1000genomes.hs37d5) :
Only SNV substitutions are currently supported.
>
> #remove all but SNV
> SNV=isSNV(sca_vr)
> summary(SNV)
Mode   FALSE    TRUE
logical   14276  610215
> sca_vrSNV <- sca_vr[SNV]
> #test whether all but SNV are removed
> SNV2 <- isSNV(sca_vrSNV)
> summary(SNV2)
Mode    TRUE
logical  610215
>
> sca_motif=mutationContext(sca_vrSNV, BSgenome.Hsapiens.1000genomes.hs37d5)
Error in mutationContext(sca_vrSNV, BSgenome.Hsapiens.1000genomes.hs37d5) :
Only SNV substitutions are currently supported.
> #returns still error that only SNV's are supported althought isSNV(sca_vrSNV) is all true​

Could you also add the output of the 'sessionInfo()' command?

The vignette subsets for the SNV substitutions with sca_data = unname(subset(sca_data, Variant_Type %in% "SNP")) which is missing in your example. Is there a particular reason why you want to skip this step? Without this subsetting, the input contains indels as well which are not supported - and this is shown in the error message.