I've been trying to get a a method working based on the test_longest_path.jl.
I'm running from a singularity container, produced from a Dockerfile with the following:
FROM ubuntu:21.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y dialog apt-utils julia git wget \
&& rm -rf /var/lib/apt/lists/*
RUN julia -e 'import Pkg; Pkg.add("BioGraph"); Pkg.add("Cbc"); Pkg.add("LightGraphs"); Pkg.add("Suppressor"); Pkg.precompile()'
import Pkg; Pkg.add("BioGraph"); Pkg.add("Cbc"); Pkg.add("LightGraphs"); Pkg.add("Suppressor"); using BioGraph; using BioGraph: Weight, NodeLabel, EdgeLabel; using LightGraphs; using Suppressor; using Cbc; gfa_result = read_from_gfa("gfa_sample_1.gfa"); res = find_graph_component(gfa_result); longest = find_longest_path(res.graph[1], Cbc.Optimizer, is_weighted = false); final_gfa = get_gfa(longest, "out.txt");
Making graph
Add constraint
Solving
inter: 1, objective: 6.0, num new cycle: 0
ERROR: LoadError: MethodError: no method matching get_gfa(::BioGraph.LongestPath, ::String)
Closest candidates are:
get_gfa(::BioGraph.LongestPath; outfile) at /home/ubuntu/.julia/packages/BioGraph/N9DQS/src/longest_path.jl:167
Stacktrace:
[1] top-level scope at /data/biograph_builds/BioGraph.jl/test/data/method.jl:1
[2] include(::Function, ::Module, ::String) at ./Base.jl:380
[3] include(::Module, ::String) at ./Base.jl:368
[4] exec_options(::Base.JLOptions) at ./client.jl:296
[5] _start() at ./client.jl:506
in expression starting at /data/biograph_builds/BioGraph.jl/test/data/method.jl:1
I receive a similar error if I use get_fasta instead.
It's like the get_gfa and get_fasta functions aren't accessible.
To linearise the GFA file, should I be using a method like I'm using? I assume by passing the GFA through these functions like find_longest_path, the resulting graph will be linerised. I'm attempting to produce a method for reading in a graph produced by PGGB and writing out a linerised graph compatible with Panache.