BioGraph Function
Read GFA
BioGraph.read_from_gfa — Functionread_from_gfa(filename::String; weight_file::String)Read graph from GFA file and optional weight_file (contains two column node and weight) and return GFAResult struct which has g - the graph, w - weight array, l - node label array, e - edge label array and p - path array.
Graph Component
BioGraph.find_graph_component — Functionfind_graph_component(gfa_result::BioGraph.GFAResult)Return graph components of GFAResult:
- Simple Graphs
- Lone Cycles
- Lone Nodes
BioGraph.get_summary — Methodget_summary(g_coms::BioGraph.GraphComponent)Summary of GraphComponent.
BioGraph.get_summary — Methodget_summary(g_coms::BioGraph.GraphResult)Summary of GraphResult:
- No of vertices
- No of edges
- No of source nodes
- No of end nodes
- No of path
BioGraph.get_terminus — Methodget_terminus(g_result::BioGraph.GraphResult; outfile::String)Get all source and sink nodes of GraphResult. Write to CSV, including data from GFA.
BioGraph.get_gfa — Methodget_gfa(g_result::BioGraph.GraphResult; outfile::String)Get GFA output of GraphResult.
Longest Path
BioGraph.find_longest_path — Functionfind_longest_path(graph_result::BioGraph.GraphResult, optimizer_factory; is_weighted::Bool, source_node::Int64, sink_node::Int64, has_path::String)Find longest path in graph. Input:
GraphResult- JuMP optimizer_factory such as
CPLEX.Optimizer has_path: optional string that indicates the path must have in longest path.is_weighted: iftruefind shortest path which is weightedsource_node,sink_node: find longest path which has source and sink nodes.
BioGraph.get_gfa — Methodget_gfa(g_result::BioGraph.LongestPath; outfile::String)Get GFA output of LongestPath.
BioGraph.get_fasta — Methodget_fasta(g_result::BioGraph.LongestPath; header::String="linear_path", outdir::String="")Get FastA and Bed output of LongestPath. Will not generate files if outdir was not specified.