Skip to content

Instantly share code, notes, and snippets.

Avatar

roblanf roblanf

View GitHub Profile
View tables.txt
ID gCF gDF1 gDF2 gN sCF sDF1 sDF2 sN bootstrap branchlength
327 1.15 3.45 0 87 37.34 29.98 32.68 350.19 100 0.00304084
ID gCF gDF1 gDF2 gN sCF sDF1 sDF2 sN bootstrap branchlength gEF_p sEF_p
14 249 78.57 5.36 5.36 56 56.14 17.86 26.00 383.86 100 0.02134550 1.000000000 1.605600e-02
33 268 62.07 8.62 13.79 58 39.02 27.36 33.62 624.87 100 0.02370450 0.405380556 4.506223e-02
34 269 87.50 0.00 0.00 56 69.10 13.40 17.50 771.13 100 0.10990200 1.000000000 4.051930e-02
36 271 67.35 0.00 8.16 49 46.61 25.97 27.42 426.92 100 0.02632530 0.045500264 6.818018e-01
39 274 34.33 17.91 17.91 67 39.51 23.62 36.87 258.95 100 0.00694057 1.000000000 6.116524e-03
View concordance.R
library(viridis)
library(ggplot2)
library(dplyr)
library(ggrepel)
library(GGally)
library(entropy)
# read the data
d = read.delim("concord.cf.stat", header = T, comment.char=#')
View iqtree.sh
# infer the concatentated tree with 1000 ultrafast bootstraps and an edge-linked fully-partitioned model (-p is the same as -spp from version 1.7 onwards)
iqtree -s alignment.nex -p alignment.nex --prefix concat -bb 1000 -nt AUTO
# infer the 88 single-locus trees
iqtree -s alignment.nex -S alignment.nex --prefix loci -nt 50
# calculate concordance factors
iqtree -t concat.treefile --gcf loci.treefile -s alignment.nex --scf 100 --prefix concord
@roblanf
roblanf / code.R
Last active Jan 3, 2020
A look at gene- and site-concordance factors. See also https://www.biorxiv.org/content/early/2018/12/05/487801
View code.R
library(viridis)
library(ggplot2)
library(dplyr)
library(ggrepel)
library(GGally)
library(entropy)
# read the data
d = read.delim("concord.cf.stat", header = T, skip = 15)
View alignment.nex
This file has been truncated, but you can view the full file.
#NEXUS
begin DATA;
dimensions ntax=235 nchar=137324;
format datatype=nucleotide missing=? gap=-;
matrix
View clunky_timelapse.sh
echo "copying source pics"
mkdir source_pics
cp ~/pikrellcam/media/timelapse/* source_pics
cd source_pics
echo "renaming"
mkdir renamed
counter=1
ls -1tr *.jpg | while read filename; do cp $filename renamed/$(printf %05d $counter)_$filename; ((cou\
nter++)); done
View nanopore_r9.5_flowcell_map.R
# build the map for R9.5 flowcell, as a long-form dataframe that translates
# channels into rows and columns on the flowcell. Good for plotting in R.
p1 = data.frame(channel=33:64, row=rep(1:4, each=8), col=rep(1:8, 4))
p2 = data.frame(channel=481:512, row=rep(5:8, each=8), col=rep(1:8, 4))
p3 = data.frame(channel=417:448, row=rep(9:12, each=8), col=rep(1:8, 4))
p4 = data.frame(channel=353:384, row=rep(13:16, each=8), col=rep(1:8, 4))
p5 = data.frame(channel=289:320, row=rep(17:20, each=8), col=rep(1:8, 4))
p6 = data.frame(channel=225:256, row=rep(21:24, each=8), col=rep(1:8, 4))
p7 = data.frame(channel=161:192, row=rep(25:28, each=8), col=rep(1:8, 4))
p8 = data.frame(channel=97:128, row=rep(29:32, each=8), col=rep(1:8, 4))
@roblanf
roblanf / AAL.tsv
Last active May 19, 2016
The AAL (ANU Acronym List) is a list to help out anyone who is struggling to understand the many wonderful acronyms so beloved of the Australian National University (ANU). To enter your own data, follow this link: http://goo.gl/forms/T1k7BBrqL3CEnmfF2.
View AAL.tsv
Acronym Full Link
ANU Australian National University http://anu.edu.au/
BSB (Division of) Biomedical Science and Biochemistry http://biology.anu.edu.au/research/divisions/biomedical-science-and-biochemistry
CBA Centre for Biodiversity Analysis http://cba.anu.edu.au/
CBBU Computational Biology and Bioinformatics Unit http://biology.anu.edu.au/research/facilities/computational-biology-and-bioinformatics-unit
CGMB Centre for Genomics, Metabolomics, and Bioinformatics
CMBE Colloge of Medicine, Biology, and Environment http://science.anu.edu.au/
CSIRO Commonwealth Scientific and Industrial Research Organisation http://www.csiro.au/
EBL Ecogenomics and Bioinformatics Lab
EEG (Division of) Ecology, Evolution, and Genetics http://biology.anu.edu.au/research/divisions/evolution-ecology-and-genetics
@roblanf
roblanf / repellent_primes.R
Last active Mar 16, 2016
This gist is an attempt to analyse the distribution of the last digits of prime numbers, inspired by this article: http://www.nature.com/news/peculiar-pattern-found-in-random-prime-numbers-1.19550?WT.mc_id=FBK_NatureNews
View repellent_primes.R
library(primes)
library(coda)
library(parallel)
library(ggplot2)
# set this to the number of processors on your machine
processors = 4
remainders <- function(divisor, numbers){
@roblanf
roblanf / repellent_primes.R
Created Mar 16, 2016
This gist is an attempt to recreate some of the analyses discussed in this article:
View repellent_primes.R
library(primes)
library(coda)
library(parallel)
library(ggplot2)
# set this to the number of processors on your machine
processors = 4
remainder <- function(number, divisor){ return(number%%divisor) }
You can’t perform that action at this time.