Search
Question: Somatic Signature only SNV supported
0
gravatar for TRASA
4 weeks 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!

 

 

 

 

 

ADD COMMENTlink modified 4 weeks ago • written 4 weeks 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.

ADD REPLYlink written 4 weeks ago by Julian Gehring1.3k

I loaded following libraries

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

And then run following code (including output)

> sca_data = unlist(scaLoadDatasets())

> 
> 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​
ADD REPLYlink written 4 weeks ago by TRASA0

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

ADD REPLYlink written 4 weeks ago by Julian Gehring1.3k

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.

ADD REPLYlink modified 4 weeks ago • written 4 weeks ago by Julian Gehring1.3k

No, there is no reason. I must have completely missed that. Sorry for bothering you with such a stupid mistake...

ADD REPLYlink written 29 days ago by TRASA0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 358 users visited in the last hour