This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N=10000 | |
noise = rnorm(N,mean=0,sd=0.5) | |
random_walk=cumsum(noise) | |
ylim = range(random_walk) | |
op = par(mfrow=c(1,2)) | |
plot(noise,type="l",ylim=ylim,xlab="time",cex.lab=1.75,cex.axis=1.75) | |
plot(random_walk,type="l",ylim=ylim,xlab="time",cex.lab=1.75,cex.axis=1.75) | |
par(op) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make some synthetic data, like patient with v-shaped 2Dmito scatterplot | |
N = 500 | |
mu_x = 5 | |
sd_x = 2.5 | |
intercept = 0.1 | |
slope_normal = 1.0 | |
slope_deficient = 0.0 | |
sd_err = 1.0 | |
x_normal = rnorm(N/2,mu_x,sd_x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RATE OR STOICHIOMETRY | |
REACTIONS HAZARD (W) (M) PROBABILITIES | |
Synthesis W -> 2W ks*W +1 0 ks*W/CH | |
M -> 2M ks*M 0 +1 ks*M/CH | |
Degradation W -> NULL kd*W -1 0 kd*W/CH | |
M -> NULL kd*M 0 -1 kd*M/CH | |
__________ | |
Combined Hazard (CH): (ks+kd)*(W+M) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Annotation|IMC images</title> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@recogito/[email protected]/dist/annotorious.min.css"> | |
<script src="https://cdn.jsdelivr.net/npm/@recogito/[email protected]/dist/annotorious.min.js"></script> | |
<script language="javascript" type="text/javascript"> | |
var key = 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
R package version: 0.0-39 | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Summary type: median | |||||||||||||
Test type: wilcoxon | |||||||||||||
x-axis treatment: 20 | |||||||||||||
x-axis medium: SDM_rhlk_TGNH | |||||||||||||
x-axis screen ID: SGA0188 | |||||||||||||
x-axis screen name: CONTROL | |||||||||||||
x-axis libraries: SDLV4_1536 | |||||||||||||
x-axis client: MMA | |||||||||||||
x-axis user: AAB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import numpy as np | |
# Generate a 100x100 array of random floats between 0.0 and 1.0 | |
random_floats = np.random.rand(100,100) | |
# Scale these up to lie in the range of 8-bit integers (between 0.0 and 255.0) | |
random_floats_8bit = random_floats * 255.0 | |
# Round these float values to the nearest integer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sampling noise | |
simulateSample = function(mtDNAPerWell=1000, mutantFraction=0.95, fracVolumeSampled=1.0/3.0){ | |
# Create a synthetic population of mtDNA molecules | |
moleculeMutant = rbinom(n = round(mtDNAPerWell*fracVolumeSampled), size = 1, prob = mutantFraction) | |
# Calculate mutant fraction in sampled molecules | |
sum(moleculeMutant)/length(moleculeMutant) | |
} | |
simulateUncertainty = function(mtDNAPerWell=1000, mutantFraction=0.95, fracVolumeSampled=1.0/3.0, reps = 5000){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N = 10000 | |
Ncurve = 1000 | |
png("Walk.png",width=3000,height=1000,pointsize=12,type="cairo-png") | |
plot(NULL,ylim=c(-200,200),axes=FALSE,xlim=c(N/2,N),xlab="",ylab="") | |
for(i in 1:Ncurve) points(cumsum(rnorm(N,0,0.5)),type="l",col=rgb(0,0,0,0.1),lwd=2) | |
dev.off() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nA = 8 | |
meanA = 48 | |
sdA = 3 | |
nB = 10 | |
meanB = 53 | |
sdB = 4 | |
set.seed(42) | |
nBoot = 100000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(deldir) | |
library(png) | |
dat = read.delim("results.csv",sep=",",stringsAsFactors=FALSE) | |
im = readPNG("AVE_mitocyto.png") | |
h = dim(im)[1] | |
w = dim(im)[2] | |
td = data.frame( | |
xCoord = dat$Value[dat$Channel=="xCoord"], |