Package picard.annotation
Class SortGff
java.lang.Object
picard.cmdline.CommandLineProgram
picard.annotation.SortGff
Summary
This tool sorts a gff3 file by coordinates, so that it can be indexed. It additionally adds flush directives where possible, which can significantly reduce the memory footprint of downstream tools. Sorting of multiple contigs can be specified by a sequence dictionary; if no sequence dictionary is specified, contigs are sorted lexicographically.
Usage Examples
1. Sort gff3 file, add flush directives. Contigs will be sorted lexicographically.
java -jar picard.jar SortGff I=input.gff3 O=output.gff3
2. Sort gff3 file, add flush directives. Contigs will be sorted according to order in sequence dictionary
java -jar picard.jar SortGff I=input.gff3 O=output.gff3 SD=dictionary.dict
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
Fields inherited from class picard.cmdline.CommandLineProgram
COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, GA4GH_CLIENT_SECRETS, MAX_ALLOWABLE_ONE_LINE_SUMMARY_LENGTH, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, referenceSequence, specialArgumentsCollection, SYNTAX_TRANSITION_URL, TMP_DIR, USE_JDK_DEFLATER, USE_JDK_INFLATER, VALIDATION_STRINGENCY, VERBOSITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int
doWork()
Do the work after command line has been parsed.Methods inherited from class picard.cmdline.CommandLineProgram
checkRInstallation, customCommandLineValidation, getCommandLine, getCommandLineParser, getCommandLineParserForArgs, getDefaultHeaders, getFaqLink, getMetricsFile, getPGRecord, getStandardUsagePreamble, getStandardUsagePreamble, getVersion, hasWebDocumentation, instanceMain, instanceMainWithExit, makeReferenceArgumentCollection, parseArgs, requiresReference, setDefaultHeaders, useLegacyParser
-
Field Details
-
INPUT
-
OUTPUT
-
SEQUENCE_DICTIONARY
@Argument(doc="Dictionary to sort contigs by. If dictionary is not provided, contigs are sorted lexicographically.", shortName="SD", optional=true) public File SEQUENCE_DICTIONARY -
nRecordsInMemory
@Argument(doc="Number of records to hold in memory before spilling to disk", optional=true) public int nRecordsInMemory
-
-
Constructor Details
-
SortGff
public SortGff()
-
-
Method Details
-
doWork
protected int doWork()Description copied from class:CommandLineProgram
Do the work after command line has been parsed. RuntimeException may be thrown by this method, and are reported appropriately.- Specified by:
doWork
in classCommandLineProgram
- Returns:
- program exit status.
-