Package org.snpeff.interval
Class MarkerUtil
- java.lang.Object
-
- org.snpeff.interval.MarkerUtil
-
public class MarkerUtil extends java.lang.Object
Generic utility methods for Markers- Author:
- pcingola
-
-
Constructor Summary
Constructors Constructor Description MarkerUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<Marker,Marker>
collapseZeroGap(Markers markersOri)
Collapse adjacent intervals (i.e.static Markers
readTxt(java.lang.String fileName, Genome genome, int positionBase)
Read intervals from a file using a simplt TXT format Format: chr \t start \t end \t id Note: Zero-based positionsstatic java.util.Map<Marker,Marker>
redundant(java.util.Collection<? extends Marker> markersOri)
Redundant markers in a list: Find intervals that are totally included in other intervals in the list
-
-
-
Method Detail
-
collapseZeroGap
public static java.util.Map<Marker,Marker> collapseZeroGap(Markers markersOri)
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
public static Markers readTxt(java.lang.String fileName, Genome genome, int positionBase)
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
public static java.util.Map<Marker,Marker> redundant(java.util.Collection<? extends Marker> markersOri)
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)
-
-