Question: DESeq2; loading htseq-count output; sample condition is described in a different csv file
gravatar for mzillur
3 months ago by
mzillur0 wrote:

Hello there, I have 32 samples without any string 'treated' or something like this. File names are the sample names. In another csv file I have information about those count files (case/control). How can I load these files for differential expression analysis. In the vignettes, they used 'grep' and 'sub' for htseq output, I am not sure how can I adapt this to my dataset. ''. I am new in rnaseq analysis. Any help? Best Regards Zillur

deseq2 • 118 views
ADD COMMENTlink modified 3 months ago by Michael Love23k • written 3 months ago by mzillur0
Answer: DESeq2; loading htseq-count output; sample condition is described in a different
gravatar for Michael Love
3 months ago by
Michael Love23k
United States
Michael Love23k wrote:

See the match function in R: ?match. This will give you a numeric vector that you can use to put one vector or table in the order of another vector or table. If you're just starting with R, you might try getting some help from someone in your institute who can look over your shoulder.

ADD COMMENTlink written 3 months ago by Michael Love23k

Thank you. I have managed to load the dataset. Now facing another problem.

 estimating size factors Error in estimateSizeFactorsForMatrix(counts(object), locfunc = locfunc,  :   
every gene contains at least one zero, cannot compute log geometric means

I have tried dds=dds[rowSums(counts(dds))>32,] But the error persisits. the object is:

class: DESeqDataSet 
dim: 61471 32 
metadata(1): version
assays(1): counts
rownames(61471): 10904 12954 ... gSpikein_ERCC-00171 gSpikein_phiX174
rowData names(0):
colnames(32): A1001 A1006 ... HI021 HI023
colData names(1): condition

Thanks again.

ADD REPLYlink written 3 months ago by mzillur0

This is strange that every gene would contain a zero. What kind of data do you have? What are colSums(counts(dds))?

ADD REPLYlink written 3 months ago by Michael Love23k

Thank you. It turns out that one of my samples has zero for all genes. After removing that particular sample, its ok. Now I am having another problem in downstream analysis aka plotting.

> plotCounts(d4,gene=which.min(d4$padj),intgroup = 'condition')
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘colData’ for signature ‘"DESeqResults"’

I have updated geneplotter after facing the problem. But it didn't solve the error. I have updated it in the same session though. Thanks again and sorry to take your valuable time. Best Regards Zillur

sessionInfo() R version 3.5.2 (2018-12-20) 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

[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] parallel  stats4    stats     graphics  grDevices utils     datasets  methods  
[9] base     

other attached packages:
 [1] geneplotter_1.60.0          annotate_1.60.0             XML_3.98-1.18              
 [4] AnnotationDbi_1.44.0        lattice_0.20-38             tximport_1.10.1            
 [7] readr_1.3.1                 BiocInstaller_1.32.1        DESeq2_1.22.2              
[10] SummarizedExperiment_1.12.0 DelayedArray_0.8.0          BiocParallel_1.16.6        
[13] matrixStats_0.54.0          Biobase_2.42.0              GenomicRanges_1.34.0       
[16] GenomeInfoDb_1.18.2         IRanges_2.16.0              S4Vectors_0.20.1           
[19] BiocGenerics_0.28.0         phytools_0.6-60             maps_3.3.0                 
[22] ape_5.2                    

loaded via a namespace (and not attached):
 [1] nlme_3.1-137            bitops_1.0-6            bit64_0.9-7            
 [4] RColorBrewer_1.1-2      numDeriv_2016.8-1       tools_3.5.2            
 [7] backports_1.1.3         R6_2.4.0                rpart_4.1-13           
[10] Hmisc_4.2-0             DBI_1.0.0               lazyeval_0.2.1         
[13] colorspace_1.4-0        nnet_7.3-12             gridExtra_2.3          
[16] mnormt_1.5-5            phangorn_2.4.0          bit_1.1-14             
[19] compiler_3.5.2          htmlTable_1.13.1        animation_2.6          
[22] expm_0.999-3            scales_1.0.0            checkmate_1.9.1        
[25] genefilter_1.64.0       quadprog_1.5-5          stringr_1.4.0          
[28] digest_0.6.18           foreign_0.8-71          XVector_0.22.0         
[31] base64enc_0.1-3         pkgconfig_2.0.2         htmltools_0.3.6        
[34] plotrix_3.7-4           htmlwidgets_1.3         rlang_0.3.1            
[37] rstudioapi_0.9.0        RSQLite_2.1.1           combinat_0.0-8         
[40] acepack_1.4.1           RCurl_1.95-4.12         magrittr_1.5           
[43] GenomeInfoDbData_1.2.0  Formula_1.2-3           Matrix_1.2-15          
[46] Rcpp_1.0.0              munsell_0.5.0           scatterplot3d_0.3-41   
[49] stringi_1.3.1           clusterGeneration_1.3.4 MASS_7.3-51.1          
[52] zlibbioc_1.28.0         plyr_1.8.4              grid_3.5.2             
[55] blob_1.1.1              crayon_1.3.4            splines_3.5.2          
[58] hms_0.4.2               locfit_1.5-9.1          knitr_1.21             
[61] pillar_1.3.1            igraph_1.2.4            fastmatch_1.1-0        
[64] latticeExtra_0.6-28     data.table_1.12.0       BiocManager_1.30.4     
[67] gtable_0.2.0            ggplot2_3.1.0           xfun_0.5               
[70] xtable_1.8-3            coda_0.19-2             survival_2.43-3        
[73] tibble_2.0.1            memoise_1.1.0           cluster_2.0.7-1
ADD REPLYlink modified 3 months ago • written 3 months ago by mzillur0

If you encounter an error with a function, the best place to check is the help file:


Take a look at the arguments, and make sure that you are providing the right ones.

Here R is giving you a clue, that you gave it a DESeqResults object and it that's not what it was expecting. What is the expected class of the first argument of plotCounts?

ADD REPLYlink written 3 months ago by Michael Love23k

Thank you. My bad! Its working. Many many thanks again. Best Regards, Zillur

ADD REPLYlink written 3 months ago by mzillur0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 203 users visited in the last hour