Skip to content

Instantly share code, notes, and snippets.

View pretty_boxplot
# get the data as per https://www.cedricscherer.com/2019/05/17/the-evolution-of-a-ggplot-ep.-1/#code
library(tidyverse)
devtools::source_gist("https://gist.github.com/Z3tt/301bb0c7e3565111770121af2bd60c11")
# convert to data.frame, attach and sort region
df <- as.data.frame(df_ratios)
attach(df)
# get rid of NAs
df <- df[ ! is.na(student_ratio),]
View ssl error run 3
Output:
```
run at 2021-05-13 20:37:49.539609
run at 2021-05-13 20:37:51.455154
run at 2021-05-13 20:37:53.464305
run at 2021-05-13 20:37:55.362489
run at 2021-05-13 20:37:57.314623
wait at 2021-05-13 20:37:57.565849
wait at 2021-05-13 20:37:58.586121
View gist:56e489eb18d677f6bd0f7c17864d25ec
Output:
```
run at 2021-05-13 17:32:33.076136
run at 2021-05-13 17:32:35.094340
run at 2021-05-13 17:32:36.977748
run at 2021-05-13 17:32:38.854865
run at 2021-05-13 17:32:40.755098
wait at 2021-05-13 17:32:41.120666
wait at 2021-05-13 17:32:42.447928
View gist:4223bf6bc30391a0300cb0e160f644ff
Output:
```
run at 2021-05-13 17:27:28.334900
run at 2021-05-13 17:27:30.287149
run at 2021-05-13 17:27:32.254218
run at 2021-05-13 17:27:34.109459
run at 2021-05-13 17:27:36.062005
wait at 2021-05-13 17:27:36.433094
wait at 2021-05-13 17:27:37.513581
View bad fit
d <- data.frame(frac=seq(0.1,1.0,by=0.1), total=c(116,175,215,246,271,291,308,323,336,348))
plot(d$frac, d$total, pch=16, xlim=c(0,3), ylim=c(0,400))
fit <- lm(formula = total ~ I(1/frac), data=d)
nd <- data.frame(frac=seq(0.1,3.0,by=0.1))
nd$pred <- predict(fit, newdata=nd)
View health_wealth
x <- 0:100
y <- 100/x
plot(x,y, xlim=c(0,100), ylim=c(0,100), type="l", xlab="health", ylab="wealth", xaxt="n", yaxt="n", bty="n")
#axis(side=1, labels=FALSE, tick=NA, lty=1, lwd=1)
u <- par("usr")
# Use arrows() to draw the axis lines, adding the arrowheads
# Use the par("usr") values to specify the end points of the lines
View diamond_blastp
query:
>contig_1648_86 # 93536 # 94054 # 1 # ID=21_86;partial=00;start_type=ATG;rbs_motif=AGGAG/GGAGG;rbs_spacer=11-12bp;gc_cont=0.696
MMTLLHLISAVALLVWGTHIVRTGVLRVYGARLRRWLGGRLNRPLAFAAGTGVTALVQSS
NATALLASGFVADRLMPLATATREVLRMGDIVEGMLAAILEALRNERAGSARDLGDQDDE
LDELYTGIKLYLELIGDMKRLNSLFCAVAFSTVEEEDGDGPGLSTLSRRSRP*
subject:
>tr|A0A2E9RF79|A0A2E9RF79_9GAMM PhoU domain-containing protein OS=Alcanivorax sp. OX=1872427 GN=CL543_00625 PE=4 SV=1
MMTLLHLXSAVALLVWGTHIVRTGVLRVYGARLRRWLGGRLNRPLAFAAGTGVTALVQSS
NATALLASGFVADRLMPLATALAILLGADLGTALMARVLTLDLSWLWPLLVIAGVPLFLS
View magpy_thoughts
Download Miniconda
Main env (python 3.5):
- snakemake
- Ete3?
- CheckM
- HMMER
- pplacer
- FastTree
- Prodigal
View cowplot_mimic
## functions
plot.histograms <- function(cname="", flip=FALSE, xlim) {
dse <- density(setosa[, cname])
dve <- density(versicolor[, cname])
dvi <- density(virginica[, cname])
ymax <- max(c(dse$y, dve$y, dvi$y))
View sqrt plot
par(mar=c(2,2,1,1))
plot(sqrt, bty="n", xaxt="n", yaxt="n", xlab="", ylab="")
axis(side=1, at=seq(0,1,by=0.2), las=1, labels=FALSE)
axis(side=2, at=seq(0,1,by=0.2), las=2, labels=FALSE)
axis(side=1, at=seq(0,1,by=0.2), las=1, labels=TRUE, tick=FALSE, line=-0.5, cex.axis=0.8)
axis(side=2, at=seq(0,1,by=0.2), las=2, labels=TRUE, tick=FALSE, line=-0.5, cex.axis=0.8)
axis(side=1, at=0.5, labels="x", tick=FALSE, line=0)