Package htsjdk.variant.variantcontext.writer

# Class SortingVariantContextWriter

java.lang.Object
htsjdk.variant.variantcontext.writer.SortingVariantContextWriter

All Implemented Interfaces:
  `VariantContextWriter`, `Closeable`, `AutoCloseable`

@Deprecated public class SortingVariantContextWriter extends Object
Deprecated.
9/2017, this class is completely untested and unsupported, there is no replacement at this time if you use this class please file an issue on github or it will be removed at some point in the future
this class writes VCF files, allowing records to be passed in unsorted (up to a certain genomic distance away)

## Field Summary

Fields
Modifier and Type
Field
Description
`protected static final int`
`BEFORE_MOST_UPSTREAM_LOC`
Deprecated.
`protected Integer`
`mostUpstreamWritableLoc`
Deprecated.

## Constructor Summary

Constructors
Constructor
Description
`SortingVariantContextWriter(VariantContextWriter innerWriter, int maxCachingStartDistance)`
Deprecated.
`SortingVariantContextWriter(VariantContextWriter innerWriter, int maxCachingStartDistance, boolean takeOwnershipOfInner)`
Deprecated.
create a local-sorting VCF writer, given an inner VCF writer to write to

## Method Summary

Modifier and Type
Method
Description
`void`
`add(VariantContext vc)`
Deprecated.
add a record to the file
`boolean`
`checkError()`
Deprecated.
`void`
`close()`
Deprecated.
attempt to close the VCF file; we need to flush the queue first
`protected void`
`emitSafeRecords()`
Deprecated.
`protected void`
`noteCurrentRecord(VariantContext vc)`
Deprecated.
`void`
`setHeader(VCFHeader header)`
Deprecated.
Sets the VCF header so that data blocks can be written without writing the header Exactly one of writeHeader() or setHeader() should be called when using a writer
`String`
`toString()`
Deprecated.
Gets a string representation of this object.
`void`
`writeHeader(VCFHeader header)`
Deprecated.
Writes the header

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

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

## Field Details

### mostUpstreamWritableLoc

protected Integer mostUpstreamWritableLoc
Deprecated.

### BEFORE_MOST_UPSTREAM_LOC

protected static final int BEFORE_MOST_UPSTREAM_LOC
Deprecated.

See Also:
  - Constant Field Values

## Constructor Details

### SortingVariantContextWriter

public SortingVariantContextWriter(VariantContextWriter innerWriter, int maxCachingStartDistance, boolean takeOwnershipOfInner)
Deprecated.
create a local-sorting VCF writer, given an inner VCF writer to write to

Parameters:
  `innerWriter` - the VCFWriter to write to
  `maxCachingStartDistance` - the maximum start distance between records that we'll cache
  `takeOwnershipOfInner` - Should this Writer close innerWriter when it's done with it

### SortingVariantContextWriter

public SortingVariantContextWriter(VariantContextWriter innerWriter, int maxCachingStartDistance)
Deprecated.

## Method Details

### noteCurrentRecord

protected void noteCurrentRecord(VariantContext vc)
Deprecated.

### checkError

public boolean checkError()
Deprecated.

Returns:
  true if the underlying stream is a java.io.PrintStream and its checkError returned true, used for pipelines

### writeHeader

public void writeHeader(VCFHeader header)
Deprecated.
Description copied from interface: `VariantContextWriter`
Writes the header

Specified by:
  `writeHeader` in interface `VariantContextWriter`
Parameters:
  `header` - header

### close

public void close()
Deprecated.
attempt to close the VCF file; we need to flush the queue first

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `VariantContextWriter`

### add

public void add(VariantContext vc)
Deprecated.
add a record to the file

Specified by:
  `add` in interface `VariantContextWriter`
Parameters:
  `vc` - the Variant Context object

### setHeader

public void setHeader(VCFHeader header)
Deprecated.
Description copied from interface: `VariantContextWriter`
Sets the VCF header so that data blocks can be written without writing the header Exactly one of writeHeader() or setHeader() should be called when using a writer

Specified by:
  `setHeader` in interface `VariantContextWriter`
Parameters:
  `header` - VCF header

### toString

public String toString()
Deprecated.
Gets a string representation of this object.

Overrides:
  `toString` in class `Object`
Returns:
  a string representation of this object

### emitSafeRecords

protected void emitSafeRecords()
Deprecated.