public class SamHelper extends Object implements Resettable
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
FIRST_CIGAR_PATTERN |
static Pattern |
LAST_CIGAR_PATTERN |
| Constructor and Description |
|---|
SamHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
appendCigar(it.unimi.dsi.lang.MutableString appendTo,
it.unimi.dsi.lang.MutableString appendFrom)
When appending two cigar strings, if the left ends with the same code as the right stars with,
this will combine those two into a single code.
|
static void |
appendMismatches(it.unimi.dsi.lang.MutableString appendTo,
it.unimi.dsi.lang.MutableString appendFrom)
When one has two MD:Z mismatch strings, if the left ends with a number and the right ends with a number,
you cannot just concatenate left+right, you must take the left number and add it to the right number.
|
protected void |
applyCigar() |
static String |
canonicalMdz(List<CharSequence> mdzParts)
Given a mdz split into parts, return a canonical version of the mdz.
|
static String |
canonicalMdz(String mdz)
Given a mdz, return a canonical version of the mdz.
|
protected void |
constructRefAndQuery() |
int |
getAlignedLength() |
it.unimi.dsi.lang.MutableString |
getCigar() |
it.unimi.dsi.lang.MutableString |
getMd() |
byte |
getMinQualValue() |
int |
getNumDeletions() |
int |
getNumInsertions() |
int |
getNumLeftClipped() |
int |
getNumMisMatches() |
int |
getNumRightClipped() |
int |
getPosition()
Return zero-based position.
|
it.unimi.dsi.lang.MutableString |
getQual() |
QualityEncoding |
getQualityEncoding()
Get the quality encoding scale used for the input fastq file.
|
it.unimi.dsi.lang.MutableString |
getQuery() |
int |
getQueryAlignedLength() |
int |
getQueryIndex() |
int |
getQueryLength() |
int |
getQueryPosition() |
it.unimi.dsi.lang.MutableString |
getRef() |
int |
getScore() |
List<SamSequenceVariation> |
getSequenceVariations() |
it.unimi.dsi.lang.MutableString |
getSourceQual() |
byte[] |
getSourceQualAsBytes() |
it.unimi.dsi.lang.MutableString |
getSourceQuery() |
int |
getTargetAlignedLength() |
boolean |
isReverseStrand() |
void |
reset() |
void |
setMinQualValue(byte minQualValue) |
void |
setMinQualValue(char minQualValue) |
void |
setQualityEncoding(QualityEncoding qualityEncoding)
Set the quality encoding scale to be used for the input fastq file.
|
void |
setQueryPosition(int queryPosition) |
void |
setSource(int queryIndex,
CharSequence sourceQuery,
CharSequence sourceQual,
CharSequence cigar,
CharSequence md,
int position,
boolean reverseStrand,
int readLength) |
void |
setSourceWithReference(int queryIndex,
CharSequence sourceRef,
CharSequence sourceQuery,
CharSequence sourceQual,
int position,
boolean reverseStrand) |
void |
setSourceWithReference(int queryIndex,
htsjdk.samtools.SAMRecord samRecord,
String sourceRef) |
public static final Pattern FIRST_CIGAR_PATTERN
public static final Pattern LAST_CIGAR_PATTERN
public void reset()
reset in interface Resettablepublic void setSource(int queryIndex,
CharSequence sourceQuery,
CharSequence sourceQual,
CharSequence cigar,
CharSequence md,
int position,
boolean reverseStrand,
int readLength)
public void setSourceWithReference(int queryIndex,
htsjdk.samtools.SAMRecord samRecord,
String sourceRef)
public void setSourceWithReference(int queryIndex,
CharSequence sourceRef,
CharSequence sourceQuery,
CharSequence sourceQual,
int position,
boolean reverseStrand)
public List<SamSequenceVariation> getSequenceVariations()
public it.unimi.dsi.lang.MutableString getSourceQuery()
public it.unimi.dsi.lang.MutableString getQuery()
public it.unimi.dsi.lang.MutableString getSourceQual()
public byte[] getSourceQualAsBytes()
public it.unimi.dsi.lang.MutableString getQual()
public it.unimi.dsi.lang.MutableString getRef()
public it.unimi.dsi.lang.MutableString getCigar()
public it.unimi.dsi.lang.MutableString getMd()
public void setMinQualValue(byte minQualValue)
public void setMinQualValue(char minQualValue)
public byte getMinQualValue()
public int getAlignedLength()
public int getQueryAlignedLength()
public int getQueryLength()
public int getTargetAlignedLength()
public int getNumInsertions()
public int getNumDeletions()
public int getNumMisMatches()
public int getScore()
public int getNumLeftClipped()
public int getNumRightClipped()
public int getPosition()
public int getQueryIndex()
public int getQueryPosition()
public boolean isReverseStrand()
protected void constructRefAndQuery()
protected void applyCigar()
public QualityEncoding getQualityEncoding()
public void setQualityEncoding(QualityEncoding qualityEncoding)
qualityEncoding - the quality encoding scale to be used for the input fastq filepublic void setQueryPosition(int queryPosition)
public static void appendCigar(it.unimi.dsi.lang.MutableString appendTo,
it.unimi.dsi.lang.MutableString appendFrom)
appendTo - the cigar string we are appending toappendFrom - the cigar string we are appending frompublic static void appendMismatches(it.unimi.dsi.lang.MutableString appendTo,
it.unimi.dsi.lang.MutableString appendFrom)
appendTo - the mismatchString we are appending toappendFrom - the mismatchString we are appending frompublic static String canonicalMdz(List<CharSequence> mdzParts)
mdzParts - the parts of the mdz to obtain the canonical version ofCopyright © 2017 Campagne Laboratory. All rights reserved.