Package ubic.gemma.persistence.util
Class SequenceBinUtils
- java.lang.Object
-
- ubic.gemma.persistence.util.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 SequenceBinUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringaddBinToQuery(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 intbinFromRange(int start, int end)return bin that this start-end segment is in
-
-
-
Method Detail
-
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- startend- 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- startend- end- Returns:
- bin
-
-