Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Trophic bugfixes #204

Merged
merged 2 commits into from
Feb 11, 2022
Merged

Conversation

mjsmith037
Copy link
Collaborator

@mjsmith037 mjsmith037 commented Feb 10, 2022

Several bugs fixes in calculating trophic levels and omnivory

This pull request will hopefully address some inconsistencies and bugs in trophiclevels.jl and omnivory.jl.

Specifically:

  • The functions for calculating trophic level and omnivory use an unconventional convention for trophic link direction. This means that in several places out-degree is used rather than in-degree, and in others there is inconsistent use of degree
  • Related, in some places iteration is over predators rather than prey
  • The calculation of shortest paths associated with trophic level calculation uses the maximal shortest path rather than the minimal as expected
  • the calculation of omnivory uses shortest paths rather than true trophic level

Related issues

#202

Checklist

  • The code is covered by unit tests
    • Additional cases or module in test/...
    • Relevant lines in test/runtests.jl
  • The code is documented
    • Docstrings written for every function
    • If needed, additional lines in docs/src/...
  • All contributors have added their name and affiliation to .zenodo.json

Pinging

Pinging @tpoisot

@tpoisot tpoisot linked an issue Feb 10, 2022 that may be closed by this pull request
@tpoisot tpoisot mentioned this pull request Feb 11, 2022
@tpoisot tpoisot changed the base branch from main to fix/trophiclevel February 11, 2022 14:38
@tpoisot tpoisot merged commit e478d1d into PoisotLab:fix/trophiclevel Feb 11, 2022
@tpoisot
Copy link
Member

tpoisot commented Feb 11, 2022

I have merged this into #206 - let's pick up from there!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calculating trophic levels
2 participants