Integrated Diffferential Expression and Annotation
Project description
IDEA
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:
- Performing the gene set enrichment analysis
- Constructing the network
- 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:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.