Coder Social home page Coder Social logo

gene_coexpression_mr's Introduction

mr2mods: Mutual Ranks to Modules workflow

2019-09-25

Set of scripts to identify co-expressed gene sets (i.e., modules) in gene co-expression networks.

Transforming Pearson’s or Spearman's correlation coefficents (PCCs/SCCs) into Mutual Ranks (MRs) — first described by Obayashi & Kinoshita — is a good idea if you want to compare between different datasets and/or functional categories (Obayashi et al, 2018; Liesecke et al, 2018). However, the transformation requires significant memory and disk space to compute. Moreover, MRs range from 1 to n-1 (where n is the number of genes in the genome), which does not translate well to network edge weights. We’ve implemented a series of R and Python scripts for creating MRs and gene modules directly from a directory of Kallisto gene abundance estimates. The code as been developed to run on multiple threads when possible, which significantly decreasing the total runtime. Finally, the pipeline applies exponential decay functions to transform MRs into edge weights and call co-expressed gene sets (i.e. modules) using the program ClusterONE.

See Wisecaver et al. 2017 Plant Cell | PDF

Steps

An in depth tutorial is provided and includes information on files types, run time, memory requirements, etc. The TL:DR steps are provided below.

  1. Create a gene expression matrix
Rscript ../scripts/transform_counts.r -a example/abundance_files.txt -l example/transcripts2genes.txt -s example/sample_conditions.txt -t tag -o example/gene_counts 
  1. Calculate PCC/SCC and MR for all gene pairs
# for Pearson's
python ../scripts/calc_mr_pcc.py -i example/gene_counts_normalized.matrix -o example/gene_counts_normalized_mr -t 20

# for Spearman's
python ../scripts/calc_mr_scc.py -i example/gene_counts_normalized.matrix -o example/gene_counts_normalized_mr -t 20

  1. Run clusterONE and call co-expressed gene modules
python ../scripts/create_network_and_modules.py -i example/gene_counts_normalized_mr -c ../scripts/cluster_one-1.0.jar -d 5

gene_coexpression_mr's People

Contributors

wisecaverlab 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.