Skip to content

Commit

Permalink
bump compat for Functors to 0.4 (#189)
Browse files Browse the repository at this point in the history
CI: setup-r removed from test job, @v2 in docs job

Co-authored-by: CompatHelper Julia <[email protected]>
Co-authored-by: Cecile Ane <[email protected]>
  • Loading branch information
3 people authored Dec 9, 2022
1 parent b4fdce9 commit 4ee407a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
- x64
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
Expand All @@ -44,15 +43,15 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v2
with:
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
- run: echo "LD_LIBRARY_PATH=$(R RHOME)/lib" >> $GITHUB_ENV
- uses: julia-actions/setup-julia@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ DataFrames = "1.3"
DataStructures = "0.9, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18"
Distributions = "0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 0.24, 0.25"
FASTX = "1.1, 2"
Functors = "0.2, 0.3"
Functors = "0.2, 0.3, 0.4"
GLM = "1.1, 1.2, 1.3, 1.4"
NLopt = "0.5.1, 0.6"
StaticArrays = "0.8.3, 0.9, 0.10, 0.11, 0.12, 1.0"
Expand Down
23 changes: 11 additions & 12 deletions src/addHybrid_snaq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -344,14 +344,6 @@ addHybridizationUpdateSmart!(net::HybridNetwork, N::Integer) = addHybridizationU


# ----------------------------------- add alternative hybridizations found in bootstrap ------------------------------------
## function to add the top hybridizations (not in best network)
## found in bootstrap networks
## it modifies the network and BSe to add the new edge number,
## it also adds a new column 0/1, with 1 if the edge is not present in the original estimated network
## cutoff=10, only show hybridizations with bootstrap support>10%
## top=3, only show the top three alternative hybridizations (sorted by bootstrap support)
## can we put in a different color in the plot?
## Cecile: you could add a new option to our RCall-based plot function to take a vector of colors.
"""
addAlternativeHybridizations!(net::HybridNetwork, BSe::DataFrame;
cutoff=10::Number, top=3::Int)
Expand All @@ -360,11 +352,18 @@ Modify the network `net` (the best network estimated with snaq) by adding other
that are present in the bootstrap networks. By default, it will only consider hybrid edges with
more than 10% bootstrap support (`cutoff`) and it will only include the three top hybridizations
(`top`) sorted by bootstrap support.
The function also modifies the dataframe `BSe` obtained with `hybridBootstrapSupport`. In the original
`BSe` dataframe, hybrid edges that do not appear in the best network have a missing number.
The function also modifies the dataframe `BSe`. In the original `BSe`,
supposedly obtained with `hybridBootstrapSupport`, hybrid edges that do not
appear in the best network have a missing number.
After the hybrid edges are added with `addAlternativeHybridizations`, `BSe` is modified to include the
edge numbers of the newly added hybrid edges. Note that the function only adds the hybrid edges as minor to
keep the underlying tree topology.
edge numbers of the newly added hybrid edges.
To distinguish hybrid edges present in the original network versus new edges,
an extra column of true/false values is also added to `BSe`, named "alternative",
with true for newly added edges absent from the original network.
The hybrid edges added to `net` are added as minor edges, to keep the underlying
major tree topology.
# example
Expand Down

0 comments on commit 4ee407a

Please sign in to comment.