Skip to content

Commit

Permalink
initial: quarnetGoFtest
Browse files Browse the repository at this point in the history
  • Loading branch information
cecileane committed Sep 27, 2019
0 parents commit 2b9a559
Show file tree
Hide file tree
Showing 18 changed files with 795 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docs/build/
docs/site/
*Manifest.toml
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Documentation: http://docs.travis-ci.com/user/languages/julia/
language: julia
os:
- linux
- osx
julia:
- 1.2

notifications:
email: false
git:
depth: 99999999

## uncomment and modify the following lines to manually install system packages
#addons:
# apt: # apt-get for linux
# packages:
# - gfortran

# before_install:

codecov: true
coveralls: true

jobs:
include:
- stage: "Documentation"
julia: 1.2
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.instantiate();
Pkg.develop(PackageSpec(path=pwd()))'
- julia --project=docs/ docs/make.jl
after_success: skip
22 changes: 22 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The QuartetNetworkGoodnessFit.jl package is licensed under the MIT "Expat" License:

> Copyright (c) 2019: Ruoyi Cai & Cecile Ane.
>
> 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.
>
20 changes: 20 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name = "QuartetNetworkGoodnessFit"
uuid = "1382f7fc-2744-4d9d-8ec6-1e3efdec0746"
authors = ["Cecile Ane <[email protected]>"]
version = "0.1.0"

[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
NLopt = "76087f3c-5699-56af-9a33-bf431cd00edd"
PhyloNetworks = "33ad39ac-ed31-50eb-9b15-43d0656eaa72"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c"

[compat]
PhyloNetworks = "≥ 0.10.0"
SpecialFunctions = "≥ 0.8.0"
julia = "≥ 1.2"
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[![Build Status](https://travis-ci.org/cecileane/QuartetNetworkGoodnessFit.jl.svg?branch=master)](https://travis-ci.org/cecileane/QuartetNetworkGoodnessFit.jl)
[![Coverage Status](https://coveralls.io/repos/cecileane/QuartetNetworkGoodnessFit.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/cecileane/QuartetNetworkGoodnessFit.jl?branch=master)
[![codecov.io](http://codecov.io/github/cecileane/QuartetNetworkGoodnessFit.jl/coverage.svg?branch=master)](http://codecov.io/github/cecileane/QuartetNetworkGoodnessFit.jl?branch=master)

## overview

`QuartetNetworkGoodnessFit` is a Julia package, providing tools to measure the
goodness of fit of a phylogenetic network to data on subsets of 4 tips.
It depends on the [PhyloNetworks](https://github.com/crsl4/PhyloNetworks.jl)
package.

[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://cecileane.github.io/QuartetNetworkGoodnessFit.jl/stable)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://cecileane.github.io/QuartetNetworkGoodnessFit.jl/dev)
6 changes: 6 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterMarkdown = "997ab1e6-3595-5248-9280-8efb232c3433"

[compat]
Documenter = "~0.23"
20 changes: 20 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Documenter
using QuartetNetworkGoodnessFit
DocMeta.setdocmeta!(QuartetNetworkGoodnessFit, :DocTestSetup, :(using QuartetNetworkGoodnessFit); recursive=true)

makedocs(
sitename = "QuartetNetwork GoF.jl",
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"), # easier local build
modules = [QuartetNetworkGoodnessFit],
pages = [
"home" => "index.md",
"library" => [
"public" => "lib/public.md",
"internal" => "lib/internal.md",
]
],
)

deploydocs(
repo = "github.com/cecileane/QuartetNetworkGoodnessFit.jl.git"
)
Binary file added docs/src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# QuartetNetworkGoodnessFit.jl


Julia
[package](https://github.com/cecileane/QuartetNetworkGoodnessFit.jl)
to measure the goodness of fit
of a phylogenetic network to data on subsets of 4 tips.
It depends on the [PhyloNetworks](https://github.com/crsl4/PhyloNetworks.jl)
package.

```@contents
Pages = ["lib/public.md", "lib/internals.md"]
Depth = 1
```

## functions

```@index
Pages = ["lib/public.md", "lib/internals.md"]
Order = [:function]
```
19 changes: 19 additions & 0 deletions docs/src/lib/internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# internal documentation

Documentation for `QuartetNetworkGoodnessFit`'s internal functions.
Those functions are not exported, but can still be used
(like: `QuartetNetworkGoodnessFit.foo()` for a function named `foo()`).

## index

```@index
Pages = ["internals.md"]
```

## functions

```@autodocs
Modules = [QuartetNetworkGoodnessFit]
Public = false
Order = [:function]
```
17 changes: 17 additions & 0 deletions docs/src/lib/public.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# public documentation

Documentation for `QuartetNetworkGoodnessFit`'s public (exported) functions.

## index

```@index
Pages = ["public.md"]
```

## functions

```@autodocs
Modules = [QuartetNetworkGoodnessFit]
Private = false
Order = [:function]
```
30 changes: 30 additions & 0 deletions src/QuartetNetworkGoodnessFit.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module QuartetNetworkGoodnessFit

using CategoricalArrays: cut
using DataFrames
using NLopt
using PhyloNetworks
using SpecialFunctions: loggamma
using Statistics: mean
using StatsFuns: normccdf, chisqccdf, betacdf, betaccdf
using StatsBase: countmap

import PhyloNetworks: ticr
import PhyloNetworks: ticr!
# fixit: delete from PhyloNetworks:
# - the ticr and ticr! functions: src/ticr.jl
# - mention of ticr in PhyloNetwork.jl and in docs/src/lib/public.md
# - test_ticr.jl
# - dependencies? like: "using SpecialFunctions: loggamma, gamma"
# then delete "import PhyloNetworks: ticr, ticr!" from this package

export
quarnetGoFtest!,
quarnetGoFtest,
ticr,
ticr!

include("ticr.jl")
include("quarnetGoF.jl")

end # module
Loading

2 comments on commit 2b9a559

@cecileane
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

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/3885

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:

git tag -a v0.1.0 -m "<description of version>" 2b9a559f8f9ad118d06661dfa7cf5ae36129544d
git push origin v0.1.0

Please sign in to comment.