Class MarkerUtil

java.lang.Object
org.snpeff.interval.MarkerUtil

public class MarkerUtil extends Object
Generic utility methods for Markers
Author:
pcingola
  • Constructor Details

    • MarkerUtil

      public MarkerUtil()
  • Method Details

    • collapseZeroGap

      public static 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(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 file
      genome - : 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 Map<Marker,Marker> redundant(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)