public class HtsIntervalUtils
extends java.lang.Object
Constructor and Description |
---|
HtsIntervalUtils() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<HtsInterval> |
fromQueryIntervalArray(QueryInterval[] queryIntervals,
SAMSequenceDictionary dictionary) |
static int |
toIntegerSafe(long coord)
Convert a long coordinate to an integer, for use with interconverting between old style integer
coordinates and new style long coordinates.
|
static Locatable |
toLocatable(HtsInterval interval)
Convert an HtsInterval to a
Locatable |
static java.util.List<Locatable> |
toLocatableList(java.util.List<HtsInterval> intervals)
Convert a List of
HtsInterval to a list of Locatable . |
static QueryInterval |
toQueryInterval(HtsInterval interval,
SAMSequenceDictionary dictionary)
Convert an HtsInterval to a QueryInterval
|
static QueryInterval[] |
toQueryIntervalArray(java.util.List<HtsInterval> intervals,
SAMSequenceDictionary dictionary)
Convert a list of
HtsInterval to an array of QueryInterval |
@InternalAPI public static QueryInterval toQueryInterval(HtsInterval interval, SAMSequenceDictionary dictionary)
interval
- HtsInterval
to convertdictionary
- sequence dictionary to use to convert string query names to contig indexinterval
@InternalAPI public static Locatable toLocatable(HtsInterval interval)
Locatable
interval
- HtsInterval
to convertinterval
@InternalAPI public static java.util.List<Locatable> toLocatableList(java.util.List<HtsInterval> intervals)
HtsInterval
to a list of Locatable
.intervals
- list of HtsInterval
s to convertLocatable
@InternalAPI public static QueryInterval[] toQueryIntervalArray(java.util.List<HtsInterval> intervals, SAMSequenceDictionary dictionary)
HtsInterval
to an array of QueryInterval
intervals
- list of HtsInterval
s to convertdictionary
- sequence dictionary to useQueryInterval
@InternalAPI public static java.util.List<HtsInterval> fromQueryIntervalArray(QueryInterval[] queryIntervals, SAMSequenceDictionary dictionary)
queryIntervals
- list of QueryInterval
to convertdictionary
- sequence dictionary to use for the conversionHtsInterval
@InternalAPI public static int toIntegerSafe(long coord)
coord
- long coordinate to convertcoord
if the conversion is safejava.lang.IllegalArgumentException
- if converting results in overflow