-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
get loglikelihood calculation running forgot to save on code re-locate causing function overwriting Manifest Sequence generation for a defined phylogenetic tree update manifest custom travis script Nice registry functionality limited to >v1.1.0 remove Manifest? remove Manifest? update .gitignore - Manifest removed for dependency version flexibility needed for Julia-1.0 support README update
- Loading branch information
1 parent
4da8ee1
commit 9fbcdd4
Showing
22 changed files
with
199 additions
and
1,352 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
*.jl.mem | ||
.ipynb_checkpoints | ||
testfile.jl | ||
.DS_Store | ||
Manifest.toml |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Justin Angevaare | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name = "PhyloModels" | ||
uuid = "6465ae08-de3a-5dbe-bda8-3920f6a01ab7" | ||
authors = ["Justin Angevaare <[email protected]>"] | ||
version = "0.3.0" | ||
|
||
[deps] | ||
GeneticBitArrays = "5d6f8c34-7f74-4dab-a49b-48b3414fbfce" | ||
PhyloTrees = "4c47b132-0681-5a5d-b498-3afcf53fd314" | ||
SubstitutionModels = "8365b1bb-bd83-58ee-a267-f2965fc81c73" | ||
|
||
[compat] | ||
GeneticBitArrays = "≥ 0.2.1" | ||
julia = "≥ 1.0.0" | ||
|
||
[extras] | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[targets] | ||
test = ["Test"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,23 @@ | ||
# PhyloModels.jl | ||
|
||
[![Latest Release](https://img.shields.io/github/release/jangevaare/PhyloModels.jl.svg)](https://github.com/jangevaare/PhyloModels.jl/releases/latest) | ||
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/jangevaare/PhyloModels.jl/blob/master/LICENSE) | ||
[![Build Status](https://travis-ci.org/jangevaare/PhyloModels.jl.svg?branch=master)](https://travis-ci.org/jangevaare/PhyloModels.jl) | ||
|
||
PhyloModels.jl is a package for performing phylogenetic simulation and inference in Julia. This package is no longer being developed or maintained in favour of [BioJulia/SubstitutionModels.jl](https://github.com/BioJulia/SubstitutionModels.jl) and related bioinformatics packages in the [BioJulia](https://github.com/BioJulia) Ecosystem. | ||
|
||
|
||
### Simulation | ||
Genetic sequences can be simulated from phylogenetic trees by defining a root sequence, site rates, and a nucleotide substitution model. The following nucleotide substitution models are currently available: `JC69`, `K80`, `F81`, `F84`, `HKY85`, `TN93`, and `GTR`. | ||
|
||
|
||
### Inference | ||
The log likelihood of phylogenetic trees can be calculated when genetic sequences have been observed at all leaves, and a nucleotide substitution model has been specified by using the `loglikelihood` function. Below is an example from *Molecular Evolution: A Statistical Approach* | ||
PhyloModels.jl is a package for performing genetic sequence simulation from specified phylogenetic trees (using [PhyloTrees.jl](https://github.com/jangevaare/PhyloTrees.jl) for phylogenetic tree specification, and [SubstitutionModels.jl](https://github.com/BioJulia/SubstitutionModels.jl) for nucleic acid substitution model specification), and for loglikelihood calculation of phylogenetic trees using Felsenstein's tree pruning algorithm¹. | ||
|
||
> using PhyloTrees, PhyloModels | ||
> | ||
> # Build tree | ||
> tree = Tree() | ||
> addnodes!(tree, 9) | ||
> addbranch!(tree, 9, 6, 0.1) | ||
> addbranch!(tree, 9, 8, 0.1) | ||
> addbranch!(tree, 6, 7, 0.1) | ||
> addbranch!(tree, 6, 3, 0.2) | ||
> addbranch!(tree, 7, 1, 0.2) | ||
> addbranch!(tree, 7, 2, 0.2) | ||
> addbranch!(tree, 8, 4, 0.2) | ||
> addbranch!(tree, 8, 5, 0.2) | ||
¹ Felsenstein, J. (1981). Evolutionary trees from DNA sequences: a maximum likelihood approach. *Journal of molecular evolution, 17*(6), 368-376. | ||
|
||
Phylogenetic tree with 9 nodes and 8 branches | ||
## Installation | ||
|
||
> # Set state of leaf nodes | ||
> node_data = Dict{Int64, Sequence}() | ||
> node_data[1] = Sequence("T") | ||
> node_data[2] = Sequence("C") | ||
> node_data[3] = Sequence("A") | ||
> node_data[4] = Sequence("C") | ||
> node_data[5] = Sequence("C") | ||
> | ||
> # Parametrize substitution model | ||
> model = K80([2.]) | ||
Julia 1.0.x, 1.1.x, and 1.2.x are currently supported. The current release can be installed | ||
from the Julia REPL: | ||
|
||
Kimura 1980 substitution model | ||
```julia | ||
pkg> add PhyloModels | ||
``` | ||
|
||
> # Calculate log likelihood | ||
> loglikelihood(tree, model, node_data) | ||
The development version (master branch) can be installed as: | ||
|
||
-7.5814075725577 | ||
```julia | ||
pkg> add PhyloModels#master | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,31 @@ | ||
__precompile__() | ||
|
||
module PhyloModels | ||
|
||
# Dependencies | ||
using | ||
PhyloTrees, | ||
Distributions | ||
using PhyloTrees, | ||
SubstitutionModels, | ||
GeneticBitArrays | ||
|
||
import SubstitutionModels._π | ||
import Base.rand | ||
|
||
# Methods expanded | ||
import | ||
Base.show, | ||
Base.push!, | ||
Base.append!, | ||
Base.length, | ||
Base.getindex, | ||
Base.rand, | ||
Base.copy, | ||
Base.deleteat!, | ||
StatsBase.loglikelihood | ||
# Re-export all of PhyloTrees, SubstitutionModels, and GeneticBitArrays | ||
for name in names(PhyloTrees) | ||
@eval export $(name) | ||
end | ||
|
||
export | ||
# Sequences | ||
Sequence, | ||
for name in names(SubstitutionModels) | ||
@eval export $(name) | ||
end | ||
|
||
# Substitution Models | ||
SubstitutionModel, | ||
SubstitutionModelPrior, | ||
JC69, | ||
K80, | ||
F81, | ||
F84, | ||
HKY85, | ||
TN93, | ||
GTR, | ||
JC69Prior, | ||
K80Prior, | ||
F81Prior, | ||
F84Prior, | ||
HKY85Prior, | ||
TN93Prior, | ||
GTRPrior, | ||
Q, | ||
P, | ||
logprior, | ||
for name in names(GeneticBitArrays) | ||
@eval export $(name) | ||
end | ||
|
||
# Simulation | ||
simulate, | ||
simulate!, | ||
const NodeDNA = Dict{Int64, DNASeq} | ||
const NodeRNA = Dict{Int64, RNASeq} | ||
|
||
# Loglikelihoods | ||
loglikelihood | ||
include("loglikelihood.jl") | ||
include("simulate.jl") | ||
|
||
# Package files | ||
include("sequences.jl") | ||
include("substitution_models/abstract.jl") | ||
include("substitution_models/jc69.jl") | ||
include("substitution_models/k80.jl") | ||
include("substitution_models/f81.jl") | ||
include("substitution_models/f84.jl") | ||
include("substitution_models/hky85.jl") | ||
include("substitution_models/tn93.jl") | ||
include("substitution_models/gtr.jl") | ||
include("simulation.jl") | ||
include("loglikelihoods.jl") | ||
export NodeDNA, NodeRNA, siimulate!, simulate, rand, loglikelihood | ||
|
||
end # module |
This file contains 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
Oops, something went wrong.
9fbcdd4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
9fbcdd4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/3681
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via: