Package picard.util
Class SequenceDictionaryUtils
java.lang.Object
picard.util.SequenceDictionaryUtils
Class with helper methods for generating and writing SequenceDictionary objects.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertSequenceDictionariesEqual
(htsjdk.samtools.SAMSequenceDictionary firstDict, String firstDictSource, htsjdk.samtools.SAMSequenceDictionary secondDict, String secondDictSource) Throw an exception if the two provided sequence dictionaries are not equal.static void
encodeDictionary
(BufferedWriter writer, Iterator<htsjdk.samtools.SAMSequenceRecord> samSequenceRecordIterator) Encodes a sequence dictionarystatic htsjdk.samtools.util.SortingCollection<String>
-
Constructor Details
-
SequenceDictionaryUtils
public SequenceDictionaryUtils()
-
-
Method Details
-
encodeDictionary
public static void encodeDictionary(BufferedWriter writer, Iterator<htsjdk.samtools.SAMSequenceRecord> samSequenceRecordIterator) Encodes a sequence dictionary- Parameters:
writer
- a Buffered writer into which the dictionary will be writtensamSequenceRecordIterator
- an iterator that produces SAMSequenceRecords- Throws:
IllegalArgumentException
- if the iterator produces two SAMSequenceRecord with the same name
-
makeSortingCollection
-
assertSequenceDictionariesEqual
public static void assertSequenceDictionariesEqual(htsjdk.samtools.SAMSequenceDictionary firstDict, String firstDictSource, htsjdk.samtools.SAMSequenceDictionary secondDict, String secondDictSource) Throw an exception if the two provided sequence dictionaries are not equal.- Parameters:
firstDict
- first dictionary to comparefirstDictSource
- a user-recognizable message identifying the source of the first dictionary, preferably a file pathsecondDict
- second dictionary to comparesecondDictSource
- a user-recognizable message identifying the source of the second dictionary, preferably a file path
-