How to add search functions and additional fields to the html file of DESeq2 results created with ReportingTools
1
1
Entering edit mode
da.de ▴ 30
@dade-7723
Last seen 22 months ago
Austria

Hi,

I started using the ReportingTools Package to visualize DESeq2 results including a ggplot2 graph, links and metadata. I really like the resulting html report.

However, I am looking for a way how to add some features:

  1. Automatically there is a filter option for numeric columns in the html report. How can I also add a search field to character columns (eg „gene symbol“)?
    There is only a general  „search all columns“ field which is in my case not very useful because I also have gene symbols in some metadata columns as well.
  2. How can I add a subtitle?
  3. Is it possible to add text fields (eg for experiment descriptions)?

Thanks for your help!

Best, Dagmar

 

 

#loop for making the pictures

imagename <- c()

for (i in 1:nrow(res_filtered))

{

  imagename[i]<- paste0("plot_", res_filtered $symbol[i], ".png")

  png(filename=paste0("reports/", imagename[i]))

  data <- plotCounts(dds, gene= res_filtered$ensembl[i], intgroup="Combined", returnData=TRUE)

  gp <- ggplot (data, aes(x=Combined, y=count))+

    geom_boxplot(fill="white", outlier.colour=NA)+

    geom_jitter(shape=16, size=4, aes(colour=Condition), position=position_jitter(width=0.2))

  print(gp)

  dev.off() 

}

#adding pictures + links to the data frame

my.df <- as.data.frame(res_filtered)

my.df$image <- hwriteImage(imagename, link=imagename, table=FALSE, width=100, height=100)

my.df$link <- hwrite(as.character(my.df$symbol), link=paste("http://www.ncbi.nlm.nih.gov/gene/",

                                                            as.character(my.df$entrez), sep=""), table=FALSE)

htmlreport5 <- HTMLReport (shortName="DEG_1",

                           title="DEG",

                           reportDirectory="./reports")

publish(my.df, htmlreport5)

finish(htmlreport5)

 

ReportingTools deseq2 hwriter • 1.2k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

1.) This is handled by the java scripts that come with the ReportingTools package. Every time you make an HTML table, there is a directory called jslib that is dropped in the same directory as your table. In there is a file called jsquery.dataTables.columnFilter.js, which seems to be in charge of doing the filtering, so I would start there.

2.) Not sure what you mean by subtitle. Subtitle to what? But do note that most of the basic HTML is handled by the hwriter package, and there is an extensive set of examples, showing how to do any number of things, so I would start there.

3.) See #2

ADD COMMENT

Login before adding your answer.

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