Skip to content

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())
A total of 7820904 miRNA-mRNA interaction and 176510 miRNA-lncRNA interaction
type
miRNA-mRNA                 7820904
miRNA-lncRNA                176510
miRNA-mRNA;miRNA-lncRNA      10915
Name: count, dtype: int64
None

# 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())
database
miRWalk                                                                 6494557
RNAInter                                                                 425707
miRDB_6.0                                                                297889
RNAInter;miRTarBase_9.0                                                  252458
NPInter_4.0                                                              109142
                                                                         ...   
miRDB_6.0;RNAInter;ENCORI                                                     2
miRDB_6.0;ENCORI                                                              2
RNAInter;miRWalk;ENCORI                                                       2
miRDB_6.0;NPInter_4.0;miRTarBase_9.0                                          1
TargetSCAN_8.0;NPInter_4.0;miRTarBase_9.0;RNAInter;miRDB_6.0;miRWalk          1
Name: count, Length: 69, dtype: int64

# 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()))
The number of unique ceRNA interactions:  30177
The number of unique miRNA-mRNA interactions:  21354
The number of unique miRNA-lncRNA interactions:  12849