          qnameLen, read->getId(),
          flags,
          contigName,
-@@ -1263,7 +1292,10 @@ SAMFormat::writeRead(
+@@ -1263,7 +1295,10 @@ SAMFormat::writeRead(
          fullLength, quality,
          aux != NULL ? "\t" : "", auxLen, aux != NULL ? aux : "",
          readGroupSeparator, readGroupString,

+		
+		// ZT:Z
+		ztzSeparator = "\tZT:Z:";
+		snprintf(ztzbuf, 1024, "%0.8f,%0.8f,%d", features.probabilityOfAllCandidates, features.probabilityOfBestCandidate, features.popularSeedsSkipped);
+		ztzString = ztzbuf;
+	}
+	

     GenomeLocation genomeLocation,
     Direction direction,
     bool secondaryAlignment,
@@ -1249,7 +1250,38 @@ SAMFormat::writeRead(
             readGroupString = read->getReadGroup();
         }
     }
