run multiple mcaw analyses

Based on the useful notebook runner tool by https://github.com/tritemio/nbrun (requires nbrun.py)


In [ ]:
%reset -f

In [ ]:
## import all required dependencies
from nbrun import run_notebook

In [ ]:
## hardcoded results from http://localhost:8889/notebooks/notebooks/zscore_highbinders_for_galectin.ipynb#
# filtered by p-value then rank
results = {'average': {547,
  549,
  550,
  551,
  565,
  566,
  569,
  577,
  578,
  579,
  580,
  581,
  582,
  587,
  588,
  589},
 'fivemg_filter50': {543,
  547,
  549,
  550,
  551,
  565,
  566,
  569,
  577,
  578,
  579,
  580,
  581,
  582,
  585,
  586,
  587,
  588,
  589},
 'fivemg_filter75': {543,
  547,
  549,
  550,
  551,
  565,
  566,
  569,
  577,
  578,
  579,
  580,
  581,
  582,
  585,
  586,
  587,
  588,
  589},
 'fivemg_topten_nofilter': {550, 551, 565, 566, 577, 579, 582, 585, 588, 589},
 'tenmg_filter50': {75,
  372,
  543,
  545,
  547,
  549,
  550,
  551,
  552,
  565,
  566,
  569,
  572,
  576,
  577,
  578,
  579,
  580,
  581,
  582,
  583,
  585,
  586,
  587,
  588,
  589},
 'tenmg_filter75': {545,
  549,
  550,
  551,
  565,
  566,
  578,
  579,
  580,
  581,
  582,
  586,
  587,
  588,
  589},
 'tenmg_topten_nofilter': {545, 550, 551, 565, 566, 578, 580, 581, 582, 589},
 'twomg_filter50': {547,
  549,
  551,
  565,
  566,
  569,
  577,
  578,
  579,
  580,
  581,
  582,
  588,
  589},
 'twomg_filter75': {547,
  549,
  551,
  565,
  566,
  569,
  578,
  579,
  581,
  582,
  588,
  589},
 'twomg_topten_nofilter': {547, 549, 551, 565, 566, 569, 578, 581, 582, 589}}

In [ ]:
# loop over highbinders and run MCAW analysis 

dataframefile = "../results/galectin-3/dataframes_galectin.pkl"
nb_name = 'run_mcaw_analysis'
for samplename in results:
    nb_kwargs = {'samplename': samplename, 'highbinding_glycans':results[samplename],'dataframefile':dataframefile}
    run_notebook(nb_name, nb_suffix='-out_%s' % (samplename), nb_kwargs=nb_kwargs)

In [ ]:


In [ ]: