Git Product home page Git Product logo

chrom_functional_clusters's Introduction

Chrom_Functional_Clusters

A little script to find enriched functions (pfam/ipr/gene family etc) on chromosomes, eg. fist to make 50-gene windows, and test in each window functional enrichment compared to all genes.

NOTE: the funcitonal genes are not necessarily adjacent for their gene orders.

Input files

1. gene-chr-start.txt (gene chromosome start_coord (only for chromosomes))

!!!sorted by chr and coord

Smp_329140 SM_V7_1 88327
Smp_315690 SM_V7_1 103403
Smp_317470 SM_V7_1 256087

2. gene-func.txt (gene and domain ids separated by ,)

Smp_000020	PF07555
Smp_000040	PF13374,PF13424
Smp_000050	PF00520

3. func-names.txt (domain id and name)

PF00001	7tm_1
PF00002	7tm_2

4. chr-length.txt (chromosome lengths for plotting, seprated by " ")

SM_V7_1 88881357
SM_V7_2 48130368
...

1. Enrichment without sliding windows

To get significantly enriched clusters for each block, run

./getClusters_nonSliding.sh [WINDOWSIZE]

Output files:

  • fisher_enriched_nonsliding.txt (significant clusters on each chromosome)
  • plot_func-clusters_nonsliding.txt (Significantly enriched functions: FDR<0.05, at least 3 genes)
  • plot_func-clusters_nonsliding.txt.pdf (chromosome plots with significant clusters)

2. Enrichment with sliding windows

Using 50-gene window with stepping 5-genes. Run

./getClusters_Sliding.sh [WINDOWSIZE] [STEPSIZE]

Output files:

  • fisher_enriched_raw.txt (raw test results for all functions and all blocks: overlapping exists)
  • fisher_enriched_sliding.txt (significant clusters on each chromosome)
  • plot_func-clusters_sliding.txt (Significantly enriched functions: FDR<0.05, at least 3 genes)
  • plot_func-clusters_sliding.txt.pdf (chromosome plots with significant clusters)

Note that the current script is not perfect to choose the cluster with most genes. Duplicate clusters may exist and several clusters of the same function may exist but not picked. Suggest to run the non-sliding approach for a reference.

Output plots

  • 3-cluster_geneCounts.R: plot the gene counts in each cluster as a bar

geneCounts

  • 4-cluster_geneCoord.R: plot clusters with start coordinates of the first and last genes. Shown as coloured blocks.

geneCoord

chrom_functional_clusters's People

Contributors

zglu avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

wangpanqiao

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.