Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load bcalm2's output into our bigraph #2

Closed
18 tasks done
sebschmi opened this issue May 25, 2020 · 0 comments · Fixed by #26
Closed
18 tasks done

Load bcalm2's output into our bigraph #2

sebschmi opened this issue May 25, 2020 · 0 comments · Fixed by #26
Assignees
Labels
enhancement New feature or request

Comments

@sebschmi
Copy link
Collaborator

sebschmi commented May 25, 2020

Implement this functionality in the context of the verify command.

  • Create genome-graph crate for the IO functions
  • Load the output, perhaps with support of the bio crate
    • Store the genome string
    • Compute reverse complements
    • Add error handling using error-chain
    • Implement DynamicBigraph::add_partner_nodes()
    • Implement DynamicBigraph::add_mirror_edges()
    • parse a single node from bcalm2
    • parse all the nodes from bcalm2 into a graph
    • add the edges to the graph
    • add the partner nodes and mirror edges to the graph
  • Save the output again, such that we can verify that it gets loaded correctly
    • plan this
    • write a method that serialises a single node including its out-edges
    • write a method that serialises all nodes, but skips nodes whose partner has already been serialised

Also add tests for

  • DynamicBigraph::add_partner_nodes()
  • DynamicBigraph::add_mirror_edges()
  • One full test case with a tiny bcalm2 file (artificially made) that checks if the resulting graph is completely correct
@sebschmi sebschmi added the enhancement New feature or request label May 25, 2020
@sebschmi sebschmi added this to the Load bigraph from bcalm2 milestone May 25, 2020
@sebschmi sebschmi assigned sebschmi and unassigned sebschmi May 25, 2020
@sebschmi sebschmi self-assigned this Jul 20, 2020
sebschmi added a commit that referenced this issue Jul 20, 2020
sebschmi added a commit that referenced this issue Jul 20, 2020
sebschmi added a commit that referenced this issue Jul 20, 2020
The command now opens the file and prints the first line, and panics afterwards.

Relates to #2
sebschmi added a commit that referenced this issue Jul 20, 2020
Error handling is done with error-chain that was added in this commit.

Relates to #2
sebschmi added a commit that referenced this issue Jul 21, 2020
…Wrapper`.

Also added a trait `BidirectedNodeData` with a function `reverse_complement` that can be used instead of the `binode_mapping_function` parameter of some methods.
The test case for `add_partner_nodes()` currently fails, because `StaticBigraph::new_unchecked()` is unimplemented.

Relates to #2
sebschmi added a commit that referenced this issue Jul 21, 2020
+ Implement `DynamicBigraph` and `add_partner_nodes()` for `NodeBigraphWrapper`
+ Implement `new_unchecked` for `NodeBigraphWrapper`
+ Add trait `BidirectedNodeData` with a function `reverse_complement` that can be used instead of the `binode_mapping_function` parameter of some methods
* Fix partner node: Return none if invalid

Relates to #2
sebschmi added a commit that referenced this issue Jul 21, 2020
+ implement `add_mirror_edges`
+ add partner nodes to the graph
+ add edges to the graph
+ add mirror edges to the graph

Relates to #2
sebschmi added a commit that referenced this issue Jul 21, 2020
sebschmi added a commit that referenced this issue Jul 21, 2020
sebschmi added a commit that referenced this issue Jul 21, 2020
This allows us to verify that the bigraph was loaded correctly.

Relates to #2
sebschmi added a commit that referenced this issue Jul 21, 2020
* bcalm2 seems to output the edges without system, therefore we had to sort them manually
* we were missing some edges, they are output now
* the test case can be reproduced manually with the `verify.sh` script

Relates to #2
sebschmi added a commit that referenced this issue Jul 21, 2020
sebschmi added a commit that referenced this issue Jul 22, 2020
Read from a string, write it again and check if it is the same.

Relates to #2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant