Giter Site home page Giter Site logo

bluebrain / mooc-neurons-and-synapses-2017 Goto Github PK

View Code? Open in Web Editor NEW
43.0 24.0 26.0 5.67 MB

Reference data for the "Simulation Neuroscience:Neurons and Synapses" Massive Online Open Course

License: Other

Python 0.29% Jupyter Notebook 84.13% Makefile 0.05% AMPL 15.54%

mooc-neurons-and-synapses-2017's People

Contributors

alex4200 avatar anner-dejong avatar antonelepfl avatar jdcourcol avatar markovg avatar wvangeit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mooc-neurons-and-synapses-2017's Issues

Issue regarding lecture.

I don't know what happened but my lectures are stopped working on 2 week i can't play from Morphology studies. It was working normally, i waited for 2 days but still it's not resolved. If anyone can guide me about issue I'll be grateful.

Make sure all images are visible in collab

To show images in notebooks in the collab, they should all be placed in a public url.

One can use the following trick found by @samuel-kerrien:
1.       Make your directory Public (i.e. Anyone on the internet can find and view).
 
2.       Get shareable link from the Google Drive UI (right click on the image file you want to embed)
https://drive.google.com/open?id=0BwxhapwZNdeKcGJlUzZPTjhscms
 
3.       modify the URL you got in your clipboard to (replace code by uc):
https://drive.google.com/uc?id=0BwxhapwZNdeKcGJlUzZPTjhscms
 
4.       add to your notebook:
![Title]( https://drive.google.com/uc?id=0BwxhapwZNdeKcGJlUzZPTjhscms)

Fix text error in constrmodels notebook

The following text should be checked in
https://github.com/BlueBrain/MOOC-neurons-and-synapses-2017/blob/master/ConstrModels/TutBallStickOpt/ballandstickopt.ipynb
E.g. this is wrong: 'so we know that this should generate a perfect score of 0 for step1'

Now we can ask evaluator to calculate the scores for a set of parameters. (The lower the score the better the model). Let's calculate the score of the default_params set we used before, we know that this parameter set generates 1 spike in the first trace, and 5 spikes in the second, so we know that this should generate a perfect score of 0 for step1. For step2 we are searching for a solution with 6 spikes, so the score of our default_params won't be perfect for that trace:

Cannot open W2 Graded exercise

I am unable to run the python notebook on collab. Tried to do it locally but cannot download the submission repo. Please advise.

Nexus tutorial failing

Hello,

In the Nexus tutorial, when I try to run the one_cell_minds notebook, I get an error when I execute the following cell:

forge = KnowledgeGraphForge("https://raw.githubusercontent.com/BlueBrain/nexus/ef830192d4e7bb95f9351c4bdab7b0114c27e2f0/docs/src/main/paradox/docs/getting-started/notebooks/forge.yml",
                            bucket=f"{ORG}/{PROJECT}",
                            endpoint="https://sandbox.bluebrainnexus.io/v1",
                            token=TOKEN)

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
/tmp/ipykernel_17777/1142190872.py in <module>
      2                             bucket=f"{ORG}/{PROJECT}",
      3                             endpoint="https://sandbox.bluebrainnexus.io/v1",
----> 4                             token=TOKEN)

~/miniconda3/envs/kgforge/lib/python3.7/site-packages/kgforge/core/forge.py in __init__(self, configuration, **kwargs)
    183         store_name = store_config.pop("name")
    184         store = import_class(store_name, "stores")
--> 185         self._store: Store = store(**store_config)
    186         store_config.update(name=store_name)
    187 

~/miniconda3/envs/kgforge/lib/python3.7/site-packages/kgforge/specializations/stores/bluebrain_nexus.py in __init__(self, endpoint, bucket, token, versioned_id_template, file_resource_mapping, model_context, searchendpoints, **store_config)
     87                  model_context: Optional[Context] = None, searchendpoints:Optional[Dict] = None, **store_config) -> None:
     88         super().__init__(endpoint, bucket, token, versioned_id_template, file_resource_mapping,
---> 89                          model_context, searchendpoints, **store_config)
     90 
     91     @property

~/miniconda3/envs/kgforge/lib/python3.7/site-packages/kgforge/core/archetypes/store.py in __init__(self, endpoint, bucket, token, versioned_id_template, file_resource_mapping, model_context, searchendpoints, **store_config)
     62         self.file_mapping: Optional[Any] = loaded
     63         self.model_context: Optional[Context] = model_context
---> 64         self.service: Any = self._initialize_service(self.endpoint, self.bucket, self.token, searchendpoints, **store_config)
     65         self.context: Context = self.service.context if hasattr(self.service, "context") else None
     66         self.metadata_context: Context = self.service.metadata_context if hasattr(self.service, "metadata_context") else None

~/miniconda3/envs/kgforge/lib/python3.7/site-packages/kgforge/specializations/stores/bluebrain_nexus.py in _initialize_service(self, endpoint, bucket, token, searchendpoints, **store_config)
    510                            store_context=nexus_context_iri, namespace=namespace, project_property = project_property,
    511                            deprecated_property=deprecated_property, content_type=content_type, accept=accept,
--> 512                            files_upload_config=files_upload_config, files_download_config=files_download_config)
    513 
    514 

~/miniconda3/envs/kgforge/lib/python3.7/site-packages/kgforge/specializations/stores/nexus/service.py in __init__(self, endpoint, org, prj, token, model_context, max_connection, searchendpoints, store_context, namespace, project_property, deprecated_property, content_type, accept, files_upload_config, files_download_config)
    117             self.headers_upload["Authorization"] = "Bearer " + token
    118             self.headers_download["Authorization"] = "Bearer " + token
--> 119         self.context = Context(self.get_project_context())
    120 
    121         self.url_base_files = "/".join((self.endpoint, "files"))

~/miniconda3/envs/kgforge/lib/python3.7/site-packages/kgforge/specializations/stores/nexus/service.py in get_project_context(self)
    146         project_data = nexus.projects.fetch(self.organisation, self.project)
    147         context = {
--> 148             "@base": project_data["base"],
    149             "@vocab": project_data["vocab"]
    150         }

KeyError: 'base'

I think I followed the tutorial properly. Any clue?

Thanks!

Week 6 NMC Portal zip L5_TTPC2_cADpyr232_1

Hello,

I'm trying to compile the "Week 6. NMC portal" on the collab HBP website jupyter notebook.

After running the function
urllib.urlretrieve('https://bbp.epfl.ch/nmc-portal/documents/10184/1921755/L5_TTPC2_cADpyr232_1.zip/a058fc9c-6c67-417b-a65b-20742902ccbb','L5_TTPC2_cADpyr232_1');
I can check with a !ls command that the file has been properly downloaded.

-rw-r--r-- 1 jovyan users  246 Feb 10 09:12 L5_TTPC2_cADpyr232_1.zip

But when running the unzip function, I get the following error

BadZipfileTraceback (most recent call last)
<ipython-input-8-575a2c75b940> in <module>()
      1 import os, zipfile
----> 2 with zipfile.ZipFile('./L5_TTPC2_cADpyr232_1', 'r') as zip_file:
      3     zip_file.extractall('.')

/opt/conda/envs/python2/lib/python2.7/zipfile.pyc in __init__(self, file, mode, compression, allowZip64)
    768         try:
    769             if key == 'r':
--> 770                 self._RealGetContents()
    771             elif key == 'w':
    772                 # set the modified flag so central directory gets written

/opt/conda/envs/python2/lib/python2.7/zipfile.pyc in _RealGetContents(self)
    809             raise BadZipfile("File is not a zip file")
    810         if not endrec:
--> 811             raise BadZipfile, "File is not a zip file"
    812         if self.debug > 1:
    813             print endrec

BadZipfile: File is not a zip file

I tried some zip fix solutions, unzipping directly from the bash commands but without success...

malformed answer on week 4

Subject: Simulation Neuroscience MOOC Week 4 question
Date: 6 January 2020 at 12:23:42 GMT+2

Dr. Segev,

I'm taking the Simulation Neuroscience MOOC on edX. For the graded assignment of week 4, when I try to submit my answer, I get the following message:

The grading process failed to complete. Please double-check your answer or contact the organizers of the course with the following information: [params: {u'answer': u'{Q1: "0.2880502974240863", "Q2": "0.9486832980505138", "Q3": "3/5", "Q4": "2/5", "Q5": "2.51619269984"}', u'submission_token': u'4fZZmzE018mvTGlKWrtMoVQSDbuL'} , exception: Malformed answer. Expected answer of the form '{"key":value,...}'].

Week 2 tutorial section 4.4

Hello,
The section 4.4 of tutorial week 2 says to: "Then create a Dashboard, using the SPARQL query above."
I managed to make a new dashboard area and it has that query space so I put this in the dashboard query:


PREFIX nxv: https://bluebrain.github.io/nexus/vocabulary/
PREFIX nsg: https://neuroshapes.org/
PREFIX schema: http://schema.org/
PREFIX prov: http://www.w3.org/ns/prov#
PREFIX rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema#
PREFIX skos: http://www.w3.org/2004/02/skos/core#
SELECT DISTINCT ?self ?name ?brainRegion ?brainRegionLayer ?subjectSpecies ?subjectStrain ?registered_by ?registeredAt
WHERE {
?entity nxv:self ?self ;
a nsg:NeuronMorphology ;
schema:name ?name ;
nxv:createdBy ?registered_by ;
nxv:createdAt ?registeredAt ;
nxv:deprecated false ;
nsg:brainLocation / nsg:brainRegion / rdfs:label ?brainRegion ;
nsg:brainLocation / nsg:layer ?brainRegionLayer ;
nsg:subject / nsg:species / rdfs:label ?subjectSpecies ;
nsg:subject / nsg:strain / rdfs:label ?subjectStrain.
}
LIMIT 1000


But there is not anything in the Dashboard still after that. This is how it is looking:
image

And here is the querying in the dashboard:
image

If I am meant to be putting some other query in there or anything else tricky,
please let me know,
thank you
Phaedra

Week 4 git clone fails if dir exists

It might make sense to add:
!rm -rf MOOC-neurons-and-synapses-2017
before the !git clone command in the Week 4 notebook.

That way one is sure to get the latest MOD files, and it prevents the error one gets if one has run the same notebook before.

Unable to submit graded exercises

Hi, everytime I try to load the submission widget into Jupyter notebook, I get told that there is no module named single_cell_mooc_client.

Anyone know why this is or how to fix it?

image

Jupyter notebooks one_cell_minds

When trying to complete the "Configure a forge client to store, manage and access datasets" section, I get the following error message:
image

I have followed every step as indicated, the only deviation is that I am using python 3.9. What is going on?

Thank you very much in advance!

os.unsetenv

Hi,
I am currently working through week 6 of the course but am having trouble with the start of the NMC portal notebook.

It seems that the command os.unsetenv is not recognised on a windows PC.

Is there anything I can replace it with?

image

Invalid key

Hi all!

I am trying to submit the week 2 graded exercise, but I get an error message saying the key is invalid.
(I got this key from the Week 2 assignment page on EdX.)

Any ideas on what I can do to get this working?

Split up Week 3 exercise

Split Week 3 exercise in separate notebooks so that the don't affect the results further in the notebook

`nrn.h.load_file("./init.hoc");` crashes notebook

When arriving at and running the cell: nrn.h.load_file("./init.hoc"); of the 'Week 6. NMC portal' notebook, the kernel keeps crashing. Not sure why. (notebook taking from HBP collab, but seems the same as github version). Tried both locally (without compiling !nrnivmodl mechanisms) and in a google colab (with compiling).


  1. I tried to go into init.hoc and comment out lines 1 by 1. Not giving me a definite pattern but it seems: calling create_cell() causes the crash. If nrn.h.load_file("./init.hoc"); doesnt crash (with init.hoc line create_cell(synapses_enabled) commented out), the following notebook cell will (nrn.h.create_cell(arg);).
    • The nrn.h.load_file("./init.hoc"); command, depending on how much is commented out, will issue an error, see below.
  2. Same as with assignments of earlier weeks, the prescribed package versions give me clashes; I remove them and so far everything worked fine, but it might be that this is causing the issue? See below for versions.

nrn.h.load_file("./init.hoc"); error when init.hoc has everything but 4 load_file() lines commented out:

NEURON: Ih is not a MECHANISM
 in biophysics.hoc near line 50
 		insert Ih
           ^
        xopen("biophysics.hoc")
      execute1("{xopen("bi...")
    load_file("biophysics.hoc")
  xopen("createsimu...")
and others
NEURON: ProbGABAAB_EMS is not a template
 in synapses.hoc near line 274
             section.sec synapse = new ProbGABAAB_EMS(seg_x)
                                                           ^
        xopen("synapses.hoc")
      execute1("{xopen("sy...")
    load_file("synapses/s...")
  xopen("template.hoc")
and others

package versions:

python: 3.7
neuron:  7.8.2
bluepyopt:  1.9.147
matplotlib:  3.2.2
numpy:  1.19.5
neurom: 1.8.0
neurom: 7.8.2
efel: 3.1.88

ConstrModels notebooks issues

In notebooks:
GradedExercise.ipynb
ballandstickopt.ipynb

With:
bluepyopt (v 1.10.12) and numpy (1.19.5):

We get some errors / warning such as:

New error when importing bluepyopt: RuntimeError Traceback (most recent call last)
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
MatplotlibDeprecationWarning: Passing non-integers as three-element position specification is deprecated since 3.3 and will be removed two minor releases later.

To access to NOTO platform link

Please commit changes to branch 2021_release

Do you have an idea of what could be happening? @wvangeit @mgeplf

NO Q1 key

In week 4 in graded ex if you push your ans(json) with Q1-5 keys and if in Q5 you have value not float as default - 'my answer', u get error as - Q1 not found in ans json

Week 5: ballandstickopt.ipynb

Hi,

I seem to have different plot from the ball and stick model than in the lecture video (should be 1 spike in the first and 5 spikes in the second subplot):
ballandstickplot

I noticed that the SWC string differs from what is in the video (at least). It is now:

morph_swc_string = """
1 1 0.0 0.0 -10.0 10.0 -1                                                        
2 1 0.0 0.0 0.0 10.0 1                                                           
3 1 0.0 0.0 10.0 10.0 1                                                          
4 3 0.0 10.0 0.0 2.0 1                                                           
5 3 0.0 110.0 0.0 2.0 4
"""

it used to be:

morph_swc_string = """
1 1 0.0 0.0 -10.0 10.0 -1                                                        
2 1 0.0 0.0 0.0 10.0 1                                                           
3 1 0.0 0.0 10.0 10.0 2                                                          
4 3 0.0 10.0 0.0 2.0 2                                                           
5 3 0.0 110.0 0.0 2.0 4
"""

I backtracked the changes to the following commits:
d5d1fa2
916c347
but there was no particular explanation (at least that I would've noticed) why they were changed.

Moreover, I tried with the old SWC string and got the following warning:

Warning: with a 3 points soma, neurites must be connected to the first soma point:
ballandstick.swc:5:warning

after running the block:

import neurom
import neurom.viewer
fig, ax = neurom.viewer.draw(neurom.load_neuron('ballandstick.swc'))

I continued running the notebook until the plot and now I have 4 spikes in the second subplot:
ballandstickplot2
I am not sure what's going on here.

Week 4 graded exercise widget install fails

The >/dev/null 2>&1 is hiding an error message in the week 4 graded exercise
!pip -q install --upgrade --pre -i https://bbpteam.epfl.ch/repository/devpi/simple/ single-cell-mooc-client > /dev/null 2>&1

One gets:
ImportError: No module named site

It's because of:
https://github.com/BlueBrain/mooc-grading-service/blob/master/docs/faq.md#when-pip-installing-the-widget-i-get-importerror-no-module-named-site

To solve this:

  • execute this right before the pip: import os; os.unsetenv('PYTHONHOME')
  • in general, I think it's better to add this at the end of the pip install: '2>&1 | grep -v 'SNIMissingWarning|InsecurePlatformWarning'' instead of '> /dev/null 2>&1'

Set up your HBP Collab not working

I have tried Many times to set up an HBP account without successes. I press the button GetHBP Invitation and receive:
An invitation has been sent to your address [email protected].

Go to your inbox and search for an email named Invitation to Collaboratory. Open it and follow the steps.

Once your HBP account has been created, come here to finish setting it up for this course.

But no email ever arrives.
Some systems will not accept that my email address is so short or that it ends in 'Net' but it is correct. I am well aware of the junk folder and the response is not there.

Fix week 5 grader in next iteration

In the next iteration of this MOOC, fix the Week 5 grader and tutorial notebook, by:

  • use the same SWC file for graded exercise and main notebook
  • add hh to dendrite in grader

week 3 assignment

Hi, my name is Hernan. I did the assignment of the week 3 and it didn't go really well. I don't know if I can submit it again? Can someone help me with that? This is what I did...
neuron.h.load_file("stdrun.hoc");
neuron.h.stdinit();

Define soma

soma = neuron.h.Section(name='soma')
soma.L = 40
soma.diam = 40
soma.insert('hh');
soma.gl_hh = 5e-4 # Leak conductance, S/cm^2
soma.el_hh = -65 # Reversal potential leak current, mV
soma.gkbar_hh = 0.0 # in S/cm^2
soma.gnabar_hh = 0.0

Define dendrite

dend = neuron.h.Section(name='dend')
dend.connect(soma)
dend.insert('hh')
dend.el_hh = -65 # Reversal potential leak current, mV
dend.gl_hh = 5e-4 # Leak conductance, S/cm^2
dend.gkbar_hh = 0.0
dend.gnabar_hh = 0.0
dend.L = 400 # micron
dend.nseg = 51 # number of segments in the dendritic section
dend.Ra = 200

Record voltage

time = neuron.h.Vector()
voltage = neuron.h.Vector()

time.record(neuron.h._ref_t)
voltage.record(dend(0)._ref_v);

def plot_tv(time_array, voltage_array, show=True, label=None, constants=[]):
import matplotlib.pyplot as plt
import numpy
plt.plot(time_array, voltage_array, label=label)
for constant in constants:
plt.plot(time_array, constant*numpy.ones(len(time_array)))
plt.xlabel('Time (ms)')
plt.ylabel('Membrane voltage (mV)')
if show:
plt.show()

Add synapse

expsyn = neuron.h.ExpSyn(0.5, sec=dend)
netstim = neuron.h.NetStim()
netstim.interval = 1
netstim.number = 1
netstim.start = 20
netstim.noise = 0

netcon = neuron.h.NetCon(netstim, expsyn)
netcon.weight[0] = .01
neuron.h.tstop = 100
neuron.h.run()

#How affects diameter in our attenuation
diameter_vector = {}
atts = []

diameter_range = numpy.linspace(0.1, 10.0, 20)
for dend_diameter in diameter_range:
dend.diam = dend_diameter
diameter_vector[dend_diameter] = numpy.array(voltage)

neuron.h.run()

plot_tv(time, diameter_vector[dend_diameter], show=False, label=(dend_diameter))
plt.legend()

plt.show()

epsp_size1 = []
a = []
for dend_diameter in diameter_range:
# Get the EPSP size by subtracting the min (baseline) voltage from the max voltage
epsp_size1.append(max(diameter_vector[dend_diameter])-min(diameter_vector[dend_diameter]))

Bring x[0] to 0.0

x = diameter_range-diameter_range[0]

Normalize

y = epsp_size1/epsp_size1[0]

Fit a linear line to log plot

a , b = numpy.polyfit(x, numpy.log(y), 1)

exp_decay_constant = a

x1 = numpy.log(diameter_range)
y1 = numpy.log(y)

Plot the data

plt.plot(x1, y1, 'o')

Plot the fit

plt.plot(x1, a*x1 + b)

plt.xlabel('log diameter')
plt.ylabel('log Max voltage (mV)')
plt.show()

print('Exponential decay constant of EPSPs: %f' % exp_decay_constant)

Week 4 StochasticTM AMPA NMDA MOD files

Hello,

I'm having trouble compiling the mod files from the week 4 exercises.

When executing the following command

!nrnivmodl ./MOOC-neurons-and-synapses-2017/ModelingSynapses/mechanisms

I get the following error

/usr/bin/xcrun
/Users/martinvielvoye/Simulation-Neuroscience/Week 4
-n Mod files:
-n  "./MOOC-neurons-and-synapses-2017/ModelingSynapses/mechanisms/SimpleAMPA_NMDA.mod"
-n  "./MOOC-neurons-and-synapses-2017/ModelingSynapses/mechanisms/StochasticTsodyksMarkram_AMPA_NMDA.mod"
-n  "./MOOC-neurons-and-synapses-2017/ModelingSynapses/mechanisms/TsodyksMarkram_AMPA_NMDA.mod"
-n  "./MOOC-neurons-and-synapses-2017/ModelingSynapses/mechanisms/vecevent.mod"


Creating x86_64 directory for .o files.

COBJS=''
 -> Compiling mod_func.c
clang -O2   -I.   -I/usr/local/lib/python3.8/site-packages/neuron/.data/include  -I/usr/local/Cellar/open-mpi/4.0.5/include -fPIC -c mod_func.c -o mod_func.o
 -> NMODL .././MOOC-neurons-and-synapses-2017/ModelingSynapses/mechanisms/SimpleAMPA_NMDA.mod
(cd ".././MOOC-neurons-and-synapses-2017/ModelingSynapses/mechanisms"; MODLUNIT=/usr/local/lib/python3.8/site-packages/neuron/.data/share/nrn/lib/nrnunits.lib /usr/local/lib/python3.8/site-packages/neuron/.data/bin/nocmodl SimpleAMPA_NMDA.mod -o "/Users/martinvielvoye/Simulation-Neuroscience/Week 4/x86_64")
 -> NMODL .././MOOC-neurons-and-synapses-2017/ModelingSynapses/mechanisms/StochasticTsodyksMarkram_AMPA_NMDA.mod
 -> NMODL .././MOOC-neurons-and-synapses-2017/ModelingSynapses/mechanisms/TsodyksMarkram_AMPA_NMDA.mod
(cd ".././MOOC-neurons-and-synapses-2017/ModelingSynapses/mechanisms"; MODLUNIT=/usr/local/lib/python3.8/site-packages/neuron/.data/share/nrn/lib/nrnunits.lib /usr/local/lib/python3.8/site-packages/neuron/.data/bin/nocmodl StochasticTsodyksMarkram_AMPA_NMDA.mod -o "/Users/martinvielvoye/Simulation-Neuroscience/Week 4/x86_64")
(cd ".././MOOC-neurons-and-synapses-2017/ModelingSynapses/mechanisms"; MODLUNIT=/usr/local/lib/python3.8/site-packages/neuron/.data/share/nrn/lib/nrnunits.lib /usr/local/lib/python3.8/site-packages/neuron/.data/bin/nocmodl TsodyksMarkram_AMPA_NMDA.mod -o "/Users/martinvielvoye/Simulation-Neuroscience/Week 4/x86_64")
Translating SimpleAMPA_NMDA.mod into /Users/martinvielvoye/Simulation-Neuroscience/Week 4/x86_64/SimpleAMPA_NMDA.c
Translating TsodyksMarkram_AMPA_NMDA.mod into /Users/martinvielvoye/Simulation-Neuroscience/Week 4/x86_64/TsodyksMarkram_AMPA_NMDA.c
Translating StochasticTsodyksMarkram_AMPA_NMDA.mod into /Users/martinvielvoye/Simulation-Neuroscience/Week 4/x86_64/StochasticTsodyksMarkram_AMPA_NMDA.c
R not really a STATE; Ie. No differential equation for it.
 at line 281 in file StochasticTsodyksMarkram_AMPA_NMDA.mod
^
Thread Safe
Thread Safe
make: *** [StochasticTsodyksMarkram_AMPA_NMDA.c] Error 1
make: *** Waiting for unfinished jobs....

There seems to be an error with the StochasticTsodyksMarkram_AMPA_NMDA.mod file.
When I delete the file, the compiling goes fine but it makes me unable to do the graded exercise for this week.

This is run locally on MacOS Big Sur 11.2, using jupyter notebook with a trusted kernel.

Anyone has an idea?
I tried to look in the mod file but being really unfamiliar with the format I can't seem to find the possible syntax error or bug.

Need Help: ballandstick.ipynb code - Python - SyntaxError

Hello!

OS: Windows 10 Home.
Software: Anaconda2-2019.10-Windows-x86_64
I am trying to run the code from the ballandstick.ipynb using the Python
https://github.com/BlueBrain/MOOC-neurons-and-synapses-2017/blob/master/ModelingNeurons/TutBallStick/ballandstick.ipynb
First lines go well untill In [15], where I receive a SyntaxError message.
Here is that piece of code:

def plot_tv(time_array, voltage_array, show=True, label=None, constants=[]):
... import matplotlib.pyplot as plt
... import numpy
... plt.plot(time_array, voltage_array, label=label)
... for constant in constants:
... plt.plot(time_array, constant*numpy.ones(len(time_array)))
... plt.xlabel('Time (ms)')
... plt.ylabel('Membrane voltage (mV)')
... if show:
... plt.show()
...
... plot_tv(time, voltage)
File "", line 12
plot_tv(time, voltage)
^
SyntaxError: invalid syntax

It looks like the def function does not work. But I can't understand why (and I can easily be wrong with my guess))).
Tried the same using Anaconda3-2019.10-Windows-x86_64 - same result.

Thanks in advance for any help or advice!

Best wishes,
Vlas

Week 2 tutorial: Integrate Neuroscience Datasets from Multiple Sources using MINDS

Hello,
I just had this same issue but with another part of the tutorial.
I hope this issue can be fixed in a similar way.

Tutorial: Integrate Neuroscience Datasets from Multiple Sources using MINDS
Configure a forge client to store, manage and access datasets
error:
/srv/conda/envs/notebook/lib/python3.7/site-packages/rdflib_jsonld/init.py:12: DeprecationWarning: The rdflib-jsonld package has been integrated into rdflib as of rdflib==6.0.1. Please remove rdflib-jsonld from your project's dependencies.
DeprecationWarning,

Thank you for any help and your time,
Phaedra

Collabs do not work any more

Hi! I cannot longer connect to HBP collabs, so I cannot go through the exercises of theSimulation Neuroscience MOOC. Is that me, my account, or is it something else?
Thank you!
Marianne

StochasticTsodyksMarkram_AMPA_NMDA.mod does not compile (in "Week 4. Graded assignment.ipynb")

Output when running !nrnivmodl ./MOOC-neurons-and-synapses-2017/ModelingSynapses/mechanisms :

...
Translating StochasticTsodyksMarkram_AMPA_NMDA.mod into /content/x86_64/StochasticTsodyksMarkram_AMPA_NMDA.c
R not really a STATE; Ie. No differential equation for it.
 at line 281 in file StochasticTsodyksMarkram_AMPA_NMDA.mod
...

Tried several changes (see below) but my unfamiliarity with .mod files, as well as I cant compile locally but only in a colab, is not getting me anywhere. Hopefully someone more familiar has a fix.


Side notes:

It seems this file is an update from the non Stochastic file, but with some of the updates missing (e.g. the R, but also local A still declared but unused in NET_RECEIVE, R never assigned to, ..)

  • making R a local like Psurv, but R state should persist so seems wrong
  • making R a PARAMETER, but gives other compiler errors
  • others

NMC portal notebooks issues

In notebooks:
Final graded assignment.ipynb
NMCPortal.ipynb

When:

neurom.viewer.draw(neurom.load_neuron('morphology/dend-C310897B-P3_axon-C220498B-P3_cor_-_Clone_1.asc'));

Output:

/usr/local/lib/python3.8/dist-packages/neurom/view/common.py:108: MatplotlibDeprecationWarning: Passing non-integers as three-element position specification is deprecated since 3.3 and will be removed two minor releases later.
  ax = fig.add_subplot(subplot, **params)

To access to NOTO platform link

Please commit changes to branch 2021_release

Do you have an idea of what could be happening? @wvangeit @mgeplf

Problem with Collab: The page have redirect you so many times

Hi! HBP collaboration is not working, when i try to open the workspace it said to me "jupyterhub.humanbrainproject.org have redirect you so many times".
It have already happened to me the last week (trying to do the week2 asiggment), and i could fix it open the collaboratory in firefox but now i've try it in firefox, chrome, microssoft edge and nothing works.

what should i do?
Thanks.

Ball-and-stick: Exercise 2

In

# linear_coef = numpy.polyfit(gkbar_range, max_voltages, 1)

# print 'Linear equation max_voltage = %f*gkbar + %f' % tuple([x for x in linear_coef])

the print statement use py2 syntax (no parenthesis). It would be simpler for the student if the hints use proper py3 syntax.

Week 2 Tutorial

Hello,
I have this error now:

dataset_from_different_sources
select metadata

KeyError Traceback (most recent call last)
/tmp/ipykernel_61/1646912356.py in
32 __typename\n }\n}\n"""
33 })
---> 34 nm_mouselight_graphql = json.loads(nm_request.text)["data"]["searchNeurons"]["neurons"]
35 nm_mouselight_names = [x["idString"] for x in nm_mouselight_graphql]

KeyError: 'data'

Final assignment - compatibility with Windows

Hi,
I am currently working through week 6 of the course but am having trouble with the start of the NMC portal notebook.

It seems that the command os.setenv is not recognised on a windows PC.

Is there anything I can replace it with?

image

One_cell_minds: ModuleNotFoundError

I am trying to run the notebook one-cell_minds on binder ut I keep getting a Module not found error. I think there is some problem with the dependencies. Could you maybe help me?

issue

Thank you in advance!

Marta

Error uploading graded exercise week 2

I set up my HBP collab, completed and submitted my assignment while also providing the key and I recive this message: The grading process failed to complete. Please double-check your answer or contact the organizers of the course with the following information: [params: {u'answer': u"{'specimen_id': '', 'email': ''}", u'submission_token': u'J6M0nJG6FTXrX0M9EOLcrReCtVae'} , exception: No data available for student email address '''']. I've tried some workarounds but neither of those seem to work.

Week 2 - error in tutorial notebook: Can't register the Allen Cell Types Database neuron morphology

I'm currently using the notebook: Step by step jupyter notebook for bringing data to Nexus v1.ipynb using google colab which is a tutorial for Week 2.

This line of code returns False, which I assume indicates that registration failed. How do I make it work? I've tried entering fresh token and reinitialized several times but to no avail. Any solutions? Thank you.

Input:
forge.register(nm_allen_resources)

Output:
_register_one
False
AttributeError: 'NoneType' object has no attribute 'format'

week 3 Modeling neurons failing

I logged in with a new created user:

in this cell:
image
I got that call stack:

ValueError Traceback (most recent call last)
in ()
15 max_voltages.append(max(voltage))
16
---> 17 plt.plot(gnabar_range, max_voltages, 'oC0')
18 plt.xlabel('gnabar (S/cm2)')
19 plt.ylabel('Maximum AP voltage')

/home/jupyter/.local/lib/python2.7/site-packages/matplotlib/pyplot.pyc in plot(*args, **kwargs)
3152 ax.hold(hold)
3153 try:
-> 3154 ret = ax.plot(*args, **kwargs)
3155 finally:
3156 ax.hold(washold)

/home/jupyter/.local/lib/python2.7/site-packages/matplotlib/init.pyc in inner(ax, *args, **kwargs)
1810 warnings.warn(msg % (label_namer, func.name),
1811 RuntimeWarning, stacklevel=2)
-> 1812 return func(ax, *args, **kwargs)
1813 pre_doc = inner.doc
1814 if pre_doc is None:

/home/jupyter/.local/lib/python2.7/site-packages/matplotlib/axes/_axes.pyc in plot(self, *args, **kwargs)
1422 kwargs['color'] = c
1423
-> 1424 for line in self._get_lines(*args, **kwargs):
1425 self.add_line(line)
1426 lines.append(line)

/home/jupyter/.local/lib/python2.7/site-packages/matplotlib/axes/_base.pyc in _grab_next_args(self, *args, **kwargs)
384 return
385 if len(remaining) <= 3:
--> 386 for seg in self._plot_args(remaining, kwargs):
387 yield seg
388 return

/home/jupyter/.local/lib/python2.7/site-packages/matplotlib/axes/_base.pyc in _plot_args(self, tup, kwargs)
334 ret = []
335 if len(tup) > 1 and is_string_like(tup[-1]):
--> 336 linestyle, marker, color = _process_plot_format(tup[-1])
337 tup = tup[:-1]
338 elif len(tup) == 3:

/home/jupyter/.local/lib/python2.7/site-packages/matplotlib/axes/_base.pyc in _process_plot_format(fmt)
114 else:
115 raise ValueError(
--> 116 'Unrecognized character %c in format string' % c)
117
118 if linestyle is None and marker is None:

ValueError: Unrecognized character C in format string

Not a zipfile?

Dear staff,

I have put a lot of effort into learning all the content for this course and I have done everything but the final graded exercise but now I am having some issues with the collab. First of all, I wasn't able to initalise the collab because of changes to the platform. I asked about this on Github and was directed to the jupyter notebook for week 6, which I was told to download to my device. When using this, I encountered some errors and queried again and got told that some of the features wouldn't work well on a Windows computer, and that it was advised to do them on the platform. This put me back where I started. Now, I am really desperate to finish this before the course is archived as I have worked super hard since December 2020 on getting through all the contents and want to be able to obtain the certificate for this course. All I need is to finish the Final Graded Assignment but how can I do that if it doesn't work well on my device? Desperate, as I know this will be shut down tomorrow, I scrolled through all the collabs and found an empty week 6 one, which I copied onto one of my other collabs. I have worked through this but have not been able to get far as I encountered this error (see snip):
image

Please help me. This course has been amazing and it would be painful not to finish it nor get recognition for all the work I've put in over these past months.

Best wishes,

Ari

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.