|
|
@@ -182,6 +182,15 @@ public static int computeInsertSize(final SAMRecord firstEnd, final SAMRecord se |
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Write the mate info for two SAMRecords. This will always clear/remove any mate cigar tag that is present.
|
|
|
+ * @param rec1 the first SAM record
|
|
|
+ * @param rec2 the second SAM record
|
|
|
+ */
|
|
|
+ public static void setMateInfo(final SAMRecord rec1, final SAMRecord rec2) {
|
|
|
+ setMateInfo(rec1, rec2, false);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* Write the mate info for two SAMRecords
|
|
|
* @param rec1 the first SAM record. Must have a non-null SAMFileHeader.
|
|
|
* @param rec2 the second SAM record. Must have a non-null SAMFileHeader.
|
|
|
@@ -270,6 +279,7 @@ else if (rec1.getReadUnmappedFlag() && rec2.getReadUnmappedFlag()) { |
|
|
* @param rec2 the second SAM record
|
|
|
* @param header the SAM file header
|
|
|
* @param setMateCigar true if we are to update/create the Mate CIGAR (MC) optional tag, false if we are to clear any mate cigar tag that is present.
|
|
|
+ * @deprecated use {@link #setMateInfo(SAMRecord, SAMRecord, boolean)} instead
|
|
|
*/
|
|
|
@Deprecated
|
|
|
public static void setMateInfo(final SAMRecord rec1, final SAMRecord rec2, final SAMFileHeader header, final boolean setMateCigar) {
|
|
|
@@ -281,9 +291,11 @@ public static void setMateInfo(final SAMRecord rec1, final SAMRecord rec2, final |
|
|
* @param rec1 the first SAM record
|
|
|
* @param rec2 the second SAM record
|
|
|
* @param header the SAM file header
|
|
|
+ * @deprecated use {@link #setMateInfo(SAMRecord, SAMRecord)} instead
|
|
|
*/
|
|
|
+ @Deprecated
|
|
|
public static void setMateInfo(final SAMRecord rec1, final SAMRecord rec2, final SAMFileHeader header) {
|
|
|
- setMateInfo(rec1, rec2, false);
|
|
|
+ setMateInfo(rec1, rec2);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -322,26 +334,43 @@ public static void setMateInformationOnSupplementalAlignment( final SAMRecord su |
|
|
|
|
|
/**
|
|
|
* This method will clear any mate cigar already present.
|
|
|
+ * @deprecated use {@link #setProperPairAndMateInfo(SAMRecord, SAMRecord, List)} instead
|
|
|
*/
|
|
|
+ @Deprecated
|
|
|
public static void setProperPairAndMateInfo(final SAMRecord rec1, final SAMRecord rec2,
|
|
|
final SAMFileHeader header,
|
|
|
- final List<PairOrientation> exepectedOrientations) {
|
|
|
- setProperPairAndMateInfo(rec1, rec2, header, exepectedOrientations, false);
|
|
|
+ final List<PairOrientation> expectedOrientations) {
|
|
|
+ setProperPairAndMateInfo(rec1, rec2, expectedOrientations);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param rec1
|
|
|
- * @param rec2
|
|
|
- * @param header
|
|
|
- * @param exepectedOrientations
|
|
|
* @param addMateCigar true if we are to update/create the Mate CIGAR (MC) optional tag, false if we are to clear any mate cigar tag that is present.
|
|
|
+ * @deprecated use {@link #setProperPairAndMateInfo(SAMRecord, SAMRecord, List, boolean)}
|
|
|
*/
|
|
|
+ @Deprecated
|
|
|
public static void setProperPairAndMateInfo(final SAMRecord rec1, final SAMRecord rec2,
|
|
|
final SAMFileHeader header,
|
|
|
- final List<PairOrientation> exepectedOrientations,
|
|
|
+ final List<PairOrientation> expectedOrientations,
|
|
|
+ final boolean addMateCigar) {
|
|
|
+ setProperPairAndMateInfo(rec1, rec2, expectedOrientations, addMateCigar);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * This method will clear any mate cigar already present.
|
|
|
+ */
|
|
|
+ public static void setProperPairAndMateInfo(final SAMRecord rec1, final SAMRecord rec2,
|
|
|
+ final List<PairOrientation> expectedOrientations) {
|
|
|
+ setProperPairAndMateInfo(rec1, rec2, expectedOrientations, false);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param addMateCigar true if we are to update/create the Mate CIGAR (MC) optional tag, false if we are to clear any mate cigar tag that is present.
|
|
|
+ */
|
|
|
+ public static void setProperPairAndMateInfo(final SAMRecord rec1, final SAMRecord rec2,
|
|
|
+ final List<PairOrientation> expectedOrientations,
|
|
|
final boolean addMateCigar) {
|
|
|
- setMateInfo(rec1, rec2, header, addMateCigar);
|
|
|
- setProperPairFlags(rec1, rec2, exepectedOrientations);
|
|
|
+ setMateInfo(rec1, rec2, addMateCigar);
|
|
|
+ setProperPairFlags(rec1, rec2, expectedOrientations);
|
|
|
}
|
|
|
|
|
|
public static void setProperPairFlags(final SAMRecord rec1, final SAMRecord rec2, final List<PairOrientation> expectedOrientations) {
|
|
|
|
You're recommending the version without a boolean but calling the one with it. Could you make it consistent?