# Class SAMReadGroupRecord

java.lang.Object
htsjdk.samtools.AbstractSAMHeaderRecord
htsjdk.samtools.SAMReadGroupRecord

All Implemented Interfaces:
  `Serializable`

public class SAMReadGroupRecord extends AbstractSAMHeaderRecord
Header information about a read group.

See Also:
  - Serialized Form

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`SAMReadGroupRecord.PlatformValue`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`BARCODE_TAG`
`static final String`
`DATE_RUN_PRODUCED_TAG`
`static final String`
`DESCRIPTION_TAG`
`static final String`
`FLOW_ORDER_TAG`
`static final String`
`KEY_SEQUENCE_TAG`
`static final String`
`LIBRARY_TAG`
`static final String`
`PLATFORM_MODEL_TAG`
`static final String`
`PLATFORM_TAG`
`static final String`
`PLATFORM_UNIT_TAG`
`static final String`
`PREDICTED_MEDIAN_INSERT_SIZE_TAG`
`static final String`
`PROGRAM_GROUP_TAG`
`static final String`
`READ_GROUP_ID_TAG`
`static final String`
`READ_GROUP_SAMPLE_TAG`
`static final String`
`SEQUENCING_CENTER_TAG`
`static final Set<String>`
`STANDARD_TAGS`

### Fields inherited from class AbstractSAMHeaderRecord

`serialVersionUID`

## Constructor Summary

Constructors
Constructor
Description
`SAMReadGroupRecord(String id)`
`SAMReadGroupRecord(String id, SAMReadGroupRecord srcProgramRecord)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`boolean`
`equivalent(SAMReadGroupRecord that)`
`List<String>`
`getBarcodes()`
`String`
`getDescription()`
`String`
`getFlowOrder()`
`String`
`getId()`
Returns the ID tag (or equivalent) for this header record.
`String`
`getKeySequence()`
`String`
`getLibrary()`
`String`
`getPlatform()`
`String`
`getPlatformModel()`
`String`
`getPlatformUnit()`
`Integer`
`getPredictedMedianInsertSize()`
`String`
`getProgramGroup()`
`String`
`getReadGroupId()`
`Date`
`getRunDate()`
`String`
`getSample()`
`String`
`getSAMString()`
Returns the record in the SAM line-based text format.
`String`
`getSequencingCenter()`
`int`
`hashCode()`
`void`
`setBarcodes(List<String> barcodes)`
Set the barcodes associated with this ReadGroup.
`void`
`setDescription(String description)`
`void`
`setFlowOrder(String flowOrder)`
`void`
`setKeySequence(String keySequence)`
`void`
`setLibrary(String value)`
`void`
`setPlatform(String platform)`
`void`
`setPlatformModel(String platformModel)`
`void`
`setPlatformUnit(String pu)`
`void`
`setPredictedMedianInsertSize(Integer predictedMedianInsertSize)`
`void`
`setProgramGroup(String programGroup)`
`void`
`setRunDate(Date runDate)`
Converts to Iso8601Date if not already in that form.
`void`
`setSample(String value)`
`void`
`setSequencingCenter(String center)`

### Methods inherited from class AbstractSAMHeaderRecord

`attributesEqual, attributesHashCode, getAttribute, getAttributes, setAttribute, setAttribute, setAttribute, toString`

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### READ_GROUP_ID_TAG

public static final String READ_GROUP_ID_TAG

See Also:
  - Constant Field Values

### SEQUENCING_CENTER_TAG

public static final String SEQUENCING_CENTER_TAG

See Also:
  - Constant Field Values

### DESCRIPTION_TAG

public static final String DESCRIPTION_TAG

See Also:
  - Constant Field Values

### DATE_RUN_PRODUCED_TAG

public static final String DATE_RUN_PRODUCED_TAG

See Also:
  - Constant Field Values

### FLOW_ORDER_TAG

public static final String FLOW_ORDER_TAG

See Also:
  - Constant Field Values

### KEY_SEQUENCE_TAG

public static final String KEY_SEQUENCE_TAG

See Also:
  - Constant Field Values

### LIBRARY_TAG

public static final String LIBRARY_TAG

See Also:
  - Constant Field Values

### PROGRAM_GROUP_TAG

public static final String PROGRAM_GROUP_TAG

See Also:
  - Constant Field Values

### PREDICTED_MEDIAN_INSERT_SIZE_TAG

public static final String PREDICTED_MEDIAN_INSERT_SIZE_TAG

See Also:
  - Constant Field Values

### PLATFORM_TAG

public static final String PLATFORM_TAG

See Also:
  - Constant Field Values

### PLATFORM_MODEL_TAG

public static final String PLATFORM_MODEL_TAG

See Also:
  - Constant Field Values

### PLATFORM_UNIT_TAG

public static final String PLATFORM_UNIT_TAG

See Also:
  - Constant Field Values

### READ_GROUP_SAMPLE_TAG

public static final String READ_GROUP_SAMPLE_TAG

See Also:
  - Constant Field Values

### BARCODE_TAG

public static final String BARCODE_TAG

See Also:
  - Constant Field Values

### STANDARD_TAGS

public static final Set<String> STANDARD_TAGS

## Constructor Details

### SAMReadGroupRecord

public SAMReadGroupRecord(String id)

### SAMReadGroupRecord

public SAMReadGroupRecord(String id, SAMReadGroupRecord srcProgramRecord)

## Method Details

### getId

public String getId()
Description copied from class: `AbstractSAMHeaderRecord`
Returns the ID tag (or equivalent) for this header record. The default implementation throws a SAMException to indicate "not implemented".

Overrides:
  `getId` in class `AbstractSAMHeaderRecord`

### getReadGroupId

public String getReadGroupId()

### getSample

public String getSample()

### setSample

public void setSample(String value)

### getLibrary

public String getLibrary()

### setLibrary

public void setLibrary(String value)

### getPlatformUnit

public String getPlatformUnit()

### setPlatformUnit

public void setPlatformUnit(String pu)

### getPlatform

public String getPlatform()

### setPlatform

public void setPlatform(String platform)

### getBarcodes

public List<String> getBarcodes()

Returns:
  the List of barcodes associated with this read group or null

### setBarcodes

public void setBarcodes(List<String> barcodes)
Set the barcodes associated with this ReadGroup. Note that an input of null results in unsetting the attribute while an empty list is set as a tag with an empty value.

Parameters:
  `barcodes` - a list of barcodes to associate with this read group

### getRunDate

public Date getRunDate()

### getFlowOrder

public String getFlowOrder()

### setFlowOrder

public void setFlowOrder(String flowOrder)

### getKeySequence

public String getKeySequence()

### setKeySequence

public void setKeySequence(String keySequence)

### setRunDate

public void setRunDate(Date runDate)
Converts to Iso8601Date if not already in that form.

### getSequencingCenter

public String getSequencingCenter()

### setSequencingCenter

public void setSequencingCenter(String center)

### getDescription

public String getDescription()

### setDescription

public void setDescription(String description)

### getPredictedMedianInsertSize

public Integer getPredictedMedianInsertSize()

### setPredictedMedianInsertSize

public void setPredictedMedianInsertSize(Integer predictedMedianInsertSize)

### getProgramGroup

public String getProgramGroup()

### setProgramGroup

public void setProgramGroup(String programGroup)

### getPlatformModel

public String getPlatformModel()

### setPlatformModel

public void setPlatformModel(String platformModel)

### equivalent

public boolean equivalent(SAMReadGroupRecord that)

Returns:
  true if this == that except for the read group ID, which is arbitrary

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### getSAMString

public String getSAMString()
Description copied from class: `AbstractSAMHeaderRecord`
Returns the record in the SAM line-based text format. Fields are separated by '\t' characters. The String is NOT terminated by '\n'.

Specified by:
  `getSAMString` in class `AbstractSAMHeaderRecord`