Entering edit mode
Dear all,
I'm using ReportingTools with DESeq 2. I'm working with Ensembl Gene ID, for this I'm using recommendation on previous posts her (i.e. create a function). After several error, I have to use R-3.3.1 because of problem with "survival" .
At the end of Reportingtools, I obtained no error but I only have in the table results the ensembl gene ID (no hgnc, no description).
Any help will be really appreciate, Thanks in advance,
You will find below my script.
rm(list=ls()) workDir <- "C:/Users/cagenet/Documents/AMHAROC/3_Analyses_bioinfo/Analyse_Stat" setwd(workDir) AMHdup<-read.csv(file="count_genes_8indi_RmDup.csv", sep = ";",header=TRUE,row.names=1 ) dim(AMHdup) library(DESeq2) #HTSFilter library(HTSFilter) coldatafile<-read.table(file="colData.txt",sep="\t",header=TRUE,row.names=1) colnames(AMHdup) <- NULL # pour éviter l'erreur avec summarizedExperiment dds<-DESeqDataSetFromMatrix(countData = AMHdup, colData = coldatafile, design = ~ Treatment) dds <-dds[rowSums(counts(dds)) > 1,] ## minimal pre-filtering en virant les lignes avec 0 ou 1 reads. nrow(dds) dds1<-dds dds1<-DESeq(dds1) # on lance l'analyse différentielle filterHTS<-HTSFilter(dds1,s.len=500, plot=TRUE)$filteredData dim(filterHTS) # on réduit à 12800 res<-results(filterHTS, independentFiltering = FALSE) ## on utilise les 12700 gènes ayant passé le seuil et on continue avec DESEQ2 library(ReportingTools) library(biomaRt) ensembl<-useEnsembl(biomart="ensembl",dataset="oaries_gene_ensembl")# use ensembl host #creating function to work with ensembl gene ID as input add.anns <- function (dds1, ensembl, ...) { nm <- rownames(dds1) anns <- getBM( attributes = c("ensembl_gene_id","hgnc_symbol", "description"), filters = "ensembl_gene_id", values = nm, mart = ensembl) anns <- anns[match(nm, anns[, 1]), ] colnames(anns) <- c("ID", "Gene Symbol", "Gene Description") dds1 <- cbind (anns, dds1[,-1, drop=FALSE]) rownames(dds1) <- nm dds1 } des2Report <- HTMLReport(shortName = 'RNAseq_analysis_with_DESeq2', title = 'RNA-seq analysis of differential expression using DESeq2', reportDirectory = "./reports") publish(dds1,des2Report, pvalueCutoff=0.05, factor = colData(dds1)$Treatment, modifyDF=list(add.anns, modifyReportDF), reportDirectory="./reports") finish(des2Report)
> sessionInfo(package = NULL) R version 3.3.1 RC (2016-06-17 r70798) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 8.1 x64 (build 9600) locale: [1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252 [3] LC_MONETARY=French_France.1252 LC_NUMERIC=C [5] LC_TIME=French_France.1252 attached base packages: [1] parallel stats4 stats graphics grDevices utils datasets methods base other attached packages: [1] biomaRt_2.28.0 ReportingTools_2.12.2 BiocInstaller_1.22.2 [4] knitr_1.13 DESeq2_1.12.3 SummarizedExperiment_1.2.3 [7] Biobase_2.32.0 GenomicRanges_1.24.1 GenomeInfoDb_1.8.2 [10] IRanges_2.6.0 S4Vectors_0.10.1 BiocGenerics_0.18.0 loaded via a namespace (and not attached): [1] httr_1.2.0 edgeR_3.14.0 [3] AnnotationHub_2.4.2 splines_3.3.1 [5] R.utils_2.3.0 Formula_1.2-1 [7] shiny_0.13.2 interactiveDisplayBase_1.10.3 [9] latticeExtra_0.6-28 RBGL_1.48.1 [11] BSgenome_1.40.1 Rsamtools_1.24.0 [13] Category_2.38.0 RSQLite_1.0.0 [15] lattice_0.20-33 biovizBase_1.20.0 [17] limma_3.28.6 chron_2.3-47 [19] digest_0.6.9 RColorBrewer_1.1-2 [21] XVector_0.12.0 colorspace_1.2-6 [23] ggbio_1.20.1 R.oo_1.20.0 [25] httpuv_1.3.3 htmltools_0.3.5 [27] Matrix_1.2-6 plyr_1.8.4 [29] OrganismDbi_1.14.1 GSEABase_1.34.0 [31] XML_3.98-1.4 genefilter_1.54.2 [33] zlibbioc_1.18.0 xtable_1.8-2 [35] GO.db_3.3.0 scales_0.4.0 [37] BiocParallel_1.6.2 annotate_1.50.0 [39] ggplot2_2.1.0 PFAM.db_3.3.0 [41] GenomicFeatures_1.24.2 nnet_7.3-12 [43] mime_0.4 survival_2.39-4 [45] magrittr_1.5 R.methodsS3_1.7.1 [47] GGally_1.1.0 hwriter_1.3.2 [49] foreign_0.8-66 GOstats_2.38.0 [51] graph_1.50.0 tools_3.3.1 [53] data.table_1.9.6 stringr_1.0.0 [55] munsell_0.4.3 locfit_1.5-9.1 [57] cluster_2.0.4 AnnotationDbi_1.34.3 [59] ensembldb_1.4.6 Biostrings_2.40.2 [61] grid_3.3.1 RCurl_1.95-4.8 [63] dichromat_2.0-0 VariantAnnotation_1.18.1 [65] AnnotationForge_1.14.2 bitops_1.0-6 [67] gtable_0.2.0 DBI_0.4-1 [69] reshape_0.8.5 reshape2_1.4.1 [71] R6_2.1.2 GenomicAlignments_1.8.1 [73] gridExtra_2.2.1 rtracklayer_1.32.0 [75] Hmisc_3.17-4 stringi_1.1.1 [77] Rcpp_0.12.5 geneplotter_1.50.0 [79] rpart_4.1-10 acepack_1.3-3.3 >