Command

results_transcripts=stattest(bg_filtered, feature="transcript", covariate="treatment", adjustvars=c("variety"), getFC=TRUE, meas="FPKM")

Error message:

Error in solve.default(t(mod) %*% mod) :   system is computationally singular: reciprocal condition number = 6.66115e-17

my mapping file:

> pheno_data

    ids       treatment variety
1 112-C         control     112
2 112-S          stress     112
3 111-C         control     111
4 111-S          stress     111

Commands ran before running stattest:

>bg = ballgown(dataDir=data_directory, samplePattern='11', meas="all", pData=pheno_data)

>library(genefilter)

>bg_filtered=subset(bg, "rowVars(texpr(bg)) > 1", genomesubset=TRUE)

SessionInfo

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS release 6.6 (Final)

locale:
 [1] LC_CTYPE=en_US.utf8       LC_NUMERIC=C             
 [3] LC_TIME=en_US.utf8        LC_COLLATE=en_US.utf8    
 [5] LC_MONETARY=en_US.utf8    LC_MESSAGES=en_US.utf8   
 [7] LC_PAPER=en_US.utf8       LC_NAME=C                
 [9] LC_ADDRESS=C              LC_TELEPHONE=C           
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C      

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

other attached packages:
[1] genefilter_1.56.0 ballgown_2.6.0   

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.9                AnnotationDbi_1.36.1      
 [3] XVector_0.14.0             GenomicRanges_1.26.2      
 [5] BiocGenerics_0.20.0        splines_3.3.1             
 [7] zlibbioc_1.20.0            GenomicAlignments_1.10.0  
 [9] IRanges_2.8.1              BiocParallel_1.8.1        
[11] xtable_1.8-2               lattice_0.20-34           
[13] GenomeInfoDb_1.10.2        tools_3.3.1               
[15] SummarizedExperiment_1.4.0 parallel_3.3.1            
[17] grid_3.3.1                 nlme_3.1-128              
[19] Biobase_2.34.0             mgcv_1.8-12               
[21] DBI_0.5-1                  survival_2.40-1           
[23] digest_0.6.12              Matrix_1.2-6              
[25] sva_3.22.0                 rtracklayer_1.34.1        
[27] RColorBrewer_1.1-2         S4Vectors_0.12.1          
[29] bitops_1.0-6               RCurl_1.95-4.8            
[31] memoise_1.0.0              RSQLite_1.1-2             
[33] limma_3.30.9               Biostrings_2.42.1         
[35] Rsamtools_1.26.1           stats4_3.3.1              
[37] XML_3.98-1.5               annotate_1.52.1

Troubleshooting from my side:

This is a known error(github.com/alyssafrazee/ballgown/issues/67), so here are the things I checked:

There are indeed some transcripts where the FPKM values are zero; e.g

checking for column1 and column2

> any(texpr(bg_filtered)[,1]==0 & texpr(bg_filtered)[,2]==0)
[1] TRUE

checking for column3 and column4

> any(texpr(bg_filtered)[,3]==0 & texpr(bg_filtered)[,4]==0)
[1] TRUE

checking for all the columns

> any(texpr(bg_filtered)[,1]==0 & texpr(bg_filtered)[,2]==0 & texpr(bg_filtered)[,3]==0 & texpr(bg_filtered)[,4]==0)
[1] FALSE

* i.e. there are no rows where FPKM for all the samples is zero.



Source link