Skip to content

Basic operations and stats for the reference ceRNA network

Basic operations and stats for the reference ceRNA network

%load_ext autoreload
import sys
sys.path.append('../../')

from cernatax.cernatax import CERNATAX

# initialize CERNATAX object
cernatax = CERNATAX()

# show CERNATAX reference ceRNA network
print(cernatax.summarize_ref_db())
The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload
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_db = cernatax.ref_db

# there are some operations to filter the ceRNA interactions from the ref_db
# show reference interaction source
print(ref_db.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
cernatax.ref_db[cernatax.ref_db.type == 'miRNA-mRNA;miRNA-lncRNA'].to_csv('../../demo_out/ceRNA_db_mix.csv')

print('The number of unique ceRNA interactions: ', len(ref_db.ceRNA.unique()))
print('The number of unique miRNA-mRNA interactions: ', len(ref_db[ref_db.type == 'miRNA-mRNA'].ceRNA.unique()))
print('The number of unique miRNA-lncRNA interactions: ', len(ref_db[ref_db.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