SCZ - ceRNA expression visualization for a cohort
ceRNA expression visualization for a cohort
%load_ext autoreload
# Just download the github, and load the cernaxis into python path
# do
import sys
sys.path.append('../../')
# or install cernaxis by pip
#!pip install git+https://github.com/compbioclub/cernaxis.git@v1_as
from cernaxis.cernaxis import ceRNAxis
# initialize cernaxis object
cernaxis = ceRNAxis()
%load_ext autoreload
'''
Given the mRNA expression profiles for a cohort, plot the disease and control expression
for the ceRNA axis
'''
import scanpy as sc
# Read one mRNA expression profiles from a SCZ cohort;
# this could be self-sequenced, or downloaded from the public GEO resources;
# the expression and phenotype information should be curated.
mRNA_adata = sc.read_h5ad('../../demo/SCZ_mRNA.h5ad')
mRNA_adata.var_names_make_unique()
# show the expression profile
print('expression\n', mRNA_adata.X)
# show the phenotype information
print('meta info\n', mRNA_adata.obs)
# set the groupby as the cohort sample type
groupby = 'type'
# set the ceRNAs to be plotted
ceRNA_list = ['ARHGAP8']
# plot the expression of ceRNA_list
cernaxis.plot_cohort_ceRNA_exp(mRNA_adata, groupby, ceRNA_list)
%autoreload
'''
Given the miRNA expression profiles for a cohort, plot the disease and control expression
for the ceRNA axis
'''
import scanpy as sc
# Read one miRNA expression profiles from a SCZ cohort;
# this could be self-sequenced, or downloaded from the public GEO resources;
# the expression and phenotype information should be curated.
miRNA_adata = sc.read_h5ad('../../demo/SCZ_miRNA.h5ad')
miRNA_adata.var_names_make_unique()
# show the expression profile
print('expression\n', miRNA_adata.X)
# show the phenotype information
print('meta info\n', miRNA_adata.obs)
# set the groupby as the cohort sample type
groupby = 'type'
# set the ceRNAs to be plotted
ceRNA_list = ['hsa-miR-485-5p']
# plot the expression of ceRNA_list
cernaxis.plot_cohort_ceRNA_exp(miRNA_adata, groupby, ceRNA_list)
%autoreload
'''
Given the lncRNA expression profiles for a cohort, plot the disease and control expression
for the ceRNA axis
'''
import scanpy as sc
# Read one lncRNA expression profiles from a SCZ cohort;
# this could be self-sequenced, or downloaded from the public GEO resources;
# the expression and phenotype information should be curated.
lncRNA_adata = sc.read_h5ad('../../demo/SCZ_lncRNA.h5ad')
lncRNA_adata.var_names_make_unique()
# show the expression profile
print('expression\n', lncRNA_adata.X)
# show the phenotype information
print('meta info\n', lncRNA_adata.obs)
# set the groupby as the cohort sample type
groupby = 'type'
# set the ceRNAs to be plotted
ceRNA_list = ['ENST00000522525'] # the ens id of 'THUMPD3-AS1'
# plot the expression of ceRNA_list
cernaxis.plot_cohort_ceRNA_exp(lncRNA_adata, groupby, ceRNA_list)