Paths

Types

PanGraph.Graphs.Paths.PathType
mutable struct Path
	name     :: String
	node     :: Array{Node{Block}}
	offset   :: Union{Int,Nothing}
	circular :: Bool
	position :: Array{Int}
end

Path is a single genome entry within the pangraph. name stores the unique identifier of the genome. node is an array of Nodes. The concatenation of all Nodes recapitulates the original sequence. offset is the circular shift that must be applied to the concatenation to retain the original starting positition. It is nothing if the Path is linear. circular is true only if the path should be considered circular, i.e. the last node is implictly connected to the first node. position represents the array of breakpoints each node corresponds to.

source
PanGraph.Graphs.Paths.PathMethod
Path(name::String,node::Node{Block};circular::Bool=false)

Return a new Path structure obtained from a single node and name name. By default will be interpreted as a linear path.

source

Functions

Base.lengthMethod
length(p::Path)

Return the number of nodes associated to Path p.

source
Base.replace!Method
replace!(p::Path, old::Array{Link}, new::Block)

Replace all instances of oriented Block list old with the single block new. Operates on Path p in place.

source
Base.replace!Method
replace!(p::Path, old::Block, new::Array{Block}, orientation::Bool)

Replace all instances of Block old with the array of blocks new. Operates on Path p in place. orientation is the relative orientation assumed between old and new, i.e. if it is false, new is assumed to be the reverse complement of old.

source
PanGraph.Graphs.sequenceMethod
sequence(p::Path; shift=true)

Return the reconstructed sequence of Path p. If shift is false, the circular offset will be ignored.

source