Entering edit mode
TRASA
•
0
@trasa-17881
Last seen 6.4 years ago
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!

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.
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 trueCould 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.No, there is no reason. I must have completely missed that. Sorry for bothering you with such a stupid mistake...