GithubHelp home page GithubHelp logo

hanjunlee21 / bedgraph2cluster Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 3.16 MB

MATLAB Function for the k-Means Clustering of ChIP-seq bedGraph Data

License: MIT License

Shell 1.54% MATLAB 98.46%

bedgraph2cluster's Introduction

bedGraph2Cluster

MATLAB Function for the k-Means Clustering of ChIP-seq bedGraph Data

DOI


MATLAB_VERSION RUNTIME_VERSION
R2018b 9.5
bedGraph2Cluster(bedGraphs_Signal, bedGraphs_Control, bedGraphs_Cluster, bedGraphs_Heatmap, outdir, bed_bin, fold_change, normalization_method, k, distance_method, clustering_method, workingdir)

Required arguments

bedGraphs_Signal (string): comma-delimited list of bedGraph files to be included during peak calling

bedGraphs_Control (string): comma-delimited list of bedGraph files to be used as controls for peak calling

bedGraphs_Cluster (string): comma-delimited list of bedGraph files to be included during k-means clustering

bedGraphs_Heatmap (string): comma-delimited list of bedGraph files to be included in heatmap

outdir (string): path to the output directory

bed_bin (string): path to the BED file used for binned bedGraph generation

fold_change (string): threshold for the fold change over the control during peak calling

normalization_method (string): normalization method to utilize ("QNorm": QNorm, "CPM": CPM)

k (string): number of clusters during k-means clustering

distance_method (string): distance metric for k-means clustering ("sqeuclidean", "cityblock", "cosine", "correlation")

clustering_method (string): clustering method to utilize ("1": profile, "2": profile+scalar, "3": symmetry_collapsed_profile+scalar)

Optional arguments

workingdir (string): path to the output directory

Output files

tiles_200_data.mat: MATLAB variable for the entire dataset

tiles_200_data_peak.mat: MATLAB variable for only the peakset

peaks.bed: BED file of the peakset

peaks.clust${k}.${clusterID}.bed: BED file of the peakset for each cluster

clustering_heatmap.pdf: heatmap for the k-means clustering


Examplary usage

with license for MATLAB

bedGraph2Cluster("bedgraph/RB.WT.bedgraph,bedgraph/RB.dCDK.bedgraph", "bedgraph/INPUT.WT.bedgraph,bedgraph/INPUT.dCDK.bedgraph", "bedgraph/RB.WT.bedgraph,bedgraph/RB.dCDK.bedgraph,bedgraph/H3K4me3.WT.bedgraph,bedgraph/H3K4me3.dCDK.bedgraph,bedgraph/H3K4me.WT.bedgraph,bedgraph/H3K4me.dCDK.bedgraph,bedgraph/H3K27ac.WT.bedgraph,bedgraph/H3K27ac.dCDK.bedgraph", "bedgraph/RB.WT.bedgraph,bedgraph/RB.dCDK.bedgraph,bedgraph/H3K4me3.WT.bedgraph,bedgraph/H3K4me3.dCDK.bedgraph,bedgraph/H3K4me.WT.bedgraph,bedgraph/H3K4me.dCDK.bedgraph,bedgraph/H3K27ac.WT.bedgraph,bedgraph/H3K27ac.dCDK.bedgraph,bedgraph/E2F1.bedgraph,bedgraph/CTCF.shSCR.bedgraph,bedgraph/c-Jun.shSCR.bedgraph", "output", "bed/hg19.200bp.bed", "2", "true", "8", "cosine", "1", "../")

without license for MATLAB

PyPI version

pip3 install run_matlab
run_matlab install -v R2018b -r 9.5
git clone https://github.com/hanjunlee21/bedGraph2Cluster
run_matlab run -v R2018b -r 9.5 bedGraph2Cluster bedGraph2Cluster bedgraph/RB.WT.bedgraph,bedgraph/RB.dCDK.bedgraph bedgraph/INPUT.WT.bedgraph,bedgraph/INPUT.dCDK.bedgraph bedgraph/RB.WT.bedgraph,bedgraph/RB.dCDK.bedgraph,bedgraph/H3K4me3.WT.bedgraph,bedgraph/H3K4me3.dCDK.bedgraph,bedgraph/H3K4me.WT.bedgraph,bedgraph/H3K4me.dCDK.bedgraph,bedgraph/H3K27ac.WT.bedgraph,bedgraph/H3K27ac.dCDK.bedgraph bedgraph/RB.WT.bedgraph,bedgraph/RB.dCDK.bedgraph,bedgraph/H3K4me3.WT.bedgraph,bedgraph/H3K4me3.dCDK.bedgraph,bedgraph/H3K4me.WT.bedgraph,bedgraph/H3K4me.dCDK.bedgraph,bedgraph/H3K27ac.WT.bedgraph,bedgraph/H3K27ac.dCDK.bedgraph,bedgraph/E2F1.bedgraph,bedgraph/CTCF.shSCR.bedgraph,bedgraph/c-Jun.shSCR.bedgraph output bed/hg19.200bp.bed 2 true 8 cosine 1 $PWD

BED_Bin

hg19: https://drive.google.com/uc?id=1chMyuUAK3rycgAbj1P-FnWhJkW7K0q0H&export=download&confirm=t

hg38: https://drive.google.com/uc?id=1kfVOx78xTBoJHC7EL_HnkCFiWxdrNDal&export=download&confirm=t


Examplary output

All output files

outputs

Clustering heatmap

k=3 k=8
fig1 fig2

bedgraph2cluster's People

Contributors

hanjunlee21 avatar

Stargazers

Weijie Guo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.