Basic operations and stats for the reference ceRNA network
Basic operations and stats for the reference ceRNA network
%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()
%autoreload
# show CERNATAX reference ceRNA network
print(cernaxis.summarize_ref_net())
# extract the CERNATAX reference ceRNA network
ref_net = cernaxis.ref_net
# there are some operations to filter the ceRNA interactions from the ref_net
# show reference interaction source
print(ref_net.database.value_counts())
# store the miRNA-mRNA;miRNA-lncRNA interactions
cernaxis.ref_net[cernaxis.ref_net.type == 'miRNA-mRNA;miRNA-lncRNA'].to_csv('../../demo_out/ceRNA_db_mix.csv')
print('The number of unique ceRNA interactions: ', len(ref_net.ceRNA.unique()))
print('The number of unique miRNA-mRNA interactions: ', len(ref_net[ref_net.type == 'miRNA-mRNA'].ceRNA.unique()))
print('The number of unique miRNA-lncRNA interactions: ', len(ref_net[ref_net.type == 'miRNA-lncRNA'].ceRNA.unique()))