Package picard.util

# Class SequenceDictionaryUtils

java.lang.Object
picard.util.SequenceDictionaryUtils

public class SequenceDictionaryUtils extends Object
Class with helper methods for generating and writing SequenceDictionary objects.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`SequenceDictionaryUtils.SamSequenceRecordsIterator`

## Constructor Summary

Constructors
Constructor
Description
`SequenceDictionaryUtils()`

## Method Summary

Modifier and Type
Method
Description
`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.
`static void`
`encodeDictionary(BufferedWriter writer, Iterator<htsjdk.samtools.SAMSequenceRecord> samSequenceRecordIterator)`
Encodes a sequence dictionary
`static htsjdk.samtools.util.SortingCollection<String>`
`makeSortingCollection()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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 written
  `samSequenceRecordIterator` - an iterator that produces SAMSequenceRecords
Throws:
  `IllegalArgumentException` - if the iterator produces two SAMSequenceRecord with the same name

### makeSortingCollection

public static htsjdk.samtools.util.SortingCollection<String> 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 compare
  `firstDictSource` - a user-recognizable message identifying the source of the first dictionary, preferably a file path
  `secondDict` - second dictionary to compare
  `secondDictSource` - a user-recognizable message identifying the source of the second dictionary, preferably a file path