Package org.bdgenomics.formats.avro
Class Alignment
- java.lang.Object
-
- org.apache.avro.specific.SpecificRecordBase
-
- org.bdgenomics.formats.avro.Alignment
-
- All Implemented Interfaces:
Externalizable
,Serializable
,Comparable<org.apache.avro.specific.SpecificRecord>
,org.apache.avro.generic.GenericContainer
,org.apache.avro.generic.GenericRecord
,org.apache.avro.generic.IndexedRecord
,org.apache.avro.specific.SpecificRecord
public class Alignment extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord
Alignment.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Alignment.Builder
RecordBuilder for Alignment instances.
-
Field Summary
Fields Modifier and Type Field Description static org.apache.avro.Schema
SCHEMA$
-
Constructor Summary
Constructors Constructor Description Alignment()
Default constructor.Alignment(String referenceName, Long start, Long originalStart, Long end, Integer mappingQuality, String readName, String sequence, String qualityScores, String cigar, String originalCigar, Integer basesTrimmedFromStart, Integer basesTrimmedFromEnd, Boolean readPaired, Boolean properPair, Boolean readMapped, Boolean mateMapped, Boolean failedVendorQualityChecks, Boolean duplicateRead, Boolean readNegativeStrand, Boolean mateNegativeStrand, Boolean primaryAlignment, Boolean secondaryAlignment, Boolean supplementaryAlignment, String mismatchingPositions, String originalQualityScores, String readGroupId, String readGroupSampleId, Long mateAlignmentStart, String mateReferenceName, Long insertSize, Integer readInFragment, String attributes)
All-args constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.apache.avro.message.BinaryMessageDecoder<Alignment>
createDecoder(org.apache.avro.message.SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specifiedSchemaStore
.void
customDecode(org.apache.avro.io.ResolvingDecoder in)
void
customEncode(org.apache.avro.io.Encoder out)
static Alignment
fromByteBuffer(ByteBuffer b)
Deserializes a Alignment from a ByteBuffer.Object
get(int field$)
String
getAttributes()
Gets the value of the 'attributes' field.Integer
getBasesTrimmedFromEnd()
Gets the value of the 'basesTrimmedFromEnd' field.Integer
getBasesTrimmedFromStart()
Gets the value of the 'basesTrimmedFromStart' field.String
getCigar()
Gets the value of the 'cigar' field.static org.apache.avro.Schema
getClassSchema()
static org.apache.avro.message.BinaryMessageDecoder<Alignment>
getDecoder()
Return the BinaryMessageDecoder instance used by this class.Boolean
getDuplicateRead()
Gets the value of the 'duplicateRead' field.static org.apache.avro.message.BinaryMessageEncoder<Alignment>
getEncoder()
Return the BinaryMessageEncoder instance used by this class.Long
getEnd()
Gets the value of the 'end' field.Boolean
getFailedVendorQualityChecks()
Gets the value of the 'failedVendorQualityChecks' field.Long
getInsertSize()
Gets the value of the 'insertSize' field.Integer
getMappingQuality()
Gets the value of the 'mappingQuality' field.Long
getMateAlignmentStart()
Gets the value of the 'mateAlignmentStart' field.Boolean
getMateMapped()
Gets the value of the 'mateMapped' field.Boolean
getMateNegativeStrand()
Gets the value of the 'mateNegativeStrand' field.String
getMateReferenceName()
Gets the value of the 'mateReferenceName' field.String
getMismatchingPositions()
Gets the value of the 'mismatchingPositions' field.String
getOriginalCigar()
Gets the value of the 'originalCigar' field.String
getOriginalQualityScores()
Gets the value of the 'originalQualityScores' field.Long
getOriginalStart()
Gets the value of the 'originalStart' field.Boolean
getPrimaryAlignment()
Gets the value of the 'primaryAlignment' field.Boolean
getProperPair()
Gets the value of the 'properPair' field.String
getQualityScores()
Gets the value of the 'qualityScores' field.String
getReadGroupId()
Gets the value of the 'readGroupId' field.String
getReadGroupSampleId()
Gets the value of the 'readGroupSampleId' field.Integer
getReadInFragment()
Gets the value of the 'readInFragment' field.Boolean
getReadMapped()
Gets the value of the 'readMapped' field.String
getReadName()
Gets the value of the 'readName' field.Boolean
getReadNegativeStrand()
Gets the value of the 'readNegativeStrand' field.Boolean
getReadPaired()
Gets the value of the 'readPaired' field.String
getReferenceName()
Gets the value of the 'referenceName' field.org.apache.avro.Schema
getSchema()
Boolean
getSecondaryAlignment()
Gets the value of the 'secondaryAlignment' field.String
getSequence()
Gets the value of the 'sequence' field.org.apache.avro.specific.SpecificData
getSpecificData()
Long
getStart()
Gets the value of the 'start' field.Boolean
getSupplementaryAlignment()
Gets the value of the 'supplementaryAlignment' field.protected boolean
hasCustomCoders()
static Alignment.Builder
newBuilder()
Creates a new Alignment RecordBuilder.static Alignment.Builder
newBuilder(Alignment other)
Creates a new Alignment RecordBuilder by copying an existing Alignment instance.static Alignment.Builder
newBuilder(Alignment.Builder other)
Creates a new Alignment RecordBuilder by copying an existing Builder.void
put(int field$, Object value$)
void
readExternal(ObjectInput in)
void
setAttributes(String value)
Sets the value of the 'attributes' field.void
setBasesTrimmedFromEnd(Integer value)
Sets the value of the 'basesTrimmedFromEnd' field.void
setBasesTrimmedFromStart(Integer value)
Sets the value of the 'basesTrimmedFromStart' field.void
setCigar(String value)
Sets the value of the 'cigar' field.void
setDuplicateRead(Boolean value)
Sets the value of the 'duplicateRead' field.void
setEnd(Long value)
Sets the value of the 'end' field.void
setFailedVendorQualityChecks(Boolean value)
Sets the value of the 'failedVendorQualityChecks' field.void
setInsertSize(Long value)
Sets the value of the 'insertSize' field.void
setMappingQuality(Integer value)
Sets the value of the 'mappingQuality' field.void
setMateAlignmentStart(Long value)
Sets the value of the 'mateAlignmentStart' field.void
setMateMapped(Boolean value)
Sets the value of the 'mateMapped' field.void
setMateNegativeStrand(Boolean value)
Sets the value of the 'mateNegativeStrand' field.void
setMateReferenceName(String value)
Sets the value of the 'mateReferenceName' field.void
setMismatchingPositions(String value)
Sets the value of the 'mismatchingPositions' field.void
setOriginalCigar(String value)
Sets the value of the 'originalCigar' field.void
setOriginalQualityScores(String value)
Sets the value of the 'originalQualityScores' field.void
setOriginalStart(Long value)
Sets the value of the 'originalStart' field.void
setPrimaryAlignment(Boolean value)
Sets the value of the 'primaryAlignment' field.void
setProperPair(Boolean value)
Sets the value of the 'properPair' field.void
setQualityScores(String value)
Sets the value of the 'qualityScores' field.void
setReadGroupId(String value)
Sets the value of the 'readGroupId' field.void
setReadGroupSampleId(String value)
Sets the value of the 'readGroupSampleId' field.void
setReadInFragment(Integer value)
Sets the value of the 'readInFragment' field.void
setReadMapped(Boolean value)
Sets the value of the 'readMapped' field.void
setReadName(String value)
Sets the value of the 'readName' field.void
setReadNegativeStrand(Boolean value)
Sets the value of the 'readNegativeStrand' field.void
setReadPaired(Boolean value)
Sets the value of the 'readPaired' field.void
setReferenceName(String value)
Sets the value of the 'referenceName' field.void
setSecondaryAlignment(Boolean value)
Sets the value of the 'secondaryAlignment' field.void
setSequence(String value)
Sets the value of the 'sequence' field.void
setStart(Long value)
Sets the value of the 'start' field.void
setSupplementaryAlignment(Boolean value)
Sets the value of the 'supplementaryAlignment' field.ByteBuffer
toByteBuffer()
Serializes this Alignment to a ByteBuffer.void
writeExternal(ObjectOutput out)
-
Methods inherited from class org.apache.avro.specific.SpecificRecordBase
compareTo, equals, get, getConversion, getConversion, hashCode, put, toString
-
-
-
-
Constructor Detail
-
Alignment
public Alignment()
Default constructor. Note that this does not initialize fields to their default values from the schema. If that is desired then one should usenewBuilder()
.
-
Alignment
public Alignment(String referenceName, Long start, Long originalStart, Long end, Integer mappingQuality, String readName, String sequence, String qualityScores, String cigar, String originalCigar, Integer basesTrimmedFromStart, Integer basesTrimmedFromEnd, Boolean readPaired, Boolean properPair, Boolean readMapped, Boolean mateMapped, Boolean failedVendorQualityChecks, Boolean duplicateRead, Boolean readNegativeStrand, Boolean mateNegativeStrand, Boolean primaryAlignment, Boolean secondaryAlignment, Boolean supplementaryAlignment, String mismatchingPositions, String originalQualityScores, String readGroupId, String readGroupSampleId, Long mateAlignmentStart, String mateReferenceName, Long insertSize, Integer readInFragment, String attributes)
All-args constructor.- Parameters:
referenceName
- The reference for this alignment. If the read is unaligned, this field should be null. SAM column 3 field RNAME.start
- Start position for this alignment, in zero-based coordinate system with closed-open intervals. Should be null if the read is unaligned. SAM column 4 field POS converted to zero-based coordinate system, closed-open intervals.originalStart
- Original start position for this alignment, before local realignment, in zero-based coordinate system with closed-open intervals. Should be null if the read is unaligned. SAM optional field reserved tag OP converted to zero-based coordinate system, closed-open intervals.end
- End position for this alignment, in zero-based coordinate system with closed-open intervals. Should be null if the read is unaligned.mappingQuality
- Global mapping quality for this alignment. SAM column 5 field MAPQ.readName
- Name of the read for this alignment. This should be unique within the read group that the read is from, and can be used to identify other reads that are derived from a single fragment. SAM column 5 field QNAME.sequence
- Sequence of the read for this alignment. If the read has been hard clipped, this may not represent all the bases in the original read. SAM column 10 field SEQ.qualityScores
- Per-base quality scores of the read for this alignment. If the read has been hard clipped, this may not represent all the bases in the original read. Additionally, if the error scores have been recalibrated, this field will not contain the original base quality scores. SAM column 11 field QUAL.cigar
- Compact Ideosyncratic Gapped Alignment Report (CIGAR) string that describes the local alignment of the read for this alignment. SAM column 6 field CIGAR. Contains {length, operator} pairs for all contiguous alignment operations. The operators include: M, ALIGNMENT_MATCH: An alignment match indicates that a sequence can be aligned to the reference without evidence of an INDEL. Unlike the SEQUENCE_MATCH and SEQUENCE_MISMATCH operators, the ALIGNMENT_MATCH operator does not indicate whether the reference and read sequences are an exact match. I, INSERT: The insert operator indicates that the read contains evidence of bases being inserted into the reference. D, DELETE: The delete operator indicates that the read contains evidence of bases being deleted from the reference. N, SKIP: The skip operator indicates that this read skips a long segment of the reference, but the bases have not been deleted. This operator is commonly used when working with RNA-seq data, where reads may skip long segments of the reference between exons. S, CLIP_SOFT: The soft clip operator indicates that bases at the start/end of a read have not been considered during alignment. This may occur if the majority of a read maps, except for low quality bases at the start/end of a read. Bases that are soft clipped will still be stored in the read. H, CLIP_HARD: The hard clip operator indicates that bases at the start/end of a read have been omitted from this alignment. This may occur if this linear alignment is part of a chimeric alignment, or if the read has been trimmed (e.g., during error correction, or to trim poly-A tails for RNA-seq). P, PAD: The pad operator indicates that there is padding in an alignment. =, SEQUENCE_MATCH: This operator indicates that this portion of the aligned sequence exactly matches the reference (e.g., all bases are equal to the reference bases). X, SEQUENCE_MISMATCH: This operator indicates that this portion of the aligned sequence is an alignment match to the reference, but a sequence mismatch (e.g., the bases are not equal to the reference). This can indicate a SNP or a read error.originalCigar
- Original CIGAR string that describes the local alignment of the read for this alignment, before local realignment. SAM optional field reserved tag OC.basesTrimmedFromStart
- Number of bases in the read for this alignment that have been trimmed from the start of the read. By default, this is equal to 0. If the value is non-zero, that means that the start of the read has been hard-clipped.basesTrimmedFromEnd
- Number of bases in the read for this alignment that have been trimmed from the end of the read. By default, this is equal to 0. If the value is non-zero, that means that the end of the read has been hard-clipped.readPaired
- True if the read for this alignment has a mate. Defaults to false.properPair
- True if the read for this alignment and its mate are a proper pair. Defaults to false.readMapped
- True if the read for this alignment has been mapped. Defaults to false.mateMapped
- True if the mate of the read for this alignment has been mapped. Defaults to false.failedVendorQualityChecks
- True if the read for this alignent failed vendor quality checks. Defaults to false.duplicateRead
- True if the read for this alignment has been marked as duplicate. Defaults to false.readNegativeStrand
- True if this alignment is mapped as a reverse compliment. Defaults to false.mateNegativeStrand
- True if the mate pair for this alignment is mapped as a reverse compliment. Defaults to false.primaryAlignment
- True if this alignment is either the best linear alignment, or the first linear alignment in a chimeric alignment. Defaults to false.secondaryAlignment
- True if this alignment is a lower quality linear alignment for a multiply-mapped read. Defaults to false.supplementaryAlignment
- True if this alignment is a non-primary linear alignment in a chimeric alignment. Defaults to false.mismatchingPositions
- Mismatching positions for this alignment. SAM optional field reserved tag MD. Format (not enforced here): [0-9]+(([A-Z]|\^[A-Z]+)[0-9]+)*originalQualityScores
- Original per-base quality scores of the read for this alignment, before recalibration. SAM optional field reserved tag OQ.readGroupId
- Read group identifier for the read for this alignment. Join with ReadGroup.id for read group metadata.readGroupSampleId
- Read group sample identifier for the read for this alignment. Join with ReadGroup.sampleId for read group metadata or Sample.id for sample metadata.mateAlignmentStart
- Start position of the mate of the read for this alignment, in zero-based coordinate system with closed-open intervals. Should be set to null if the mate is unaligned, or if the mate does not exist. SAM column 8 field PNEXT converted to zero-based coordinate system, closed-open intervals.mateReferenceName
- Reference for the mate of the read for this alignment. Should be set to null if the mate is unaligned, or if the mate does not exist. SAM column 7 field RNEXT.insertSize
- Insert size between the read for this alignment and its mate, derived from alignment, if the reads have been aligned. Should be set to null if the mate is unaligned, or if the mate does not exist.readInFragment
- Index of the read for this alignment within an array of fragments. Defaults to zero.attributes
- Additional alignment attributes that do not fit into the standard fields above, flattened into a string.
-
-
Method Detail
-
getClassSchema
public static org.apache.avro.Schema getClassSchema()
-
getEncoder
public static org.apache.avro.message.BinaryMessageEncoder<Alignment> getEncoder()
Return the BinaryMessageEncoder instance used by this class.- Returns:
- the message encoder used by this class
-
getDecoder
public static org.apache.avro.message.BinaryMessageDecoder<Alignment> getDecoder()
Return the BinaryMessageDecoder instance used by this class.- Returns:
- the message decoder used by this class
-
createDecoder
public static org.apache.avro.message.BinaryMessageDecoder<Alignment> createDecoder(org.apache.avro.message.SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specifiedSchemaStore
.- Parameters:
resolver
- aSchemaStore
used to find schemas by fingerprint- Returns:
- a BinaryMessageDecoder instance for this class backed by the given SchemaStore
-
toByteBuffer
public ByteBuffer toByteBuffer() throws IOException
Serializes this Alignment to a ByteBuffer.- Returns:
- a buffer holding the serialized data for this instance
- Throws:
IOException
- if this instance could not be serialized
-
fromByteBuffer
public static Alignment fromByteBuffer(ByteBuffer b) throws IOException
Deserializes a Alignment from a ByteBuffer.- Parameters:
b
- a byte buffer holding serialized data for an instance of this class- Returns:
- a Alignment instance decoded from the given buffer
- Throws:
IOException
- if the given bytes could not be deserialized into an instance of this class
-
getSpecificData
public org.apache.avro.specific.SpecificData getSpecificData()
- Overrides:
getSpecificData
in classorg.apache.avro.specific.SpecificRecordBase
-
getSchema
public org.apache.avro.Schema getSchema()
- Specified by:
getSchema
in interfaceorg.apache.avro.generic.GenericContainer
- Specified by:
getSchema
in classorg.apache.avro.specific.SpecificRecordBase
-
get
public Object get(int field$)
- Specified by:
get
in interfaceorg.apache.avro.generic.IndexedRecord
- Specified by:
get
in classorg.apache.avro.specific.SpecificRecordBase
-
put
public void put(int field$, Object value$)
- Specified by:
put
in interfaceorg.apache.avro.generic.IndexedRecord
- Specified by:
put
in classorg.apache.avro.specific.SpecificRecordBase
-
getReferenceName
public String getReferenceName()
Gets the value of the 'referenceName' field.- Returns:
- The reference for this alignment. If the read is unaligned, this field should be null. SAM column 3 field RNAME.
-
setReferenceName
public void setReferenceName(String value)
Sets the value of the 'referenceName' field. The reference for this alignment. If the read is unaligned, this field should be null. SAM column 3 field RNAME.- Parameters:
value
- the value to set.
-
getStart
public Long getStart()
Gets the value of the 'start' field.- Returns:
- Start position for this alignment, in zero-based coordinate system with closed-open intervals. Should be null if the read is unaligned. SAM column 4 field POS converted to zero-based coordinate system, closed-open intervals.
-
setStart
public void setStart(Long value)
Sets the value of the 'start' field. Start position for this alignment, in zero-based coordinate system with closed-open intervals. Should be null if the read is unaligned. SAM column 4 field POS converted to zero-based coordinate system, closed-open intervals.- Parameters:
value
- the value to set.
-
getOriginalStart
public Long getOriginalStart()
Gets the value of the 'originalStart' field.- Returns:
- Original start position for this alignment, before local realignment, in zero-based coordinate system with closed-open intervals. Should be null if the read is unaligned. SAM optional field reserved tag OP converted to zero-based coordinate system, closed-open intervals.
-
setOriginalStart
public void setOriginalStart(Long value)
Sets the value of the 'originalStart' field. Original start position for this alignment, before local realignment, in zero-based coordinate system with closed-open intervals. Should be null if the read is unaligned. SAM optional field reserved tag OP converted to zero-based coordinate system, closed-open intervals.- Parameters:
value
- the value to set.
-
getEnd
public Long getEnd()
Gets the value of the 'end' field.- Returns:
- End position for this alignment, in zero-based coordinate system with closed-open intervals. Should be null if the read is unaligned.
-
setEnd
public void setEnd(Long value)
Sets the value of the 'end' field. End position for this alignment, in zero-based coordinate system with closed-open intervals. Should be null if the read is unaligned.- Parameters:
value
- the value to set.
-
getMappingQuality
public Integer getMappingQuality()
Gets the value of the 'mappingQuality' field.- Returns:
- Global mapping quality for this alignment. SAM column 5 field MAPQ.
-
setMappingQuality
public void setMappingQuality(Integer value)
Sets the value of the 'mappingQuality' field. Global mapping quality for this alignment. SAM column 5 field MAPQ.- Parameters:
value
- the value to set.
-
getReadName
public String getReadName()
Gets the value of the 'readName' field.- Returns:
- Name of the read for this alignment. This should be unique within the read group that the read is from, and can be used to identify other reads that are derived from a single fragment. SAM column 5 field QNAME.
-
setReadName
public void setReadName(String value)
Sets the value of the 'readName' field. Name of the read for this alignment. This should be unique within the read group that the read is from, and can be used to identify other reads that are derived from a single fragment. SAM column 5 field QNAME.- Parameters:
value
- the value to set.
-
getSequence
public String getSequence()
Gets the value of the 'sequence' field.- Returns:
- Sequence of the read for this alignment. If the read has been hard clipped, this may not represent all the bases in the original read. SAM column 10 field SEQ.
-
setSequence
public void setSequence(String value)
Sets the value of the 'sequence' field. Sequence of the read for this alignment. If the read has been hard clipped, this may not represent all the bases in the original read. SAM column 10 field SEQ.- Parameters:
value
- the value to set.
-
getQualityScores
public String getQualityScores()
Gets the value of the 'qualityScores' field.- Returns:
- Per-base quality scores of the read for this alignment. If the read has been hard clipped, this may not represent all the bases in the original read. Additionally, if the error scores have been recalibrated, this field will not contain the original base quality scores. SAM column 11 field QUAL.
-
setQualityScores
public void setQualityScores(String value)
Sets the value of the 'qualityScores' field. Per-base quality scores of the read for this alignment. If the read has been hard clipped, this may not represent all the bases in the original read. Additionally, if the error scores have been recalibrated, this field will not contain the original base quality scores. SAM column 11 field QUAL.- Parameters:
value
- the value to set.
-
getCigar
public String getCigar()
Gets the value of the 'cigar' field.- Returns:
- Compact Ideosyncratic Gapped Alignment Report (CIGAR) string that describes the local alignment of the read for this alignment. SAM column 6 field CIGAR. Contains {length, operator} pairs for all contiguous alignment operations. The operators include: M, ALIGNMENT_MATCH: An alignment match indicates that a sequence can be aligned to the reference without evidence of an INDEL. Unlike the SEQUENCE_MATCH and SEQUENCE_MISMATCH operators, the ALIGNMENT_MATCH operator does not indicate whether the reference and read sequences are an exact match. I, INSERT: The insert operator indicates that the read contains evidence of bases being inserted into the reference. D, DELETE: The delete operator indicates that the read contains evidence of bases being deleted from the reference. N, SKIP: The skip operator indicates that this read skips a long segment of the reference, but the bases have not been deleted. This operator is commonly used when working with RNA-seq data, where reads may skip long segments of the reference between exons. S, CLIP_SOFT: The soft clip operator indicates that bases at the start/end of a read have not been considered during alignment. This may occur if the majority of a read maps, except for low quality bases at the start/end of a read. Bases that are soft clipped will still be stored in the read. H, CLIP_HARD: The hard clip operator indicates that bases at the start/end of a read have been omitted from this alignment. This may occur if this linear alignment is part of a chimeric alignment, or if the read has been trimmed (e.g., during error correction, or to trim poly-A tails for RNA-seq). P, PAD: The pad operator indicates that there is padding in an alignment. =, SEQUENCE_MATCH: This operator indicates that this portion of the aligned sequence exactly matches the reference (e.g., all bases are equal to the reference bases). X, SEQUENCE_MISMATCH: This operator indicates that this portion of the aligned sequence is an alignment match to the reference, but a sequence mismatch (e.g., the bases are not equal to the reference). This can indicate a SNP or a read error.
-
setCigar
public void setCigar(String value)
Sets the value of the 'cigar' field. Compact Ideosyncratic Gapped Alignment Report (CIGAR) string that describes the local alignment of the read for this alignment. SAM column 6 field CIGAR. Contains {length, operator} pairs for all contiguous alignment operations. The operators include: M, ALIGNMENT_MATCH: An alignment match indicates that a sequence can be aligned to the reference without evidence of an INDEL. Unlike the SEQUENCE_MATCH and SEQUENCE_MISMATCH operators, the ALIGNMENT_MATCH operator does not indicate whether the reference and read sequences are an exact match. I, INSERT: The insert operator indicates that the read contains evidence of bases being inserted into the reference. D, DELETE: The delete operator indicates that the read contains evidence of bases being deleted from the reference. N, SKIP: The skip operator indicates that this read skips a long segment of the reference, but the bases have not been deleted. This operator is commonly used when working with RNA-seq data, where reads may skip long segments of the reference between exons. S, CLIP_SOFT: The soft clip operator indicates that bases at the start/end of a read have not been considered during alignment. This may occur if the majority of a read maps, except for low quality bases at the start/end of a read. Bases that are soft clipped will still be stored in the read. H, CLIP_HARD: The hard clip operator indicates that bases at the start/end of a read have been omitted from this alignment. This may occur if this linear alignment is part of a chimeric alignment, or if the read has been trimmed (e.g., during error correction, or to trim poly-A tails for RNA-seq). P, PAD: The pad operator indicates that there is padding in an alignment. =, SEQUENCE_MATCH: This operator indicates that this portion of the aligned sequence exactly matches the reference (e.g., all bases are equal to the reference bases). X, SEQUENCE_MISMATCH: This operator indicates that this portion of the aligned sequence is an alignment match to the reference, but a sequence mismatch (e.g., the bases are not equal to the reference). This can indicate a SNP or a read error.- Parameters:
value
- the value to set.
-
getOriginalCigar
public String getOriginalCigar()
Gets the value of the 'originalCigar' field.- Returns:
- Original CIGAR string that describes the local alignment of the read for this alignment, before local realignment. SAM optional field reserved tag OC.
-
setOriginalCigar
public void setOriginalCigar(String value)
Sets the value of the 'originalCigar' field. Original CIGAR string that describes the local alignment of the read for this alignment, before local realignment. SAM optional field reserved tag OC.- Parameters:
value
- the value to set.
-
getBasesTrimmedFromStart
public Integer getBasesTrimmedFromStart()
Gets the value of the 'basesTrimmedFromStart' field.- Returns:
- Number of bases in the read for this alignment that have been trimmed from the start of the read. By default, this is equal to 0. If the value is non-zero, that means that the start of the read has been hard-clipped.
-
setBasesTrimmedFromStart
public void setBasesTrimmedFromStart(Integer value)
Sets the value of the 'basesTrimmedFromStart' field. Number of bases in the read for this alignment that have been trimmed from the start of the read. By default, this is equal to 0. If the value is non-zero, that means that the start of the read has been hard-clipped.- Parameters:
value
- the value to set.
-
getBasesTrimmedFromEnd
public Integer getBasesTrimmedFromEnd()
Gets the value of the 'basesTrimmedFromEnd' field.- Returns:
- Number of bases in the read for this alignment that have been trimmed from the end of the read. By default, this is equal to 0. If the value is non-zero, that means that the end of the read has been hard-clipped.
-
setBasesTrimmedFromEnd
public void setBasesTrimmedFromEnd(Integer value)
Sets the value of the 'basesTrimmedFromEnd' field. Number of bases in the read for this alignment that have been trimmed from the end of the read. By default, this is equal to 0. If the value is non-zero, that means that the end of the read has been hard-clipped.- Parameters:
value
- the value to set.
-
getReadPaired
public Boolean getReadPaired()
Gets the value of the 'readPaired' field.- Returns:
- True if the read for this alignment has a mate. Defaults to false.
-
setReadPaired
public void setReadPaired(Boolean value)
Sets the value of the 'readPaired' field. True if the read for this alignment has a mate. Defaults to false.- Parameters:
value
- the value to set.
-
getProperPair
public Boolean getProperPair()
Gets the value of the 'properPair' field.- Returns:
- True if the read for this alignment and its mate are a proper pair. Defaults to false.
-
setProperPair
public void setProperPair(Boolean value)
Sets the value of the 'properPair' field. True if the read for this alignment and its mate are a proper pair. Defaults to false.- Parameters:
value
- the value to set.
-
getReadMapped
public Boolean getReadMapped()
Gets the value of the 'readMapped' field.- Returns:
- True if the read for this alignment has been mapped. Defaults to false.
-
setReadMapped
public void setReadMapped(Boolean value)
Sets the value of the 'readMapped' field. True if the read for this alignment has been mapped. Defaults to false.- Parameters:
value
- the value to set.
-
getMateMapped
public Boolean getMateMapped()
Gets the value of the 'mateMapped' field.- Returns:
- True if the mate of the read for this alignment has been mapped. Defaults to false.
-
setMateMapped
public void setMateMapped(Boolean value)
Sets the value of the 'mateMapped' field. True if the mate of the read for this alignment has been mapped. Defaults to false.- Parameters:
value
- the value to set.
-
getFailedVendorQualityChecks
public Boolean getFailedVendorQualityChecks()
Gets the value of the 'failedVendorQualityChecks' field.- Returns:
- True if the read for this alignent failed vendor quality checks. Defaults to false.
-
setFailedVendorQualityChecks
public void setFailedVendorQualityChecks(Boolean value)
Sets the value of the 'failedVendorQualityChecks' field. True if the read for this alignent failed vendor quality checks. Defaults to false.- Parameters:
value
- the value to set.
-
getDuplicateRead
public Boolean getDuplicateRead()
Gets the value of the 'duplicateRead' field.- Returns:
- True if the read for this alignment has been marked as duplicate. Defaults to false.
-
setDuplicateRead
public void setDuplicateRead(Boolean value)
Sets the value of the 'duplicateRead' field. True if the read for this alignment has been marked as duplicate. Defaults to false.- Parameters:
value
- the value to set.
-
getReadNegativeStrand
public Boolean getReadNegativeStrand()
Gets the value of the 'readNegativeStrand' field.- Returns:
- True if this alignment is mapped as a reverse compliment. Defaults to false.
-
setReadNegativeStrand
public void setReadNegativeStrand(Boolean value)
Sets the value of the 'readNegativeStrand' field. True if this alignment is mapped as a reverse compliment. Defaults to false.- Parameters:
value
- the value to set.
-
getMateNegativeStrand
public Boolean getMateNegativeStrand()
Gets the value of the 'mateNegativeStrand' field.- Returns:
- True if the mate pair for this alignment is mapped as a reverse compliment. Defaults to false.
-
setMateNegativeStrand
public void setMateNegativeStrand(Boolean value)
Sets the value of the 'mateNegativeStrand' field. True if the mate pair for this alignment is mapped as a reverse compliment. Defaults to false.- Parameters:
value
- the value to set.
-
getPrimaryAlignment
public Boolean getPrimaryAlignment()
Gets the value of the 'primaryAlignment' field.- Returns:
- True if this alignment is either the best linear alignment, or the first linear alignment in a chimeric alignment. Defaults to false.
-
setPrimaryAlignment
public void setPrimaryAlignment(Boolean value)
Sets the value of the 'primaryAlignment' field. True if this alignment is either the best linear alignment, or the first linear alignment in a chimeric alignment. Defaults to false.- Parameters:
value
- the value to set.
-
getSecondaryAlignment
public Boolean getSecondaryAlignment()
Gets the value of the 'secondaryAlignment' field.- Returns:
- True if this alignment is a lower quality linear alignment for a multiply-mapped read. Defaults to false.
-
setSecondaryAlignment
public void setSecondaryAlignment(Boolean value)
Sets the value of the 'secondaryAlignment' field. True if this alignment is a lower quality linear alignment for a multiply-mapped read. Defaults to false.- Parameters:
value
- the value to set.
-
getSupplementaryAlignment
public Boolean getSupplementaryAlignment()
Gets the value of the 'supplementaryAlignment' field.- Returns:
- True if this alignment is a non-primary linear alignment in a chimeric alignment. Defaults to false.
-
setSupplementaryAlignment
public void setSupplementaryAlignment(Boolean value)
Sets the value of the 'supplementaryAlignment' field. True if this alignment is a non-primary linear alignment in a chimeric alignment. Defaults to false.- Parameters:
value
- the value to set.
-
getMismatchingPositions
public String getMismatchingPositions()
Gets the value of the 'mismatchingPositions' field.- Returns:
- Mismatching positions for this alignment. SAM optional field reserved tag MD. Format (not enforced here): [0-9]+(([A-Z]|\^[A-Z]+)[0-9]+)*
-
setMismatchingPositions
public void setMismatchingPositions(String value)
Sets the value of the 'mismatchingPositions' field. Mismatching positions for this alignment. SAM optional field reserved tag MD. Format (not enforced here): [0-9]+(([A-Z]|\^[A-Z]+)[0-9]+)*- Parameters:
value
- the value to set.
-
getOriginalQualityScores
public String getOriginalQualityScores()
Gets the value of the 'originalQualityScores' field.- Returns:
- Original per-base quality scores of the read for this alignment, before recalibration. SAM optional field reserved tag OQ.
-
setOriginalQualityScores
public void setOriginalQualityScores(String value)
Sets the value of the 'originalQualityScores' field. Original per-base quality scores of the read for this alignment, before recalibration. SAM optional field reserved tag OQ.- Parameters:
value
- the value to set.
-
getReadGroupId
public String getReadGroupId()
Gets the value of the 'readGroupId' field.- Returns:
- Read group identifier for the read for this alignment. Join with ReadGroup.id for read group metadata.
-
setReadGroupId
public void setReadGroupId(String value)
Sets the value of the 'readGroupId' field. Read group identifier for the read for this alignment. Join with ReadGroup.id for read group metadata.- Parameters:
value
- the value to set.
-
getReadGroupSampleId
public String getReadGroupSampleId()
Gets the value of the 'readGroupSampleId' field.- Returns:
- Read group sample identifier for the read for this alignment. Join with ReadGroup.sampleId for read group metadata or Sample.id for sample metadata.
-
setReadGroupSampleId
public void setReadGroupSampleId(String value)
Sets the value of the 'readGroupSampleId' field. Read group sample identifier for the read for this alignment. Join with ReadGroup.sampleId for read group metadata or Sample.id for sample metadata.- Parameters:
value
- the value to set.
-
getMateAlignmentStart
public Long getMateAlignmentStart()
Gets the value of the 'mateAlignmentStart' field.- Returns:
- Start position of the mate of the read for this alignment, in zero-based coordinate system with closed-open intervals. Should be set to null if the mate is unaligned, or if the mate does not exist. SAM column 8 field PNEXT converted to zero-based coordinate system, closed-open intervals.
-
setMateAlignmentStart
public void setMateAlignmentStart(Long value)
Sets the value of the 'mateAlignmentStart' field. Start position of the mate of the read for this alignment, in zero-based coordinate system with closed-open intervals. Should be set to null if the mate is unaligned, or if the mate does not exist. SAM column 8 field PNEXT converted to zero-based coordinate system, closed-open intervals.- Parameters:
value
- the value to set.
-
getMateReferenceName
public String getMateReferenceName()
Gets the value of the 'mateReferenceName' field.- Returns:
- Reference for the mate of the read for this alignment. Should be set to null if the mate is unaligned, or if the mate does not exist. SAM column 7 field RNEXT.
-
setMateReferenceName
public void setMateReferenceName(String value)
Sets the value of the 'mateReferenceName' field. Reference for the mate of the read for this alignment. Should be set to null if the mate is unaligned, or if the mate does not exist. SAM column 7 field RNEXT.- Parameters:
value
- the value to set.
-
getInsertSize
public Long getInsertSize()
Gets the value of the 'insertSize' field.- Returns:
- Insert size between the read for this alignment and its mate, derived from alignment, if the reads have been aligned. Should be set to null if the mate is unaligned, or if the mate does not exist.
-
setInsertSize
public void setInsertSize(Long value)
Sets the value of the 'insertSize' field. Insert size between the read for this alignment and its mate, derived from alignment, if the reads have been aligned. Should be set to null if the mate is unaligned, or if the mate does not exist.- Parameters:
value
- the value to set.
-
getReadInFragment
public Integer getReadInFragment()
Gets the value of the 'readInFragment' field.- Returns:
- Index of the read for this alignment within an array of fragments. Defaults to zero.
-
setReadInFragment
public void setReadInFragment(Integer value)
Sets the value of the 'readInFragment' field. Index of the read for this alignment within an array of fragments. Defaults to zero.- Parameters:
value
- the value to set.
-
getAttributes
public String getAttributes()
Gets the value of the 'attributes' field.- Returns:
- Additional alignment attributes that do not fit into the standard fields above, flattened into a string.
-
setAttributes
public void setAttributes(String value)
Sets the value of the 'attributes' field. Additional alignment attributes that do not fit into the standard fields above, flattened into a string.- Parameters:
value
- the value to set.
-
newBuilder
public static Alignment.Builder newBuilder()
Creates a new Alignment RecordBuilder.- Returns:
- A new Alignment RecordBuilder
-
newBuilder
public static Alignment.Builder newBuilder(Alignment.Builder other)
Creates a new Alignment RecordBuilder by copying an existing Builder.- Parameters:
other
- The existing builder to copy.- Returns:
- A new Alignment RecordBuilder
-
newBuilder
public static Alignment.Builder newBuilder(Alignment other)
Creates a new Alignment RecordBuilder by copying an existing Alignment instance.- Parameters:
other
- The existing instance to copy.- Returns:
- A new Alignment RecordBuilder
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classorg.apache.avro.specific.SpecificRecordBase
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classorg.apache.avro.specific.SpecificRecordBase
- Throws:
IOException
-
hasCustomCoders
protected boolean hasCustomCoders()
- Overrides:
hasCustomCoders
in classorg.apache.avro.specific.SpecificRecordBase
-
customEncode
public void customEncode(org.apache.avro.io.Encoder out) throws IOException
- Overrides:
customEncode
in classorg.apache.avro.specific.SpecificRecordBase
- Throws:
IOException
-
customDecode
public void customDecode(org.apache.avro.io.ResolvingDecoder in) throws IOException
- Overrides:
customDecode
in classorg.apache.avro.specific.SpecificRecordBase
- Throws:
IOException
-
-