plot function

The plot function allows to visualize the results obtained with the supertest function and allows the same visualizations as the R package SuperExtractTest (https://github.com/mw201608/SuperExactTest)

[24]:
%load_ext autoreload
%autoreload 2
The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload
[25]:
import superexacttestpy as stest

Import data

[26]:
CB = ['KCTD10', 'CHURC1', 'C10orf85', 'AMFR', 'INPP5E', 'RAB3IP', 'PPAPDC1A', 'HMBOX1', 'PEX6', 'WDR41', 'RPS23', 'SCG3', 'GOLGB1', 'ABHD12', 'BRWD1', 'TIMM10', 'SEZ6L2', 'GSTM3', 'DSCC1', 'C17orf97', 'CBS', 'MYOM2', 'PPARG', 'NAPRT1', 'FAM149A', 'C17orf75', 'EIF5A', 'NCAPD2', 'SURF6', 'CADM1', 'WDR48', 'CECR1', 'TPM2', 'CDK5RAP2', 'C9orf156', 'WDR55', 'SLC44A3', 'PPIL3', 'NPM1', 'MAP3K2', 'ZNF589', 'KCNK1', 'C19orf30', 'MTRR', 'TOR1B', 'MRPL43', 'TSPAN15', 'NSUN2', 'C19orf12', 'PHACTR4', 'N4BP2L2', 'CCDC23', 'ATPIF1', 'SLC2A8', 'EPHX2', 'POLE', 'TMEM80', 'C15orf57', 'CHST7', 'ZNF266', 'CPEB4', 'SQSTM1', 'GSTM1', 'RNF167', 'FAM119B', 'CDS2', 'TAP2', 'NSFL1C', 'LRWD1', 'NR1D2', 'LY6G5C', 'DNAJC15', 'ZNF323', 'VRK3', 'CCDC88B', 'CARD8', 'MAPT', 'BDKRB2', 'RAB24', 'LIG3', 'IL17RB', 'B3GALT4', 'CCBL2', 'ZNF418', 'ABHD10', 'SURF1', 'NMRAL1', 'CMTM7', 'ADAL', 'EBPL', 'BMP4', 'SLC46A2', 'SLC25A34', 'PDCD2', 'DCAF4', 'TBC1D2', 'C21orf57', 'PLXDC1', 'TPCN2', 'NUDT2', 'TCFL5', 'MCTP1', 'CYP4V2', 'FECH', 'FTSJ3', 'STEAP2', 'ZNF84', 'FEZ2', 'COLEC11', 'CD151', 'PFAS', 'COX4NB', 'STAG3L2', 'VAMP1', 'DECR2', 'ATRIP', 'MTHFR', 'RCCD1', 'ZNF593', 'ALOX5', 'FN3KRP', 'SPAG16', 'CNTNAP4', 'DAAM1', 'GAS8', 'ACO1', 'DGCR8', 'SALL2', 'CA9', 'BPHL', 'KCTD21', 'SLC16A9', 'FAM46A', 'MAPK1IP1L', 'C9orf95', 'RPUSD4', 'ZFYVE19', 'DPYSL4', 'EXOC3', 'HSD17B12', 'ALDH16A1', 'VAMP4', 'DHX36', 'SMG7', 'TBC1D7', 'CDRT4', 'CENPJ']
FC = ['CHURC1', 'KCTD10', 'AMFR', 'SCG3', 'INPP5E', 'RPS23', 'NAPRT1', 'PEX6', 'C9orf156', 'TIMM10', 'WDR41', 'CPEB4', 'ABHD12', 'RAB3IP', 'BRWD1', 'N4BP2L2', 'SMG7', 'SEZ6L2', 'CADM1', 'C17orf75', 'NSFL1C', 'GOLGB1', 'TRIM69', 'HMBOX1', 'TCFL5', 'THNSL2', 'EIF5A', 'GPNMB', 'SURF6', 'MRPL43', 'LRRC37A', 'PPIL3', 'CAMKK2', 'TRPV2', 'ATPIF1', 'LCN15', 'SURF1', 'WDR48', 'C9orf95', 'NSUN2', 'VRK3', 'C19orf30', 'KCNK1', 'FECH', 'POLE', 'B3GALTL', 'STAT6', 'C19orf12', 'DNAJC15', 'NR1D2', 'TIPRL', 'MRI1', 'RNF167', 'GSTM1', 'CCDC23', 'MTRR', 'CRIPT', 'HYAL3', 'GSTM3', 'GSTM5', 'NPM1', 'BCR', 'GNB1L', 'SLC2A8', 'TMEM8A', 'FAM119B', 'TRPC4AP', 'MINK1', 'FN3KRP', 'CBS', 'CCBL2', 'ZNF589', 'C2orf43', 'ZNF323', 'FRMD3', 'MAP3K2', 'SRR', 'CLUAP1', 'AKAP8', 'NUDT14', 'DHRS11', 'ATP5G1', 'LMF1', 'ADAL', 'NDUFB1', 'LIG3', 'DAAM1', 'FAM149A', 'PDCD2', 'WDR55', 'UROS', 'GNA15', 'C2orf82', 'ZNF419', 'C17orf97', 'RABEP1', 'ENTPD4', 'BPHL', 'SFTPD', 'SQSTM1', 'MYOM2', 'HSD17B12', 'UNQ1887', 'CENPV', 'BXDC1', 'COQ5', 'VAMP4', 'EPHA3', 'CNTNAP4', 'C16orf88', 'EIF2A', 'DGCR8', 'GSTO2', 'PLXDC1', 'TAP2', 'TMEM80', 'ZNF593', 'MGMT', 'C11orf46', 'DHRS1', 'CCNO', 'RRP7A', 'SUPT3H', 'MAPT', 'ALKBH3', 'C6orf162', 'LIAS', 'PSMD3', 'TOR1B', 'RNASEL', 'LRRC2', 'CD59', 'SPATA5L1', 'WDR73', 'IMPAD1', 'TBCD', 'DTNA', 'PISD', 'RWDD2B', 'C8orf40', 'SCARA3', 'NIT2', 'APOD', 'SLC25A26', 'SFXN4', 'PCM1', 'MTAP', 'ADAD2', 'CEP192', 'C17orf48', 'ASPDH', 'DDX55', 'FKBP11', 'TESC', 'ARHGAP25', 'SIVA1', 'GUF1', 'SHMT1', 'TPCN2', 'AKAP10', 'PITRM1', 'SCCPDH', 'CPLX2', 'ZNF721']
TC = ['CHURC1', 'SCG3', 'AMFR', 'KCTD10', 'INPP5E', 'PIGP', 'RPS23', 'PEX6', 'TIMM10', 'NSFL1C', 'C9orf156', 'NAPRT1', 'WDR41', 'ABHD12', 'RAB3IP', 'BRWD1', 'GOLGB1', 'ATPIF1', 'C17orf75', 'CPEB4', 'N4BP2L2', 'MTRR', 'SEZ6L2', 'HMBOX1', 'THNSL2', 'SMG7', 'C9orf95', 'WDR48', 'PPIL3', 'RNF167', 'CCBL2', 'EIF5A', 'CAMKK2', 'VRK3', 'LCN15', 'FN3KRP', 'TRPV2', 'NR1D2', 'NSUN2', 'ZNF589', 'MRPL43', 'CCDC23', 'TCFL5', 'CADM1', 'C17orf97', 'SURF1', 'SLC2A8', 'B3GALTL', 'EPHA3', 'POLE', 'MAP3K2', 'KCNK1', 'TIPRL', 'GSTM5', 'TAP2', 'GNB1L', 'ZNF419', 'CNTNAP4', 'ADAL', 'CENPV', 'NPM1', 'CLUAP1', 'ACP6', 'UNQ1887', 'PDCD2', 'MCTP1', 'LIAS', 'VAMP4', 'STAG3L2', 'WDR55', 'ZNF323', 'DNAJC15', 'TMEM80', 'CRIPT', 'TM7SF3', 'GSTM3', 'CBS', 'FECH', 'C8orf40', 'FAM119B', 'RCCD1', 'FRMD3', 'MRI1', 'C2orf43', 'ENTPD4', 'SRR', 'SQSTM1', 'TRPC4AP', 'BPHL', 'HPR', 'RNASEL', 'C19orf12', 'BCR', 'CDK5RAP2', 'EID1', 'CEP192', 'MYOM2', 'EIF2A', 'PITRM1', 'NUDT14', 'DFFB', 'EFHC1', 'STAT6', 'AKAP8', 'RRP7A', 'C6orf64', 'DTNA', 'DGCR8', 'NUP50', 'TMEM8A', 'WDYHV1', 'PIGN', 'HYAL3', 'ACCS', 'TRAPPC2L', 'CLEC11A', 'CCDC84', 'DHRS11', 'SPATA5L1', 'FAM149A', 'LIG3', 'NCAPD2', 'AQP11', 'ZNF514', 'ZNF721', 'COQ5', 'CPLX2', 'C2orf82', 'AGA', 'TPCN2', 'CISD2', 'MCCC1', 'RYBP', 'RRAGD', 'ALG8', 'C6orf162', 'EIF2B2']
PONS = ['CHURC1', 'KCTD10', 'PEX6', 'HMBOX1', 'TIMM10', 'GOLGB1', 'MYOM2', 'THNSL2', 'PIGP', 'C17orf75', 'INPP5E', 'NAPRT1', 'AMFR', 'ABHD12', 'ATPIF1', 'NSUN2', 'WDR41', 'ACP6', 'BRWD1', 'WDR48', 'RAB3IP', 'CPEB4', 'RPS23', 'SPATA20', 'SCG3', 'SURF1', 'NSFL1C', 'TRPC4AP', 'CBS', 'NR1D2', 'CCDC23', 'PPIL3', 'PDE1A', 'ZNF589', 'TCFL5', 'VAMP4', 'SMG7', 'STMN4', 'TMEM149', 'EIF5A', 'C16orf88', 'SEZ6L2', 'B3GALTL', 'WDR55', 'CADM1', 'CENPV', 'C5orf35', 'MTRR', 'C2orf43', 'KCNK1', 'SLC2A8', 'LIAS', 'C9orf156', 'GSTM3', 'POLR2L', 'DDX55', 'ZNF323', 'CEP192', 'N4BP2L2', 'PI16', 'RNF167', 'FAM82B', 'CCBL2', 'FECH', 'CLUAP1', 'SURF6', 'TTC23', 'DAAM1', 'ATP1B1', 'SQSTM1', 'DDX51', 'TYW1', 'CHST7', 'VRK3', 'DGCR8', 'C9orf95', 'MUL1', 'TPCN2', 'MAP3K2', 'PPIE', 'FN3KRP', 'TOR1B', 'FAM119B', 'CNTNAP4', 'KLHDC4', 'OXTR', 'TMEM80', 'ZNF593', 'SPTBN1', 'NPM1', 'ACCS', 'DTNA', 'ZNF721', 'RRP7A', 'SLC24A2', 'AATF', 'CD151', 'UBR7', 'SORCS2', 'C6orf64', 'C2orf82']
data = [CB,FC,TC,PONS]
data_name = ["CB","FC","TC","PONS"]
total = 18196

Functions

color_map_color

[27]:
stest.pl.color_map_color(10,cmap_name='YlOrRd',vmin=0,vmax=100)
[27]:
'#fff1a9'

Plotting function

Default parameters

[34]:
stest.pl.plot(data,total,data_name,size=(10,6))
No artists with labels found to put in legend.  Note that artists whose label start with an underscore are ignored when legend() is called with no argument.
../_images/notebooks_06_plot_11_1.png
[34]:
intersection degree observed_overlap expected_overlap fold_enrichment p_value elements
0001 PONS 1 101 NaN NaN NaN AATF, ABHD12, ACCS, ACP6, AMFR, ATP1B1, ATPIF1...
0010 TC 1 137 NaN NaN NaN ABHD12, ACCS, ACP6, ADAL, AGA, AKAP8, ALG8, AM...
0011 TC & PONS 2 72 0.760442 9.468180e+01 2.099334e-138 ABHD12, ACCS, ACP6, AMFR, ATPIF1, B3GALTL, BRW...
0100 FC 1 164 NaN NaN NaN ABHD12, ADAD2, ADAL, AKAP10, AKAP8, ALKBH3, AM...
0101 FC & PONS 2 74 0.910310 8.129099e+01 3.393103e-136 ABHD12, AMFR, ATPIF1, B3GALTL, BRWD1, C16orf88...
0110 FC & TC 2 108 1.234777 8.746519e+01 2.080207e-212 ABHD12, ADAL, AKAP8, AMFR, ATPIF1, B3GALTL, BC...
0111 FC & TC & PONS 3 68 0.006854 9.921446e+03 0.000000e+00 ABHD12, AMFR, ATPIF1, B3GALTL, BRWD1, C17orf75...
1000 CB 1 147 NaN NaN NaN ABHD10, ABHD12, ACO1, ADAL, ALDH16A1, ALOX5, A...
1001 CB & PONS 2 62 0.815949 7.598518e+01 6.330091e-109 ABHD12, AMFR, ATPIF1, BRWD1, C17orf75, C9orf15...
1010 CB & TC 2 72 1.106782 6.505348e+01 1.161600e-120 ABHD12, ADAL, AMFR, ATPIF1, BPHL, BRWD1, C17or...
1011 CB & TC & PONS 3 56 0.006143 9.115502e+03 0.000000e+00 ABHD12, AMFR, ATPIF1, BRWD1, C17orf75, C9orf15...
1100 CB & FC 2 76 1.324907 5.736254e+01 2.756327e-122 ABHD12, ADAL, AMFR, ATPIF1, BPHL, BRWD1, C17or...
1101 CB & FC & PONS 3 60 0.007354 8.158692e+03 0.000000e+00 ABHD12, AMFR, ATPIF1, BRWD1, C17orf75, C9orf15...
1110 CB & FC & TC 3 67 0.009975 6.716529e+03 0.000000e+00 ABHD12, ADAL, AMFR, ATPIF1, BPHL, BRWD1, C17or...
1111 CB & FC & TC & PONS 4 56 0.000055 1.011376e+06 0.000000e+00 ABHD12, AMFR, ATPIF1, BRWD1, C17orf75, C9orf15...

You can get the plot and the df of results

Custom parameters

Degree

e.g with degree = 2, we choose only the intersection between 2 sets

[29]:
tmp = stest.pl.plot(data,total,data_name,degree=2,size=(10,6))
No artists with labels found to put in legend.  Note that artists whose label start with an underscore are ignored when legend() is called with no argument.
../_images/notebooks_06_plot_16_1.png
Sort_by
[30]:
tmp = stest.pl.plot(data,total,data_name,sort_by="cardinality",size=(10,6))
No artists with labels found to put in legend.  Note that artists whose label start with an underscore are ignored when legend() is called with no argument.
../_images/notebooks_06_plot_18_1.png
Show count
[31]:
tmp = stest.pl.plot(data,total,data_name,show_count=False,size=(10,6))
No artists with labels found to put in legend.  Note that artists whose label start with an underscore are ignored when legend() is called with no argument.
../_images/notebooks_06_plot_20_1.png
Orientation
[32]:
tmp = stest.pl.plot(data,total,data_name,orientation="vertical",size=(10,6))
No artists with labels found to put in legend.  Note that artists whose label start with an underscore are ignored when legend() is called with no argument.
../_images/notebooks_06_plot_22_1.png

Background color

[33]:
tmp = stest.pl.plot(data,total,data_name,degree=-1,background_color="dark_background",size=(10,6))
No artists with labels found to put in legend.  Note that artists whose label start with an underscore are ignored when legend() is called with no argument.
../_images/notebooks_06_plot_24_1.png