Computational Surgery (Lytton et al. 2011)

 Download zip file   Auto-launch 
Help downloading and running models
Accession:140881
Figure 2 in Neocortical simulation for epilepsy surgery guidance: Localization and intervention, by William W. Lytton, Samuel A. Neymotin, Jason C. Wester, and Diego Contreras in Computational Surgery and Dual Training, Springer, 2011
Reference:
1 . Lytton WW, Neymotin SA, Wester JC, Contreras D (2011) Neocortical simulation for epilepsy surgery guidance: Localization and intervention Computational Surgery and Dual Training
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism: Neocortex;
Cell Type(s): Neocortex fast spiking (FS) interneuron; Neocortex spiking regular (RS) neuron; Neocortex spiking low threshold (LTS) neuron;
Channel(s):
Gap Junctions:
Receptor(s):
Gene(s):
Transmitter(s):
Simulation Environment: NEURON;
Model Concept(s): Epilepsy;
Implementer(s): Lytton, William [billl at neurosim.downstate.edu];
/
b11aug17
data
readme.txt
intf6_.mod *
misc.mod *
nstim.mod *
stats.mod *
vecst.mod *
col.hoc
declist.hoc *
decnqs.hoc *
decvec.hoc *
default.hoc *
drline.hoc *
gload.hoc
grvec.hoc
init.hoc
labels.hoc
local.hoc *
misc.h *
mosinit.hoc
network.hoc
nqs.hoc
nqs_utils.hoc *
nqsnet.hoc *
nrnoc.hoc *
params.hoc
run.hoc
setup.hoc *
simctrl.hoc *
spkts.hoc *
stats.hoc
stdgui.hoc *
syncode.hoc
                            
: $Id: misc.mod,v 1.23 2007/12/07 21:46:51 billl Exp $

COMMENT
Misc. routines:
sassign() // assign a string from system
dassign()// assign a double
nokill() // chatch SIGHUP
prtime() // gives date/time
fspitchar(c,file) // sends single char to a file
spitchar(c)       // sends single char to stdout: eg c=1 => ^A
file_exist(file) // returns 1 if filename exists
hocgetc(file) // get single char from a file

  Note that with a SUFFIX equal to "nothing" these functions do not
have a suffix in hoc.  Thus to call sassign() in hoc use simply type
"sassign()" <- without the quotes.

    file_exist(filename)
        - returns 1 if filename exists

    sassign()  (string assign, written by Bill Lytton)
        - This routine is used to set a string in Hoc to something that has
          been returned by a system call.  sassign("name","shell_call ...")
          will produce a file called "sassign" in the cwd that will contain
          a hoc call that sets string 'name' to the result of shell_call 
          which should be a string.
        
    dassign()  (double assign, written and used by Bill Lytton)
        - This routine is used to set a variable in Hoc to something that has
          been returned by a system call.  sassign("name","shell_call ...")
          will produce a file called "dassign" in the cwd that will contain
          a hoc call that sets variable 'name' to the result of shell_call 
          which should be a number.

ENDCOMMENT
                           
INDEPENDENT {t FROM 0 TO 1 WITH 1 (ms)}

NEURON {
    SUFFIX nothing
}

VERBATIM
#include <unistd.h>     /* F_OK     */
#include <errno.h>      /* errno    */
#include <signal.h>
#include <sys/types.h>         /* MUST REMEMBER THIS */
#include <time.h>
#include <stdio.h>
#include <limits.h>
extern int hoc_is_tempobj(int narg);
ENDVERBATIM

:* FUNCTION file_exist()
FUNCTION file_exist() {
VERBATIM
    /* Returns TRUE if file exists, if file not exist the need to reset
       errno else will get a nrnoc error.  Seems to be a problem even
       if I don't include <errno.h> */

    char *gargstr(), *filename;

    filename = gargstr(1);

    if (*filename && !access(filename, F_OK)) {
        _lfile_exist = 1;

    } else {
        /* Errno set to 2 when file not found */
        errno = 0;

        _lfile_exist = 0;
    }
ENDVERBATIM
}

FUNCTION istmpobj () {
VERBATIM
  _listmpobj=hoc_is_tempobj_arg(1);
ENDVERBATIM  
}

:* PROCEDURE sassign()
PROCEDURE sassign() {
VERBATIM
    FILE *pipein;
    char string[BUFSIZ], **strname, *syscall;
    char** hoc_pgargstr();

    strname = hoc_pgargstr(1);
    syscall = gargstr(2);

    if( !(pipein = popen(syscall, "r"))) {
        fprintf(stderr,"System call failed\n");
        return; 
    }
    
    if (fgets(string,BUFSIZ,pipein) == NULL) {
        fprintf(stderr,"System call did not return a string\n");
        pclose(pipein); return;
    }

    /*  assign_hoc_str(strname, string, 0); */
    hoc_assign_str(strname, string);

    pclose(pipein);
    errno = 0;
ENDVERBATIM
}

:* PROCEDURE dassign() 
PROCEDURE dassign() {
VERBATIM
    FILE *pipein, *outfile;
    char *strname, *syscall;
    double num;

    strname = gargstr(1);
    syscall = gargstr(2);

    if ( !(outfile = fopen("dassign","w"))) {
        fprintf(stderr,"Can't open output file dassign\n");
        return; 
    }

    if( !(pipein = popen(syscall, "r"))) {
        fprintf(stderr,"System call failed\n");
        fclose(outfile); return; 
    }
    
    if (fscanf(pipein,"%lf",&num) != 1) {
        fprintf(stderr,"System call did not return a number\n");
        fclose(outfile); pclose(pipein); return; 
    }

    fprintf(outfile,"%s=%g\n",strname,num);
    fprintf(outfile,"system(\"rm dassign\")\n");

    fclose(outfile); pclose(pipein);
    errno = 0;
ENDVERBATIM
}

:* PROCEDURE nokill() 
: nohup
PROCEDURE nokill() {
VERBATIM
  signal(SIGHUP, SIG_IGN);
ENDVERBATIM
}

:* FUNCTION prtime()
FUNCTION prtime () {
VERBATIM
_lprtime = clock();
ENDVERBATIM
}

:* FUNCTION now ()
FUNCTION now () {
VERBATIM
  _lnow = time((time_t*)0);
  _lnow -= (12784) * 24*60*60; // time from the Epoch to 01/01/05
ENDVERBATIM
}

:* PROCEDURE sleepfor ()
PROCEDURE sleepfor (sec) {
VERBATIM
  struct timespec ts;
  ts.tv_sec = (time_t)_lsec;
  ts.tv_nsec = (long)0;
  nanosleep(&ts,(struct timespec*)0);
ENDVERBATIM
}

:* PROCEDURE spitchar
PROCEDURE spitchar(c) {
VERBATIM
{	
  printf("%c", (int)_lc);
}
ENDVERBATIM
}

:* PROCEDURE spitchar
VERBATIM
static char *pmlc;
ENDVERBATIM

PROCEDURE mymalloc(sz) {
VERBATIM
{ 
  size_t x,y;
  x=(size_t)_lsz;
  pmlc=(char *)malloc(x);
  printf("Did %ld: %x\n",x,pmlc);
  y=(unsigned int)_lsz-1;
  pmlc[y]=(char)97;
  printf("WRITE/READ 'a': "); 
  printf("%c\n",pmlc[y]);
  if (ifarg(2)) free(pmlc); else printf("Use unmalloc() to free memory\n");
}
ENDVERBATIM
}

PROCEDURE unmalloc() {
VERBATIM
  free(pmlc);
ENDVERBATIM
}

:* FUNCTION hocgetc
FUNCTION hocgetc() {
VERBATIM
{	
  FILE* f, *hoc_obj_file_arg();
  f = hoc_obj_file_arg(1);
  _lhocgetc = (double)getc(f);
}
ENDVERBATIM
}

PROCEDURE pwd() {
  VERBATIM
  {char cwd[1000],cmd[1200];
  getcwd(cwd, 1000);
  sprintf(cmd, "execute1(\"strdef cwd\")\n");         hoc_oc(cmd);
  sprintf(cmd, "execute1(\"cwd=\\\"%s\\\"\")\n",cwd); hoc_oc(cmd);
  }
  ENDVERBATIM
}

Lytton WW, Neymotin SA, Wester JC, Contreras D (2011) Neocortical simulation for epilepsy surgery guidance: Localization and intervention Computational Surgery and Dual Training

References and models cited by this paper

References and models that cite this paper

Babloyantz A, Destexhe A (1986) Low-dimensional chaos in an instance of epilepsy. Proc Natl Acad Sci U S A 83:3513-7 [PubMed]

Benifla M, Otsubo H, Ochi A, Snead OC, Rutka JT (2006) Multiple subpial transections in pediatric epilepsy: indications and outcomes. Childs Nerv Syst 22:992-8 [PubMed]

Brown SP, Hestrin S (2009) Intracortical circuits of pyramidal neurons reflect their long-range axonal targets. Nature 457:1133-6 [PubMed]

Buonomano DV (2009) Harnessing chaos in recurrent neural networks. Neuron 63:423-5 [PubMed]

Carnevale NT, Hines ML (2006) The NEURON Book

Clusmann H, Kral T, Gleissner U, Sassen R, Urbach H, Blumcke I, Bogucki J, Schramm J (2004) Analysis of different types of resection for pediatric patients with temporal lobe epilepsy. Neurosurgery 54:847-59; discussion 859-60 [PubMed]

Cohen-Gadol AA, Stoffman MR, Spencer DD (2003) Emerging surgical and radiotherapeutic techniques for treating epilepsy. Curr Opin Neurol 16:213-9 [PubMed]

Crampin EJ, Halstead M, Hunter P, Nielsen P, Noble D, Smith N, Tawhai M (2004) Computational physiology and the Physiome Project. Exp Physiol 89:1-26 [PubMed]

Duarte NC, Becker SA, Jamshidi N, Thiele I, Mo ML, Vo TD, Srivas R, Palsson BØ (2007) Global reconstruction of the human metabolic network based on genomic and bibliomic data. Proc Natl Acad Sci U S A 104:1777-82 [PubMed]

Dubitzky W (2006) Understanding the computational methodologies of systems biology. Brief Bioinform 7:315-7 [PubMed]

Groh A, Meyer HS, Schmidt EF, Heintz N, Sakmann B, Krieger P (2010) Cell-type specific properties of pyramidal neurons in neocortex underlying a layout that is modifiable depending on the cortical area. Cereb Cortex 20:826-36 [PubMed]

   [48 reconstructed morphologies on NeuroMorpho.Org]

Hines ML, Carnevale NT (2001) NEURON: a tool for neuroscientists. Neuroscientist 7:123-35 [Journal] [PubMed]

   Spatial gridding and temporal accuracy in NEURON (Hines and Carnevale 2001) [Model]

Jahr CE, Stevens CF (1990) A quantitative description of NMDA receptor-channel kinetic behavior. J Neurosci 10:1830-7 [PubMed]

Jahr CE, Stevens CF (1990) Voltage dependence of NMDA-activated macroscopic conductances predicted by single-channel kinetics. J Neurosci 10:3178-82 [PubMed]

Kossoff EH, Ritzl EK, Politsky JM, Murro AM, Smith JR, Duckrow RB, Spencer DD, Bergey GK (2004) Effect of an external responsive neurostimulator on seizures and electrographic discharges during subdural electrode monitoring. Epilepsia 45:1560-7 [PubMed]

Lesser RP, Crone NE, Webber WR (2010) Subdural electrodes. Clin Neurophysiol 121:1376-92

Lesser RP, Crone NE, Webber WR (2011) Using subdural electrodes to assess the safety of resections. Epilepsy Behav 20:223-9 [PubMed]

Lesser RP, Kim SH, Beyderman L, Miglioretti DL, Webber WR, Bare M, Cysyk B, Krauss G, Gordon (1999) Brief bursts of pulse stimulation terminate afterdischarges caused by cortical stimulation. Neurology 53:2073-81 [PubMed]

Lytton W, Hellman K, Sutula T (1996) Computer network model of mossy fiber sprouting in dentate gyrus Epilepsia-aes Proceedings 37 S 5:117

Lytton WW, Hellman KM, Sutula TP (1998) Computer models of hippocampal circuit changes of the kindling model of epilepsy. Artif Intell Med 13:81-97 [PubMed]

Lytton WW, Neymotin SA, Hines ML (2008) The virtual slice setup. J Neurosci Methods 171:309-15 [Journal] [PubMed]

   The virtual slice setup (Lytton et al. 2008) [Model]

Lytton WW, Omurtag A (2007) Tonic-clonic transitions in computer simulation. J Clin Neurophysiol 24:175-81 [PubMed]

   Tonic-clonic transitions in a seizure simulation (Lytton and Omurtag 2007) [Model]

Lytton WW, Stewart M (2005) A rule-based firing model for neural networks Int J Bioelectromagn 7:47-50

Lytton WW, Stewart M (2006) Rule-based firing for network simulations. Neurocomputing 69:1160-1164

Milton JG (2010) Epilepsy as a dynamic disease: a tutorial of the past with an eye to the future. Epilepsy Behav 18:33-44 [PubMed]

Morrell F, Whisler WW, Bleck TP (1989) Multiple subpial transection: a new approach to the surgical treatment of focal epilepsy. J Neurosurg 70:231-9 [PubMed]

Motamedi GK, Salazar P, Smith EL, Lesser RP, Webber WR, Ortinski PI, Vicini S, Rogawski MA (2006) Termination of epileptiform activity by cooling in rat hippocampal slice epilepsy models. Epilepsy Res 70:200-10 [PubMed]

Neymotin SA, Lee H, Park E, Fenton AA, Lytton WW (2011) Emergence of physiological oscillation frequencies in a computer model of neocortex. Front Comput Neurosci 5:19-75 [Journal] [PubMed]

   Emergence of physiological oscillation frequencies in neocortex simulations (Neymotin et al. 2011) [Model]

Osorio I, Frei MG, Manly BF, Sunderam S, Bhavaraju NC, Wilkinson SB (2001) An introduction to contingent (closed-loop) brain electrical stimulation for seizure blockage, to ultra-short-term clinical trials, and to multidimensional statistical analysis of therapeutic efficacy. J Clin Neurophysiol 18:533-44 [PubMed]

Polsky A, Mel BW, Schiller J (2004) Computational subunits in thin dendrites of pyramidal cells. Nat Neurosci 7:621-7 [Journal] [PubMed]

   CA1 pyramidal neuron: as a 2-layer NN and subthreshold synaptic summation (Poirazi et al 2003) [Model]

Richardson KA, Schiff SJ, Gluckman BJ (2005) Control of traveling waves in the Mammalian cortex. Phys Rev Lett 94:028103-92

Rutecki P (1990) Anatomical, physiological, and theoretical basis for the antiepileptic effect of vagus nerve stimulation. Epilepsia 31 Suppl 2:S1-6

Schramm J, Aliashkevich AF, Grunwald T (2002) Multiple subpial transections: outcome and complications in 20 patients who did not undergo resection. J Neurosurg 97:39-47 [PubMed]

Schulz R, Hoppe M, Boesebeck F, Gyimesi C, Pannek HW, Woermann FG, May T, Ebner A (2011) Analysis of reoperation in mesial temporal lobe epilepsy with hippocampal sclerosis. Neurosurgery 68:89-97; discussion 97 [PubMed]

Spencer SS, Schramm J, Wyler A, O'Connor M, Orbach D, Krauss G, Sperling M, Devinsky O, Elger (2002) Multiple subpial transection for intractable partial epilepsy: an international meta-analysis. Epilepsia 43:141-5 [PubMed]

Steriade M (2004) Neocortical cell classes are flexible entities. Nat Rev Neurosci 5:121-34 [PubMed]

Tonnesen J, Sorensen AT, Deisseroth K, Lundberg C, Kokaia M (2009) Optogenetic control of epileptiform activity. Proc Natl Acad Sci U S A 106:12162-7

Ty L, Yorke J (1975) Period three implies chaos Amer Math Monthly 82:985-992

Wyler AR (1997) Recent advances in epilepsy surgery: temporal lobectomy and multiple subpial transections. Neurosurgery 41:1294-301; discussion 1301-2 [PubMed]

Wyler AR, Hermann BP, Somes G (1995) Extent of medial temporal resection on outcome from anterior temporal lobectomy: a randomized prospective study. Neurosurgery 37:982-90; discussion 990-1 [PubMed]

Yogarajah M, Focke NK, Bonelli SB, Thompson P, Vollmar C, McEvoy AW, Alexander DC, Symms MR, (2010) The structural plasticity of white matter networks following anterior temporal lobe resection. Brain 133:2348-64 [PubMed]

(41 refs)