Package picard.sam

Class BuildBamIndex


  • @DocumentedFeature
    public class BuildBamIndex
    extends CommandLineProgram
    Command line program to generate a BAM index (.bai) file from a BAM (.bam) file
    • Field Detail

      • INPUT

        @Argument(shortName="I",
                  doc="A BAM file or GA4GH URL to process. Must be sorted in coordinate order.")
        public PicardHtsPath INPUT
      • OUTPUT

        @Argument(shortName="O",
                  doc="The BAM index file. Defaults to x.bai if INPUT is x.bam, otherwise INPUT.bai.\nIf INPUT is a URL and OUTPUT is unspecified, defaults to a file in the current directory.",
                  optional=true)
        public File OUTPUT
    • Constructor Detail

      • BuildBamIndex

        public BuildBamIndex()
    • Method Detail

      • doWork

        protected int doWork()
        Main method for the program. Checks that all input files are present and readable and that the output file can be written to. Then iterates through all the records generating a BAM Index, then writes the bai file.
        Specified by:
        doWork in class CommandLineProgram
        Returns:
        program exit status.