Module: RGFATools::LinearPaths
- Included in:
- RGFATools
- Defined in:
- lib/rgfatools/linear_paths.rb
Overview
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) ⇒ RGFA
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 inname
-
: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
Note that the extensions to the original method will only be run if either #enable_extensions has been called on RGFA object or the enable_tracking parameter is set.. After calling #enable_extensions, you may still obtain the original behaviour by setting the disable_tracking parameter.
Limitations: all containments und paths involving merged segments are deleted.
|
# File 'lib/rgfatools/linear_paths.rb', line 7
|