r <- params$r
input <- params$input
r_clust <- params$r_clust
library(knitr)

Dashboard for the Inference and Analysis of Networks from Expression data


This report was automatically generated by DIANE to improve research reproducibility.

It contains the main settings and results for the clustering tab of the application.

If you're interested in one particular cluster, you can download the csv table of the genes from this cluster in the tab "explore clusters".

Your settings

Normalization method :

print(r$norm_method)

Input genes for clustering :

r_clust$genes

Conditions used for the clustering :

r_clust$conditions

Number of clusters tested :

paste("min =", input$min_k, "max =", input$max_k )

Chosen Mixture Models :

if(input$coseq_model) "Poisson" else "Normal"

Transformation prior to Gaussian Mixture :

if(input$coseq_model) "NA" else input$transfo

Statistical model :

r_clust$model

Results

Plots generated by the coseq run :

DIANE::draw_coseq_run(r_clust$model, plot = "ICL")
DIANE::draw_coseq_run(r_clust$model, plot = "barplots")

Normalized expression profiles of the clusters:

DIANE::draw_profiles(
      data = params$normalized_counts,
      conds = r_clust$conditions,
      membership = r_clust$membership
    )

To reproduce this result on identical data, specify this seed in DIANE's interface (data import tab), or as the seed argument to run_coseq() in command line.

r$seed

Clusters exploration

Let's go for a tour of the different clusters, by visualizing their profiles and gene members.

# Init Step to make sure that the dependencies are loaded
htmltools::tagList(DT::datatable(cars))
htmltools::tagList(plotly::ggplotly(ggplot2::ggplot()))
membership <- r_clust$membership
K <- 1:max(membership)

for(k in K){

  genes <- get_genes_in_cluster(membership = membership, cluster = k)

  print(DIANE::draw_profiles(
      data = params$normalized_counts,
      conds = r_clust$conditions,
      membership = membership,
      k = k
    ))

  table <- data.frame(Genes = genes)
  if (!is.null(r$gene_info)) {
    if (r$splicing_aware) ids <- DIANE::get_locus(genes, unique = FALSE)
    else ids <- genes

    table <- data.frame(Genes = ids)
    table[,colnames(r$gene_info)] <- r$gene_info[match(ids, rownames(r$gene_info)),]

    print(htmltools::tagList(
      DT::datatable(table
    )))

  }
  else{
    print(table)
  }
}


OceaneCsn/DIANE documentation built on Jan. 10, 2024, 6:43 p.m.