@DocumentedFeature public class AddOrReplaceReadGroups extends CommandLineProgram
RG tag, defining a "read-group"
to which each read can be assigned (as specified in the RG tag in the SAM record).
This tool enables the user to assign all the reads in the INPUT to a single new read-group.
For more information about read-groups, see the
GATK Dictionary entry.
java -jar picard.jar AddOrReplaceReadGroups \
I=input.bam \
O=output.bam \
RGID=4 \
RGLB=lib1 \
RGPL=illumina \
RGPU=unit1 \
RGSM=20
"^[ -~]+$"(one or more characters from the ASCII range 32 through 126). In particular
<Space> is the only non-printing character allowed.
INPUT to a single read-group. If your file
already has reads assigned to multiple read-groups, the original RG value will be lost.| Modifier and Type | Field | Description |
|---|---|---|
String |
INPUT |
|
File |
OUTPUT |
|
static String |
READGROUP_ID_REGEX |
|
String |
RGCN |
|
String |
RGDS |
|
htsjdk.samtools.util.Iso8601Date |
RGDT |
|
String |
RGFO |
|
String |
RGID |
|
String |
RGKS |
|
String |
RGLB |
|
String |
RGPG |
|
Integer |
RGPI |
|
String |
RGPL |
|
String |
RGPM |
|
String |
RGPU |
|
String |
RGSM |
|
htsjdk.samtools.SAMFileHeader.SortOrder |
SORT_ORDER |
COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, GA4GH_CLIENT_SECRETS, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, referenceSequence, specialArgumentsCollection, TMP_DIR, USE_JDK_DEFLATER, USE_JDK_INFLATER, VALIDATION_STRINGENCY, VERBOSITY| Constructor | Description |
|---|---|
AddOrReplaceReadGroups() |
| Modifier and Type | Method | Description |
|---|---|---|
protected String[] |
customCommandLineValidation() |
Put any custom command-line validation in an override of this method.
|
protected int |
doWork() |
Do the work after command line has been parsed.
|
getCommandLine, getCommandLineParser, getDefaultHeaders, getFaqLink, getMetricsFile, getStandardUsagePreamble, getStandardUsagePreamble, getVersion, hasWebDocumentation, instanceMain, instanceMainWithExit, makeReferenceArgumentCollection, parseArgs, requiresReference, setDefaultHeaders, useLegacyParserpublic static final String READGROUP_ID_REGEX
@Argument(shortName="I",
doc="Input file (BAM or SAM or a GA4GH url).")
public String INPUT
@Argument(shortName="O",
doc="Output file (BAM or SAM).")
public File OUTPUT
@Argument(shortName="SO",
optional=true,
doc="Optional sort order to output in. If not supplied OUTPUT is in the same order as INPUT.")
public htsjdk.samtools.SAMFileHeader.SortOrder SORT_ORDER
@Argument(shortName="ID",
doc="Read-Group ID")
public String RGID
@Argument(shortName="LB",
doc="Read-Group library")
public String RGLB
@Argument(shortName="PL",
doc="Read-Group platform (e.g. illumina, solid)")
public String RGPL
@Argument(shortName="PU",
doc="Read-Group platform unit (eg. run barcode)")
public String RGPU
@Argument(shortName="SM",
doc="Read-Group sample name")
public String RGSM
@Argument(shortName="CN",
doc="Read-Group sequencing center name",
optional=true)
public String RGCN
@Argument(shortName="DS",
doc="Read-Group description",
optional=true)
public String RGDS
@Argument(shortName="DT",
doc="Read-Group run date",
optional=true)
public htsjdk.samtools.util.Iso8601Date RGDT
@Argument(shortName="KS",
doc="Read-Group key sequence",
optional=true)
public String RGKS
@Argument(shortName="FO",
doc="Read-Group flow order",
optional=true)
public String RGFO
@Argument(shortName="PI",
doc="Read-Group predicted insert size",
optional=true)
public Integer RGPI
@Argument(shortName="PG",
doc="Read-Group program group",
optional=true)
public String RGPG
@Argument(shortName="PM",
doc="Read-Group platform model",
optional=true)
public String RGPM
protected int doWork()
CommandLineProgramdoWork in class CommandLineProgramprotected String[] customCommandLineValidation()
CommandLineProgramcustomCommandLineValidation in class CommandLineProgram