public final class SequenceDictionaryUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SequenceDictionaryUtils.SequenceDictionaryCompatibility |
Modifier and Type | Field and Description |
---|---|
protected static htsjdk.samtools.SAMSequenceRecord |
CHR1_B36 |
protected static htsjdk.samtools.SAMSequenceRecord |
CHR1_B37 |
protected static htsjdk.samtools.SAMSequenceRecord |
CHR1_HG18 |
protected static htsjdk.samtools.SAMSequenceRecord |
CHR1_HG19 |
protected static htsjdk.samtools.SAMSequenceRecord |
CHR10_B36 |
protected static htsjdk.samtools.SAMSequenceRecord |
CHR10_B37 |
protected static htsjdk.samtools.SAMSequenceRecord |
CHR10_HG18 |
protected static htsjdk.samtools.SAMSequenceRecord |
CHR10_HG19 |
protected static htsjdk.samtools.SAMSequenceRecord |
CHR2_B36 |
protected static htsjdk.samtools.SAMSequenceRecord |
CHR2_B37 |
protected static htsjdk.samtools.SAMSequenceRecord |
CHR2_HG18 |
protected static htsjdk.samtools.SAMSequenceRecord |
CHR2_HG19 |
Modifier and Type | Method and Description |
---|---|
static SequenceDictionaryUtils.SequenceDictionaryCompatibility |
compareDictionaries(htsjdk.samtools.SAMSequenceDictionary dict1,
htsjdk.samtools.SAMSequenceDictionary dict2,
boolean checkContigOrdering)
Workhorse routine that takes two dictionaries and returns their compatibility.
|
static java.util.Set<java.lang.String> |
getCommonContigsByName(htsjdk.samtools.SAMSequenceDictionary dict1,
htsjdk.samtools.SAMSequenceDictionary dict2)
Returns the set of contig names found in both dicts.
|
static java.util.Set<java.lang.String> |
getContigNames(htsjdk.samtools.SAMSequenceDictionary dict) |
static java.util.List<java.lang.String> |
getContigNamesList(htsjdk.samtools.SAMSequenceDictionary refSeqDict) |
static java.lang.String |
getDictionaryAsString(htsjdk.samtools.SAMSequenceDictionary dict)
Returns a compact String representation of the sequence dictionary it's passed
The format of the returned String is:
[ contig1Name(length: contig1Length) contig2Name(length: contig2Length) ...
|
static boolean |
sequenceRecordsAreEquivalent(htsjdk.samtools.SAMSequenceRecord first,
htsjdk.samtools.SAMSequenceRecord second)
Helper routine that returns whether two sequence records are equivalent, defined as having the same name and
lengths.
|
static void |
validateCRAMDictionaryAgainstReference(htsjdk.samtools.SAMSequenceDictionary referenceDictionary,
htsjdk.samtools.SAMSequenceDictionary cramDictionary)
Tests for compatibility between a reference dictionary and a CRAM dictionary, using appropriate
validation settings.
|
static void |
validateDictionaries(java.lang.String name1,
htsjdk.samtools.SAMSequenceDictionary dict1,
java.lang.String name2,
htsjdk.samtools.SAMSequenceDictionary dict2)
Tests for compatibility between two sequence dictionaries, using standard validation settings appropriate
for the GATK.
|
static void |
validateDictionaries(java.lang.String name1,
htsjdk.samtools.SAMSequenceDictionary dict1,
java.lang.String name2,
htsjdk.samtools.SAMSequenceDictionary dict2,
boolean requireSuperset,
boolean checkContigOrdering)
Tests for compatibility between two sequence dictionaries.
|
protected static final htsjdk.samtools.SAMSequenceRecord CHR1_HG18
protected static final htsjdk.samtools.SAMSequenceRecord CHR2_HG18
protected static final htsjdk.samtools.SAMSequenceRecord CHR10_HG18
protected static final htsjdk.samtools.SAMSequenceRecord CHR1_HG19
protected static final htsjdk.samtools.SAMSequenceRecord CHR2_HG19
protected static final htsjdk.samtools.SAMSequenceRecord CHR10_HG19
protected static final htsjdk.samtools.SAMSequenceRecord CHR1_B36
protected static final htsjdk.samtools.SAMSequenceRecord CHR2_B36
protected static final htsjdk.samtools.SAMSequenceRecord CHR10_B36
protected static final htsjdk.samtools.SAMSequenceRecord CHR1_B37
protected static final htsjdk.samtools.SAMSequenceRecord CHR2_B37
protected static final htsjdk.samtools.SAMSequenceRecord CHR10_B37
public static void validateDictionaries(java.lang.String name1, htsjdk.samtools.SAMSequenceDictionary dict1, java.lang.String name2, htsjdk.samtools.SAMSequenceDictionary dict2)
validateCRAMDictionaryAgainstReference(SAMSequenceDictionary, SAMSequenceDictionary)
instead.name1
- name associated with dict1dict1
- the sequence dictionary dict1name2
- name associated with dict2dict2
- the sequence dictionary dict2public static void validateCRAMDictionaryAgainstReference(htsjdk.samtools.SAMSequenceDictionary referenceDictionary, htsjdk.samtools.SAMSequenceDictionary cramDictionary)
referenceDictionary
- the sequence dictionary for the referencecramDictionary
- sequence dictionary from a CRAM filepublic static void validateDictionaries(java.lang.String name1, htsjdk.samtools.SAMSequenceDictionary dict1, java.lang.String name2, htsjdk.samtools.SAMSequenceDictionary dict2, boolean requireSuperset, boolean checkContigOrdering)
name1
- name associated with dict1dict1
- the sequence dictionary dict1name2
- name associated with dict2dict2
- the sequence dictionary dict2requireSuperset
- if true, require that dict1 be a superset of dict2, rather than dict1 and dict2 sharing a common subsetcheckContigOrdering
- if true, require common contigs to be in the same relative order with respect to each other
and occur at the same absolute indices, and forbid lexicographically-sorted human dictionariespublic static SequenceDictionaryUtils.SequenceDictionaryCompatibility compareDictionaries(htsjdk.samtools.SAMSequenceDictionary dict1, htsjdk.samtools.SAMSequenceDictionary dict2, boolean checkContigOrdering)
dict1
- first sequence dictionarydict2
- second sequence dictionarycheckContigOrdering
- if true, perform checks related to contig ordering: forbid lexicographically-sorted
dictionaries, and require common contigs to be in the same relative order and at the
same absolute indicespublic static boolean sequenceRecordsAreEquivalent(htsjdk.samtools.SAMSequenceRecord first, htsjdk.samtools.SAMSequenceRecord second)
first
- first sequence record to comparesecond
- second sequence record to comparepublic static java.util.Set<java.lang.String> getCommonContigsByName(htsjdk.samtools.SAMSequenceDictionary dict1, htsjdk.samtools.SAMSequenceDictionary dict2)
dict1
- dict2
- public static java.util.Set<java.lang.String> getContigNames(htsjdk.samtools.SAMSequenceDictionary dict)
public static java.util.List<java.lang.String> getContigNamesList(htsjdk.samtools.SAMSequenceDictionary refSeqDict)
public static java.lang.String getDictionaryAsString(htsjdk.samtools.SAMSequenceDictionary dict)
dict
- a non-null SAMSequenceDictionary