# HG changeset patch # User mingchen0919 # Date 1543547927 18000 # Node ID 69157062629fced7f9b55d035a1f23f30b23a2cf # Parent 11994267638a62b5026db50f52190776870c8783 planemo upload commit e37a78252b05a1a274a750e55a1a74693b7abc18-dirty diff -r 11994267638a -r 69157062629f rmarkdown_report.Rmd --- a/rmarkdown_report.Rmd Thu Nov 29 16:15:37 2018 -0500 +++ b/rmarkdown_report.Rmd Thu Nov 29 22:18:47 2018 -0500 @@ -36,6 +36,24 @@ +```{r, eval=FALSE, echo=FALSE} +# The script below is used to avoid conflicts between different javascript labraries +``` + + + --- # javascript code below is to build the file tree interface # see this for how to implement opening hyperlink: https://stackoverflow.com/questions/18611317/how-to-get-i-get-leaf-nodes-in-jstree-to-open-their-hyperlink-when-clicked-when @@ -67,13 +85,13 @@ ## Counts -Only the first few rows are displayed. +Write data into a CSV file. -```{r, echo=FALSE} +```{r, echo=TRUE} count_data = read.table(paste0(opt$X_d, '/counts.txt'), row.names = 1) sample_names = trimws(strsplit(opt$X_B, ',')[[1]]) colnames(count_data) = rep(sample_names, length = ncol(count_data)) -kable(head(count_data)) +# kable(head(count_data)) # modify column names count_data = data.frame(feature_id = rownames(count_data), count_data) @@ -82,3 +100,14 @@ quote = FALSE, row.names = FALSE) ``` +Display the top 1000 rows with largest average counts. + +```{r echo=TRUE} +# Sort count table by count average +rownames(count_data) = count_data$feature_id +count_data = count_data[, -1] +sorted_ct_table = count_data[order(rowMeans(count_data), decreasing = TRUE), ] +DT::datatable(head(sorted_ct_table, 1000)) +``` + +