Model of the cerebellar granular network (Sudhakar et al 2017)

 Download zip file   Auto-launch 
Help downloading and running models
"The granular layer, which mainly consists of granule and Golgi cells, is the first stage of the cerebellar cortex and processes spatiotemporal information transmitted by mossy fiber inputs with a wide variety of firing patterns. To study its dynamics at multiple time scales in response to inputs approximating real spatiotemporal patterns, we constructed a large-scale 3D network model of the granular layer. ..."
1 . Sudhakar SK, Hong S, Raikov I, Publio R, Lang C, Close T, Guo D, Negrello M, De Schutter E (2017) Spatiotemporal network coding of physiological mossy fiber inputs by the cerebellar granular layer. PLoS Comput Biol 13:e1005754 [PubMed]
Citations  Citation Browser
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism: Cerebellum;
Cell Type(s): Cerebellum golgi cell;
Channel(s): I A; I Calcium; I K; I K,Ca; I Na,t; I h; I Na,p; I T low threshold;
Gap Junctions: Gap junctions;
Receptor(s): AMPA; NMDA; Gaba;
Transmitter(s): Glutamate; Gaba;
Simulation Environment: NEURON;
Model Concept(s): Spatio-temporal Activity Patterns; Oscillations; Synchronization; Winner-take-all;
Implementer(s): Hong, Sungho [shhong at]; Guo, Daqing [dqguo at]; Raikov, Ivan [ivan.g.raikov at]; Publio, Rodrigo [publio at]; De Schutter, Erik [erik at];
Search NeuronDB for information about:  AMPA; NMDA; Gaba; I Na,p; I Na,t; I T low threshold; I A; I K; I h; I K,Ca; I Calcium; Gaba; Glutamate;
;; Simple arithmetic calculator. 

(require-extension lalr-driver)

;; parser

(include "brep.yy.scm")

;;;;   The lexer

(define (port-line port) 
  (let-values (((line _) (port-position port)))
(define (port-column port)
  (let-values (((_ column) (port-position port)))

(define (make-lexer errorp in)
  (lambda ()
    (letrec ((skip-spaces
              (lambda ()
                (let loop ((c (peek-char in)))
                  (if (and (not (eof-object? c))
                           (or (char=? c #\space) (char=? c #\tab)))
                        (read-char in)
                        (loop (peek-char in)))))))
              (lambda ()
                (let loop ((c (peek-char in)))
                  (if (and (not (eof-object? c)) (not (char=? c #\newline)) (not (char=? c #\return)))
                        (read-char in)
                        (loop (peek-char in)))
              (lambda (l)
                (let ((c (peek-char in)))
                  (if (or (char-numeric? c) (char=? #\. c) (char=? #\- c) (char=? #\e c))
                      (read-number (cons (read-char in) l))
                      (string->number (apply string (reverse l))) ))
              (lambda (l)
                (let ((c (peek-char in)))
                  (if (or (char-alphabetic? c) (char=? #\_ c))
                      (read-id (cons (read-char in) l))
                      (string->symbol (apply string (reverse l))) ))
              (lambda (l)
	       (let ([c (peek-char in)])
		 (cond [(eq? 'eof c)   (errorp "unexpected end of string constant")]
		       [(char=? c #\\) (let ((n (read-char in)))
					 (loop (cons n l)))]
		       [(char=? c #\") (begin (read-char in) (apply string (reverse l))) ]
		       [else (read-string (cons (read-char in) cs))] ))

      ;; -- skip spaces
      ;; -- read the next token
      (let loop ()
        (let* ((location (make-source-location "*stdin*" (port-line in) (port-column in) -1 -1))
               (c (read-char in)))
          (cond ((eof-object? c)      '*eoi*)
                ((char=? c #\newline) (make-lexical-token 'NEWLINE location #f))
                ((char=? c #\+)       (make-lexical-token '+       location #f))
                ((char=? c #\-)       (make-lexical-token '-       location #f))
                ((char=? c #\*)       (make-lexical-token '*       location #f))
                ((char=? c #\/)       (let ((n (peek-char in)))
                                        (if (char=? n #\/)
                                            (begin (skip-line) (loop))
                                            (make-lexical-token '/ location #f))))
                ((char=? c #\=)       (make-lexical-token '=       location #f))
                ((char=? c #\,)       (make-lexical-token 'COMMA   location #f))
                ((char=? c #\()       (make-lexical-token 'LPAREN  location #f))
                ((char=? c #\))       (make-lexical-token 'RPAREN  location #f))
                ((char=? c #\")       (make-lexical-token 'STRING  location (read-string (list c))))
                ((char-numeric? c)    (make-lexical-token 'NUM     location (read-number (list c))))
                ((char-alphabetic? c) (make-lexical-token 'ID      location (read-id (list c))))
                 (errorp "PARSE ERROR : illegal character: " c)

;;;;   Environment management

(define *env* (make-parameter (list (cons '$$ 0))))

(define (init-bindings)
  (*env* (list (cons '$$ 0)))
  (add-binding 'PI 3.14159265358979)
  (add-binding 'int round)
  (add-binding 'cos cos)
  (add-binding 'sin sin)
  (add-binding 'tan tan)
  (add-binding 'expt expt)
  (add-binding 'sqrt sqrt)
  (add-binding 'loadPoints load-points-from-file)

(define (add-binding var val)
  (*env* (cons (cons var val) (*env*)))

(define (get-binding var)
  (let ((p (assq var (*env*))))
    (if p
        (cdr p)

(define (invoke-func proc-name args)
  (let ((proc (get-binding proc-name)))
    (if (procedure? proc)
        (apply proc args)
          (display "ERROR: invalid procedure:")
          (display proc-name)

;; (init-bindings)

(define (errorp message . args)
  (display message)
  (if (and (pair? args) 
           (lexical-token? (car args)))
      (let ((token (car args)))
        (display (or (lexical-token-value token)
                     (lexical-token-category token)))
        (let ((source (lexical-token-source token)))
          (if (source-location? source)
              (let ((line (source-location-line source))   
                    (column (source-location-column source)))
                (if (and (number? line) (number? column))
                      (display " (at line ")
                      (display line)
                      (display ", column ")
                      (display (+ 1 column))
                      (display ")")))))))
      (for-each display args))

(define (brep-lexer in) (make-lexer errorp in))

(define (brep-eval lexer) (brep-parser lexer errorp))

(define (brep-eval-string s) 
  (brep-parser (brep-lexer (open-input-string (string-append s "\n"))) errorp))