Class SequenceBinUtils
java.lang.Object
ubic.gemma.core.analysis.sequence.SequenceBinUtils
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.)static int
binFromRange
(int start, int end) return bin that this start-end segment is in
-
Constructor Details
-
SequenceBinUtils
public SequenceBinUtils()
-
-
Method Details
-
addBinToQuery
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
-