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

Evolutionary distance computation for BioSequence. #228

Merged
merged 30 commits into from
Aug 20, 2016
Merged

Conversation

TransGirlCodes
Copy link
Member

@TransGirlCodes TransGirlCodes commented Jul 26, 2016

Fulfills some of issue #266

This PR will start with Raw mutations counts, P distances, JC69, and K80. For BioSequences.

@coveralls
Copy link

coveralls commented Jul 26, 2016

Coverage Status

Coverage increased (+0.02%) to 80.989% when pulling 7df3322 on evo_dist into cfaefd3 on master.

@codecov-io
Copy link

codecov-io commented Jul 26, 2016

Current coverage is 82.20% (diff: 75.86%)

No coverage report found for master at 061e149.

Powered by Codecov. Last update 061e149...f9d0ecd

@TransGirlCodes TransGirlCodes changed the title Initial commit evo_dist Computation of evolutionary distance between sequences. Jul 26, 2016
@coveralls
Copy link

coveralls commented Jul 26, 2016

Coverage Status

Coverage decreased (-0.1%) to 80.822% when pulling fe986e4 on evo_dist into cfaefd3 on master.

@coveralls
Copy link

coveralls commented Jul 26, 2016

Coverage Status

Coverage decreased (-0.1%) to 80.842% when pulling e8ceaac on evo_dist into e3b8ceb on master.

macro checkambig(expr)
quote
if isambiguous(a[i]) || isambiguous(b[i])
break
Copy link
Member

Choose a reason for hiding this comment

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

Why are you using break instead of throw an error?

Copy link
Member Author

Choose a reason for hiding this comment

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

It should be a continue not a break, that's a typo on my part.

@coveralls
Copy link

coveralls commented Jul 28, 2016

Coverage Status

Coverage decreased (-0.2%) to 80.767% when pulling dde72d9 on evo_dist into e3b8ceb on master.

@coveralls
Copy link

coveralls commented Jul 29, 2016

Coverage Status

Coverage decreased (-0.9%) to 80.763% when pulling 554b616 on evo_dist into 9cc8990 on master.

@@ -170,7 +232,58 @@ end

# K80 Distance computation.

<<<<<<< HEAD
Copy link
Member

Choose a reason for hiding this comment

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

Whoops! @Ward9250

Copy link
Member Author

@TransGirlCodes TransGirlCodes Aug 1, 2016

Choose a reason for hiding this comment

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

I've seen it - it's gone on my uncommitted workings 😆. Code committed here might be messy in places for a while. I'm basing the design on a C design, which uses a lot of repetitive code, and macros. In julia, with generated functions, type hierarchy, and multiple dispatch I think we can do better and be more concise, but I'm still feeling my way to the best way of doing it.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds awesome! Excuse the uninvited interjections, for some reason the diffs display in email alerts and though I'd let you know in case you missed it! Sorry for the noise.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is not problematic for me at all, in fact we encourage such participation! :)

@TransGirlCodes TransGirlCodes force-pushed the evo_dist branch 9 times, most recently from 093cfcd to 3394d73 Compare August 2, 2016 15:06
@TransGirlCodes TransGirlCodes changed the title Computation of evolutionary distance between sequences. Evolutionary distance computation for BioSequence. Aug 17, 2016
Kimura80,
distance,
Raw, # alias for N_Mutations{DifferentMutation}
P, # alias for P_Distance{DifferentMutation}
Copy link
Member

Choose a reason for hiding this comment

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

P and Raw looks too short and vague.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok it can be removed.

@TransGirlCodes
Copy link
Member Author

TransGirlCodes commented Aug 20, 2016

@bicycle1885 Based on your comments I've changed N_Mutations{T} to Count{T}, and P_Distance{T} to Proportion{T}, removing the underscore, and I think, giving them both more semantic names e.g. I think the meaning of e.g. Count{Transitions} is clear, as is Proportion{Transitions}, indeed Proportion is more descriptive for people who have never heard of the measure referred to as a p-distance (Phylogeneticists and population geneticists certainly would have heard of p-distance, but other biologists may not have).

# -----

# Evolutionary distances
abstract EvolutionaryDistances
Copy link
Member

Choose a reason for hiding this comment

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

Why is this plural?

immutable Kimura80 <: TsTv end

typealias JC69 JukesCantor69
typealias K80 Kimura80
Copy link
Member

Choose a reason for hiding this comment

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

I think these type aliases are redundant. We should stick to use a single type name to avoid unnecessary confusion.

Copy link
Member Author

Choose a reason for hiding this comment

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

JC69 and K80 and other models in phylogenetics and evo.genetics have such few letter abbreviations that are commonly used, but they can be defined elsewhere in specific places if really needed, so I took them away.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 82.209% when pulling f9d0ecd on evo_dist into 10e6478 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 82.209% when pulling f9d0ecd on evo_dist into 10e6478 on master.

@TransGirlCodes
Copy link
Member Author

@bicycle1885 tests pass now 👍 if there's nothing else I'd like to merge and tick a few things off of #266.

JukesCantor69,
Kimura80,
JC69, # alias for JukesCantor69
K80, # alias for Kimura80
Copy link
Member

Choose a reason for hiding this comment

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

I guess these type aliases are already removed (a peculiar fact is that Julia doesn't warn you for this kind of mistakes).

Copy link
Member Author

Choose a reason for hiding this comment

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

That is indeed odd that the build didn't flag that up! :O

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok just did a git commit amend, that should be gone now.

@bicycle1885
Copy link
Member

Okay, please go ahead :shipit: .

@TransGirlCodes TransGirlCodes merged commit b798fd6 into master Aug 20, 2016
@TransGirlCodes TransGirlCodes deleted the evo_dist branch August 20, 2016 20:26
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 82.192% when pulling 3c1a893 on evo_dist into 061e149 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 82.192% when pulling 3c1a893 on evo_dist into 061e149 on master.

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

Successfully merging this pull request may close these issues.

None yet

6 participants