Skip to main content

Integrated Diffferential Expression and Annotation

Project description

IDEA

logo

Integrated Differential Expression and Annotation

Introduction

This is a python module to perform GO analysis using Enrichr and visualize the bipartite graph of terms and genes as an interactive force-directed graph.

This uses pyvis as the force-directed graph backend and ggetrs to perform the gene set enrichment using Enrichr's API.

Installation

You can install this like other python packages using pip:

pip install idea-bio

Usage

The basic workflow for this tool is made up of 3 steps:

  1. Performing the gene set enrichment analysis
  2. Constructing the network
  3. Visualizing the network
import idea
import pandas as pd

#################
# Preprocessing #
#################

# Load in our example dataframe
url = "https://github.com/noamteyssier/idea/raw/main/example_data/AP2S1.tab.gz"
deg_frame = pd.read_csv(url, sep="\t")

# Filter to significant enrichments
sig_degs = deg_frame[
    (deg_frame.log2FoldChange > 0) &
    (deg_frame.padj < 0.05)
]

# Select the gene names
geneset = sig_degs.gene.values

########################################
# Perform Gene Set Enrichment Analysis #
########################################

gsea = idea.run_go(
    geneset,
    threshold=0.05,
    library="BP",
)

###############################
# Build and Visualize Network #
###############################

# Build Network
id = idea.IDEA(
    sig_degs,
    gsea.head(30),
)

# Write HTML of network to `network.html`
id.visualize("network.html")

Visualization

We can then visualize and interact with our network by opening the created *.html in our favorite browser.

Here is a static image of an example network:

network.png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

idea_bio-0.1.1.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

idea_bio-0.1.1-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page