Parameter Extraction for EGL-36 Ion Channel


In [1]:
"""
Example of using cwFitter to generate a HH model for EGL-36 ion channel
Based on experimental data from doi:10.1016/S0896-6273(00)80355-4
"""

import os.path
import sys
import time
import numpy as np
import matplotlib.pyplot as plt

sys.path.append('..')
sys.path.append('../..')
sys.path.append('../../..')
from channelworm.fitter import *

In [2]:
cwd=os.getcwd()
path = cwd+'/egl-36-data/boltzmannFit/'
if not os.path.exists(path):
  os.makedirs(path)

pov_id = 11
vc_id = 12

args = {'weight':{'start':1,'peak':1,'tail':1,'end':1}}
sampleData = {}
myInitiator = initiators.Initiator()
print 'Sample Data:'
sampleData['POV'] = myInitiator.get_graphdata_from_db(pov_id,plot=False)
print 'POV'
sampleData['VClamp'] = myInitiator.get_graphdata_from_db(vc_id, plot=False)
print 'VClamp'


Sample Data:
POV
VClamp

In [3]:
scale = False
bio_params = myInitiator.get_bio_params()
sim_params = myInitiator.get_sim_params()
myEvaluator = evaluators.Evaluator(sampleData,sim_params,bio_params,scale=scale,args=args)

print 'Scale: %s'%scale
print 'args:'
print args


Scale: False
args:
{'weight': {'start': 1, 'tail': 1, 'end': 1, 'peak': 1}}

In [4]:
# bio parameters for EGL-36
bio_params['cell_type'] = 'Xenopus oocytes'
bio_params['channel_type'] = 'EGL-36'
bio_params['ion_type'] = 'K'
bio_params['val_cell_params'][0] = 200e-9 # C_mem DOI: 10.1074/jbc.M605814200
bio_params['val_cell_params'][1] = 20e-6 # area DOI: 10.1101/pdb.top066308
bio_params['gate_params'] = {'vda': {'power': 1},'cd': {'power': 1}}

print 'Gate_params:'
print bio_params['gate_params']


Gate_params:
{'vda': {'power': 1}, 'cd': {'power': 1}}

In [5]:
bio_params['channel_params'] = ['g_dens','e_rev']
bio_params['unit_chan_params'] = ['S/m2','V']
bio_params['min_val_channel'] = [1 , -150e-3]
bio_params['max_val_channel'] = [10, 150e-3]

bio_params['channel_params'].extend(['v_half_a','k_a','T_a'])
bio_params['unit_chan_params'].extend(['V','V','s'])
bio_params['min_val_channel'].extend([-0.15, 0.001, 0.001])
bio_params['max_val_channel'].extend([ 0.15,   0.1, 1])

# # #Parameters for Ca-dependent inactivation (Boyle & Cohen 2008)
bio_params['channel_params'].extend(['ca_half','alpha_ca','k_ca','T_ca'])
bio_params['unit_chan_params'].extend(['M','','M','s'])
bio_params['min_val_channel'].extend([1e-10,0.1, -1e-6, 1e-4])
bio_params['max_val_channel'].extend([1e-6 , 1 , -1e-9, 1])

# TODO: Separate simulator protocols from plot

# Simulation parameters for EGL-36 VClamp and POV
sim_params['v_hold'] = -90e-3
sim_params['I_init'] = 0
sim_params['pc_type'] = 'VClamp'
sim_params['deltat'] = 1e-4
sim_params['duration'] = 1.2
sim_params['start_time'] = 0.045
sim_params['end_time'] = 1.055
sim_params['protocol_start'] = -90e-3
sim_params['protocol_end'] = 90e-3
sim_params['protocol_steps'] = 10e-3
sim_params['ca_con'] = 1e-6

print 'Sim_params:'
print sim_params

# opt = '-pso'
# opt = '-ga'
# opt = 'leastsq'
# If no optimzation method is specified, the best candidate is hard coded.  See the next cell.  
opt = None
print 'Optimization method: ' + str(opt)


Sim_params:
{'I_init': 0, 'deltat': 0.0001, 'protocol_steps': 0.01, 'ion_type': 'Ca', 'start_time': 0.045, 'v_hold': -0.09, 'v_init': -0.075, 'ca_con': 1e-06, 'pc_type': 'VClamp', 'end_time': 1.055, 'duration': 1.2, 'protocol_end': 0.09, 'protocol_start': -0.09}
Optimization method: None

In [6]:
if len(sys.argv) == 2:
    opt = sys.argv[1]

start = time.time()

# Genetic Algorithm
if opt == '-ga':
    opt_args = myInitiator.get_opt_params()
    opt_args['max_evaluations'] = 300
    opt_args['population_size'] = 600
    # opt_args['verbose'] = False
    best_candidate, score = myEvaluator.ga_evaluate(min=bio_params['min_val_channel'],
                                                        max=bio_params['max_val_channel'],
                                                        args=opt_args)

# Particle Swarm Optimization    
elif opt == '-pso':
    opt_args = myInitiator.get_opt_params(type='PSO')
    opt_args['minstep'] = 1e-18
    opt_args['minfunc'] = 1e-18
    opt_args['swarmsize'] = 500
    opt_args['maxiter'] = 100
    opt_args['POV_dist'] = 4e-4
    best_candidate, score = myEvaluator.pso_evaluate(lb=bio_params['min_val_channel'],
                                                         ub=bio_params['max_val_channel'],
                                                         args=opt_args)

# Hard Coded Values from Past Simulation    
# GS 6/5/2018: Would be nice to know where these came from, i.e. was it simply this script with 
# one of the above algorithms, or something else
else:
    opt_args = {}
    # vda,cd *******
    best_candidate = [  3.00231776e+00,  -9.00073633e-02,   6.02673501e-02,   1.95933741e-02,
                            2.53990016e-02,   1.00000000e-9,   8.18616232e-01,  -3.29244576e-08,
                            2.42556384e-01] # 7.85842303587e-15

if opt_args:
    print 'Optimization parameters:'
    print opt_args

if opt == 'leastsq':

    # best_candidate = np.asarray(bio_params['min_val_channel']) + np.asarray(bio_params['max_val_channel']) / 2
    best_candidate_params = dict(zip(bio_params['channel_params'],best_candidate))
    cell_var = dict(zip(bio_params['cell_params'],bio_params['val_cell_params']))

    # sim_params['protocol_start'] = 10e-3
    # sim_params['protocol_end'] = 70e-3

    # vcSim = simulators.Simulator(sim_params,best_candidate_params,cell_var,bio_params['gate_params'],act_fit=True)
    vcSim = simulators.Simulator(sim_params,best_candidate_params,cell_var,bio_params['gate_params'])
    vcEval =  evaluators.Evaluator(sampleData,sim_params,bio_params,scale=scale)

    # args['weight'] = {'POV':10}
    args['weight'] = {}
    args['ftol'] = 1e-14
    # args['xtol'] = 1e-14
    # args['full_output'] = 1

    result = vcSim.vclamp_leastsq(params= bio_params['channel_params'],
                                           best_candidate= best_candidate,
                                           sampleData=sampleData,args=args)
    print 'Optimized using Scipy leastsq:'
    print result
    print 'Full output:'
    print result
    print 'leastsq Parameters:'
    print args
    best_candidate = result

    if 'POV' in sampleData:
        POV_fit_cost = vcEval.pov_cost(result)
        print 'POV cost:'
        print POV_fit_cost
    VClamp_fit_cost = vcEval.vclamp_cost(result)
    print 'VClamp cost:'
    print VClamp_fit_cost

if opt == None:
    print('No optimzation method was used.  Best candidate values hard coded.')
elif opt == 'ga':
    print('Optimzation performed with genetic algorithms')
elif opt == 'pso':
    print('Optimzation performed with particle swarm based techniques.')
elif opt == 'leastsq':
    print('Optimzation performed with least squares.')
    
secs = time.time()-start
print("----------------------------------------------------\n\n"
      +"Ran in %f seconds (%f mins)\n"%(secs, secs/60.0))


No optimzation method was used.  Best candidate values hard coded.
----------------------------------------------------

Ran in 0.000950 seconds (0.000016 mins)

Best candidate values used below are hard coded (see above)


In [7]:
best_candidate_params = dict(zip(bio_params['channel_params'],best_candidate))
cell_var = dict(zip(bio_params['cell_params'],bio_params['val_cell_params']))
print 'best candidate after optimization:'
print best_candidate_params


best candidate after optimization:
{'ca_half': 1e-09, 'T_a': 0.0253990016, 'k_ca': -3.29244576e-08, 'alpha_ca': 0.818616232, 'k_a': 0.0195933741, 'v_half_a': 0.0602673501, 'g_dens': 3.00231776, 'e_rev': -0.0900073633, 'T_ca': 0.242556384}

In [8]:
mySimulator = simulators.Simulator(sim_params,best_candidate_params,cell_var,bio_params['gate_params'],act_fit=True)
mySimulator = simulators.Simulator(sim_params,best_candidate_params,cell_var,bio_params['gate_params'])
bestSim = mySimulator.patch_clamp()

In [10]:
myModelator = modelators.Modelator(bio_params,sim_params)

In [16]:
myModelator.compare_plots(sampleData,bestSim,show=True, path=path)


Out[16]:
<module 'matplotlib.pyplot' from '/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/pyplot.pyc'>

In [12]:
myModelator.patch_clamp_plots(bestSim,show=True, path=path)


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-12-b4ef90ad9309> in <module>()
----> 1 myModelator.patch_clamp_plots(bestSim,show=True, path=path)

/Users/gopalsarma/git/openworm_base/ChannelWorm/channelworm/fitter/modelators.pyc in patch_clamp_plots(self, simData, show, path)
     38         plt.xlabel("Time (ms)")
     39         plt.ylabel("Current (pA)")
---> 40         plt.savefig(path+"current_time.png",bbox_inches='tight',format='png')
     41         pickle.dump(it, file(path+"current_time.pickle", 'w'))
     42         if show:

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/pyplot.pyc in savefig(*args, **kwargs)
    708 def savefig(*args, **kwargs):
    709     fig = gcf()
--> 710     res = fig.savefig(*args, **kwargs)
    711     fig.canvas.draw_idle()   # need this if 'transparent=True' to reset colors
    712     return res

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/figure.pyc in savefig(self, fname, **kwargs)
   2033             self.set_frameon(frameon)
   2034 
-> 2035         self.canvas.print_figure(fname, **kwargs)
   2036 
   2037         if frameon:

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/backend_bases.pyc in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs)
   2210                     orientation=orientation,
   2211                     dryrun=True,
-> 2212                     **kwargs)
   2213                 renderer = self.figure._cachedRenderer
   2214                 bbox_inches = self.figure.get_tightbbox(renderer)

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/backends/backend_agg.pyc in print_png(self, filename_or_obj, *args, **kwargs)
    511 
    512     def print_png(self, filename_or_obj, *args, **kwargs):
--> 513         FigureCanvasAgg.draw(self)
    514         renderer = self.get_renderer()
    515         original_dpi = renderer.dpi

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/backends/backend_agg.pyc in draw(self)
    431             # if toolbar:
    432             #     toolbar.set_cursor(cursors.WAIT)
--> 433             self.figure.draw(self.renderer)
    434             # A GUI class may be need to update a window using this draw, so
    435             # don't forget to call the superclass.

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/figure.pyc in draw(self, renderer)
   1473 
   1474             mimage._draw_list_compositing_images(
-> 1475                 renderer, self, artists, self.suppressComposite)
   1476 
   1477             renderer.close_group('figure')

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/image.pyc in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    139     if not_composite or not has_images:
    140         for a in artists:
--> 141             a.draw(renderer)
    142     else:
    143         # Composite any adjacent images together

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/axes/_base.pyc in draw(self, renderer, inframe)
   2605             renderer.stop_rasterizing()
   2606 
-> 2607         mimage._draw_list_compositing_images(renderer, self, artists)
   2608 
   2609         renderer.close_group('axes')

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/image.pyc in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    139     if not_composite or not has_images:
    140         for a in artists:
--> 141             a.draw(renderer)
    142     else:
    143         # Composite any adjacent images together

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/lines.pyc in draw(self, renderer)
    759                 self._set_gc_clip(gc)
    760 
--> 761                 ln_color_rgba = self._get_rgba_ln_color()
    762                 gc.set_foreground(ln_color_rgba, isRGBA=True)
    763                 gc.set_alpha(ln_color_rgba[3])

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/lines.pyc in _get_rgba_ln_color(self, alt)
   1260 
   1261     def _get_rgba_ln_color(self, alt=False):
-> 1262         return mcolors.to_rgba(self._color, self._alpha)
   1263 
   1264     # some aliases....

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/colors.pyc in to_rgba(c, alpha)
    166         rgba = _colors_full_map.cache[c, alpha]
    167     except (KeyError, TypeError):  # Not in cache, or unhashable.
--> 168         rgba = _to_rgba_no_colorcycle(c, alpha)
    169         try:
    170             _colors_full_map.cache[c, alpha] = rgba

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/colors.pyc in _to_rgba_no_colorcycle(c, alpha)
    217         # float)` and `np.array(...).astype(float)` all convert "0.5" to 0.5.
    218         # Test dimensionality to reject single floats.
--> 219         raise ValueError("Invalid RGBA argument: {!r}".format(orig_c))
    220     # Return a tuple to prevent the cached value from being modified.
    221     c = tuple(c.astype(float))

ValueError: Invalid RGBA argument: array([[0.28719157],
       [0.40084588],
       [0.6514793 ]])
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/IPython/core/formatters.pyc in __call__(self, obj)
    332                 pass
    333             else:
--> 334                 return printer(obj)
    335             # Finally look for special method names
    336             method = get_real_method(obj, self.print_method)

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/IPython/core/pylabtools.pyc in <lambda>(fig)
    245 
    246     if 'png' in formats:
--> 247         png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs))
    248     if 'retina' in formats or 'png2x' in formats:
    249         png_formatter.for_type(Figure, lambda fig: retina_figure(fig, **kwargs))

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/IPython/core/pylabtools.pyc in print_figure(fig, fmt, bbox_inches, **kwargs)
    129 
    130     bytes_io = BytesIO()
--> 131     fig.canvas.print_figure(bytes_io, **kw)
    132     data = bytes_io.getvalue()
    133     if fmt == 'svg':

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/backend_bases.pyc in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs)
   2210                     orientation=orientation,
   2211                     dryrun=True,
-> 2212                     **kwargs)
   2213                 renderer = self.figure._cachedRenderer
   2214                 bbox_inches = self.figure.get_tightbbox(renderer)

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/backends/backend_agg.pyc in print_png(self, filename_or_obj, *args, **kwargs)
    511 
    512     def print_png(self, filename_or_obj, *args, **kwargs):
--> 513         FigureCanvasAgg.draw(self)
    514         renderer = self.get_renderer()
    515         original_dpi = renderer.dpi

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/backends/backend_agg.pyc in draw(self)
    431             # if toolbar:
    432             #     toolbar.set_cursor(cursors.WAIT)
--> 433             self.figure.draw(self.renderer)
    434             # A GUI class may be need to update a window using this draw, so
    435             # don't forget to call the superclass.

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/figure.pyc in draw(self, renderer)
   1473 
   1474             mimage._draw_list_compositing_images(
-> 1475                 renderer, self, artists, self.suppressComposite)
   1476 
   1477             renderer.close_group('figure')

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/image.pyc in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    139     if not_composite or not has_images:
    140         for a in artists:
--> 141             a.draw(renderer)
    142     else:
    143         # Composite any adjacent images together

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/axes/_base.pyc in draw(self, renderer, inframe)
   2605             renderer.stop_rasterizing()
   2606 
-> 2607         mimage._draw_list_compositing_images(renderer, self, artists)
   2608 
   2609         renderer.close_group('axes')

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/image.pyc in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    139     if not_composite or not has_images:
    140         for a in artists:
--> 141             a.draw(renderer)
    142     else:
    143         # Composite any adjacent images together

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/lines.pyc in draw(self, renderer)
    759                 self._set_gc_clip(gc)
    760 
--> 761                 ln_color_rgba = self._get_rgba_ln_color()
    762                 gc.set_foreground(ln_color_rgba, isRGBA=True)
    763                 gc.set_alpha(ln_color_rgba[3])

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/lines.pyc in _get_rgba_ln_color(self, alt)
   1260 
   1261     def _get_rgba_ln_color(self, alt=False):
-> 1262         return mcolors.to_rgba(self._color, self._alpha)
   1263 
   1264     # some aliases....

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/colors.pyc in to_rgba(c, alpha)
    166         rgba = _colors_full_map.cache[c, alpha]
    167     except (KeyError, TypeError):  # Not in cache, or unhashable.
--> 168         rgba = _to_rgba_no_colorcycle(c, alpha)
    169         try:
    170             _colors_full_map.cache[c, alpha] = rgba

/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/colors.pyc in _to_rgba_no_colorcycle(c, alpha)
    217         # float)` and `np.array(...).astype(float)` all convert "0.5" to 0.5.
    218         # Test dimensionality to reject single floats.
--> 219         raise ValueError("Invalid RGBA argument: {!r}".format(orig_c))
    220     # Return a tuple to prevent the cached value from being modified.
    221     c = tuple(c.astype(float))

ValueError: Invalid RGBA argument: array([[0.28719157],
       [0.40084588],
       [0.6514793 ]])
<Figure size 432x288 with 1 Axes>

In [13]:
# # Decreasing voltage steps for pretty gating plots
sim_params['protocol_steps'] = 1e-3
# # sim_params['deltat'] = 1e-5
mySimulator = simulators.Simulator(sim_params,best_candidate_params,cell_var,bio_params['gate_params'])
bestSim = mySimulator.patch_clamp()

In [14]:
#
myModelator = modelators.Modelator(bio_params,sim_params)
myModelator.gating_plots(bestSim, show=True, path=path)


Out[14]:
<module 'matplotlib.pyplot' from '/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/pyplot.pyc'>

In [15]:
# Generate NeuroML2 file
contributors = [{'name': 'Vahid Ghayoomi','email': 'vahidghayoomi@gmail.com'}]
model_params = myInitiator.get_modeldata_from_db(fig_id=vc_id,model_id=3,contributors=contributors,file_path=path)
print model_params

nml2_file = myModelator.generate_channel_nml2(bio_params,best_candidate_params,model_params)
run_nml_out = myModelator.run_nml2(model_params['file_name'])


{'model_id': 3, 'contributors': [{'name': 'Vahid Ghayoomi', 'email': 'vahidghayoomi@gmail.com'}], 'channel_id': '35', 'file_name': '/Users/gopalsarma/git/openworm_base/ChannelWorm/channelworm/fitter/examples/egl-36-data/boltzmannFit/EGL-36.channel.nml', 'channel_name': 'EGL36', 'references': [{'PMID': '9247271', 'doi': '10.1016/S0896-6273(00)80355-4', 'citation': 'Behavioral defects in C. elegans egl-36 mutants result from potassium channels shifted in voltage-dependence of activation. (Johnstone DB; Wei A; Butler A; Salkoff L; Thomas JH. Neuron, 19(1):151-64)'}]}
Unknown cell_type: Xenopus oocytes
Currently unknown: <<<Unknown cell_type: Xenopus oocytes
>>>
Written NeuroML 2 channel file to: /Users/gopalsarma/git/openworm_base/ChannelWorm/channelworm/fitter/examples/egl-36-data/boltzmannFit/EGL-36.channel.nml
Validating /Users/gopalsarma/git/openworm_base/ChannelWorm/channelworm/fitter/examples/egl-36-data/boltzmannFit/EGL-36.channel.nml against /Users/gopalsarma/git/openworm_base/ChannelWorm/src/libneuroml/neuroml/nml/NeuroML_v2beta5.xsd
It's valid!
pyNeuroML >>> 
pyNeuroML >>> Analysing channels from files: ['/Users/gopalsarma/git/openworm_base/ChannelWorm/channelworm/fitter/examples/egl-36-data/boltzmannFit/EGL-36.channel.nml']
pyNeuroML >>> 
pyNeuroML >>> Reloading data specified in LEMS file: /Users/gopalsarma/git/openworm_base/ChannelWorm/channelworm/fitter/examples/LEMS_Test_ChannelWorm_EGL36_35_3.xml (/Users/gopalsarma/git/openworm_base/ChannelWorm/channelworm/fitter/examples/LEMS_Test_ChannelWorm_EGL36_35_3.xml), base_dir: ., cwd: /Users/gopalsarma/git/openworm_base/ChannelWorm/channelworm/fitter/examples
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/cbook/deprecation.py:107: MatplotlibDeprecationWarning: Passing one of 'on', 'true', 'off', 'false' as a boolean is deprecated; use an actual boolean (True/False) instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)

In [ ]: