SomaticSignatures, cannot reproduce use case
6
0
Entering edit mode
Anna N. • 0
@anna-n-6889
Last seen 9.9 years ago
France

Hello, I would like to use the Somatic Signatures vignette.

I have downloaded the package, ran all the functions, and tried to reproduce the Use case: Estimating Somatic Signatures from TCGA WES Studies
- but I get these warnings: ( I have copied the response for each command that gives me trouble)

> library(SomaticSignatures)
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
  le package ‘IRanges’ 1.22.10 est déjà chargé, mais >= 1.99.28 est requis
Error: le chargement du package ou de l'espace de noms a échoué pour ‘SomaticSignatures’

> library(BSgenome.Hsapiens.UCSC.hg19)
Le chargement a nécessité le package : BSgenome
Error in gzfile(file, "rb") : cannot open the connection
In addition: Warning messages:
1: In read.dcf(file.path(p, "DESCRIPTION"), c("Package", "Version")) :
  cannot open compressed file 'C:/Program Files/R/R-3.1.1/library/IRanges/DESCRIPTION', probable reason 'No such file or directory'
2: In gzfile(file, "rb") :
  cannot open compressed file '', probable reason 'Invalid argument'

> sca_merge = unlist(sca_all)
Warning message:
In valid.GenomicRanges.seqinfo(x) :
  'ranges' contains values outside of sequence bounds. See ?trim to subset ranges.

> sca_merge = sca_merge[ sca_merge$Variant_Type %in% "SNP" ]
Warning message:
In valid.GenomicRanges.seqinfo(x) :
  'ranges' contains values outside of sequence bounds. See ?trim to subset ranges.

> sca_merge = keepSeqlevels(sca_merge, hsAutosomes())
Warning message:
In valid.GenomicRanges.seqinfo(x) :
  'ranges' contains values outside of sequence bounds. See ?trim to subset ranges.

> sca_vr = VRanges(
+     seqnames(sca_merge),
+     ranges(sca_merge),
+     ref = sca_merge$Reference_Allele,
+     alt = sca_merge$Tumor_Seq_Allele2,
+     sampleNames = sca_merge$Patient_ID,
+     seqinfo = seqinfo(sca_merge),
+     study = sca_merge$study)
Warning messages:
1: In valid.GenomicRanges.seqinfo(x) :
  'ranges' contains values outside of sequence bounds. See ?trim to subset ranges.
2: In valid.GenomicRanges.seqinfo(x) :
  'ranges' contains values outside of sequence bounds. See ?trim to subset ranges.

> sca_motifs = mutationContext(sca_vr, BSgenome.Hsapiens.UCSC.hg19, unify = TRUE)

Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘granges’ for signature ‘"VRanges"’

> sca_mm = motifMatrix(sca_motifs, group = "study", normalize = TRUE)

Error in unname(vr) :
  erreur d'évaluation de l'argument 'obj' lors de la sélection d'une méthode pour la fonction 'unname' : Error: object 'sca_motifs' not found
 

> sca_motifs = mutationContext(sca_vr, BSgenome.Hsapiens.UCSC.hg19, unify = TRUE)

Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘granges’ for signature ‘"VRanges"’

The session Info command gives

Error: $ operator is invalid for atomic vectors
In addition: Warning messages:
1: In FUN(c("tools", "Matrix", "graph", "gplots", "devtools", "gtools",  :
  le fichier DESCRIPTION du package 'VariantAnnotation' est manquant ou incorrect
2: In FUN(c("tools", "Matrix", "graph", "gplots", "devtools", "gtools",  :
  le fichier DESCRIPTION du package 'Rsamtools' est manquant ou incorrect
3: In FUN(c("tools", "Matrix", "graph", "gplots", "devtools", "gtools",  :
  le fichier DESCRIPTION du package 'Biostrings' est manquant ou incorrect
4: In FUN(c("tools", "Matrix", "graph", "gplots", "devtools", "gtools",  :
  le fichier DESCRIPTION du package 'XVector' est manquant ou incorrect
5: In FUN(c("tools", "Matrix", "graph", "gplots", "devtools", "gtools",  :
  le fichier DESCRIPTION du package 'GenomicRanges' est manquant ou incorrect
6: In FUN(c("tools", "Matrix", "graph", "gplots", "devtools", "gtools",  :
  le fichier DESCRIPTION du package 'IRanges' est manquant ou incorrect

 

 

Thank you in advance for your help

somaticsignatures 'IRanges • 2.9k views
ADD COMMENT
2
Entering edit mode
@james-w-macdonald-5106
Last seen 2 days ago
United States

You have to load the SomaticSignatures package before you can use it (note that neither VariantAnnotation nor SomaticSignatures are listed in your sessionInfo).

ADD COMMENT
0
Entering edit mode
Julian Gehring ★ 1.3k
@julian-gehring-5818
Last seen 5.6 years ago

It seems that your bioc packages mismatch.  Looking at 

le package ‘IRanges’ 1.22.10 est déjà chargé, mais >= 1.99.28 est requis

at least the IRanges package is outdated.  Please give us a output of your

sessionInfo()

and

biocValid()
ADD COMMENT
0
Entering edit mode
Anna N. • 0
@anna-n-6889
Last seen 9.9 years ago
France

SessionInfo() is at the end of the firts message, I recopy

Error: $ operator is invalid for atomic vectors
In addition: Warning messages:
1: In FUN(c("tools", "Matrix", "graph", "gplots", "devtools", "gtools",  :
  le fichier DESCRIPTION du package 'VariantAnnotation' est manquant ou incorrect
2: In FUN(c("tools", "Matrix", "graph", "gplots", "devtools", "gtools",  :
  le fichier DESCRIPTION du package 'Rsamtools' est manquant ou incorrect
3: In FUN(c("tools", "Matrix", "graph", "gplots", "devtools", "gtools",  :
  le fichier DESCRIPTION du package 'Biostrings' est manquant ou incorrect
4: In FUN(c("tools", "Matrix", "graph", "gplots", "devtools", "gtools",  :
  le fichier DESCRIPTION du package 'XVector' est manquant ou incorrect
5: In FUN(c("tools", "Matrix", "graph", "gplots", "devtools", "gtools",  :
  le fichier DESCRIPTION du package 'GenomicRanges' est manquant ou incorrect
6: In FUN(c("tools", "Matrix", "graph", "gplots", "devtools", "gtools",  :
  le fichier DESCRIPTION du package 'IRanges' est manquant ou incorrect

 

biocValid returns TRUE

I have updated everything...

 

ADD COMMENT
0
Entering edit mode

It seem to me that your R/bioconductor installation is seriously broken. I would recommend to consider a reinstallation.

ADD REPLY
0
Entering edit mode
Anna N. • 0
@anna-n-6889
Last seen 9.9 years ago
France

Hi Julian

 

I reinstalled everything, still not working.

I was using Rstudio, so I also installed R and tried all over again.

It seems that the problem is in the package VariantAnnotation...

or my system...

 

R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

The first time it gives me this:

> biocLite("VariantAnnotations")
BioC_mirror: http://bioconductor.org
Using Bioconductor version 3.0 (BiocInstaller 1.16.0), R version
  3.1.1.
Installing package(s) 'VariantAnnotations'
Message d'avis :
package ‘VariantAnnotations’ is not available (for R version 3.1.1)

 

The second time (without doing anything different) it says that:

> biocLite("VariantAnnotation")
BioC_mirror: http://bioconductor.org
Using Bioconductor version 3.0 (BiocInstaller 1.16.0), R version
  3.1.1.
Installing package(s) 'VariantAnnotation'
essai de l'URL 'http://bioconductor.org/packages/3.0/bioc/bin/windows/contrib/3.1/VariantAnnotation_1.12.0.zip'
Content type 'application/zip' length 3851752 bytes (3.7 Mb)
URL ouverte
downloaded 3.7 Mb

package ‘VariantAnnotation’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\Users\a_niaraki\AppData\Local\Temp\Rtmp0wRcXk\downloaded_packages

 

Still, when i proceed with the commands I end up at the same thing...

 

> sca_vr = VRanges(
+     seqnames(sca_merge),
+     ranges(sca_merge),
+     ref = sca_merge$Reference_Allele,
+     alt = sca_merge$Tumor_Seq_Allele2,
+     sampleNames = sca_merge$Patient_ID,
+     seqinfo = seqinfo(sca_merge),
+     study = sca_merge$study)
Erreur : impossible de trouver la fonction "VRanges"

 

and

> sca_vr = ucsc(sca_vr)
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
  there is no package called ‘checkmate’
Erreur dans .requirePackage(package) :
  unable to find required package ‘VariantAnnotation’

 

 

And the sessionInfo gives

> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252    LC_MONETARY=French_France.1252 LC_NUMERIC=C                   LC_TIME=French_France.1252    

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] SomaticCancerAlterations_1.1.1 ggplot2_1.0.0                  Rsamtools_1.18.0               Biostrings_2.34.0              XVector_0.6.0                  GenomicRanges_1.18.1           GenomeInfoDb_1.2.0            
 [8] IRanges_2.0.0                  S4Vectors_0.4.0                BiocGenerics_0.12.0            BiocInstaller_1.16.0           knitr_1.7                     

loaded via a namespace (and not attached):
 [1] AnnotationDbi_1.28.0 Biobase_2.26.0       biomaRt_2.22.0       bitops_1.0-6         codetools_0.2-9      colorspace_1.2-4     DBI_0.3.1            digest_0.6.4         evaluate_0.5.5       exomeCopy_1.12.0     foreach_1.4.2       
[12] formatR_1.0          grid_3.1.1           gtable_0.1.2         iterators_1.0.7      MASS_7.3-35          munsell_0.4.2        plyr_1.8.1           proto_0.3-10         Rcpp_0.11.3          RCurl_1.95-4.3       reshape2_1.4        
[23] RSQLite_0.11.4       scales_0.2.4         stringr_0.6.2        tools_3.1.1          XML_3.98-1.1         zlibbioc_1.12.0     

 

 

I was thinking, should I try with a previous version of R?
Is it a matter of compatibility? 

 

Anna

 

 

 

 

 

ADD COMMENT
0
Entering edit mode
@wolfgang-huber-3550
Last seen 3 months ago
EMBL European Molecular Biology Laborat…

Anna

when you get an error, it is useful to read and study it, and try to resolve the reason. Trying to ignore what happened and simply pasting the next command is not a good approach with computers. They are dumb.

In your example above - it looks like you installed the package but did not load it. Have a look at the R-Intro to learn the difference between these two. Also, in your example above, note how you spelled the package name differently in two cases: biocLite("VariantAnnotation") vs biocLite("VariantAnnotations"). It may look equivalent to you but for a computer these are completely different things.

My suggestion is to start the R sesssion from scratch, then to follow the code in the vignette source (http://www.bioconductor.org/packages/release/bioc/vignettes/SomaticSignatures/inst/doc/SomaticSignatures-vignette.R) line by line, and at each line make sure that no error occurs. If an error occurs, stop, don't run additional commands, but rather, resolve the error, and then restart.

Wolfgang

ADD COMMENT
0
Entering edit mode
Anna N. • 0
@anna-n-6889
Last seen 9.9 years ago
France

Dear Wolfgang

thank you for your answer.

Apparently I was missing a dependency: the package checkmate - so this is why VariantAnnotation was not loading properly.

Now everything is working like a charm. Thank you all for your answers and help.

Anna

ADD COMMENT

Login before adding your answer.

Traffic: 631 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6