Hello,
I am trying to run somaticsignatures on mutation data.
When I run the commands:
snpvr_mm = motifMatrix(snpvr_motif, group = "study", normalize = TRUE)
gof_nmf = identifySignatures(snpvr_mm, 4, decomposition = nmfDecomposition)
I get the following error:
Error: NMF::nmf - Input matrix x contains at least one null or NA-filled row.
The session info for R is:
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggplot2_2.2.1 SomaticSignatures_2.8.4 VariantAnnotation_1.18.7 Rsamtools_1.24.0 Biostrings_2.40.2
[6] XVector_0.12.1 SummarizedExperiment_1.2.3 Biobase_2.32.0 GenomicRanges_1.24.3 GenomeInfoDb_1.8.7
[11] IRanges_2.6.1 S4Vectors_0.10.3 BiocGenerics_0.18.0
loaded via a namespace (and not attached):
[1] httr_1.2.1 foreach_1.4.3 AnnotationHub_2.4.2 splines_3.3.1 Formula_1.2-1
[6] shiny_1.0.0 assertthat_0.1 interactiveDisplayBase_1.10.3 latticeExtra_0.6-28 RBGL_1.48.1
[11] BSgenome_1.40.1 RSQLite_1.1-2 backports_1.0.5 lattice_0.20-34 biovizBase_1.20.0
[16] digest_0.6.12 RColorBrewer_1.1-2 checkmate_1.8.2 colorspace_1.3-2 ggbio_1.20.2
[21] htmltools_0.3.5 httpuv_1.3.3 Matrix_1.2-8 plyr_1.8.4 OrganismDbi_1.14.1
[26] XML_3.98-1.5 biomaRt_2.28.0 zlibbioc_1.18.0 xtable_1.8-2 scales_0.4.1
[31] BiocParallel_1.6.6 proxy_0.4-16 htmlTable_1.9 tibble_1.2 pkgmaker_0.22
[36] GenomicFeatures_1.24.5 nnet_7.3-12 lazyeval_0.2.0 survival_2.40-1 magrittr_1.5
[41] mime_0.5 memoise_1.0.0 GGally_1.3.0 doParallel_1.0.10 NMF_0.20.6
[46] foreign_0.8-67 graph_1.50.0 BiocInstaller_1.22.3 registry_0.3 tools_3.3.1
[51] data.table_1.10.4 gridBase_0.4-7 stringr_1.1.0 munsell_0.4.3 rngtools_1.2.4
[56] cluster_2.0.5 AnnotationDbi_1.34.4 ensembldb_1.4.7 pcaMethods_1.64.0 grid_3.3.1
[61] RCurl_1.95-4.8 iterators_1.0.8 dichromat_2.0-0 htmlwidgets_0.8 bitops_1.0-6
[66] base64enc_0.1-3 codetools_0.2-15 gtable_0.2.0 DBI_0.5-1 reshape_0.8.6
[71] reshape2_1.4.2 R6_2.2.0 GenomicAlignments_1.8.4 gridExtra_2.2.1 knitr_1.15.1
[76] rtracklayer_1.32.2 Hmisc_4.0-2 stringi_1.1.2 Rcpp_0.12.9 rpart_4.1-10
[81] acepack_1.4.1
Can the problem be identified?
Thanks!
Judging from "Error: NMF::nmf - Input matrix x contains at least one null or NA-filled row.", I would suspect that your input 'snpvr_mm' contains a full row, i.e. study, without any mutations. Can you check if this is the case? It is not possible to narrow it down further from the distance without knowing about the data.
Also, please consider updating your packages to the current Bioconductor release. The version you are using is not supported any more (see the Bioc help pages) and the new version of SomaticSignatures might behave differently.
Hi Julian,
I checked my data table, and I do not have any studies with no mutation calls (studies are in the columns). I do have rows where the trinucleotide motifs are present that have 0 values. See the example below
If a small number of mutations are present in a sample, it is likely to have some rows with a 0 value. (e.g. CA A.G)
How do I overcome this problem?
If I artificially add in values for the missing rows, I get this error:
Error in rowQ(imat, ncol(imat)) : cannot handle missing values.
In addition: Warning message:
In .local(x, rank, method, ...) :
NMF residuals: final objective value is NA
I have now updated bioconductor. Can you please help figure out why this problem persists?
Thanks!
Natalie
How many mutations do you have per sample/study? I.e. what does
return?