Class SequenceBinUtils

java.lang.Object
ubic.gemma.core.analysis.sequence.SequenceBinUtils

public class SequenceBinUtils extends Object
Used to assign a bin to a chromosome location, identify bins for a range, or to generate SQL to add to a query on a GoldenPath database. Directly ported from Jim Kent's binRange.c and hdb.c.
Author:
pavlidis
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    addBinToQuery(String table, Long start, Long end)
    Directly ported from jksrc binRange.c and hdb.c From the binRange.c comments: There's a bin for each 128k segment, for each 1M segment, for each 8M segment, for each 64M segment, and for each chromosome (which is assumed to be less than 512M.) A range goes into the smallest bin it will fit in.
    static int
    binFromRange(int start, int end)
    return bin that this start-end segment is in

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SequenceBinUtils

      public SequenceBinUtils()
  • Method Details

    • addBinToQuery

      public static String addBinToQuery(String table, Long start, Long end)
      Directly ported from jksrc binRange.c and hdb.c From the binRange.c comments: There's a bin for each 128k segment, for each 1M segment, for each 8M segment, for each 64M segment, and for each chromosome (which is assumed to be less than 512M.) A range goes into the smallest bin it will fit in.
      Parameters:
      table - The alias of the table (SQL) or class (HQL)
      start - start
      end - end
      Returns:
      clause that will restrict to relevant bins to query. This should be ANDed into your WHERE clause.
    • binFromRange

      public static int binFromRange(int start, int end)
      return bin that this start-end segment is in
      Parameters:
      start - start
      end - end
      Returns:
      bin