It looks like you're new here. If you want to get involved, click one of these buttons!
In theory, any class implementing the
OutputStream interface. In practice, three types of classes are commonly used:
PrintStreams for plain text files,
SAMFileWriters for BAM files, and
VCFWriters for VCF files.
To declare a basic
PrintStream for output, use the following declaration syntax:
@Output public PrintStream out;
And use it just as you would any other PrintStream:
@Output streams prepopulate
required in this context means that the GATK will always fill in the contents of the
out field for you. If the user specifies no
--out command-line argument, the 'out' field will be prepopulated with a stream pointing to
If your walker outputs a custom format that requires more than simple concatenation by Queue you should also implement a custom
For some applications, you might need to manage their own SAM readers and writers directly from inside your walker. Current best practice for creating these Readers / Writers is to declare arguments of type
SAMFileWriter as in the following example:
@Output SAMFileWriter outputBamFile = null;
If you do not specify the full name and short name, the writer will provide system default names for these arguments. Creating a
SAMFileWriter in this way will create the type of writer most commonly used by members of the GSA group at the Broad Institute -- it will use the same header as the input BAM and require presorted data. To change either of these attributes, use the
StingSAMIterator interface instead:
@Output StingSAMFileWriter outputBamFile = null;
and later, in
initialize(), run one or both of the following methods:
You can change the header or presorted state until the first alignment is written to the file.
VCFWriter outputs behave similarly to
SAMFileWriters. Declare a
VCFWriter as follows:
@Output(doc="File to which variants should be written",required=true)
protected VCFWriter writer = null;
The walkers provide a protected logger instance. Users can adjust the debug level of the walkers using the
-l command line option.
Turning on verbose logging can produce more output than is really necessary. To selectively turn on logging for a class or package, specify a
log4j.properties property file from the command line as follows:
-Dlog4j.configuration=file:///<your development root>/Sting/java/config/log4j.properties
log4j.properties file is available in the
java/config directory of the Git repository.
Geraldine Van der Auwera, PhD