Skip to content

Utility functions to create JSON input for the online DendroX app

Notifications You must be signed in to change notification settings

frlender/dendrox-util

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DendroX-Util

Packages to create JSON input for the DendroX app.

Code for demonstration can be found in the demo folder.

Python

To install the package:

pip install dendrox

To use the package:

from dendrox import get_json
import seaborn

g = seaborn.clustermap(...)
get_json(g) # will create an input json file for the row dendrogram

Interface:

def get_json(g, row=True, labels=None, fname='nodes'):
    # g: output object from seaborn.clustermap function
    # row: whether to get json data of the row dendrogram or the column dendrogram
    # labels: text labels in the order as in the input data to the clustermap 
    #         function. If left to None, it will extract labels from the input 
    #         g object.
    # fname: the file name of the output json file
    ...

R

To install the package, do the following:

install.packages(reticulate)
reticulate::install_miniconda()
reticulate::py_install('dendrox',pip=T)
# download the dendrox_0.1.0.tar.gz file in this repo
install.packages('path/to/dendrox_0.1.0.tar.gz',repos=NULL)

To use the package:

library(pheatmap)
library(dendrox)

g = pheatmap(...)
get_json(g) # will create an input json file for the row dendrogram

Interface:

get_json <- function(g,row=T,labels=NA, fname='nodes'){
    # g: output object from pheatmap function
    # row: whether to get json data of the row dendrogram or the column dendrogram
    # labels: text labels in the order as in the input data to pheatmap. If left 
    #         NA, it will extract labels from the input g object.
    # fname: the file name of the output json file
    ...
}

About

Utility functions to create JSON input for the online DendroX app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published