- Included in:
- Defined in:
Methods for the RGFA class, which involve a traversal of the graph following links
Instance Method Summary collapse
#merge_linear_path(segpath, **options) ⇒ RGFA
Merge a linear path, i.e.
Instance Method Details
#merge_linear_path(segpath, **options) ⇒
Merge a linear path, i.e. a path of segments without extra-branches. Extends the RGFA method, with additional functionality:
name: the name of the merged segment is set to the name of the single segments joined by underscore (
_). If a name already contained an underscore, it is splitted before merging. Whenever a segment is reversed complemented, its name (or the name of all its components) is suffixed with a ^; if the last letter was already ^, it is removed; if it contained
_the name is splitted, the elements reversed and joined back using
_; round parentheses are removed from the name before processing and added back after it.
:or: keeps track of the origin of the merged segment; the origin tag is set to an array of :or or name (if no :or available) tags of the segment which have been merged; the character ^ is assigned the same meaning as in
:rn: tag used to store possible inversion positions and it is updated by this method; i.e. it is passed from the single segments to the merged segment, and the coordinates updated
:mp: tag used to store the position of the single segments in the merged segment; it is created or updated by this method
Limitations: all containments und paths involving merged segments are deleted.
# File 'lib/rgfatools/linear_paths.rb', line 7