How to use SamR
1
0
Entering edit mode
aristotele_m ▴ 40
@aristotele_m-6821
Last seen 7.5 years ago
Italy

Dear All,

I want to use samr on my rnaseq data.

After  I prepare my normalizate expression value using deseq2 I want to use  samr for detect whihc is the  gene responbile for the difference from on set of data to another.


Dati.coun <- counts(dds,normalize=TRUE)

colnames(Dati.coun)[match(colnames(Dati.coun)[id],colnames(Dati.coun))] <-1
colnames(Dati.coun)[(colnames(Dati.coun) != "1")] <-2

head(Dati.coun,3)
                         1         1          1        2         2          1         2
ENSG00000000003 195.080779 27.020672 111.743404 86.11620 55.208979 100.766001 76.288760
ENSG00000000005   4.150655  1.501148   2.793585  4.30581  1.648029   3.148938  4.146128
ENSG00000000419  70.561133 59.295364  48.887739 47.36391 59.329052  89.315319 60.533473

sam.data<-list(x=Dati.coun,y=colnames(Dati.coun), geneid= 1:nrow(Dati.coun), genenames=rownames(Dati.coun), logged2=T) 

samr.obj<-samr(sam.data,  resp.type="Two class unpaired", nperms=100, random.seed=12345) ##

Error in ttstar[, j] <- -1 * sort(-1 * ttstar[, j]) :
  replacement has length zero
In addition: There were 50 or more warnings (use warnings() to see the first 50)

> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: i686-pc-linux-gnu (32-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] pamr_1.55                 survival_2.37-7           cluster_1.15.3           
 [4] DESeq2_1.4.5              RcppArmadillo_0.4.450.1.0 Rcpp_0.11.3              
 [7] GenomicRanges_1.14.4      XVector_0.2.0             IRanges_1.20.7           
[10] ALL_1.4.16                Biobase_2.22.0            BiocGenerics_0.8.0       
[13] BiocInstaller_1.12.1      samr_2.0                  matrixStats_0.10.0       
[16] impute_1.36.0            

loaded via a namespace (and not attached):
 [1] annotate_1.40.1      AnnotationDbi_1.24.0 DBI_0.3.1            digest_0.6.4        
 [5] genefilter_1.44.0    geneplotter_1.40.0   grid_3.1.1           htmltools_0.2.6     
 [9] lattice_0.20-29      locfit_1.5-9.1       RColorBrewer_1.0-5   rmarkdown_0.3.3     
[13] R.methodsS3_1.6.1    RSQLite_0.11.4       stats4_3.1.1         tools_3.1.1         
[17] XML_3.98-1.1         xtable_1.7-4         yaml_2.1.13 

 

Could you help me on resolve this isssue?

thanks in advance for any help!

 

samr rnaseq CRAN • 3.1k views
ADD COMMENT
1
Entering edit mode
aristotele_m ▴ 40
@aristotele_m-6821
Last seen 7.5 years ago
Italy

I resolve I need only to delete 0 on the rows

 

row_sun<-apply(Dati.coun, 1, function(row) all(row !=0 ))
Da<-Dati.coun[row_sun,]
ADD COMMENT

Login before adding your answer.

Traffic: 879 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