Skip to content

Commit

Permalink
fix: error with gfa export of fully duplicated paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mmolari authored and nnoll committed Mar 3, 2022
1 parent a30e065 commit ca646a1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/gfa.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ function marshal_gfa(io::IO, G::Graph; opt=nothing)
]
filter!(n->n!==nothing, nodes)

if length(nodes) == 0
continue
end

for (j,node) in enumerate(nodes[2:end])
addlink!(nodes[j], node)
end
Expand Down Expand Up @@ -170,8 +174,10 @@ function marshal_gfa(io::IO, G::Graph; opt=nothing)
end

write(io, "# sequences\n")
for path in values(paths)
write(io,"$(path)\n")
for i = 1:length(paths)
if isassigned(paths, i)
write(io, "$(paths[i])\n")
end
end
end

Expand Down

0 comments on commit ca646a1

Please sign in to comment.