Documentation ¶
Overview ¶
Package overlap identifies overlaps on a list of segments.
A segment is defined by the tuple:
segment_id, segment_start, segment_end
segment_start and segment_end mark the beginning and the end of the segment on the x-axis.
An overlap between two or more segments is defined by the tuple:
overlap_length, overlap_start, overlap_end, segment_count, segment_list
overlap_length is the length of the overlapping segment, expressed in the same units as segment_start and segment_end. overlap_start and overlap_end mark the beginning and the end of the overlapping segment. segment_count is the number of segments crossing over the overlap; segment_list carries the comma-separated list of all segment_id's crossing over the overlap.
This package then reads a comma-separated values (CSV) file, where each CSV record identifies a segment. It produces a CSV file with all the identified overlaps, one overlap per CSV record.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Calculate ¶
Calculate reads a CSV file with segments (filePath) and returns a list of all of their overlaps (results).
Each CSV record in filePath should identify a segment and consist of exactly three fields:
segment_id(string),segment_start(float64),segment_end(float64)
The type of each field is included in parentheses.
Types ¶
This section is empty.