Class SortGff


public class SortGff extends CommandLineProgram

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 Details

    • INPUT

      @Argument(doc="Input Gff3 file to sort.", shortName="I") public File INPUT
    • OUTPUT

      @Argument(doc="Sorted Gff3 output file.", shortName="O") public File 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 class CommandLineProgram
      Returns:
      program exit status.