-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
…oved src.graph to Graph.models.
…simple creation test. Run manage.py migrate
Travis still won't be happy with the Django setup.
… side effects in testing.
…blocker # Conflicts: # HaploBlocker/HaploBlocker.ipynb
…blocker # Conflicts: # HaploBlocker/HaploBlocker.ipynb
…it_one_group improved. Use test_workflow
…lit_one_group: Added new test with by hand data. Refactoring of update_transitions.
…sts. Next is integration with the rest of vgbrowser
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job @josiahseaman and @tpook92, thumps up!
There are some minor questions from my side regarding understanding the code and documentation of the code. I would be happy, if you could answer them ;)
As soon as I have a clear picture, you are ready to go.
@@ -336,12 +341,3 @@ def load_from_slices(cls, slices, paths): | |||
graph = cls(paths) | |||
graph.slices = slices | |||
return graph | |||
|
|||
|
|||
if __name__ == "__main__": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we feed the location of the xg binary now? Not needed, yet?
HaploBlocker/haplonetwork.py
Outdated
class Node: | ||
def __init__(self, ident, start, end, specimens=None, upstream=None, downstream=None): | ||
self.ident = ident | ||
self.start = start #Point() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So start
and end
are SNPs? Or SNPs and base pairs? Or a node id?
Here, I would find it really helpful, if you could add some multi line docstrings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes these are SNP-numbers.
This originated from us using a SNP-chip data set to build the original graph. The only time they are actually used is for generating nodeIDs and to make it easier for us to check the results.
Do we need some kind of position for the visualization? BP-position might be different based on specimen or even multiple values for a specimens in case of CNV.
In vg graphs we are building a positional index of the paths in the graph.
The node IDs aren't stable or something that we use for positional
organization. What matters are the actual sequences the graph was made
from. One way to provide this for SNP data is to make each of the alternate
alleles in the graph a path.
…On Wed, Aug 14, 2019, 17:12 Torsten Pook ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In HaploBlocker/haplonetwork.py
<#22 (comment)>:
> + return next(iter(iterable))
+
+
+class Point:
+ def __init__(self, snp, bp=0):
+ self.snp, self.bp = snp, bp
+
+ @Property
+ def window(self):
+ return self.snp // BLOCK_SIZE
+
+
+class Node:
+ def __init__(self, ident, start, end, specimens=None, upstream=None, downstream=None):
+ self.ident = ident
+ self.start = start #Point()
Yes these are SNP-numbers.
This originated from us using a SNP-chip data set to build the original
graph. The only time they are actually used is for generating nodeIDs and
to make it easier for us to check the results.
Do we need some kind of position for the visualization? BP-position might
be different based on specimen or even multiple values for a specimens in
case of CNV.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#22>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABDQEOZNE2F5HSHFM5XFNLQEQOFNANCNFSM4ILLZNEQ>
.
|
…h a simple integer. Same functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the documentation added I can understand the code much better now.
I have no further questions from my side.
@@ -0,0 +1,343 @@ | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very detailed documentation now, thanks!
This pull request rearranges the file structure to bring everything together under a unified django app structure. Torsten and Josiah's work on HaploBlocker is contained in the HaploBlocker app, while Toshiyuki and Josiah's work on Graph structures is contained in the Graph app. HaploBlocker is successfully using all 3 of the basic graph simplifications.
Currently, HaploBlocker and Graph are not using the same data objects. The next step will be a HaploBlocker refactor to use database objects defined in Graph.
Travis is currently not passing because the Django path changes were never resolved. However, unit tests run from PyCharm all pass (or are skipped).