Skip to content

Genetic#42

Open
soniamitchell wants to merge 14 commits intodevfrom
genetic
Open

Genetic#42
soniamitchell wants to merge 14 commits intodevfrom
genetic

Conversation

@soniamitchell
Copy link

Added function geneDistance(), which calculates genetic distance from genotype / sequence data.

Note that:

  • I was only able to read in the example vcf file given in PopGen.jl (which wraps GeneticVariation.jl), other vcf files I have access to fail to read
  • I'm not sure whether you want to include example data in the package, since small examples could be written on the fly – obviously data will be required for tests
  • As far as I can tell there is no dist2sim() function so I have transformed the matrix manually in the tests (not pushed)

@soniamitchell
Copy link
Author

Looks like one of the tests in test_API.jl is failing on the CI, yet it works fine on my machine. I don't think any of my code could have affected this test, though I could be wrong?

@richardreeve
Copy link
Member

As far as I can tell there is no dist2sim() function so I have transformed the matrix manually in the tests

You're right there's no equivalent functionality at the moment. We should think that, but there's nothing it was useful for as we didn't have anything with distances before.

@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2021

Codecov Report

❌ Patch coverage is 3.03030% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.14%. Comparing base (8f8009c) to head (38515ec).
⚠️ Report is 34 commits behind head on dev.

Files with missing lines Patch % Lines
ext/DiversityGeneticsExt.jl 0.00% 29 Missing ⚠️
src/Diversity.jl 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #42      +/-   ##
==========================================
- Coverage   98.43%   94.14%   -4.29%     
==========================================
  Files          16       17       +1     
  Lines         701      734      +33     
==========================================
+ Hits          690      691       +1     
- Misses         11       43      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coveralls
Copy link

coveralls commented Aug 16, 2021

Pull Request Test Coverage Report for Build 1136154925

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 39 unchanged lines in 9 files lost coverage.
  • Overall coverage increased (+5.5%) to 87.478%

Files with Coverage Reduction New Missed Lines %
src/Diversity.jl 1 75.0%
src/Hill.jl 1 62.5%
src/Metacommunity.jl 1 75.61%
src/Types.jl 1 93.02%
src/Interface.jl 2 73.33%
src/Phylogenetics.jl 4 80.39%
src/EcoBase.jl 7 18.6%
src/DiversityMeasure.jl 10 87.79%
src/Iterators.jl 12 59.09%
Totals Coverage Status
Change from base Build 1090744121: 5.5%
Covered Lines: 503
Relevant Lines: 575

💛 - Coveralls

src/Genetics.jl Outdated
Comment on lines 14 to 15
struct GeneticType{PopData} <: AbstractGeneticTypes{PopData}
dat::PopData
Copy link
Member

Choose a reason for hiding this comment

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

So, as a for instance, I would make this some arbitrary "Data" type, which is defined when you construct the object (note Data must not already exist!):

Suggested change
struct GeneticType{PopData} <: AbstractGeneticTypes{PopData}
dat::PopData
struct GeneticType{Data} <: AbstractGeneticTypes{Data}
dat::Data

Copy link
Author

Choose a reason for hiding this comment

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

Alrighty, got both constructors working. Wondering though if AbstractGenetic is necessary? Since the two genetic types could just as easily be subtypes of Diversity.API.AbstractTypes, unless you want genetic types to be treated differently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants