Skip to content

Instantly share code, notes, and snippets.

View antagomir's full-sized avatar

Leo Lahti antagomir

View GitHub Profile

Keybase proof

I hereby claim:

  • I am antagomir on github.
  • I am antagomir (https://keybase.io/antagomir) on keybase.
  • I have a public key ASDi61hh71_F4t64lmCjGy6lOzaGA_dEPvnzNo6FSb-CDwo

To claim this, I am signing this object:

@antagomir
antagomir / miaverse_paired_boxplot_diversity
Created December 30, 2021 23:05
Visualize diversity for paired samples in miaverse
library(mia)
library(dplyr)
library(tidyr)
# Get example data
library(microbiomeDataSets)
# tse <- LahtiMData()
x <- tse
# Agglomerate to Genus level
@antagomir
antagomir / Visualize taxa abundance for paired samples
Last active December 30, 2021 23:04
Paired boxplot for miaverse: taxa abundance
library(mia)
library(dplyr)
library(tidyr)
# Get example data
library(microbiomeDataSets)
# tse <- LahtiMData()
x <- tse
# Agglomerate to Genus level
@antagomir
antagomir / reprints.R
Created March 16, 2019 23:02
Example timeline for reprints
# reprints would be nodes; and edges would connect reprints of the same title?
set.seed(3452)
n <- 30
year <- round(runif(n, min = 1600, max = 1800))
publisher <- sample(1:3, n, replace = TRUE)
title <- c(rep("Bible", 10), rep("Bible2", n - 10))
df <- data.frame(title = title, year = year, publisher = publisher)
df <- df %>% arrange(title, publisher, year)
@antagomir
antagomir / doi2bibtex.sh
Created August 22, 2017 10:41 — forked from konrad/doi2bibtex.sh
Returns a BibTeX entry for one or more given DOIs.
#!/usr/bin/env bash
# Returns a BibTeX (www.bibtex.org) entry for one or more given DOIs
# (https://www.doi.org/).
#
# Call it like this:
#
# $ doi2bibtex.sh 10.1093/bioinformatics/btu533
#
# Can also be used for several DOIs at once:
@antagomir
antagomir / index.html
Created April 15, 2015 09:34
Scatterplot
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='//cdn.oesmith.co.uk/morris-0.4.2.min.css'>
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js' type='text/javascript'></script>
@antagomir
antagomir / index.html
Created March 20, 2015 22:27
Scatterplot
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='//cdn.oesmith.co.uk/morris-0.4.2.min.css'>
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js' type='text/javascript'></script>
@antagomir
antagomir / index.html
Created March 20, 2015 22:07
Scatterplot
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='//cdn.oesmith.co.uk/morris-0.4.2.min.css'>
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js' type='text/javascript'></script>
@antagomir
antagomir / index.html
Created February 21, 2015 23:12
EdinburghPeak
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='//cdn.oesmith.co.uk/morris-0.4.2.min.css'>
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js' type='text/javascript'></script>
@antagomir
antagomir / index.html
Created November 20, 2013 11:03
Scatterplot
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://polychart.com/s/third_party/polychart2.standalone.js' type='text/javascript'></script>
<style>
.rChart {
display: block;