Entering edit mode
I would like to check if some gene signature are enriched as up-regulated on my rnaseq experiment.
I have 2 groups and I calculate the differential expression using Deseq2. I have a folder where I have some signature genes and I don't understand how to use geneSetTest. If i use pvalue I have some errors . Only if I use log2Foldchange seems to work.
What is the right way to apply this method?
resSig<-res[which(res$pvalue < .05),] files <- list.files(path=path, pattern="*.ensembl.csv", full.names=T, recursive=FALSE) for (i in 1:length(files)) { print(files[i]) listaGeni<- read.table(files[i],header=F,sep="\t") signature1<-listaGeni$V1 index_gene<-match(signature1,resSig$ensembl) knowres<-index_gene[!is.na(index_gene)] a<-geneSetTest(knowres,res$log2FoldChange,"greater") #upregulated b<-geneSetTest(knowres,res$log2FoldChange,"less") #downreglare print(a) print("###") print(b) } a<-geneSetTest(knowres,res$pvalue,"greater") Error in if (allsamesign) type <- "f" else type <- "t" : missing value where TRUE/FALSE needed > sessionInfo() R version 3.3.2 (2016-10-31) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.2 LTS locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=it_IT.UTF-8 [4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=it_IT.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=it_IT.UTF-8 LC_NAME=C LC_ADDRESS=C [10] LC_TELEPHONE=C LC_MEASUREMENT=it_IT.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] parallel stats4 stats graphics grDevices utils datasets methods base other attached packages: [1] tximportData_1.0.2 tximport_1.0.3 gplots_3.0.1 [4] genefilter_1.54.2 limma_3.28.21 biomaRt_2.28.0 [7] reshape2_1.4.2 RColorBrewer_1.1-2 ggplot2_2.2.1 [10] pheatmap_1.0.8 DESeq2_1.12.4 SummarizedExperiment_1.2.3 [13] Biobase_2.32.0 GenomicRanges_1.24.3 GenomeInfoDb_1.8.7 [16] IRanges_2.6.1 S4Vectors_0.10.3 BiocGenerics_0.18.0 loaded via a namespace (and not attached): [1] Rcpp_0.12.9 locfit_1.5-9.1 lattice_0.20-35 gtools_3.5.0 [5] assertthat_0.1 digest_0.6.12 plyr_1.8.4 backports_1.0.5 [9] acepack_1.4.1 RSQLite_1.1-2 zlibbioc_1.18.0 lazyeval_0.2.0 [13] data.table_1.10.0 annotate_1.50.1 gdata_2.17.0 QoRTs_1.1.8 [17] rpart_4.1-10 Matrix_1.2-8 checkmate_1.8.2 labeling_0.3 [21] splines_3.3.2 BiocParallel_1.6.6 geneplotter_1.50.0 stringr_1.2.0 [25] foreign_0.8-67 htmlwidgets_0.8 RCurl_1.95-4.8 munsell_0.4.3 [29] base64enc_0.1-3 htmltools_0.3.5 nnet_7.3-12 tibble_1.2 [33] gridExtra_2.2.1 htmlTable_1.9 Hmisc_4.0-2 XML_3.98-1.5 [37] bitops_1.0-6 grid_3.3.2 xtable_1.8-2 gtable_0.2.0 [41] DBI_0.6-1 magrittr_1.5 scales_0.4.1 KernSmooth_2.23-15 [45] stringi_1.1.2 XVector_0.12.1 latticeExtra_0.6-28 Formula_1.2-1 [49] tools_3.3.2 survival_2.40-1 AnnotationDbi_1.34.4 colorspace_1.3-2 [53] cluster_2.0.6 caTools_1.17.1 memoise_1.0.0 knitr_1.15.1
thanks so much!! Have you some exmple to gave me ,..because I don't found any example on deseq2 results
Go to the relevant packages:
goseq is its own Bioconductor package (and there are posts on the support site regarding goseq and DESeq2)
and roast and camera are in the limma package and have examples in the User Guide