Ih tunes oscillations in an In Silico CA3 model (Neymotin et al. 2013)

 Download zip file   Auto-launch 
Help downloading and running models
Accession:151282
" ... We investigated oscillatory control using a multiscale computer model of hippocampal CA3, where each cell class (pyramidal, basket, and oriens-lacunosum moleculare cells), contained type-appropriate isoforms of Ih. Our model demonstrated that modulation of pyramidal and basket Ih allows tuning theta and gamma oscillation frequency and amplitude. Pyramidal Ih also controlled cross-frequency coupling (CFC) and allowed shifting gamma generation towards particular phases of the theta cycle, effected via Ih’s ability to set pyramidal excitability. ..."
Reference:
1 . Neymotin SA, Hilscher MM, Moulin TC, Skolnick Y, Lazarewicz MT, Lytton WW (2013) Ih Tunes Theta/Gamma Oscillations and Cross-Frequency Coupling In an In Silico CA3 Model PLoS ONE 8(10):e76285 [PubMed]
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism: Hippocampus;
Cell Type(s): Hippocampus CA3 pyramidal cell; Hippocampus CA3 basket cell; Hippocampus CA3 stratum oriens lacunosum-moleculare interneuron;
Channel(s): I Na,t; I A; I K; I K,leak; I h; I K,Ca; I Sodium; I Potassium;
Gap Junctions:
Receptor(s): GabaA; AMPA; NMDA; Glutamate;
Gene(s): HCN1; HCN2;
Transmitter(s): Gaba; Glutamate;
Simulation Environment: NEURON; Python;
Model Concept(s): Oscillations; Brain Rhythms; Conductance distributions; Multiscale;
Implementer(s): Lazarewicz, Maciej [mlazarew at gmu.edu]; Neymotin, Sam [samn at neurosim.downstate.edu];
Search NeuronDB for information about:  Hippocampus CA3 pyramidal cell; Hippocampus CA3 basket cell; GabaA; AMPA; NMDA; Glutamate; I Na,t; I A; I K; I K,leak; I h; I K,Ca; I Sodium; I Potassium; Gaba; Glutamate;
/
ca3ihdemo
readme.txt
CA3ih.mod
CA3ika.mod
CA3ikdr.mod
CA3ina.mod
caolmw.mod *
HCN1.mod
icaolmw.mod *
iholmw.mod
ihstatic.mod
kcaolmw.mod *
kdrbwb.mod *
misc.mod *
MyExp2SynBB.mod *
MyExp2SynNMDABB.mod *
nafbwb.mod *
stats.mod *
vecst.mod *
aux_fun.inc *
declist.hoc *
decmat.hoc *
decnqs.hoc *
decvec.hoc *
default.hoc *
drline.hoc *
geom.py
grvec.hoc *
init.hoc
labels.hoc *
local.hoc *
misc.h *
network.py
nqs.hoc *
nrnoc.hoc *
params.py
pyinit.py *
pywrap.hoc
run.py
sim.py
simctrl.hoc *
stats.hoc *
syncode.hoc *
xgetargs.hoc *
                            
// $Id: decnqs.hoc,v 1.38 2011/03/01 19:06:15 billl Exp $

print "Loading decnqs.hoc..."

{load_file("nqs.hoc")}
objref nq[10],pq[10]

//** prl2nqs(NQS[,min,max,nointerp]) -- transfer printlist to NQS
proc rename () {}
// eg proc rename () { sprint($s1,"P%d",objnum($s1)) }
obfunc prl2nqs () { local tstep localobj st,oq
  st=new String2()
  oq=new NQS()
  if (numarg()>=1) min=$1 else min=0
  if (numarg()>=2) max=$2 else max=printlist.count-1
  if (numarg()>=3) interp=$3 else interp=0 // no interp when looking at spk times
  if (interp) oq.resize(max-min+2)
  if (interp) {
    tstep=0.1 // 0.1 ms step size for interpolation
    oq.s[0].s="time"
    oq.v[0].indgen(0,printlist.object(0).tvec.max,tstep)
    for ii=min,max {
      XO=printlist.object(ii)
      oq.s[ii+1-min].s = XO.var
      rename(oq.s[ii+1-min].s)
      oq.v[ii+1-min].resize(oq.v.size)
      oq.v[ii+1-min].interpolate(oq.v[0],XO.tvec,XO.vec)
    }
  } else {
    for ii=min,max {
      XO=printlist.object(ii)
      st.s=XO.name
      sprint(st.t,"%s-time",XO.name)
      rename(st.s) rename(st.t)
      oq.resize(st.s,st.t)
      oq.setcols(XO.vec,XO.tvec)
    }
  }
  return oq
}

//** pvp2nqs(NQS) -- transfer grvec data file to NQS
obfunc pvp2nqs () { local min,max,interp,gvnum,ii,jj,n localobj oq,po,st,xo
  interp=min=max=gvnum=0
  if (argtype(1)==2) { po=gvnew($s1) gvnum=panobjl.count()-1 }
  if (argtype(1)==0) gvnum=$1
  if (numarg()>=2) min=$2
  if (numarg()>=3) max=$3
  if (numarg()>=4) interp=$4 // no interp when looking at spk times
  if (po==nil) po=panobjl.o(gvnum)
  oq=new NQS() st=new String2()
  if (gvnum>0) {
    if (max==0) max=po.llist.count()-1
    for ii=min,max {
      xo=po.llist.object(ii)
      po.tmpfile.seek(xo.loc)
      if (xo.num==-2) {
        sprint(st.s,"%s-time",xo.name)
        jj=oq.resize(st.s)-1
        oq.v[jj].vread(po.tmpfile)
      }
      jj=oq.resize(xo.name)-1
      oq.v[jj].vread(po.tmpfile)
    }
  } else { // from printlist
    if (max==0) max=printlist.count()-1
    for ii=min,max {
      xo=printlist.o(ii)
      jj=oq.resize(xo.name)-1
      oq.v[jj].copy(xo.vec)
      if (xo.pstep==0) {
        sprint(st.s,"%s-time",xo.name)
        jj=oq.resize(st.s)-1
        oq.v[jj].copy(xo.tvec)
      }
    }
  }
  return oq
}

//** veclist2nqs(nqs[,STR1,STR2,...])
proc veclist2nqs () { local flag,i
  if (numarg()==0) {printf("veclist2nqs(nqs[,STR1,STR2,...])\n") return}
  $o1.resize(veclist.count)
  if (numarg()==1+$o1.m) flag=1 else flag=0
  for ltr(XO,veclist) {
    $o1.v[i1].copy(XO)
    if (flag) {i=i1+2 $o1.s[i1].s=$si} else {sprint(tstr,"v%d",i1) $o1.s[i1].s=tstr}
  }
  $o1.cpout()
}

// fudup(vec[,nq,#CUTS,LOGCUT,MIN]) -- use updown() to find spikes
// LOC(0) PEAK(1) WIDTH(2) BASE(3) HEIGHT(4) START(5) SLICES(6) SHARP(7) INDEX(8) FILE(9) NESTED(10)
// other options
pos_fudup=1 // set to 1 to move whole curve up above 0
maxp_fudup=0.95 // draw top sample at 95% of max 
minp_fudup=0.05 // draw bottom sample at 5% of max
over_fudup=1    // turn over and try again if nothing found
allover_fudup=0 // turn over and add these locs (not debugged)
verbose_fudup=0 // give messages, can also turn on DEBUG_VECST for messages from updown()
obfunc fudup () { local a,i,ii,npts,logflag,min,x,sz localobj bq,cq,v1,v2,v3,bb,tl,v5,eq
  if (verbose_fudup) printf("MAXTIME appears to be %g (dt=%g)\n",$o1.size*dt,dt)
  logflag=0  npts=10 // n sample locations by default
  bq=new NQS("LOC","PEAK","WIDTH","BASE","HEIGHT","START","SLICES","SHARP","INDEX","FILE","NESTED") 
  i=2
  if (argtype(i)==1) {i+=1 if ($o2==nil) {cq=new NQS() $o2=cq} else cq=$o2} else cq=new NQS()
  if (cq.m!=11) { cq.resize(0) 
  cq.resize("LOC","PEAK","WIDTH","BASE","HEIGHT","START","SLICES","SHARP","INDEX","FILE","NESTED")}
  if (argtype(i)==0){ npts=$i i+=1
    if (argtype(i)==0){ logflag=$i i+=1
      if (argtype(i)==1) { v5=$oi i+=1
        if (npts!=v5.size) printf("Correcting npts from %d to %d\n",npts,npts=v5.size)
        if (v5.ismono(1)) v5.reverse
        if (! v5.ismono(-1)) {printf("fudup: final arg (%s) must be monotonic\n",v5) return}
      }
    }
  }
  bq.listvecs(bb)
  bq.pad(5000)
  eq=new NQS(-2,npts) a=allocvecs(v1,v2,v3)
  tl=eq.vl
  eq.clear(2e4) vrsz(2e4,v1,v2,v3)
  v1.copy($o1)
  if (pos_fudup) {
    min=v1.min
    v1.sub(min) // make it uniformly positive
  } else min=0
  if (numarg()>4) v2.copy(v5) else {
    v2.indgen(2,2+npts-1,1)   // sampling at npts points, start at 2 to avoid log(1)=0
    if (logflag) v2.log() // log sampling
    v2.scale(-maxp_fudup*v1.max,-minp_fudup*v1.max) v2.mul(-1)
  }
  v1.updown(v2,tl,bb)
  if (pos_fudup) { bq.v[1].add(min) bq.v[3].add(min) }
  cq.append(bq)
  sz=bq.size(1)
  if (allover_fudup) { // do it upside down as well
    v1.mul(-1) // v2 will be upside-down
    if (pos_fudup) {min=v1.min v1.sub(min)}
    if (0) {  // can't see a rationale to recalc sampling points
      v2.indgen(2,2+npts-1,1)   // sampling at npts points
      if (logflag) v2.log() // log sampling
      v2.scale(-0.95*v1.max,-0.05*v1.max) v2.mul(-1)
    }
    v1.updown(v2,tl,bb)
    bq.v[8].add(sz) bq.v[4].mul(-1) // turn HEIGHT upside down
    cq.append(bq)
  } else if (over_fudup && sz==0) { // turn it over an try again
    print "fudup() checking upside-down"
    v1.mul(-1) // v2 will be upside-down
    v1.updown(v2,tl,bb)
  } 
  for case(&x,0,2,5) cq.v[x].mul(dt)
  nqsdel(bq,eq)
  dealloc(a)
  return cq
}

//** listsort(LIST[,START,REV]) sorts list of strings numerically
// optional start gives a regexp to start at
proc listsort () { local x,rev localobj nq,st,xo
  if (numarg()==0) { 
    print "listsort(LIST[,RXP,REV]) numerically, optional RXP starts after there" return}
  if (numarg()==3) if ($3) rev=-1 else rev=0
  nq=new NQS("STR","NUM") nq.strdec("STR")
  st=new String()
  for ltr(xo,$o1) {
    if (numarg()>=2) sfunc.tail(xo.s,$s2,st.s) else st.s=xo.s
    if (sscanf(st.s,"%g",&x)!=1) print "listsort ERR: num not found in ",st.s
    nq.append(xo.s,x)
  } 
  nq.sort("NUM",rev)
  $o1.remove_all
  for nq.qt(st.s,"STR") $o1.append(new String(st.s))
}

// stat(VEC) print stats for the vector
// stat(VEC1,VEC2) append stats of VEC1 on VEC2
// stat(VEC1,NQS) append stats of VEC1 on NQS (create if necessary)
proc stat () { local sz
  sz=$o1.size
  if (sz<=1) {printf("decnqs::stat() WARN: %s size %d\n",$o1,$o1.size) return}
  if (numarg()==1 && sz>1) {
    printf("Sz:%d\tmax=%g; min=%g; mean=%g; stdev=%g\n",$o1.size,$o1.max,$o1.min,$o1.mean,$o1.stdev)
  } else {
    if (!isassigned($o2)) { $o2=new NQS("SIZE","MAX","MIN","MEAN","STDEV")
    } else if (isobj($o2,"NQS")) { 
      if ($o2.m!=5) {$o2.resize(0) $o2.resize("SIZE","MAX","MIN","MEAN","STDEV")}
    } else if (isobj($o2,"Vector")) revec($o2)
    if (sz>2) {$o2.append($o1.size,$o1.max,$o1.min,$o1.mean,$o1.stdev) // .append for Vector or NQS
    } else   $o2.append($o1.size,$o1.max,$o1.min,$o1.min,0) // no sdev
  }
}

//* fil2nqs(FILE,NQS) reads lines of file and places all numbers in NQS
func fil2nqs () { local a,n localobj v1
  $o2.clear
  a=allocvecs(v1)
  tmpfile.ropen($s1)
  for (n=1;tmpfile.gets(tstr)!=-1;n+=1) {
    if (n%1e3==0) printf("%d ",n)
    parsenums(tstr,v1)
    if (v1.size!=$o2.m) {
      printf("Wrong size at line %d (%d)  ",n,v1.size)  vlk(v1)
      return
    }
    $o2.append(v1)
  }
  dealloc(a)
  return $o2.size(1)
}

//** plnqs(file,NQS) reads output of txt2num.pl
// format ascii 'rows cols' then binary contents
proc plnqs () { local a,rows,cols localobj v1,v2
  a=allocvecs(v1,v2)
  tmpfile.ropen($s1)
  tmpfile.gets(tstr)
  sscanf(tstr,"%d %d",&rows,&cols)
  printf("%s: %d rows x %d cols\n",$s1,rows,cols)
  v1.fread(tmpfile,rows*cols) // could now use .transpose
  v2.indgen(0,rows*cols,cols)
  $o2.resize(cols,rows)
  for ii=0,cols-1 {
    v2.add(ii)
    $o2.v[ii].index(v1,v2)
  }
  dealloc(a)
}
    
// DEST=maxem(SRC,MIN,WIDTH) -- keep looking for maxima till get down to min
obfunc maxem () { local a,min,wid,ii,ix,beg,end localobj v1,aq
  a=allocvecs(v1)
  aq=new NQS("max","loc") aq.clear(v1.size/2)
  v1.copy($o1)
  min=$2 wid=$3
  while(v1.max>min) {
   aq.append(v1.max,ix=v1.max_ind)
   beg=ix-wid if (beg<0) beg=0
   end=ix+wid if (end>=v1.size) end=v1.size-1
   for ii=beg,end v1.x[ii]=-1e9
  }
  dealloc(a)
  return aq
}

// nqo=percl(nq,"COLA", ..) generates NQS of percentile values (10..90) for these cols
// nqo=percl(nq,min,max,step,"COLA", ..) -- eg percl(nq,50,70,5,"COLA","COLB")
obfunc percl () {  local i,ii,a,p localobj v1,v2,v3,aq,xo
  a=allocvecs(v1,v2,v3)
  aq=new NQS(numarg())
  if (argtype(2)==0) {
    v3.indgen($2,$3,$4) 
    aq.resize(aq.size(1)-3)
    i=5 j=4 // start at arg i and aq col #j
  } else {
    v3.indgen(10,90,10)
    i=2 j=1
  }
  aq.setcol(0,"PERCL",v3)
  for (;i<=numarg();i+=1) {
    $o1.getcol($si,v1)
    v1.sort()
    v2.resize(0)
    for vtr(&ii,v3) {ii/=100 v2.append(v1.x[round(ii*v1.size)])}
    aq.setcol(i-j,$si,v2)
  }
  dealloc(a)
  return aq
}

// pqunq(NQS) returns columns of sorted nique values corresponding to the arg
// NB: does not produce a rectangular array
obfunc pqunq () { local a localobj v1,v2,aq
  aq=new NQS()
  a=allocvecs(v1,v2,1e5)
  aq.sethdrs($o1)
  aq.resize(-2) 
  for ii=0,aq.m-1 {
    $o1.getcol(ii,v1)
    v1.sort 
    v2.redundout(v1)
    aq.v[ii].copy(v2)
  }
  dealloc(a)
  return aq
}

//** aa=seqind(ind) -- find beginning and end of sequential indices with 
obfunc seqind () { local a,n,skip,ii,x,last localobj vi,oq
  vi=$o1
  if (numarg()>=2) skip=$2+1 else skip=1
  if (numarg()>=3) oq=$o3
  if (!isassigned(oq)) {oq=new NQS() if (numarg()>=3) $o3=oq}
  if (oq.m!=3) { oq.resize(0) oq.resize("beg","end","diff") }
  oq.clear()
  n=last=0
  for ii=1,vi.size(1)-1 {
    if (vi.x[ii]-vi.x[ii-1]>skip) {
      if (n>0) oq.append(vi.x[last],vi.x[ii-1],0)
      last=ii
      n=0
    } else n+=1
  }
  if (n>0) oq.append(vi.x[last],vi.x[ii-1],0)
  oq.pad()
  oq.calc("<diff>.copy(<end>.c.sub(<beg>))")
  return oq
}

//** list_transpose
proc list_transpose () { localobj aq,mat,xo,inlist,outlist
  aq=new NQS() inlist=$o1 outlist=$o2
  if (!isojt(outlist,inlist)) {outlist=new List() $o2=outlist}
  for ltr(xo,inlist) aq.resize("",xo)
  mat=aq.tomat(1) // transpose
  aq.frmat(mat)
  outlist.remove_all
  aq.listvecs(outlist)
  delnqs(aq)
}

//* Sam's additions -- moved from nqs_utils.hoc
//get row of Vectors
//$o1 = nqs
//$2 = row number
//$s3 - $snumarg() - name of cols to get values for
//returns list with associated Vectors
obfunc getobjrow(){ local i,rowid localobj nq,vt,ls
  nq=$o1 rowid=$2
  ls=new List()
  vt=new Vector()
  for(i=3;i<=numarg();i+=1){
    nq.get($si,rowid,vt)
    ls.append(vt)
  }
  return ls
}

//get column of objects as Vector using oform
//$o1 = nqs
//$s2 = col name
//$3=iff==1 return list of Vectors in column, else return vector of oform of each row in column
obfunc getobjcol(){ local idx,getl localobj nq,vt,vt2,ls
  nq=$o1
  if(numarg()>2) getl=$3 else getl=0
  if(getl){
    ls=new List()
    vt=new Vector()
    for idx=0,nq.size-1{
      nq.get($s2,idx,vt)
      ls.append(vt)
    }
    return ls
  } else {
    vt=new Vector(nq.size)
    vt.resize(0)
    vt2=new Vector()
    for idx=0,nq.size-1{
      nq.get($s2,idx,vt2)
      vt.append(oform(vt2))
    }
    return vt
  }
}

//get correlation between 2 columns of an NQS
//$o1=nqs
//$s2=column name
//$s3=column name
//$4=pearson correlation iff == 1 (default), otherwise spearman
func nqcor(){ local pc localobj nq1,v1,v2
  if(numarg()>3) pc=$4 else pc=1
  nq1=$o1
  v1=nq1.getcol($s2)  v2=nq1.getcol($s3)
  if (pc) return v1.pcorrel(v2) else return v1.scorrel(v2)
}

//func nqgrslice(){ local startidx,endidx localobj nq,vtmp
//  nq=$o1 startidx=$2 endidx=$3
//  vtmp=new Vector($3-$2+1)
//  gg(
//}

func MIN(){ if($1<$2)return $1 else return $2 }

//get correlation matrix/nqs of all columns to all columns
//$o1 = NQS
//$2 = num columns 0 - NQS.m
//$3 = start row/index
//$4 = end row/index
//$5 = index increment
//$6 = window size , iff <= 0, do full columns against each other
obfunc nqcolcor(){ local startidx,endidx,inct,wint,c1,c2,ncol localobj vhr,vhl,nqc,nqf
 if(numarg()<1){
   printf("nqcolcor usage: \n\t$o1 = NQS\
                           \n\t$2 = num columns 0 - NQS.m\
                           \n\t$3 = start row/index\
                           \n\t$4 = end row/index\
                           \n\t$5 = index increment\
                           \n\t$6 = window size , iff <= 0, do full columns against each other\n")
   return nil
 }
 nqf=$o1
 if(numarg()>1) ncol=$2 else ncol=nqf.m
 if(numarg()>2) startidx=$3 else startidx=0
 if(numarg()>3) endidx=$4 else endidx=nqf.size
 if(numarg()>4) inct=$5 else inct=50*2//50ms
 if(numarg()>5) wint=$6 else wint=100*2//50ms

 vhr=new Vector(wint) vhl=new Vector(wint)

 if(wint<=0){ //full column cross-correlation
   nqc=new NQS("ID0","ID1","cor") 
   for c1=0,ncol-1{
     for c2=c1+1,ncol-1{
       nqc.append(c1,c2,nqf.v[c1].pcorrel(nqf.v[c2]))
     }
   }
 } else { //cross correlation using slices of column
   nqc=new NQS("ID0","ID1","start","end","cor") 
   for c1=0,ncol-1{
     for c2=c1+1,ncol-1{
       for(startidx=0;startidx<endidx;startidx+=inct){
         vhl.copy(nqf.v[c1],startidx,MIN(startidx+wint,endidx-1))
         vhr.copy(nqf.v[c2],startidx,MIN(startidx+wint,endidx-1))
         nqc.append(c1,c2,startidx,startidx+wint,vhl.pcorrel(vhr))
       }
     }
   }
 }

 return nqc
}

 
//read wmf ascii file (just skips header and calls rdcol)
//$s1 = wmf file path
//$2 = # of columns
// obfunc rdwmf(){ local idx,jdx,hdrlines localobj nq,myf,myftmp,strf,str,strtmp,lcols
// myf=new File() myftmp=new File() strf=new StringFunctions() str=new String() lcols=new List()
// strtmp=new String() hdrlines=6
// myf.ropen($s1)
// if(!myf.is_open()){
//  printf("rdwmf ERRA: couldn't open wmf file %s for read\n",$s1)
//  return nil
// }
// for idx=0,hdrlines-1{
//  if(myf.gets(str.s)==-1){
//    printf("rdwmf ERRB: corrupt header\n")
//    return nil
//  } else if(idx==2){
//    jdx=strf.tail(str.s,"",strtmp.s)            
//  }
// }
// myf.close()
// return nq
// }

//draw regression line
//$o1 = nqs, $s2 = column 1, $s3 = column 2
// or
//$o1 = Vector 1 , $o2 = Vector 2
//returns vo
obfunc drawregline(){ local x0,y0,x1,y1,gvtmp,r localobj vo,nq,v1,v2,vx,vy,str
  vo=new Vector(5)
  if(numarg()==3){
    nq = $o1
    v1=new Vector()  v2=new Vector()
    nq.getcol($s2,v1)
    nq.getcol($s3,v2)
  } else {
    v1=$o1 v2=$o2
  }
  v1.vstats(v2,vo)
  x0 = v2.min
  y0 = x0*vo.x(0)+vo.x(1)
  x1 = v2.max
  y1 = x1*vo.x(0)+vo.x(1)
  vx=new Vector(2)
  vx.x(0)=x0
  vx.x(1)=x1
  vy=new Vector(2)
  vy.x(0)=y0
  vy.x(1)=y1
  gvtmp=gvmarkflag
  gvmarkflag=0
  gg(vy,vx)
  gvmarkflag=gvtmp
  str=new String()
  r=v1.pcorrel(v2)
  if(name_declared("rpval_stats")){
    sprint(str.s,"r = %.2f, p = %g, N = %d",r,rpval_stats(v1.size,r),v1.size)
    g.label(0,0,str.s)
  }
  return vo
}

// select from a vector handled as a matrix -- see matrix.mod
halfmat=0
obfunc mindsel () { local a,x,r,c localobj vm,vi,oq
  vm=$o1 
  a=allocvecs(vi)
  if (numarg()==4) vi.indvwhere(vm,$s2,$3,$4) else vi.indvwhere(vm,$s2,$3)
  oq=new NQS("row","col","val") 
  oq.clear(vi.size)
  for vtr(&x,vi) {
    r=int(x/COLS) c=x-r*COLS
    if (!halfmat || c>r) oq.append(r,c,vm.x[x])
  }
  dealloc(a)
  print oq.size(1)
  return oq
}

//* return row $2 of nqs $o1 
obfunc nqrow () { local row,col localobj vout,nq
  nq=$o1
  row=$2
  vout=new Vector(nq.m)
  for col=0,nq.m-1 vout.x(col)=nq.v[col].x(row)
  return vout
}

//* find row $o2 (vector) in $o1 (nqs) and return index
//  if not there return -1
func nqfindrow () { local idx,jdx,sz localobj nq,vf,vrow
  nq=$o1  vf=$o2
  sz=nq.size(-1)
  for idx=0,sz-1 {
    vrow = nqrow(nq,idx)
    if(vrow.eq(vf)) return idx
  }
  return -1
}

//* nquniq(NQS) -- return a new NQS with unique rows in $o1
obfunc nquniq () { local sz,idx,outrow,jdx localobj nqin,nqout,vrow
  nqin=$o1
  nqout=new NQS()
  for idx=0,nqin.m-1{
    nqout.resize(nqin.s[idx].s)
    nqout.v[nqout.m-1].resize(nqin.v[idx].size)
  }
  sz=nqin.size(-1)
  jdx=0
  outrow=0
  for idx=0,sz-1{
    vrow=nqrow(nqin,idx)
    if(nqfindrow(nqout,vrow)==-1){
      for jdx=0,nqin.m-1 nqout.v[jdx].x(outrow) = vrow.x(jdx)
      outrow += 1
    }
  }
  for idx=0,nqout.m-1 nqout.v[idx].resize(outrow)
  return nqout
}

Neymotin SA, Hilscher MM, Moulin TC, Skolnick Y, Lazarewicz MT, Lytton WW (2013) Ih Tunes Theta/Gamma Oscillations and Cross-Frequency Coupling In an In Silico CA3 Model PLoS ONE 8(10):e76285[PubMed]

References and models cited by this paper

References and models that cite this paper

Accili EA, Proenza C, Baruscotti M, DiFrancesco D (2002) From funny current to HCN channels: 20 years of excitation. News Physiol Sci 17:32-7 [PubMed]

Aponte Y, Lien CC, Reisinger E, Jonas P (2006) Hyperpolarization-activated cation channels in fast-spiking interneurons of rat hippocampus. J Physiol 574:229-43 [PubMed]

Arnsten AF, Paspalas CD, Gamo NJ, Yang Y, Wang M (2010) Dynamic Network Connectivity: A new form of neuroplasticity. Trends Cogn Sci 14:365-75 [PubMed]

Belluscio MA, Mizuseki K, Schmidt R, Kempter R, Buzsaki G (2012) Cross-frequency phase-phase coupling between theta¸ and gamma oscillations in the hippocampus. J Neurosci 32:423-35 [PubMed]

Bender RA, Brewster A, Santoro B, Ludwig A, Hofmann F, Biel M, Baram TZ (2001) Differential and age-dependent expression of hyperpolarization-activated, cyclic nucleotide-gated cation channel isoforms 1-4 suggests evolving roles in the developing rat hippocampus. Neuroscience 106:689-98 [PubMed]

Borgers C, Kopell N (2003) Synchronization in networks of excitatory and inhibitory neurons with sparse, random connectivity. Neural Comput 15:509-38 [PubMed]

Buzsaki G, Wang XJ (2012) Mechanisms of gamma oscillations. Annu Rev Neurosci 35:203-25 [PubMed]

Caixeta FV, Cornelio AM, Scheffer-Teixeira R, Ribeiro S, Tort AB (2013) Ketamine alters oscillatory coupling in the hippocampus. Sci Rep 3:2348-35 [PubMed]

Canolty RT, Edwards E, Dalal SS, Soltani M, Nagarajan SS, Kirsch HE, Berger MS, Barbaro NM, K (2006) High gamma power is phase-locked to theta oscillations in human neocortex. Science 313:1626-8 [PubMed]

Canolty RT, Knight RT (2010) The functional role of cross-frequency coupling. Trends Cogn Sci 14:506-15 [PubMed]

Carnevale NT, Hines ML (2006) The NEURON Book

Carr DB, Andrews GD, Glen WB, Lavin A (2007) alpha2-Noradrenergic receptors activation enhances excitability and synaptic integration in rat prefrontal cortex pyramidal neurons via inhibition of HCN currents. J Physiol 584:437-50 [PubMed]

Chen S, Wang J, Siegelbaum SA (2001) Properties of hyperpolarization-activated pacemaker current defined by coassembly of HCN1 and HCN2 subunits and basal modulation by cyclic nucleotide. J Gen Physiol 117:491-504 [PubMed]

de Almeida L, Idiart M, Lisman JE (2009) A second function of gamma frequency oscillations: an E%-max winner-take-all mechanism selects which cells fire. J Neurosci 29:7497-503 [PubMed]

Destexhe A, Rudolph M, Pare D (2003) The high-conductance state of neocortical neurons in vivo. Nat Rev Neurosci 4:739-51 [PubMed]

Dyhrfjeld-Johnsen J, Morgan RJ, Foldy C, Soltesz I (2008) Upregulated H-current in hyperexcitable CA1 dendrites after febrile seizures. Front Cell Neurosci 2:2 [Journal] [PubMed]

Dyhrfjeld-Johnsen J, Morgan RJ, Soltesz I (2009) Double Trouble? Potential for Hyperexcitability Following Both Channelopathic up- and Downregulation of I(h) in Epilepsy. Front Neurosci 3:25-33 [PubMed]

El Khoury N, Mathieu S, Marger L, Ross J, El Gebeily G, Ethier N, Fiset C (2013) Upregulation of the hyperpolarization-activated current increases pacemaker activity of the sinoatrial node and heart rate during pregnancy in mice. Circulation 127:2009-20 [PubMed]

Freund TF, Buzsaki G (1996) Interneurons of the hippocampus. Hippocampus 6:347-470 [PubMed]

Hagiwara N, Irisawa H (1989) Modulation by intracellular Ca2+ of the hyperpolarization-activated inward current in rabbit single sino-atrial node cells. J Physiol 409:121-41 [PubMed]

Heys JG, Hasselmo ME (2012) Neuromodulation of I(h) in layer II medial entorhinal cortex stellate cells: a voltage-clamp study. J Neurosci 32:9066-72 [PubMed]

Hilscher MM, Leão KE, Leão RN (2013) Synchronization through nonreciprocal connections in a hybrid hippocampus microcircuit. Front Neural Circuits 7:120-503 [PubMed]

Hines ML, Davison AP, Muller E (2009) NEURON and Python Frontiers in Neuroinformatics 3:1 [Journal] [PubMed]

   NEURON + Python (Hines et al. 2009) [Model]

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

Kramer MA, Tort AB, Kopell NJ (2008) Sharp edge artifacts and spurious coupling in EEG frequency comodulation measures. J Neurosci Methods 170:352-7 [PubMed]

Lakatos P, Karmos G, Mehta AD, Ulbert I, Schroeder CE (2008) Entrainment of neuronal oscillations as a mechanism of attentional selection. Science 320:110-3 [PubMed]

Lee H, Dvorak D, Kao HY, Duffy ÁM, Scharfman HE, Fenton AA (2012) Early cognitive experience prevents adult deficits in a neurodevelopmental schizophrenia model. Neuron 75:714-24 [PubMed]

Lisman JE, Idiart MA (1995) Storage of 7 +/- 2 short-term memories in oscillatory subcycles. Science 267:1512-5 [PubMed]

Lytton WW (2006) Neural Query System: Data-mining from within the NEURON simulator. Neuroinformatics 4:163-76 [Journal] [PubMed]

   Neural Query System NQS Data-Mining From Within the NEURON Simulator (Lytton 2006) [Model]

Lytton WW, Sejnowski TJ (1991) Simulations of cortical pyramidal neurons synchronized by inhibitory interneurons. J Neurophysiol 66:1059-79 [Journal] [PubMed]

Marcelin B, Chauviere L, Becker A, Migliore M, Esclapez M, Bernard C (2009) h channel-dependent deficit of theta oscillation resonance and phase shift in temporal lobe epilepsy. Neurobiol Dis 33(3):436-447 [Journal] [PubMed]

   CA1 pyramidal neuron: h channel-dependent deficit of theta oscill. resonance (Marcelin et al. 2008) [Model]

McCormick DA, Huguenard JR (1992) A model of the electrophysiological properties of thalamocortical relay neurons. J Neurophysiol 68:1384-400 [Journal] [PubMed]

Migliore M, Messineo L, Ferrante M (2004) Dendritic Ih selectively blocks temporal summation of unsynchronized distal inputs in CA1 pyramidal neurons. J Comput Neurosci 16:5-13 [Journal] [PubMed]

   CA1 pyramidal neuron: effects of Ih on distal inputs (Migliore et al 2004) [Model]

Migliore M, Migliore R (2012) Know your current I: interaction with a shunting current explains the puzzling effects of its pharmacological or pathological modulations PLoS One 7(5):e36867 [Journal] [PubMed]

   CA1 pyramidal neuron: Ih current (Migliore et al. 2012) [Model]

Newman E, Gillet S, Climer J, Hasselmo M (2012) Effects of cholinergic modulation on interactions of entorhinal cortex and hippocampus as measured by theta modulation of high and low gamma in the rat Society for Neuroscience Abstracts 42

Neymotin S, Uhlrich DJ, Manning KA, Lytton WW (2008) Data mining of time-domain features from neural extracellular field data Applic. of Comput. Intel. in Bioinf. and Biomed.: Current Trends and Open Problems 151:119-140 [Journal]

   NEURON interfaces to MySQL and the SPUD feature extraction algorithm (Neymotin et al. 2008) [Model]

Neymotin SA, Lazarewicz MT, Sherif M, Contreras D, Finkel LH, Lytton WW (2011) Ketamine disrupts theta modulation of gamma in a computer model of hippocampus Journal of Neuroscience 31(32):11733-11743 [Journal] [PubMed]

   Ketamine disrupts theta modulation of gamma in a computer model of hippocampus (Neymotin et al 2011) [Model]

O'Keefe J, Recce ML (1993) Phase relationship between hippocampal place units and the EEG theta rhythm. Hippocampus 3:317-30 [PubMed]

Oppenheim AV, Schafer RW, Buck JR (1999) Discrete-time signal processing

Poolos NP, Bullis JB, Roth MK (2006) Modulation of h-channels in hippocampal pyramidal neurons by p38 mitogen-activated protein kinase. J Neurosci 26:7995-8003 [PubMed]

Poolos NP, Migliore M, Johnston D (2002) Pharmacological upregulation of h-channels reduces the excitability of pyramidal neuron dendrites. Nat Neurosci 5:767-74 [PubMed]

   CA1 pyramidal neuron: effects of Lamotrigine on dendritic excitability (Poolos et al 2002) [Model]

Robinson RB, Siegelbaum SA (2003) Hyperpolarization-activated cation currents: from molecules to physiological function. Annu Rev Physiol 65:453-80 [PubMed]

Santoro B, Baram TZ (2003) The multiple personalities of h-channels. Trends Neurosci 26:550-4 [PubMed]

Schroeder CE, Lakatos P (2009) The gamma oscillation: master or slave? Brain Topogr 22:24-6 [PubMed]

Stacey WC, Lazarewicz MT, Litt B (2009) Synaptic noise and physiological coupling generate high-frequency oscillations in a hippocampal computational model. J Neurophysiol 102:2342-57 [Journal] [PubMed]

   High frequency oscillations in a hippocampal computational model (Stacey et al. 2009) [Model]

Tort AB, Komorowski RW, Manns JR, Kopell NJ, Eichenbaum H (2009) Theta-gamma coupling increases during the learning of item-context associations. Proc Natl Acad Sci U S A 106:20942-7 [PubMed]

Tort AB, Kramer MA, Thorn C, Gibson DJ, Kubota Y, Graybiel AM, Kopell NJ (2008) Dynamic cross-frequency couplings of local field potential oscillations in rat striatum and hippocampus during performance of a T-maze task. Proc Natl Acad Sci U S A 105:20517-22 [PubMed]

Tort AB, Rotstein HG, Dugladze T, Gloveli T, Kopell NJ (2007) On the formation of gamma-coherent cell assemblies by oriens lacunosum-moleculare interneurons in the hippocampus. Proc Natl Acad Sci U S A 104:13490-5 [Journal] [PubMed]

   Gamma and theta rythms in biophysical models of hippocampus circuits (Kopell et al. 2011) [Model]

Tsuno Y, Schultheiss NW, Hasselmo ME (2013) In vivo cholinergic modulation of the cellular properties of medial entorhinal cortex neurons. J Physiol 591:2611-27 [PubMed]

Wahl-Schott C, Biel M (2009) HCN channels: structure, cellular regulation and physiological function. Cell Mol Life Sci 66:470-94 [PubMed]

Wang J, Chen S, Nolan MF, Siegelbaum SA (2002) Activity-Dependent Regulation of HCN Pacemaker Channels by Cyclic AMP: Signaling through Dynamic Allosteric Coupling Neuron 36:451-61 [Journal] [PubMed]

   Activity dependent regulation of pacemaker channels by cAMP (Wang et al 2002) [Model]

Wang M, Ramos BP, Paspalas CD, Shu Y, Simen A, Duque A, Vijayraghavan S, Brennan A, Dudley A, (2007) Alpha2A-adrenoceptors strengthen working memory networks by inhibiting cAMP-HCN channel signaling in prefrontal cortex. Cell 129:397-410 [PubMed]

Wang XJ (2002) Pacemaker neurons for the theta rhythm and their synchronization in the septohippocampal reciprocal loop. J Neurophysiol 87:889-900 [PubMed]

Wang XJ, Buzsaki G (1996) Gamma oscillation by synaptic inhibition in a hippocampal interneuronal network model. J Neurosci 16:6402-13 [Journal] [PubMed]

   Gamma oscillations in hippocampal interneuron networks (Wang, Buzsaki 1996) [Model]

White JA, Banks MI, Pearce RA, Kopell NJ (2000) Networks of interneurons with fast and slow gamma-aminobutyric acid type A (GABAA) kinetics provide substrate for mixed gamma-theta rhythm. Proc Natl Acad Sci U S A 97:8128-33 [PubMed]

Winograd M, Destexhe A, Sanchez-Vives MV (2008) Hyperpolarization-activated graded persistent activity in the prefrontal cortex. Proc Natl Acad Sci U S A 105:7298-303 [Journal] [PubMed]

   Hodgkin-Huxley model of persistent activity in prefrontal cortex neurons (Winograd et al. 2008) [Model]
   Hodgkin-Huxley model of persistent activity in PFC neurons (Winograd et al. 2008) (NEURON python) [Model]

Zemankovics R, Kali S, Paulsen O, Freund TF, Hajos N (2010) Differences in subthreshold resonance of hippocampal pyramidal cells and interneurons: the role of h-current and passive membrane characteristics. J Physiol 588:2109-32 [PubMed]

Zong X, Krause S, Chen CC, Kruger J, Gruner C, Cao-Ehlker X, Fenske S, Wahl-Schott C, Biel M (2012) Regulation of hyperpolarization-activated cyclic nucleotide-gated (HCN) channel activity by cCMP. J Biol Chem 287:26506-12

Aumentado-Armstrong T, Metzen MG, Sproule MKJ, Chacron MJ (2015) Electrosensory midbrain neurons display feature invariant responses to natural communication stimuli PLoS Computational Biology 11(10):e1004430 [Journal] [PubMed]

   Midbrain torus semicircularis neuron model (Aumentado-Armstrong et al. 2015) [Model]

Avella Gonzalez OJ, Mansvelder HD, van Pelt J, van Ooyen A (2015) H-Channels Affect Frequency, Power and Amplitude Fluctuations of Neuronal Network Oscillations. Front Comput Neurosci 9:141 [Journal] [PubMed]

   H-currents effect on the fluctuation of gamma/beta oscillations (Avella-Gonzalez et al., 2015) [Model]

Chehelcheraghi M, van Leeuwen C, Steur E, Nakatani C (2017) A neural mass model of cross frequency coupling. PLoS One 12:e0173776 [Journal] [PubMed]

   A neural mass model of cross frequency coupling (Chehelcheraghi et al 2017) [Model]

Hummos A, Nair SS (2017) An integrative model of the intrinsic hippocampal theta rhythm. PLoS One 12:e0182648 [Journal] [PubMed]

   Role for short term plasticity and OLM cells in containing spread of excitation (Hummos et al 2014) [Model]

Neymotin SA, Dura-Bernal S, Lakatos P, Sanger TD, Lytton WW (2016) Multitarget Multiscale Simulation for Pharmacological Treatment of Dystonia in Motor Cortex. Front Pharmacol 7:157 [Journal] [PubMed]

   Multitarget pharmacology for Dystonia in M1 (Neymotin et al 2016) [Model]

Neymotin SA, McDougal RA, Bulanova AS, Zeki M, Lakatos P, Terman D, Hines ML, Lytton WW (2016) Calcium regulation of HCN channels supports persistent activity in a multiscale model of neocortex Neuroscience 316:344-366 [Journal] [PubMed]

   Ca+/HCN channel-dependent persistent activity in multiscale model of neocortex (Neymotin et al 2016) [Model]

Neymotin SA, McDougal RA, Sherif MA, Fall CP, Hines ML, Lytton WW (2015) Neuronal calcium wave propagation varies with changes in endoplasmic reticulum parameters: a computer model Neural Computation 27(4):898-924 [Journal] [PubMed]

   Neuronal dendrite calcium wave model (Neymotin et al, 2015) [Model]

Neymotin SA, Suter BA, Dura-Bernal S, Shepherd GM, Migliore M, Lytton WW (2017) Optimizing computer models of corticospinal neurons to replicate in vitro dynamics. J Neurophysiol 117(1):148-162 [Journal] [PubMed]

   Computer models of corticospinal neurons replicate in vitro dynamics (Neymotin et al. 2017) [Model]

(66 refs)