BioGraph Function

Read GFA

BioGraph.read_from_gfaFunction
read_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.

source

Graph Component

BioGraph.get_summaryMethod
get_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
source
BioGraph.get_terminusMethod
get_terminus(g_result::BioGraph.GraphResult; outfile::String)

Get all source and sink nodes of GraphResult. Write to CSV, including data from GFA.

source
BioGraph.get_gfaMethod
get_gfa(g_result::BioGraph.GraphResult; outfile::String)

Get GFA output of GraphResult.

source

Longest Path

BioGraph.find_longest_pathFunction
find_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: if true find shortest path which is weighted
  • source_node, sink_node: find longest path which has source and sink nodes.
source
BioGraph.get_gfaMethod
get_gfa(g_result::BioGraph.LongestPath; outfile::String)

Get GFA output of LongestPath.

source
BioGraph.get_fastaMethod
get_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.

source