friday

command module
v0.0.0-...-f83eb9c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2023 License: MIT Imports: 13 Imported by: 0

README

HMS FRIDAY

Penalized likelihood divergence times

Installation

You may use standard go means of getting HMS Friday. Currently, this uses nlopt for some constrained optimization so you will need to install that as well (you can find some instructions for the relevant package here). Otherwise you get this with just go get git.sr.ht/~hms/friday and then go build -o ~/bin/hmsf friday.go within the directory (of course change where you want the binary to be housed, etc. and we assume you have your go environment setup).

Running

Running penalized likelihood on large and weird datasets can have lots of problems.

Basics

You can get the usage of hmsf with the -h argument

Usage of hmsf:
  -c	run LOOCV?
  -cpuprofile string
    	write cpu profile to file
  -d string
    	tip dates file (name=date)
  -f string
    	fossil constraints file (name1,name2=min,max)
  -i float
    	sites (default 1000)
  -s float
    	smoothing value (default 0.1)
  -t string
    	tree filename (tree can have multistate labels for local runs)
  -v	verbose
  -w int
    	number of threads (default 4)
Constraints

You can add constraints with a file (-f filename) with the format

name1,name2=min,max

In general, you will want/need to fix the root and then you can add other calibrations as you like. See General run advice for thoughts about adding a ton of constraints and how that reacts to optimization.

Local (relaxed) clocks

Currently, hmsf will accomodate shifts in rates based on a priori identification of clades that should be considered to be under different rate regimes. This can be done easily just by having internal nodes labeled (you can just add a single label) as here

labeled tree  
                      -----------------------+ a  
       ---------------+                           
       :              -----------------------+ b  
-------+                                          
:      :                     ---------------+ c   
:      :              -------+                    
:      --------------0+      ---------------+ d   
+                     :                           
:                     -----------------------+ e  
:                                                 
:              -------------------------------+ f 
---------------+                                  
               -------------------------------+ g 
Tip dates

You can add tip dates (i.e., tips that are not at 0 mya) with a file (-d filename) with the format

name=date
Cross validation

Cross validation is one way to determine what smoothing parameter you should use. Right now, you set a smoothing parameter (-s value) and then if you want to get the chisq for the smoothing value you add the argument -c. You can then run another smoothing parameter and choose the one with the lowest chisq. See General run advice for more information on cross validation.

General run advice

Depending on the constraints, constraints can cause even more rate heterogeneity than is already present. They also increase the difficulty in optimization.

You will need to remove the root node. In general, it is best practice to construct the tree, estimate branch lengths, reroot, and then remove the outgroup. This is important because reroot will generally root at the midpoint and so the branch lengths of those first edges will be wrong.

Colophon

Much like accurate divergence times based on molecular data, the HMS Friday is a myth. There has not been a ship named the HMS Friday.

The reluctance of seamen to sail on a Friday reached such epic proportions, that in the 1800s the British Government decided to take strong measures to prove the fallacy of the superstition. They laid the keel of a new vessel on Friday, selected her crew on a Friday, launched her on a Friday and named her HMS Friday. They then placed her in command of one Captain James Friday and sent her to sea for the first time on a Friday. The scheme worked well, and had only one drawback ... neither ship nor crew was ever heard from again.

source

Documentation

Overview

HMS FRIDAY: various divergence time things

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL