Giter Club home page Giter Club logo

sparsesignatures's People

Contributors

avantikalal avatar danro9685 avatar luca-dex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sparsesignatures's Issues

Using SparseSignatures in R 3.4.0

I have some issue with the installation of SparseSignatures. It installed quite well in my Laptop but I want to install that on our cluster. The problem is the R version of our cluster is 3.4.0 and SparseSignatures requires 3.6.0. Is there any way I can install SparseSignatures in 3.4.0?

How to choose the best lambda?

Hi @danro9685 ,

I was trying to use your package, but one key issue is that I cannot choose a proper number of lambda.

In the example provided by your vignette, you let the software to run **nmf.lassoCV()** with 3 lambda values (0.05, 0.10, 0.15), and you picked the best one (0.10). But there are certain cases scenarios that the best lambda may fall beyond these 3.

So is it necessary to test for more lambda values (e.g. 0.20, 0.30?) And can you briefly explain the meaning of "lambda" here? Thanks!

Exposure matrix

I am trying to get the exposure matrix. May I know the method to get the exposure matrix? I couldn't find the method in the user guide.

'match' requires vector arguments

There is an error raised when executing the function import.counts.data() in data_import.R

To replicate the error it is possible to execute a fragment from the vignette (line 102 - 102):

library("BSgenome.Hsapiens.1000genomes.hs37d5")
bsg = BSgenome.Hsapiens.1000genomes.hs37d5
data(mutation_categories)
head(mutation_categories)
imported_data = import.counts.data(input=ssm560_reduced,bsg=bsg,mutation_categories=mutation_categories)

The error is not raised every time...

R release requriement needn't >4.1.0

Here is R release requirement in the DESCRIPTION file of this R package:

R (>= 4.1.0),

I cloned this git repo, and modified R release to 'R (>= 3.6.0)' , and I managed to install under R 3.6.3 using devtools::install(). I think R 4.1 release is not needed for this package.

run time

I am doing an analysis with 21 Samples. It finished only 50 out of 500 cv repetitions with the following parameters in the last two days in an Intel(R) Xeon(R) Gold 6132 CPU @ 2.60GHz
machine with 28 processors. I can see 27 processors are working in parallel using the TOP command. I presume it might take weeks to extract 2-10 signatures from only 21 samples with the parameters I am using currently. But, In the future, I need to extract up to 45 signatures from 3000 samples which could be even slower. So do you think I am using good parameters for the nmf.LassoCV function (see below). Do you think that I should change some the of the parameters to get faster but accurate results?

I have used the following parameters for the nmf.LassoCV function.
nmf_runs = 100
iterations = 20
cross_validation_iterations = 5
cross_validation_repetitions = 500
lamda_values = c(0.01, 0.1)

R version: 3.4.0

The CPU model I am using:

Operating system: Linux

Running Sparse Sigs Pkg Error

Hi,

I'm running into this error when trying to go through the test dataset provided by the manual.

The error is during the starting beta estimation step:

data(patients) head(patients) starting_betas = starting.betas.estimation(x=patients,K=3:12,background_signature=background)

Error:

> starting_betas = starting.betas.estimation(x=patients,K=3:12,background_signature=background) Performing a robust estimation of the starting betas for the nmfLasso method... Computing the initial values of beta by standard NMF... Error in path.package(pkg) : none of the packages are loaded Timing stopped at: 0.002 0.001 0.002

Here is my R install:

> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] doParallel_1.0.11                           iterators_1.0.10                            foreach_1.4.4                              
 [4] BSgenome.Hsapiens.1000genomes.hs37d5_0.99.1 BSgenome_1.48.0                             rtracklayer_1.40.5                         
 [7] Biostrings_2.48.0                           XVector_0.20.0                              GenomicRanges_1.32.6                       
[10] GenomeInfoDb_1.16.0                         IRanges_2.14.11                             S4Vectors_0.18.3                           
[13] SparseSignatures_1.0.2                      Biobase_2.40.0                              BiocGenerics_0.26.0                        
[16] BiocInstaller_1.30.0                       

loaded via a namespace (and not attached):
 [1] SummarizedExperiment_1.10.1 reshape2_1.4.3              lattice_0.20-35             colorspace_1.3-2            NMF_0.21.0                  XML_3.98-1.16              
 [7] rlang_0.2.2                 pillar_1.3.0                withr_2.1.2                 BiocParallel_1.14.2         RColorBrewer_1.1-2          registry_0.5               
[13] rngtools_1.3.1              matrixStats_0.54.0          GenomeInfoDbData_1.1.0      plyr_1.8.4                  pkgmaker_0.27               stringr_1.3.1              
[19] zlibbioc_1.26.0             munsell_0.5.0               gtable_0.2.0                codetools_0.2-15            labeling_0.3                nnlasso_0.3                
[25] Rcpp_0.12.18                xtable_1.8-2                scales_1.0.0                DelayedArray_0.6.5          Rsamtools_1.32.3            gridExtra_2.3              
[31] ggplot2_3.0.0               digest_0.6.16               stringi_1.2.4               grid_3.5.0                  bibtex_0.4.2                tools_3.5.0                
[37] bitops_1.0-6                magrittr_1.5                RCurl_1.95-4.11             lazyeval_0.2.1              tibble_1.4.2                cluster_2.0.7-1            
[43] crayon_1.3.4                Matrix_1.2-14               gridBase_0.4-7              data.table_1.11.4           nnls_1.4                    GenomicAlignments_1.16.0   
[49] compiler_3.5.0

Problem in nmf.LassoCV

When running nmf.LassoCV with the args reported in the vignettes the following error is shown:

> cv = nmf.LassoCV(x=patients,K=3:10)
Performing a grid search to estimate the best values of K and lambda with a total of 10 cross validation repetitions... 
starting worker pid=8516 on localhost:11120 at 11:06:40.616
starting worker pid=8530 on localhost:11120 at 11:06:40.754
starting worker pid=8539 on localhost:11120 at 11:06:40.890
starting worker pid=8548 on localhost:11120 at 11:06:41.026
starting worker pid=8557 on localhost:11120 at 11:06:41.165
starting worker pid=8566 on localhost:11120 at 11:06:41.303
starting worker pid=8575 on localhost:11120 at 11:06:41.443
Executing 7 processes via parallel... 
Starting cross validation with a total of 10 repetitions... 
Performing repetition 1 out of 10... 
Performing cross validation iteration 1 out of 5... 
Computing the initial values of beta by standard NMF... 
Timing stopped at: 0.002 0 0.002
Timing stopped at: 0.001 0 0.001
Timing stopped at: 0 0.001 0.001
Timing stopped at: 0.001 0 0.001
Timing stopped at: 0.001 0 0.001
Timing stopped at: 0.001 0 0.001
Timing stopped at: 0.001 0 0.001
Timing stopped at: 0.001 0 0.001
Error in (function (...)  : All the runs produced an error:
	-#1 [r=3] -> none of the packages are loaded [in call to 'path.package']
	-#2 [r=4] -> none of the packages are loaded [in call to 'path.package']
	-#3 [r=5] -> none of the packages are loaded [in call to 'path.package']
	-#4 [r=6] -> none of the packages are loaded [in call to 'path.package']
	-#5 [r=7] -> none of the packages are loaded [in call to 'path.package']
	-#6 [r=8] -> none of the packages are loaded [in call to 'path.package']
	-#7 [r=9] -> none of the packages are loaded [in call to 'path.package']
	-#8 [r=10] -> none of the packages are loaded [in call to 'path.package']

After loading the full NMF package this is the result:

> cv = nmf.LassoCV(x=patients,K=3:10)
Performing a grid search to estimate the best values of K and lambda with a total of 10 cross validation repetitions... 
starting worker pid=8908 on localhost:11120 at 11:10:08.608
starting worker pid=8917 on localhost:11120 at 11:10:08.744
starting worker pid=8926 on localhost:11120 at 11:10:08.881
starting worker pid=8935 on localhost:11120 at 11:10:09.017
starting worker pid=8944 on localhost:11120 at 11:10:09.155
starting worker pid=8953 on localhost:11120 at 11:10:09.291
starting worker pid=8962 on localhost:11120 at 11:10:09.428
Executing 7 processes via parallel... 
Starting cross validation with a total of 10 repetitions... 
Performing repetition 1 out of 10... 
Performing cross validation iteration 1 out of 5... 
Computing the initial values of beta by standard NMF... 
Error in t.default(curr_beta) : argument is not a matrix
In addition: Warning messages:
1: In .Internal(gc(verbose, reset, full)) :
  closing unused connection 9 (<-localhost:11120)
2: In .Internal(gc(verbose, reset, full)) :
  closing unused connection 8 (<-localhost:11120)
3: In .Internal(gc(verbose, reset, full)) :
  closing unused connection 7 (<-localhost:11120)
4: In .Internal(gc(verbose, reset, full)) :
  closing unused connection 6 (<-localhost:11120)
5: In .Internal(gc(verbose, reset, full)) :
  closing unused connection 5 (<-localhost:11120)
6: In .Internal(gc(verbose, reset, full)) :
  closing unused connection 4 (<-localhost:11120)
7: In .Internal(gc(verbose, reset, full)) :
  closing unused connection 3 (<-localhost:11120)

I'm checking the changelog of NMF to understand if some change was introduced in the output of the function basis which seems to be the responsible of this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.