Package org.snpeff.interval
Class MarkerUtil
java.lang.Object
org.snpeff.interval.MarkerUtil
Generic utility methods for Markers
- Author:
- pcingola
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncollapseZeroGap
(Markers markersOri) Collapse adjacent intervals (i.e.static Markers
Read intervals from a file using a simplt TXT format Format: chr \t start \t end \t id Note: Zero-based positionsredundant
(Collection<? extends Marker> markersOri) Redundant markers in a list: Find intervals that are totally included in other intervals in the list
-
Constructor Details
-
MarkerUtil
public MarkerUtil()
-
-
Method Details
-
collapseZeroGap
Collapse adjacent intervals (i.e. intervals separated by a gap of zero length E.g.: The markers [1-100] and [101-200] are collapsed into one single marker [1-200]- Returns:
- A set of new markers that can replace the old ones, or the same set if no change is required.
-
readTxt
Read intervals from a file using a simplt TXT format Format: chr \t start \t end \t id Note: Zero-based positions- Parameters:
fileName
- : Path to filegenome
- : Genome to use. Can be null (a new one will be created)positionBase
- : Position offset. Use '1' for one-based coordinates and '0' for zero-based coordinates.
-
redundant
Redundant markers in a list: Find intervals that are totally included in other intervals in the list- Parameters:
markersOri
-- Returns:
- A map markerIncluded -> markerLarge, where markerIncluded in completely included in markerLarge WARNING: Markers having start > end (i.e. circular chromosome with uncorrected coordinates) are not processed correctly by this method (they are explicitly ignored)
-