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
#!/bin/bash | |
## script to grab individual nexson(s) from Phylografter | |
## Usage: | |
## ./getNexson.sh study1ID study2ID ... | |
## where study*ID is the Phylografter study identifier. For example, to get studies 420 and 1428, type: | |
## ./getNexson.sh 1428 420 | |
## It may be necessary to change access permission to make the script executable. Type: | |
## chmod 755 getNexson.sh |
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
#!/bin/bash | |
## script to check if files contain identical data (by byte). stops at first difference. | |
## Usage: | |
## ./cFiles.sh file1 file2 | |
## It may be necessary to change access permission to make the script executable. Type: | |
## chmod 755 cFiles.sh | |
if [ "$#" -ne 2 ] | |
then |
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
// g++ -Wall getlineSafe.cpp -o getlineSafe -O | |
#include <string.h> | |
#include <iostream> | |
#include <fstream> | |
#include <cstdlib> | |
std::istream& getlineSafe(std::istream& is, std::string& t) { | |
t.clear(); |
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
/* Compile with: | |
* g++ -Wall -std=c++11 dummy.cpp -o dummy -O | |
* Run as: | |
* ./dummy -s *.txt | |
*/ | |
#include <iostream> | |
#include <string> | |
#include <fstream> | |
#include <vector> |
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
# gist copied from: https://gist.github.com/emhart/89fd49401bc9795d790ef47ca638726f | |
# for Ubuntu 18, had to do: | |
# sudo apt-get install portaudio19-dev | |
# before installing audio package | |
# might have to install these packages first | |
library("dplyr"); | |
library("audio"); |
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
## Simple makefile to compile BayesTraitsv3 ## | |
# | |
# Program info: | |
# BayesTraits V3.0 (Mar 14 2017) | |
# Mark Pagel and Andrew Meade | |
# www.evolution.reading.ac.uk | |
# | |
# source: http://www.evolution.rdg.ac.uk/BayesTraitsV3/BayesTraitsV3.html | |
# | |
# By default, compiles serial version. To compile threaded version, do: |
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
#NEXUS | |
[ *** NOTE (JWB) *** 1st character (all 0, except Dimorphodon_macronyx who was missing the char) in original matrix (Supp. Info. pdf) was a dummy character because TNT is zero-indexed?] | |
[ It has been deleted here so char indices of 'ordered' list line up. So this martix has 457 chars, while the (incorrect) published matrix has 458.] | |
Begin data; | |
Dimensions ntax=75 nchar=457; | |
[Format Datatype=Standard Missing=? Gap=-;] [MRBAYES] | |
Format Datatype=Standard SYMBOLS="0 1 2 3 4" Missing=? Gap=-; [PAUP] | |
MATRIX |
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
## written by: | |
# Joseph W. Brown (josephwb, @j0sephwb) | |
# Klaus Schliep (KlausVigo, @Klaus_Schlp) | |
get_mrca_fast <- function(phy, tip) { | |
if (!inherits(phy, "phylo")) { | |
stop('object "phy" is not of class "phylo"'); | |
} | |
if (length(tip) < 2) { | |
return(NULL); | |
} |
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
# run from BEASTv1.8.*/native | |
# will compile and install into ../lib/ | |
CC=gcc | |
CFLAGS=-O2 -funroll-loops | |
INCLUDES=-I${JAVA_HOME}/include/ -I${JAVA_HOME}/include/linux | |
all: libNucleotideLikelihoodCore.so libAminoAcidLikelihoodCore.so | |
.c.o: |
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
# extract subtree induced from a set of tips | |
subtree.induced <- function (phy, tip) { | |
if (!inherits(phy, "phylo")) { | |
stop("object \"phy\" is not of class \"phylo\""); | |
} | |
Ntip <- length(phy$tip.label); | |
# convert to indices if strings passed in | |
if (is.character(tip)) { | |
idx <- match(tip, phy$tip.label); |
OlderNewer