Skip to content

Instantly share code, notes, and snippets.

View shug3502's full-sized avatar

Jonathan Harrison shug3502

View GitHub Profile
@shug3502
shug3502 / metaphase_inference.jl
Last active July 7, 2022 10:07
Bayesian inference for metaphase model of chromosome dynamics
## This script performs inference for the model of chromosome dynamics in metaphase
## described in Armond et al 2015 Plos Comp Biol. The four discrete hidden states (++,+-,-+,--) are
## marginalised out, as described in the methods of Harrison et al, 2021, bioRxiv.
## The likelihood is evaluated via the forward algorithm, and derivatives of the log likelihood
## are made available via automatic differentiation in Julia. These are used in an adaptive MCMC algorithm
## with a proposal known as Barker's method, and described in Livingstone and Zanella, 2022, JRSSB.
##
## Jonathan U. Harrison - 2022-07-07
####################################################
@shug3502
shug3502 / sister1_time_series.csv
Created March 10, 2020 16:50
using a gist as a data store
We can't make this file beautiful and searchable because it's too large.
"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38"
0.0430972865401404,0.0600697969928439,0.0840773825226263,0.112300571880435,0.139293930042564,0.158095314247505,0.1790398251117,0.222645384295184,0.232506487897562,0.288216743775545,0.303434003306872,0.291267825954971,0.321246997681141,0.334894979937351,0.350570215715377,0.308514587069792,0.269930993349221,0.247863708061156,0.222749063890599,0.206580200223995,0.176493079923742,0.142742247375517,0.125106278827918,0.102964417143399,0.0660113092327261,0.0571934591801037,0.0391167176491204,0.0226580591843974,0.0114334680557393,0.010579322473097,0.010612454846255,0.0060377674502947,0.00413617355416068,0.0038207509255158,0.00248175839255403,0.0006192867
@shug3502
shug3502 / sister1_time_series.csv
Created March 10, 2020 16:29
using a gist as a data store
We can't make this file beautiful and searchable because it's too large.
"-39","-38","-37","-36","-35","-34","-33","-32","-31","-30","-29","-28","-27","-26","-25","-24","-23","-22","-21","-20","-19","-18","-17","-16","-15","-14","-13","-12","-11","-10","-9","-8","-7","-6","-5","-4","-3","-2","-1","0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38"
3.79035405101315e-05,4.67039557160376e-05,4.86531996986163e-05,5.72890020404205e-05,7.82375033313897e-05,9.10388646029201e-05,0.000118904153044999,0.000111756744626077,8.81848003103889e-05,7.41670057055175e-05,8.45499404024286e-05,9.24080207588219e-05,0.000115932573196181,0.000135350762574272,0.000161006045101874,0.000171537869893698,0.000191284896991755,0.000225843887499138,0.000276623837010885,0.000294180273414672,0.00031990153555032,0.000373452162713407,0.000537087894695879,0.000620941481314475,0.000783070606747154,0.00101631858398107,0.0012126300838423,0.00133465075610676,0.00151440958522339,0.001650888
@shug3502
shug3502 / minimal_rbi_error.R
Created March 5, 2019 08:53
Minimal example to recreate RBi error
#minimal example to recreate error
library(rbi)
set.seed(123)
model_file <- system.file(package="rbi", "SIR.bi")
SIRmodel <- bi_model(model_file)
SIRdata <- bi_generate_dataset(SIRmodel, end_time=16*7, noutputs=16)
bi <- libbi(SIRmodel)
bi_prior <- sample(bi, target="prior", nsamples=1000, end_time=16*7, noutputs=16)
bi <- sample(bi_prior, target="posterior", nparticles=32, obs=SIRdata, verbose=TRUE)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.