public class VCFUtils
extends java.lang.Object
| Constructor and Description |
|---|
VCFUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.io.File |
createTemporaryIndexedVcfFile(java.lang.String prefix,
java.lang.String suffix)
This method creates a temporary VCF file and its appropriately named index file, and will delete them on exit.
|
static java.io.File |
createTemporaryIndexedVcfFromInput(java.io.File vcfFile,
java.lang.String tempFilePrefix)
This method makes a copy of the input VCF and creates an index file for it in the same location.
|
static java.util.List<VCFContigHeaderLine> |
makeContigHeaderLines(SAMSequenceDictionary refDict,
java.io.File referenceFile)
Create VCFHeaderLines for each refDict entry, and optionally the assembly if referenceFile != null
|
static java.util.Set<VCFHeaderLine> |
smartMergeHeaders(java.util.Collection<VCFHeader> headers,
boolean emitWarnings) |
static VCFHeader |
withUpdatedContigs(VCFHeader oldHeader,
java.io.File referenceFile,
SAMSequenceDictionary refDict)
Add / replace the contig header lines in the VCFHeader with the in the reference file and master reference dictionary
|
static java.util.Set<VCFHeaderLine> |
withUpdatedContigsAsLines(java.util.Set<VCFHeaderLine> oldLines,
java.io.File referenceFile,
SAMSequenceDictionary refDict) |
static java.util.Set<VCFHeaderLine> |
withUpdatedContigsAsLines(java.util.Set<VCFHeaderLine> oldLines,
java.io.File referenceFile,
SAMSequenceDictionary refDict,
boolean referenceNameOnly) |
public static java.util.Set<VCFHeaderLine> smartMergeHeaders(java.util.Collection<VCFHeader> headers, boolean emitWarnings) throws java.lang.IllegalStateException
java.lang.IllegalStateExceptionpublic static VCFHeader withUpdatedContigs(VCFHeader oldHeader, java.io.File referenceFile, SAMSequenceDictionary refDict)
oldHeader - the header to updatereferenceFile - the file path to the reference sequence used to generate this vcfrefDict - the SAM formatted reference sequence dictionarypublic static java.util.Set<VCFHeaderLine> withUpdatedContigsAsLines(java.util.Set<VCFHeaderLine> oldLines, java.io.File referenceFile, SAMSequenceDictionary refDict)
public static java.util.Set<VCFHeaderLine> withUpdatedContigsAsLines(java.util.Set<VCFHeaderLine> oldLines, java.io.File referenceFile, SAMSequenceDictionary refDict, boolean referenceNameOnly)
public static java.util.List<VCFContigHeaderLine> makeContigHeaderLines(SAMSequenceDictionary refDict, java.io.File referenceFile)
refDict - reference dictionaryreferenceFile - for assembly name. May be nullpublic static java.io.File createTemporaryIndexedVcfFile(java.lang.String prefix,
java.lang.String suffix)
throws java.io.IOException
prefix - - The prefix string to be used in generating the file's name; must be at least three characters longsuffix - - The suffix string to be used in generating the file's name; may be null, in which case the suffix ".tmp" will be usedjava.io.IOException - - if a file could not be created.public static java.io.File createTemporaryIndexedVcfFromInput(java.io.File vcfFile,
java.lang.String tempFilePrefix)
throws java.io.IOException
vcfFile - the vcf file to indexjava.io.IOException