Ejemplo n.º 1
0
 /**
  * Returns the base qualities for the read as a string.
  *
  * @param read read whose base qualities should be returned
  * @return Base qualities string as printable ASCII values (encoded as a FASTQ string).
  */
 public static String getBaseQualityString(final GATKRead read) {
   Utils.nonNull(read);
   if (Arrays.equals(SAMRecord.NULL_QUALS, read.getBaseQualities())) {
     return SAMRecord.NULL_QUALS_STRING;
   }
   return SAMUtils.phredToFastq(read.getBaseQualities());
 }
Ejemplo n.º 2
0
 /** Setters and Accessors for base insertion and base deletion quality scores */
 public void setBaseQualities(final byte[] quals, final EventType errorModel) {
   switch (errorModel) {
     case BASE_SUBSTITUTION:
       setBaseQualities(quals);
       break;
     case BASE_INSERTION:
       setAttribute(
           GATKSAMRecord.BQSR_BASE_INSERTION_QUALITIES,
           quals == null ? null : SAMUtils.phredToFastq(quals));
       break;
     case BASE_DELETION:
       setAttribute(
           GATKSAMRecord.BQSR_BASE_DELETION_QUALITIES,
           quals == null ? null : SAMUtils.phredToFastq(quals));
       break;
     default:
       throw new ReviewedGATKException("Unrecognized Base Recalibration type: " + errorModel);
   }
 }
Ejemplo n.º 3
0
 public static void setDeletionBaseQualities(final GATKRead read, final byte[] quals) {
   read.setAttribute(
       BQSR_BASE_DELETION_QUALITIES, quals == null ? null : SAMUtils.phredToFastq(quals));
 }