picard.sam.SamErrorMetric.BaseErrorMetric Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of picard Show documentation
Show all versions of picard Show documentation
A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) data and formats such as SAM/BAM/CRAM and VCF.
package picard.sam.SamErrorMetric;
/**
* An error metric for the errors in bases.
*/
public class BaseErrorMetric extends ErrorMetric {
/** The number of bases that disagree with the reference */
@MergeByAdding
public long ERROR_BASES;
/** The (phred) rate of bases that disagree with the reference */
@NoMergingIsDerived
public int Q_SCORE;
@Override
public void calculateDerivedFields() {
this.Q_SCORE = computeQScore(ERROR_BASES);
}
public BaseErrorMetric(final String covariate, final long totalBases, final long errorBases) {
super(covariate, totalBases);
this.ERROR_BASES = errorBases;
}
// needed for reading in a metric from a file
public BaseErrorMetric() {
}
}