# Class AddCommentsToBam

java.lang.Object
picard.cmdline.CommandLineProgram
picard.sam.AddCommentsToBam

@DocumentedFeature public class AddCommentsToBam extends CommandLineProgram
A tool to add comments to a BAM file header. Effectively copies the BAM file except for the addition of the @CO records in the header. This tool does not support SAM files. A block copying method is used to ensure efficient transfer to the output file.

## Field Summary

Fields
Modifier and Type
Field
Description
`List<String>`
`COMMENT`
`File`
`INPUT`
`File`
`OUTPUT`

### Fields inherited from class CommandLineProgram

`COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, 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
Constructor
Description
`AddCommentsToBam()`

## Method Summary

Modifier and Type
Method
Description
`protected int`
`doWork()`
Do the work after command line has been parsed.

### Methods inherited from class CommandLineProgram

`checkRInstallation, customCommandLineValidation, getCommandLine, getCommandLineParser, getCommandLineParserForArgs, getDefaultHeaders, getFaqLink, getMetricsFile, getPGRecord, getStandardUsagePreamble, getStandardUsagePreamble, getVersion, hasWebDocumentation, instanceMain, instanceMainWithExit, makeReferenceArgumentCollection, parseArgs, requiresReference, setDefaultHeaders, useLegacyParser`

### Methods inherited from class Object

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

## Field Details

### INPUT

@Argument(shortName="I", doc="Input BAM file to add a comment to the header") public File INPUT

### OUTPUT

@Argument(shortName="O", doc="Output BAM file to write results") public File OUTPUT

### COMMENT

@Argument(shortName="C", doc="Comments to add to the BAM file") public List<String> COMMENT

## Constructor Details

### AddCommentsToBam

public AddCommentsToBam()

## 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.