Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
3fbecd6
morphology works in principle
roblanf Jun 24, 2013
e0d9e80
added dummy morphology models for phyml
roblanf Jul 1, 2013
6010c94
Include support for LG4M and LG4X models
roblanf Sep 30, 2013
dc55bf6
exclude LG4X models from all predefined model lists
roblanf Sep 30, 2013
6119350
edit raxml parser to parse output from LG4* models
roblanf Sep 30, 2013
d298d0a
Include support for LG4M and LG4X models
roblanf Sep 30, 2013
8cacdb5
exclude LG4X models from all predefined model lists
roblanf Sep 30, 2013
b940dcc
edit raxml parser to parse output from LG4* models
roblanf Sep 30, 2013
5f84f5d
Merge branch 'feature_LG4M' of https://github.com/brettc/partitionfin…
brettc Oct 14, 2013
2079378
update download stats
roblanf Oct 16, 2013
4a8a58b
update download plot script
roblanf Oct 16, 2013
fbd9b9a
change plot size for download plots
roblanf Oct 16, 2013
44a5e62
Now using python "shelve" to store subsets.
brettc Oct 31, 2013
18ed427
Reformatting.
brettc Oct 31, 2013
1fdcee4
Get rid of all phylofiles for now.
brettc Oct 31, 2013
ca287bd
Merge branch 'feature/simple-database' into develop
brettc Oct 31, 2013
ba091ac
update download and citation stats and plots
roblanf Nov 20, 2013
a2187be
Merge branch 'feature/morphology' into feature/morphology2
roblanf Nov 21, 2013
3e33ac5
resolve conflict in parser.py
roblanf Nov 21, 2013
58d84aa
resolve conflict in raxml_models.py
roblanf Nov 21, 2013
0a85bff
add comment back to raxml_models.py
roblanf Nov 21, 2013
d011a79
resolve conflict in reporter.py
roblanf Nov 21, 2013
b9ee57a
resolve paser.py conflict
roblanf Nov 21, 2013
f730ace
resovle subset.py conflice
roblanf Nov 21, 2013
2325c31
add morphology test
roblanf Nov 21, 2013
dcc88c3
clean up model list checking
roblanf Nov 21, 2013
1f8174d
added switch for deafulting to raxml if morph
wrightaprilm Jan 20, 2014
911565c
rescaling algo
wrightaprilm Jan 22, 2014
92561b7
added rescaling as randint.py
wrightaprilm Jan 22, 2014
4960bb9
changed around recaling metric
wrightaprilm Jan 23, 2014
abf7037
modified scaling a little bit to be more inclusive to older builds of…
wrightaprilm Jan 23, 2014
3f569f3
added matrix test
wrightaprilm Jan 26, 2014
b0c8e36
tested rescaling unctions and times them. see comments for time info.
wrightaprilm Jan 26, 2014
e50dda8
added comprehension to replace NaNs with ?
wrightaprilm Feb 4, 2014
cedb014
added comments on timeit testing
wrightaprilm Feb 4, 2014
7800da6
revamped some of the unit tests, started to fix another.
wrightaprilm Feb 4, 2014
c0dd145
updated tests. will integrate tests with the testing suite l8r.
wrightaprilm Feb 6, 2014
f3f9587
Have integrated (loosely) my tests, html file full of code coverage r…
wrightaprilm Feb 8, 2014
2649855
added testing datawq
wrightaprilm Feb 18, 2014
500646e
demystified test names
wrightaprilm Feb 18, 2014
ab8c4bd
demystified names
wrightaprilm Feb 18, 2014
7d5f0e2
tabs-> spaces
wrightaprilm Feb 19, 2014
df84901
de-specified tests to run in general paths
wrightaprilm Feb 24, 2014
e216765
removed spare files
wrightaprilm Feb 24, 2014
9e3de7b
fixed abspath
wrightaprilm Mar 10, 2014
0c2dd1b
modifying models and parsing for morphology
wrightaprilm Dec 12, 2014
5b3f9ae
fixed param bug
wrightaprilm Dec 19, 2014
a20f237
trying to remove shelf.
wrightaprilm Dec 20, 2014
5f0669d
fixed pickle bug. reverted to pickle from shelf
wrightaprilm Dec 20, 2014
4c1ee54
mostly clean-up
wrightaprilm Jan 9, 2015
5469766
Merging paul's changes
wrightaprilm Jan 9, 2015
07ee2b1
pre-merge commit of small typo fixes
wrightaprilm Jan 13, 2015
3d4940e
Merge branch 'paul_develop' of https://github.com/brettc/partitionfin…
wrightaprilm Jan 13, 2015
ed88d6d
new tiger exec
wrightaprilm Jan 13, 2015
287ee4e
caught a few morph-specific bugs
wrightaprilm Jan 15, 2015
12f1086
putting in a second commit due to binaries; added new binaries for RA…
wrightaprilm Jan 15, 2015
924035c
added a 0-index, which fixes the indexing prob
wrightaprilm Jan 16, 2015
00de58d
added paul's patches
wrightaprilm Jan 17, 2015
4955394
added to readme, removed extra function
wrightaprilm Jan 18, 2015
ccbe53f
added phylip converter and more readme
wrightaprilm Jan 18, 2015
c5f6d24
Update README.md
wrightaprilm Jan 18, 2015
500449f
Update README.md
wrightaprilm Jan 21, 2015
849d148
Update README.md
wrightaprilm Jan 21, 2015
9bddfe6
untracked extra stuff for pull request to Paul
wrightaprilm Jan 31, 2015
e75c23f
remove unnecessary call to shelve.
wrightaprilm Jan 31, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15,363 changes: 15,363 additions & 0 deletions .figleaf

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions PartitionFinderMorphology.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#Copyright (C) 2012 Robert Lanfear and Brett Calcott
#
#This program is free software: you can redistribute it and/or modify it
#under the terms of the GNU General Public License as published by the
#Free Software Foundation, either version 3 of the License, or (at your
#option) any later version.
#
#This program is distributed in the hope that it will be useful, but
#WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#General Public License for more details. You should have received a copy
#of the GNU General Public License along with this program. If not, see
#<http://www.gnu.org/licenses/>. PartitionFinder also includes the PhyML
#program, the RAxML program, the PyParsing library, and the python-cluster library
#all of which are protected by their own licenses and conditions, using
#PartitionFinder implies that you agree with those licences and conditions as well.

import sys
from partfinder import main

if __name__ == "__main__":
# Well behaved unix programs exits with 0 on success...
sys.exit(main.main("PartitionFinderMorphology", "morphology"))
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,37 @@ This will run the included example analysis for PartitionFinder. More generally,
where <PartitionFinder.py> is the full file-path to the PartitionFinder.py file
and <foldername> is the full filepath to a folder with a phylip alignemnt and associated .cfg file.

#Morphology notes.
*Partition Finder Morphology is in beta. Tests are passing, the software runs on test datasets. But it is still unreleased software. Please see the software terms of use for further info. See below for caveats on morphology.*
Currently, PartitionFinder works for morphology, when using the code in branch feature/morphology2. To use this:

1. Clone the repository, as above.
2. Open Terminal (on a Mac) or Command Prompt (on Windows) and cd to the directory with PartitionFinder in it
3. Type 'git checkout feature/morphology2'
4. Now, PartitionFinder morphology can be executed. Similar to the nucelotide or protein versions, type:
```python
python PartitionFinderMorphology.py morph/ cmdline-extras 'asc-corr=lewis'
```
to execute the example, or replace <morph/> with your own folder containing a Phylip file and .cfg.

*Morphology has some special caveats.*
+ If you use automated partition discovery, this is based on the [TIGER](http://bioinf.nuim.ie/tiger/) of Cummins and McInerney (2011). Because this identifies characters that are dissimilar to other characters in the matrix (see paper for a discussion), some partitions may be quite small. That a partitioning scheme is supported statistically is not a guarantee that you will estimate a more correct topology using it, or that a Bayesian topology search will arrive at convergence using this scheme. We strongly suggest comparing trees between partitioned and unpartitioned runs, and, as always, _performing multiple rounds of topology estimation for any given set of parameters._
+ If all the data in your dataset are binary, specify 'binary' on line 10.
+ The command line option 'asc-corr=lewis' is an ascertainment bias correction. Unless you have collected invarient sites, you
need to specify an ascertainment correction. 'asc-corr=lewis' is the correction described in Paul Lewis' [2001](http://sysbio.oxfordjournals.org/content/50/6/913) paper introducing the Mk model. More information can be found on
the RAxML [website](http://sco.h-its.org/exelixis/resource/download/NewManual.pdf).
+ In order to take advantage of these important corrections, make sure you are using at least version 8.1.13
from the RAxML [github](https://github.com/stamatak/standard-RAxML/releases).
+ Phylip is not a standard format for morphology, but it is very simple. It is simply the a one-line header with the name of species
and characters, separated by a space. However, you do need to remove spaces from species names. If you would rather do this programmatically,
in the helper_scripts directory, find the script converter.py. It is called via:
```python
python converter.py 'path to files' 'files extension' 'format of input files' 'format you need'
```
For example, to convert a nexus file in the current working directory, type:
```python
python converter.py . .nex nexus phylip
```
This script depends on the Dendropy [library](https://pythonhosted.org/DendroPy/index.html).

For more details, read the manual.
Binary file added docs/citationsplot.pdf
Binary file not shown.
Binary file added docs/downloadplot.pdf
Binary file not shown.
33 changes: 20 additions & 13 deletions docs/downloadplot.r
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,33 @@ library(ggplot2)
library(reshape)

dat <- read.csv("~/Documents/Projects_Current/partitionfinder/docs/downloadstats.csv")
dat.org <- dat

#the version changes in march and may need to be fixed up
dat <- dat[,-c(4, 5, 6)]

dat <- aggregate(. ~ date, data=dat, FUN=sum)

dat <- aggregate(. ~ date, data=dat, FUN=sum, na.action=na.pass)
dat <- dat[order(as.Date(dat$date, format="%d/%m/%Y")),]


dat$Mac <- cumsum(dat$Mac)
dat$Windows <- cumsum(dat$Windows)

dat <- melt(dat)

colnames(dat) <- c("date", "OS", "downloads")
# Download plot
dl <- melt(dat[,c(1, 2, 3)])
colnames(dl) <- c("date", "OS", "downloads")
dl$date <- as.Date(dl$date, format = "%d/%m/%Y")

dat$date <- as.Date(dat$date, format = "%d/%m/%Y")
quartz(width=10, height=5)
p <- ggplot(dl, aes(date, downloads))
p + geom_area(aes(colour = OS, fill= OS), position = 'stack')
dev.copy2pdf(file="~/Documents/Projects_Current/partitionfinder/docs/downloadplot.pdf")
dev.off()


p <- ggplot(dat, aes(date, downloads))
# Citation plot
c <- dat[,c(1,5)]
c$date <- as.Date(c$date, format = "%d/%m/%Y")
c <- c[complete.cases(c),]

quartz(width=10, height=5)
p <- ggplot(c, aes(date, citations.googlescholar))
p + geom_point() + geom_smooth(stat="identity")
dev.copy2pdf(file="~/Documents/Projects_Current/partitionfinder/docs/citationsplot.pdf")
dev.off()

p + geom_area(aes(colour = OS, fill= OS), position = 'stack')
2 changes: 1 addition & 1 deletion docs/downloadstats.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
date,Mac,Windows,version,citations.googlescholar,citations.added01/01/2012,30,0,0.9,10,1001/02/2012,66,0,0.9,,201/03/2012,28,0,0.9,,201/03/2012,44,0,0.9.2,,001/04/2012,39,0,0.9.2,,201/05/2012,70,48,1.0.0,,201/06/2012,35,58,1.0.0,,201/07/2012,41,54,1.0.0,,201/08/2012,107,190,1.0.1,,201/09/2012,68,95,1.0.1,,201/10/2012,62,65,1.0.1,,201/11/2012,50,76,1.0.1,,201/12/2012,62,126,1.0.1,,201/01/2013,88,1075,1.0.1,,201/02/2013,72,252,1.0.1,,201/03/2013,108,152,1.0.1,,201/04/2013,100,127,1.0.1,,201/05/2013,59,68,1.0.1,,301/05/2013,51,50,1.1.0,,001/06/2013,50,58,1.1.0,,301/06/2013,101,86,1.1.1,49,301/07/2013,96,114,1.1.1,56,7
date,Mac,Windows,version,citations.googlescholar,citations.added.per.month01/01/2012,30,0,0.9,10,01/02/2012,66,0,0.9,NA,01/03/2012,28,0,0.9,NA,01/03/2012,44,0,0.9.2,NA,01/04/2012,39,0,0.9.2,NA,01/05/2012,70,48,1.0.0,NA,01/06/2012,35,58,1.0.0,NA,01/07/2012,41,54,1.0.0,NA,01/08/2012,107,190,1.0.1,NA,01/09/2012,68,95,1.0.1,NA,01/10/2012,62,65,1.0.1,NA,01/11/2012,50,76,1.0.1,NA,01/12/2012,62,126,1.0.1,NA,01/01/2013,88,1075,1.0.1,NA,01/02/2013,72,252,1.0.1,NA,01/03/2013,108,152,1.0.1,NA,01/04/2013,100,127,1.0.1,NA,01/05/2013,59,68,1.0.1,NA,01/05/2013,51,50,1.1.0,NA,01/06/2013,50,58,1.1.0,NA,01/06/2013,101,86,1.1.1,49,01/07/2013,96,114,1.1.1,56,701/08/2013,94,119,1.1.1,63,701/09/2013,188,104,1.1.1,77,1401/10/2013,123,108,1.1.1,92,15
Expand Down
2 changes: 1 addition & 1 deletion examples/aminoacid/partition_finder.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## ALIGNMENT FILE ##
alignment = Als_etal_2004.phy;
alignment = mat.nex;

## BRANCHLENGTHS: linked | unlinked ##
branchlengths = linked;
Expand Down
Loading