Esempio n. 1
0
 /**
  * Retrieve the original base qualities of the given read, if present, as stored in the OQ
  * attribute.
  *
  * @param read read to check
  * @return original base qualities as stored in the OQ attribute, or null if the OQ attribute is
  *     not present
  */
 public static byte[] getOriginalBaseQualities(final GATKRead read) {
   if (!read.hasAttribute(ORIGINAL_BASE_QUALITIES_TAG)) {
     return null;
   }
   final String oqString = read.getAttributeAsString(ORIGINAL_BASE_QUALITIES_TAG);
   return oqString.length() > 0 ? SAMUtils.fastqToPhred(oqString) : null;
 }
Esempio n. 2
0
 /** @return the base deletion quality or null if read doesn't have one */
 public static byte[] getExistingBaseDeletionQualities(final GATKRead read) {
   return SAMUtils.fastqToPhred(read.getAttributeAsString(BQSR_BASE_DELETION_QUALITIES));
 }