diff --git a/src/main/java/org/broad/igv/sam/SAMAlignment.java b/src/main/java/org/broad/igv/sam/SAMAlignment.java
index 449341ca0f..42d536c155 100644
--- a/src/main/java/org/broad/igv/sam/SAMAlignment.java
+++ b/src/main/java/org/broad/igv/sam/SAMAlignment.java
@@ -996,14 +996,13 @@ private String getSupplAlignmentString() {
}
private String getThisReadDescriptionForSAList() {
- return "
" +
- ""
+ return "
"
+ + ""
+ chr + ":" + Globals.DECIMAL_FORMAT.format(getAlignmentStart() + 1) + "-" + Globals.DECIMAL_FORMAT.format(getAlignmentEnd())
- + " (" + getReadStrand().toShortString() + ")" +
- "";
+ + " (" + this.getReadStrand().toShortString() + ") = " + Globals.DECIMAL_FORMAT.format(getLengthOnReference()) + "bp @MAPQ " + this.getMappingQuality() + " NM" + getAttribute(SAMTag.NM)
+ + "";
}
-
public float getScore() {
return getMappingQuality();
}
diff --git a/src/main/java/org/broad/igv/sam/SupplementaryAlignment.java b/src/main/java/org/broad/igv/sam/SupplementaryAlignment.java
index 2420bf5176..56f8089ad4 100644
--- a/src/main/java/org/broad/igv/sam/SupplementaryAlignment.java
+++ b/src/main/java/org/broad/igv/sam/SupplementaryAlignment.java
@@ -29,10 +29,6 @@ public class SupplementaryAlignment implements Locatable {
public final String chr;
public final int start;
- public Strand getStrand() {
- return strand;
- }
-
private final Strand strand;
private final Cigar cigar;
@@ -52,6 +48,10 @@ public SupplementaryAlignment(String chr, int start, Strand strand, Cigar cigar,
this.numMismatches = numMismatches;
}
+ public Strand getStrand() {
+ return strand;
+ }
+
public static int getInsertionIndex(final Alignment alignment, final List supplementaryAlignments) {
final SupplementaryAlignment alignmentAsSupplementary = new SupplementaryAlignment(null, 0, alignment.getReadStrand(), alignment.getCigar(),
0, 0); //We're just using this as a placeholder for sorting since Alignment
@@ -118,7 +118,7 @@ public static List parseFromSATag(String saTag){
return Arrays.stream(Globals.semicolonPattern.split(saTag))
.map(SupplementaryAlignment::fromSingleSaTagRecord)
.sorted(LEADING_CLIP_COMPARATOR)
- .collect(Collectors.toList());
+ .toList();
}
public static SupplementaryAlignment fromSingleSaTagRecord(String saTagRecord){
diff --git a/src/main/java/org/broad/igv/ui/supdiagram/SupplementalAlignmentDiagram.java b/src/main/java/org/broad/igv/ui/supdiagram/SupplementalAlignmentDiagram.java
index 834a7765fb..eca9a38214 100644
--- a/src/main/java/org/broad/igv/ui/supdiagram/SupplementalAlignmentDiagram.java
+++ b/src/main/java/org/broad/igv/ui/supdiagram/SupplementalAlignmentDiagram.java
@@ -23,6 +23,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Set;
+import java.util.stream.Collector;
import java.util.stream.Collectors;
class SupplementalAlignmentDiagram extends JComponent {
@@ -145,7 +146,6 @@ private static Composite getAlphaComposite() {
return AlphaComposite.getInstance(type, alpha);
}
-
private Map drawAlignmentsInReadOrder(final Graphics2D g, final SupplementaryAlignment.SupplementaryGroup toDraw,
final Set selected, final int width, final int midline) {
final Map positions = new LinkedHashMap<>();
@@ -218,7 +218,8 @@ private static Map drawAlignmentsInConde
final var groupedBySpan = groupBySpanningInterval(toDraw.streamInPositionOrder().toList());
final Map> byContig = groupedBySpan.keySet()
.stream()
- .collect(Collectors.groupingBy(Locatable::getContig));
+ .collect(Collectors.groupingBy(Locatable::getContig, LinkedHashMap::new, Collectors.toList()));
+
//tihs should probably vary per contig instead of being uniform
final double perContigAvailableSpace = (width - (2 * scaledBorderGap + (contigs.size() -1) * scaledContigGap))/((double)contigs.size());