[med-svn] [Git][med-team/artemis][master] Fix edam syntax input+output is singular

Andreas Tille gitlab at salsa.debian.org
Thu Apr 11 20:28:22 BST 2019



Andreas Tille pushed to branch master at Debian Med / artemis


Commits:
bc46cc86 by Andreas Tille at 2019-04-11T19:27:57Z
Fix edam syntax input+output is singular

- - - - -


7 changed files:

- debian/compat
- debian/copyright
- debian/patches/samreader.patch
- debian/patches/series
- debian/patches/use-lang3.patch
- debian/rules
- debian/upstream/edam


Changes:

=====================================
debian/compat
=====================================
@@ -1 +1 @@
-11
+12


=====================================
debian/copyright
=====================================
@@ -1,11 +1,15 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: artemis
 Upstream-Contact: <artemis at sanger.ac.uk>
 Source: https://github.com/sanger-pathogens/Artemis
 Files-Excluded:
 	lib/*
+	*.jar
 	test/lib/*
 	*/jquery.js
+	*/*.icns
+	*/.*.tmp
+        */.gitignore
 
 Files: *
 Copyright: 1998-2013 Genome Research Limited


=====================================
debian/patches/samreader.patch
=====================================
@@ -4,8 +4,8 @@ Author: Sascha Steinbiss <sascha at steinbiss.name>
 Bug-Debian: https://bugs.debian.org/846671
 Last-Update: 2016-12-07 23:37:52 +0000
 
---- a/uk/ac/sanger/artemis/components/alignment/BamUtils.java
-+++ b/uk/ac/sanger/artemis/components/alignment/BamUtils.java
+--- a/src/main/java/uk/ac/sanger/artemis/components/alignment/BamUtils.java
++++ b/src/main/java/uk/ac/sanger/artemis/components/alignment/BamUtils.java
 @@ -85,14 +85,14 @@ class BamUtils
      }
      return (float)len;
@@ -32,8 +32,8 @@ Last-Update: 2016-12-07 23:37:52 +0000
            int thisStart = start - offset;
            if(thisStart < 1)
              thisStart = 1;
-@@ -150,7 +150,7 @@ class BamUtils
-     {
+@@ -154,7 +154,7 @@ class BamUtils
+       // specifying byStrand as true.
        cnt = count(bamView, bam, start, end, contained, true, useStrandTag);
      }
 -    
@@ -41,8 +41,8 @@ Last-Update: 2016-12-07 23:37:52 +0000
      float cntf[] = new float[2];
      cntf[0] = cnt[0];
      cntf[1] = cnt[1];
-@@ -159,7 +159,7 @@ class BamUtils
- 
+@@ -178,7 +178,7 @@ class BamUtils
+    */
    protected static int[] count(
            final BamView bamView,
 -          final String bam, 
@@ -50,31 +50,16 @@ Last-Update: 2016-12-07 23:37:52 +0000
            final int start,
            final int end,
            final boolean contained,
-@@ -197,10 +197,10 @@ class BamUtils
-     it.close();
-     return cnt;
-   }
--  
+@@ -234,7 +234,7 @@ class BamUtils
+    * @param progressBar
+    * @return array of mapped read counts
+    */
 -  protected static int[] calc(
--      final BamView bamView, 
--      final String refName, 
-+
-+   static int[] calc(
-+      final BamView bamView,
-+      final String refName,
++  static int[] calc(
+       final BamView bamView, 
+       final String refName, 
        final int sequenceLength,
-       final boolean useStrandTag,
-       final JProgressBar progressBar)
-@@ -240,7 +240,7 @@ class BamUtils
-               if (thisEnd > thisLength)
-                 thisEnd = thisLength;
- 
--              mappedReads[j] += BamUtils.count(bamView, bam, thisStart, thisEnd, 
-+              mappedReads[j] += BamUtils.count(bamView, bam, thisStart, thisEnd,
-                   contained, false, useStrandTag)[0];
-             }
-             lastLen = len;
-@@ -295,7 +295,7 @@ class BamUtils
+@@ -340,7 +340,7 @@ class BamUtils
          {
            List<AlignmentBlock> blocks = samRecord.getAlignmentBlocks();
            boolean isFwd = !samRecord.getReadNegativeStrandFlag();
@@ -83,7 +68,7 @@ Last-Update: 2016-12-07 23:37:52 +0000
            for(int j=0; j<blocks.size(); j++)
            {
              AlignmentBlock block = blocks.get(j);
-@@ -306,12 +306,12 @@ class BamUtils
+@@ -351,12 +351,12 @@ class BamUtils
                int bin = pos - start;
                if(bin < 0 || bin > cnt.length-1)
                  continue;
@@ -98,7 +83,7 @@ Last-Update: 2016-12-07 23:37:52 +0000
            }
          }
        }
-@@ -334,13 +334,13 @@ class BamUtils
+@@ -381,13 +381,13 @@ class BamUtils
    protected static Hashtable<String, List<ReadCount>> calculateMappedReads(
        final BamView bamView,
        final FeatureVector features,
@@ -112,2270 +97,5 @@ Last-Update: 2016-12-07 23:37:52 +0000
 -    final Hashtable<String, List<ReadCount>> featureReadCount = 
 +    final Hashtable<String, List<ReadCount>> featureReadCount =
          new Hashtable<String, List<ReadCount>>();
-     for (int i = 0; i < features.size(); i++)
-     {
-@@ -381,7 +381,7 @@ class BamUtils
-             cnt[1] -= tmpcnt[1];
-           }
-         }
--        
-+
-         if (mappedReads != null)
-         {
-           cnt[0] = (cnt[0] / (((float) mappedReads[j] / 1000000.f) * (fLen / 1000.f)));
---- a/uk/ac/sanger/artemis/components/alignment/BamView.java
-+++ b/uk/ac/sanger/artemis/components/alignment/BamView.java
-@@ -186,15 +185,15 @@ public class BamView extends JPanel
-   private Bases bases;
-   private JScrollPane jspView;
-   private JScrollBar scrollBar;
--  
-+
-   private SequenceComboBox combo;
-   private boolean isOrientation = false;
-   private boolean isSingle = false;
-   private boolean isSNPs = false;
--  
-+
-   private boolean isCoverage = false;
-   private boolean isSNPplot = false;
--  
-+
-   private EntryEdit entry_edit;
-   private FeatureDisplay feature_display;
-   private Selection selection;
-@@ -205,7 +204,7 @@ public class BamView extends JPanel
-   private boolean logScale = false;
-   private Ruler ruler;
-   private int nbasesInView;
--  
-+
-   private int startBase = -1;
-   private int endBase   = -1;
-   private int laststart;
-@@ -304,8 +303,8 @@ public class BamView extends JPanel
-     this(bamList, reference, nbasesInView, feature_display, bases, containerPanel, frame);
-     this.entry_edit = entry_edit;
-   }
--  
--  public BamView(List<String> bamList, 
-+
-+  public BamView(List<String> bamList,
-                  String reference,
-                  int nbasesInView,
-                  final FeatureDisplay feature_display,
-@@ -407,13 +406,13 @@ public class BamView extends JPanel
- 
-     final javax.swing.plaf.FontUIResource font_ui_resource =
-       Options.getOptions().getFontUIResource();
--    
-+
-     Enumeration<Object> keys = UIManager.getDefaults().keys();
--    while(keys.hasMoreElements()) 
-+    while(keys.hasMoreElements())
-     {
-       Object key = keys.nextElement();
-       Object value = UIManager.get(key);
--      if(value instanceof javax.swing.plaf.FontUIResource) 
-+      if(value instanceof javax.swing.plaf.FontUIResource)
-         UIManager.put(key, font_ui_resource);
-     }
- 
-@@ -422,10 +421,10 @@ public class BamView extends JPanel
-     ALIGNMENT_PIX_PER_BASE = fm.charWidth('M');
-     BASE_HEIGHT = fm.getMaxAscent();
-     selection = new Selection(null);
--    
-+
-     MultiLineToolTipUI.initialize();
-     setToolTipText("");
--    
-+
-     buttonGroup.add(cbStackView);
-     buttonGroup.add(cbPairedStackView);
-     buttonGroup.add(cbStrandStackView);
-@@ -435,10 +434,10 @@ public class BamView extends JPanel
-     buttonGroup.add(cbCoverageHeatMap);
-     addMouseListener(new PopupListener());
- 
--    jspView = new JScrollPane(this, 
-+    jspView = new JScrollPane(this,
-         JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
-         JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
--    
-+
-     jspView.setViewportBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.DARK_GRAY));
-     Border empty = new EmptyBorder(0,0,0,0);
-     jspView.setBorder(empty);
-@@ -633,7 +632,7 @@ public class BamView extends JPanel
-     	  return bamIndex;
-     }
- 
--    public void run() 
-+    public void run()
-     {
-     	  exception = null;
-     	  
-@@ -699,7 +698,7 @@ public class BamView extends JPanel
-     }
-     //inputSam.close();
-   }
--  
-+
-   /**
-    * Iterate over BAM file and load into the <code>List</code> of
-    * <code>SAMRecord</code>.
-@@ -747,7 +746,7 @@ public class BamView extends JPanel
- 
-           if(readGrpFrame != null && !readGrpFrame.isReadGroupVisible(samRecord.getReadGroup()))
-             continue;
--          
-+
-           if( samRecordFlagPredicate == null ||
-              !samRecordFlagPredicate.testPredicate(samRecord))
-           {
-@@ -757,7 +756,7 @@ public class BamView extends JPanel
-               int abeg = samRecord.getAlignmentStart();
-               int aend = samRecord.getAlignmentEnd();
-               boolean over = false;
--              
-+
-               for(int i=abeg; i<aend; i++)
-               {
-                 int bin = ((i-start)/binSize)-1;
-@@ -772,7 +771,7 @@ public class BamView extends JPanel
-                   break;
-                 }
-               }
--             
-+
-               if(over)
-                 continue;
- 
-@@ -786,7 +785,7 @@ public class BamView extends JPanel
-                 readsInView.add(new BamViewRecord(samRecord, bamIndex));
-             }
-           }
--        
-+
-           if(cnt > checkMemAfter)
-           {
-             cnt = 0;
-@@ -794,11 +793,11 @@ public class BamView extends JPanel
-               (float)((float)memory.getHeapMemoryUsage().getUsed()/
-                       (float)memory.getHeapMemoryUsage().getMax());
-             logger4j.debug("Heap memory usage (used/max): "+heapFraction);
--          
-+
-             if(readsInView.size() > checkMemAfter*2 && !waitingFrame.isVisible())
-               waitingFrame.showWaiting("loading...", mainPanel);
- 
--            if(heapFraction > 0.90) 
-+            if(heapFraction > 0.90)
-             {
-               popFrame.show(
-                 "Using > 90 % of the maximum memory limit:"+
-@@ -835,10 +834,10 @@ public class BamView extends JPanel
-     else
-       return seqLengths.get((String) combo.getSelectedItem());
-   }
--  
-+
-   /**
-    * For BAM files with multiple references sequences, calculate
--   * the offset from the start of the concatenated sequence for 
-+   * the offset from the start of the concatenated sequence for
-    * a given reference.
-    * @param refName
-    * @return
-@@ -847,7 +846,7 @@ public class BamView extends JPanel
-   {
-     if(!isConcatSequences())
-       return 0;
--    
-+
-     if(offsetLengths == null)
-     {
-       if(feature_display == null)
-@@ -867,7 +866,7 @@ public class BamView extends JPanel
-       final HashMap<String, Integer> lookup = new HashMap<String, Integer>();
-       for(int i=0; i<features.size(); i++)
-         lookup.put(features.elementAt(i).getIDString(), features.elementAt(i).getFirstBase());
--        
-+
-       offsetLengths = new HashMap<String, Integer>(seqNames.size());
-       for(int i=0; i<seqNames.size(); i++)
-       {
-@@ -925,12 +924,12 @@ public class BamView extends JPanel
-     final int seqLength = getSequenceLength();
-     int start;
-     int end;
--    
-+
-     if(startBase > 0)
-       start = startBase;
-     else
-       start = getBaseAtStartOfView();
--    
-+
-     if(endBase > 0)
-       end = endBase;
-     else
-@@ -938,7 +937,7 @@ public class BamView extends JPanel
-       end   = start + nbasesInView - 1;
-       if(end > seqLength)
-         end = seqLength;
--      
-+
-       if(feature_display != null && nbasesInView < feature_display.getMaxVisibleBases())
-         nbasesInView = feature_display.getMaxVisibleBases();
-     }
-@@ -1077,7 +1076,7 @@ public class BamView extends JPanel
- 
-     laststart = start;
-     lastend   = end;
--    
-+
-     // this needs to be synchronized when cloning BAM window
-     synchronized(this)
-     {
-@@ -1097,7 +1096,7 @@ public class BamView extends JPanel
- 	      drawLineView(g2, seqLength, pixPerBase, start, end);
- 	  }
-     }
--    
-+
-     if(isCoverage)
-       coveragePanel.repaint();
-     if(isSNPplot)
-@@ -1109,7 +1108,7 @@ public class BamView extends JPanel
- 	{
- 	  popFrame.show(
-           "Note :: Changed to the stack view to save memory.\n"+
--          "Currently this is using "+ 
-+          "Currently this is using "+
-           (memory.getHeapMemoryUsage().getUsed()/1000000.f)+" Mb "+
-           "and the maximum\nmemory limit is "+
-           (memory.getHeapMemoryUsage().getMax()/1000000.f)+" Mb.",
-@@ -1138,7 +1137,7 @@ public class BamView extends JPanel
-     else
-       return seqLength+nbasesInView;
-   }
--  
-+
-   /**
-    * Draw the zoomed-in base view.
-    * @param g2
-@@ -1147,10 +1146,10 @@ public class BamView extends JPanel
-    * @param start
-    * @param end
-    */
--  private void drawBaseAlignment(Graphics2D g2, 
--                                 int seqLength, 
--                                 float pixPerBase, 
--                                 final int start, 
-+  private void drawBaseAlignment(Graphics2D g2,
-+                                 int seqLength,
-+                                 float pixPerBase,
-+                                 final int start,
-                                  int end)
-   {
-     ruler.start = start;
-@@ -1159,7 +1158,7 @@ public class BamView extends JPanel
-     int ypos = 0;
-     String refSeq = null;
-     int refSeqStart = start;
--    
-+
-     end = start + ( mainPanel.getWidth() * ALIGNMENT_PIX_PER_BASE );
-     if(bases != null)
-     {
-@@ -1171,9 +1170,9 @@ public class BamView extends JPanel
- 
-         if(refSeqStart < 1)
-           refSeqStart = 1;
--        refSeq = 
-+        refSeq =
-           bases.getSubSequence(new Range(refSeqStart, seqEnd), Bases.FORWARD).toUpperCase();
--        
-+
-         ruler.refSeq = refSeq;
-       }
-       catch (OutOfRangeException e)
-@@ -1185,14 +1184,14 @@ public class BamView extends JPanel
-     drawSelectionRange(g2, ALIGNMENT_PIX_PER_BASE, start, end, Color.PINK);
- 
-     g2.setStroke(new BasicStroke (2.f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND));
--    
-+
-     boolean drawn[] = new boolean[readsInView.size()];
-     for(int i=0; i<readsInView.size(); i++)
-       drawn[i] = false;
--    
-+
-     Rectangle r = jspView.getViewport().getViewRect();
-     int nreads = readsInView.size();
--    
-+
-     for (int i = 0; i < nreads; i++)
-     {
-       try
-@@ -1238,7 +1237,7 @@ public class BamView extends JPanel
-         ae.printStackTrace();
-       }
-     }
--    
-+
-     if(ypos > getHeight())
-     {
-       Dimension d = getPreferredSize();
-@@ -1248,7 +1247,7 @@ public class BamView extends JPanel
-     }
-   }
- 
--  
-+
-   /**
-    * Draw the query sequence
-    * @param g2
-@@ -1256,16 +1255,16 @@ public class BamView extends JPanel
-    * @param pixPerBase
-    * @param ypos
-    */
--  private void drawSequence(final Graphics2D g2, final BamViewRecord bamViewRecord, 
-+  private void drawSequence(final Graphics2D g2, final BamViewRecord bamViewRecord,
-                             int ypos, String refSeq, int refSeqStart)
-   {
-     SAMRecord samRecord = bamViewRecord.sam;
-     if (!samRecord.getReadPairedFlag() ||  // read is not paired in sequencing
--        samRecord.getMateUnmappedFlag() )  // mate is unmapped )  // mate is unmapped 
-+        samRecord.getMateUnmappedFlag() )  // mate is unmapped )  // mate is unmapped
-       g2.setColor(Color.black);
-     else
-       g2.setColor(Color.blue);
--    
-+
-     final Color col = g2.getColor();
-     int xpos;
-     int len    = 0;
-@@ -1372,7 +1371,7 @@ public class BamView extends JPanel
-         refPos =  block.getReferenceStart() + offset - refSeqStart;
-         int xstart = refPos*ALIGNMENT_PIX_PER_BASE;
-         int width  = block.getLength()*ALIGNMENT_PIX_PER_BASE;
--        int nextStart = 
-+        int nextStart =
-           (blocks.get(i+1).getReferenceStart() + offset - refSeqStart)*ALIGNMENT_PIX_PER_BASE;
-         g2.drawLine(xstart+width, ypos-(BASE_HEIGHT/2), nextStart, ypos-(BASE_HEIGHT/2));
-       }
-@@ -1382,7 +1381,7 @@ public class BamView extends JPanel
-     {
-       refPos = blocks.get(0).getReferenceStart()+offset-refSeqStart;
-       int xstart = refPos*ALIGNMENT_PIX_PER_BASE;
--      
-+
-       refPos = blocks.get(blocks.size()-1).getReferenceStart()+
-                blocks.get(blocks.size()-1).getLength()+offset-refSeqStart;
-       int xend   = (refPos+len)*ALIGNMENT_PIX_PER_BASE;
-@@ -1398,7 +1397,7 @@ public class BamView extends JPanel
-       }
-     }
-   }
--  
-+
-   /**
-    * Colour bases on their mapping quality.
-    * @param g2
-@@ -1415,7 +1414,7 @@ public class BamView extends JPanel
-     else
-       g2.setColor(Color.black);
-   }
--  
-+
-   /**
-    * Draw inferred size view.
-    * @param g2
-@@ -1461,7 +1460,7 @@ public class BamView extends JPanel
-           int ypos = getYPos(scaleHeight, samRecord.getReadString().length()); // (getHeight() - scaleHeight) - samRecord.getReadString().length();
-           if(ypos > r.getMaxY() || ypos < r.getMinY())
-             continue;
--          
-+
-           g2.setColor(Color.black);
-           drawRead(g2, bamViewRecord, pixPerBase, ypos, baseAtStartOfView, snps, ydiff);
-         }
-@@ -1471,35 +1470,35 @@ public class BamView extends JPanel
-       int ypos = getYPos(scaleHeight, Math.abs(samRecord.getInferredInsertSize()));
-       if( (ypos > r.getMaxY() || ypos < r.getMinY()) && ypos > 0 )
-         continue;
--      
-+
-       if(i < readsInView.size()-1)
-       {
-         bamViewNextRecord = readsInView.get(++i);
-         samNextRecord = bamViewNextRecord.sam;
- 
-         if(samRecord.getReadName().equals(samNextRecord.getReadName()))
--        { 
-+        {
-           // draw connection between paired reads
--          if(samRecord.getAlignmentEnd() < samNextRecord.getAlignmentStart() && 
-+          if(samRecord.getAlignmentEnd() < samNextRecord.getAlignmentStart() &&
-               (samNextRecord.getAlignmentStart()-samRecord.getAlignmentEnd())*pixPerBase > 2.f)
-           {
-         	g2.setColor(Color.LIGHT_GRAY);
- 
-             int offset1 = getSequenceOffset(samRecord.getReferenceName());
-             int end1   = samRecord.getAlignmentEnd()+offset1-baseAtStartOfView;
--            
-+
-             int offset2 = getSequenceOffset(samNextRecord.getReferenceName());
-             int start2  = samNextRecord.getAlignmentStart()+offset2-baseAtStartOfView;
--            
--            drawTranslucentLine(g2, 
-+
-+            drawTranslucentLine(g2,
-                    (int)(end1*pixPerBase), (int)(start2*pixPerBase), ypos);
-           }
--          
-+
-           if(colourByCoverageColour.isSelected())
-             g2.setColor(getColourByCoverageColour(bamViewRecord));
-           else if( (samRecord.getReadNegativeStrandFlag() && // strand of the query (1 for reverse)
-                     samNextRecord.getReadNegativeStrandFlag()) ||
--                   (!samRecord.getReadNegativeStrandFlag() && 
-+                   (!samRecord.getReadNegativeStrandFlag() &&
-                     !samNextRecord.getReadNegativeStrandFlag()))
-             g2.setColor(Color.red);
-           else
-@@ -1519,10 +1518,10 @@ public class BamView extends JPanel
-         drawLoneRead(g2, bamViewRecord, ypos, pixPerBase, baseAtStartOfView, scaleHeight, snps, ydiff);
-       }
-     }
--    
-+
-     drawYScale(g2, scaleHeight);
-   }
--  
-+
-   private int getYPos(int scaleHeight, int size)
-   {
-     if(!logScale)
-@@ -1533,25 +1532,25 @@ public class BamView extends JPanel
-       return (getHeight() - scaleHeight) - logInfSize;
-     }
-   }
-- 
-+
-   /**
--   * Draw the reads as lines in vertical stacks. The reads are colour 
-+   * Draw the reads as lines in vertical stacks. The reads are colour
-    * coded as follows:
--   * 
-+   *
-    * blue  - reads are unique and are paired with a mapped mate
-    * black - reads are unique and are not paired or have an unmapped mate
-    * green - reads are duplicates
--   * 
-+   *
-    * @param g2
-    * @param seqLength
-    * @param pixPerBase
-    * @param start
-    * @param end
-    */
--  private void drawStackView(Graphics2D g2, 
--                             final int seqLength, 
--                             final float pixPerBase, 
--                             final int start, 
-+  private void drawStackView(Graphics2D g2,
-+                             final int seqLength,
-+                             final float pixPerBase,
-+                             final int start,
-                              final int end)
-   {
-     drawSelectionRange(g2, pixPerBase,start, end, Color.PINK);
-@@ -1560,16 +1559,16 @@ public class BamView extends JPanel
- 
-     final BasicStroke stroke = new BasicStroke(
-         readLnHgt,
--        BasicStroke.CAP_BUTT, 
-+        BasicStroke.CAP_BUTT,
-         BasicStroke.JOIN_MITER);
-     g2.setStroke(stroke);
--    
-+
-     final int scaleHeight;
-     if(isShowScale())
-       scaleHeight = 15;
-     else
-       scaleHeight = 0;
--    
-+
-     int ypos = (getHeight() - scaleHeight);
-     int ydiff = (int) Math.round(1.5*readLnHgt);
- 
-@@ -1579,7 +1578,7 @@ public class BamView extends JPanel
-     final int baseAtStartOfView = getBaseAtStartOfView();
-     g2.setColor(Color.blue);
-     final Rectangle r = jspView.getViewport().getViewRect();
--    
-+
-     for(BamViewRecord bamViewRecord: readsInView)
-     {
-       SAMRecord samRecord = bamViewRecord.sam;
-@@ -1662,18 +1661,18 @@ public class BamView extends JPanel
-     int ydiff = (int) Math.round(1.5*readLnHgt);
-     if(isOrientation)
-       ydiff= 2*ydiff;
--    
-+
-     g2.setStroke(stroke);
--    // positive strand    
-+    // positive strand
-     drawStrand(g2, false, scaleHeight, ymid-(scaleHeight/2), -ydiff, pixPerBase);
--    
-+
-     // negative strand
-     drawStrand(g2, true, scaleHeight, ymid+(scaleHeight/2), ydiff, pixPerBase);
-   }
--  
-- 
--  private void drawStrand(Graphics2D g2, 
--                          boolean isStrandNegative, 
-+
-+
-+  private void drawStrand(Graphics2D g2,
-+                          boolean isStrandNegative,
-                           int scaleHeight,
-                           int ymid,
-                           int ystep,
-@@ -1685,7 +1684,7 @@ public class BamView extends JPanel
-     int baseAtStartOfView = getBaseAtStartOfView();
-     g2.setColor(Color.blue);
-     Rectangle r = jspView.getViewport().getViewRect();
--    
-+
-     for(BamViewRecord bamViewRecord: readsInView)
-     {
-       SAMRecord samRecord = bamViewRecord.sam;
-@@ -1763,16 +1762,16 @@ public class BamView extends JPanel
-           samRecord.getMateUnmappedFlag() )  // mate is unmapped
-         continue;
- 
--      BamViewRecord bamViewNextRecord = null;      
-+      BamViewRecord bamViewNextRecord = null;
-       if(i < readsInView.size()-1)
-       {
-         bamViewNextRecord = readsInView.get(++i);
-         SAMRecord samNextRecord = bamViewNextRecord.sam;
--        
-+
-         final PairedRead pr = new PairedRead();
--        if(samRecord.getReadName().equals(samNextRecord.getReadName()) && 
-+        if(samRecord.getReadName().equals(samNextRecord.getReadName()) &&
-            isFromSameBamFile(bamViewRecord, bamViewNextRecord, bamList))
--        { 
-+        {
-           if(samRecord.getAlignmentStart() < samNextRecord.getAlignmentStart())
-           {
-             pr.sam1 = bamViewRecord;
-@@ -1790,22 +1789,22 @@ public class BamView extends JPanel
-           pr.sam1 = bamViewRecord;
-           pr.sam2 = null;
-         }
--        
-+
-         pairedReads.add(pr);
-       }
-     }
-     Collections.sort(pairedReads, new PairedReadComparator());
--    
--    Stroke originalStroke = new BasicStroke (readLnHgt, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND); 
-+
-+    Stroke originalStroke = new BasicStroke (readLnHgt, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND);
- 
-     g2.setStroke( new BasicStroke (1.3f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND));
--    
-+
-     final int scaleHeight;
-     if(isShowScale())
-       scaleHeight = 15;
-     else
-       scaleHeight = 0;
--    
-+
-     int ydiff = (int) Math.round(2.3*readLnHgt);
-     if(isOrientation)
-       ydiff= 2*ydiff;
-@@ -1866,11 +1865,11 @@ public class BamView extends JPanel
-         }
- 
-         int offset = getSequenceOffset(pr.sam1.sam.getReferenceName());
--        drawTranslucentJointedLine(g2, 
-+        drawTranslucentJointedLine(g2,
-               (int)( (prStart+offset-getBaseAtStartOfView())*pixPerBase),
-               (int)( (prEnd  +offset-getBaseAtStartOfView())*pixPerBase), ypos);
-       }
--      
-+
-       if(colourByCoverageColour.isSelected())
-         g2.setColor(getColourByCoverageColour(pr.sam1));
-       else if(colourByStrandTag.isSelected())
-@@ -1879,12 +1878,12 @@ public class BamView extends JPanel
-           g2.setColor(Color.BLUE);
-         else if( ((Character)pr.sam1.sam.getAttribute("XS")).equals('-') )
-           g2.setColor(Color.RED);
--        else 
--          g2.setColor(Color.BLACK); 
-+        else
-+          g2.setColor(Color.BLACK);
-       }
-       else if(colourByReadGrp.isSelected())
-         g2.setColor(getReadGroupFrame().getReadGroupColour(readGroups, pr.sam1.sam.getReadGroup()));
--      else if(   pr.sam2 != null && 
-+      else if(   pr.sam2 != null &&
-               !( pr.sam1.sam.getReadNegativeStrandFlag() ^ pr.sam2.sam.getReadNegativeStrandFlag() ) )
-         g2.setColor(Color.red);
-       else
-@@ -1899,7 +1898,7 @@ public class BamView extends JPanel
-       }
-     }
-   }
--  
-+
-   /**
-    * Check if a record is on the negative strand. If the RNA strand specific
-    * checkbox is set then use the RNA strand.
-@@ -1907,8 +1906,8 @@ public class BamView extends JPanel
-    * @param useStrandTag - strand specific tag
-    * @return
-    */
--  protected static boolean isNegativeStrand(final SAMRecord samRecord, 
--                                            final boolean useStrandTag) 
-+  protected static boolean isNegativeStrand(final SAMRecord samRecord,
-+                                            final boolean useStrandTag)
-   {
-     if(useStrandTag)
-     {
-@@ -1921,7 +1920,7 @@ public class BamView extends JPanel
-     }
-     return samRecord.getReadNegativeStrandFlag();
-   }
--  
-+
-   /**
-    * Check if two records are from the same BAM file
-    * @param sam1
-@@ -1929,8 +1928,8 @@ public class BamView extends JPanel
-    * @param bamList
-    * @return
-    */
--  private boolean isFromSameBamFile(final BamViewRecord sam1, 
--                                    final BamViewRecord sam2, 
-+  private boolean isFromSameBamFile(final BamViewRecord sam1,
-+                                    final BamViewRecord sam2,
-                                     final List<String> bamList)
-   {
-     if(bamList == null || bamList.size()<2)
-@@ -1941,18 +1940,18 @@ public class BamView extends JPanel
-     if(o1 != -1 && o2 != -1)
-       if( o1 != o2 )
-         return false;
--    
-+
-     return true;
-   }
--  
--  
-+
-+
-   /**
-    * Check if two records overlap
-    * @param s1
-    * @param s2
-    * @return true id the two reads overlap
-    */
--  private boolean readsOverlap(final SAMRecord s1, 
-+  private boolean readsOverlap(final SAMRecord s1,
-                                final SAMRecord s2)
-   {
-     if( (s2.getAlignmentStart() >= s1.getAlignmentStart() &&
-@@ -1960,7 +1959,7 @@ public class BamView extends JPanel
-         (s2.getAlignmentEnd()   >= s1.getAlignmentStart() &&
-          s2.getAlignmentEnd()   <= s1.getAlignmentEnd()) )
-       return true;
--    
-+
-     if( (s1.getAlignmentStart() >= s2.getAlignmentStart() &&
-          s1.getAlignmentStart() <= s2.getAlignmentEnd()) ||
-         (s1.getAlignmentEnd()   >= s2.getAlignmentStart() &&
-@@ -1968,7 +1967,7 @@ public class BamView extends JPanel
-      return true;
-     return false;
-   }
--  
-+
-   /**
-    * Draw the read coverage.
-    * @param g2
-@@ -2003,9 +2002,9 @@ public class BamView extends JPanel
-     coverageView.drawSelectionRange(g2, pixPerBase, start, end, getHeight(), Color.PINK);
-     coverageView.draw(g2, getWidth(), hgt, hideBamList);
-     if(!coverageView.isPlotHeatMap())
--      coverageView.drawMax(g2, coverageView.getMaxCoverage());  
-+      coverageView.drawMax(g2, coverageView.getMaxCoverage());
-   }
--  
-+
-   /**
-    * Draw a read that apparently has a read mate that is not in view.
-    * @param g2
-@@ -2015,7 +2014,7 @@ public class BamView extends JPanel
-    * @param originalStroke
-    * @param stroke
-    */
--  private void drawLoneRead(Graphics2D g2, BamViewRecord bamViewRecord, int ypos, 
-+  private void drawLoneRead(Graphics2D g2, BamViewRecord bamViewRecord, int ypos,
-       float pixPerBase, int baseAtStartOfView, int scaleHeight, List<Integer> snps, int ydiff)
-   {
-     SAMRecord samRecord = bamViewRecord.sam;
-@@ -2023,64 +2022,64 @@ public class BamView extends JPanel
-     int offset = getSequenceOffset(samRecord.getReferenceName());
-     int thisStart = samRecord.getAlignmentStart()+offset;
-     int thisEnd   = thisStart + samRecord.getReadString().length() -1;
--    
-+
-     if(ypos <= 0)
-     {
-       offTheTop = true;
-       ypos = samRecord.getReadString().length();
-     }
--    
-+
-     if(samRecord.getInferredInsertSize() == 0)
-     {
-       offTheTop = true;
-       ypos = getHeight() - scaleHeight - 5;
-     }
--      
-+
-     if(samRecord.getInferredInsertSize() != 0 &&
-       Math.abs(samRecord.getMateAlignmentStart()-samRecord.getAlignmentEnd())*pixPerBase > 2.f)
-     {
-       g2.setColor(Color.LIGHT_GRAY);
--      
-+
-       if(samRecord.getAlignmentEnd() < samRecord.getMateAlignmentStart())
-       {
--        int nextStart = 
-+        int nextStart =
-           (int)((samRecord.getMateAlignmentStart()-getBaseAtStartOfView()+offset)*pixPerBase);
--        drawTranslucentLine(g2, 
-+        drawTranslucentLine(g2,
-           (int)((thisEnd-getBaseAtStartOfView())*pixPerBase), nextStart, ypos);
-       }
-       else
-       {
--        int nextStart = 
-+        int nextStart =
-             (int)((samRecord.getMateAlignmentStart()-getBaseAtStartOfView()+offset)*pixPerBase);
--        drawTranslucentLine(g2, 
-+        drawTranslucentLine(g2,
-             (int)((thisStart-getBaseAtStartOfView())*pixPerBase), nextStart, ypos);
-       }
-     }
--    
-+
-     if(colourByCoverageColour.isSelected())
-       g2.setColor(getColourByCoverageColour(bamViewRecord));
-     else if(offTheTop)
--      g2.setColor(DARK_ORANGE); 
-+      g2.setColor(DARK_ORANGE);
-     else if(samRecord.getReadNegativeStrandFlag() &&
-             samRecord.getMateNegativeStrandFlag()) // strand of the query (1 for reverse)
-       g2.setColor(Color.red);
-     else
-       g2.setColor(Color.blue);
-- 
-+
-     drawRead(g2, bamViewRecord, pixPerBase, ypos, baseAtStartOfView, snps, ydiff);
--    
-+
-     /*if (isSNPs)
-       showSNPsOnReads(g2, samRecord, pixPerBase, ypos, offset);*/
-   }
- 
--  
-+
-   private void drawScale(Graphics2D g2, int start, int end, float pixPerBase, int ypos)
-   {
-     g2.setColor(Color.black);
-     g2.drawLine( 0, ypos-14,
-                  (int)((end - getBaseAtStartOfView())*pixPerBase),   ypos-14);
-     int interval = end-start;
--    
-+
-     if(interval > 256000)
-       drawTicks(g2, start, end, pixPerBase, 512000, ypos);
-     else if(interval > 64000)
-@@ -2094,14 +2093,14 @@ public class BamView extends JPanel
-     else
-       drawTicks(g2, start, end, pixPerBase, 100, ypos);
-   }
--  
-+
-   private void drawTicks(Graphics2D g2, int start, int end, float pixPerBase, int division, int ypos)
-   {
-     int markStart = (Math.round(start/division)*division);
--    
-+
-     if(markStart < 1)
-       markStart = 1;
--    
-+
-     int sm = markStart-(division/2);
-     float x;
-     if(sm > start)
-@@ -2109,26 +2108,26 @@ public class BamView extends JPanel
-       x = (sm-getBaseAtStartOfView())*pixPerBase;
-       g2.drawLine((int)x, ypos-14,(int)x, ypos-12);
-     }
--    
-+
-     for(int m=markStart; m<end; m+=division)
-     {
-       x = (m-getBaseAtStartOfView())*pixPerBase;
-       g2.drawString(Integer.toString(m), x, ypos-1);
-       g2.drawLine((int)x, ypos-14,(int)x, ypos-11);
--      
-+
-       sm = m+(division/2);
--      
-+
-       if(sm < end)
-       {
-         x = (sm-getBaseAtStartOfView())*pixPerBase;
-         g2.drawLine((int)x, ypos-14,(int)x, ypos-12);
-       }
--      
-+
-       if(m == 1)
-         m = 0;
-     }
-   }
--  
-+
-   /**
-    * Draw a y-scale for inferred size (isize) of reads.
-    * @param g2
-@@ -2138,13 +2137,13 @@ public class BamView extends JPanel
-   {
-     g2.setColor(Color.black);
-     int maxY = getPreferredSize().height-xScaleHeight;
--    
-+
-     if(logScale)
-     {
-       int start = 10;
-       int count = 0;
-       int ypos = getYPos(xScaleHeight, start);
--      
-+
-       while(ypos > 0 && count < 15 && start > 1)
-       {
-         g2.drawLine(0, ypos, 2, ypos);
-@@ -2155,7 +2154,7 @@ public class BamView extends JPanel
-       }
-       return;
-     }
--    
-+
-     for(int i=100; i<maxY; i+=100)
-     {
-       int ypos = getHeight()-i-xScaleHeight;
-@@ -2163,7 +2162,7 @@ public class BamView extends JPanel
-       g2.drawString(Integer.toString(i), 3, ypos);
-     }
-   }
--  
-+
-   /**
-    * Draw a given read.
-    * @param g2
-@@ -2173,7 +2172,7 @@ public class BamView extends JPanel
-    * @param baseAtStartOfView
-    * @param snps
-    */
--  private void drawRead(Graphics2D g2, 
-+  private void drawRead(Graphics2D g2,
-       final BamViewRecord bamViewRecord,
-       final float pixPerBase,
-       final int ypos,
-@@ -2240,7 +2239,7 @@ public class BamView extends JPanel
-         lastEnd = blockEnd;
-       }
-     }
--    
-+
-     if(isOrientation)
-       drawArrow(g2, thisRead, thisStart, thisEnd, pixPerBase, ypos, ydiff);
      
-@@ -2271,16 +2270,16 @@ public class BamView extends JPanel
-    * @param ypos
-    */
-   private void drawArrow(final Graphics2D g2,
--      final SAMRecord thisRead, 
--      final int thisStart, 
--      final int thisEnd, 
--      final float pixPerBase, 
-+      final SAMRecord thisRead,
-+      final int thisStart,
-+      final int thisEnd,
-+      final float pixPerBase,
-       int ypos,
-       int ydiff)
-   {
-     if(ydiff < 0)
-       ydiff = -ydiff;
--    
-+
-     if(thisRead.getReadNegativeStrandFlag())
-     {
-       ypos-=readLnHgt/2;
-@@ -2294,9 +2293,9 @@ public class BamView extends JPanel
-       int apos = ypos - ydiff + 1;
-       g2.drawLine((int)( (thisEnd-5) * pixPerBase), apos,
-                   (int)( thisEnd * pixPerBase), ypos);
--    }  
-+    }
-   }
--  
-+
-   /**
-    * Highlight a selected range
-    * @param g2
-@@ -2314,19 +2313,19 @@ public class BamView extends JPanel
-       {
-         int rangeStart = selectedRange.getStart();
-         int rangeEnd   = selectedRange.getEnd();
--        
-+
-         if(end < rangeStart || start > rangeEnd)
-           return;
--        
-+
-         int x = (int) (pixPerBase*(rangeStart-getBaseAtStartOfView()));
-         int width = (int) (pixPerBase*(rangeEnd-rangeStart+1));
--        
-+
-         g2.setColor(c);
-         g2.fillRect(x, 0, width, getHeight());
-       }
-     }
-   }
--  
-+
-   /**
-    * Draw a translucent line
-    * @param g2
-@@ -2341,7 +2340,7 @@ public class BamView extends JPanel
-     g2.drawLine(start, ypos, end, ypos);
-     g2.setComposite(origComposite);
-   }
--  
-+
-   /**
-    * Draw a translucent line
-    * @param g2
-@@ -2353,14 +2352,14 @@ public class BamView extends JPanel
-   {
-     Composite origComposite = g2.getComposite();
-     g2.setComposite(translucent);
--    
-+
-     int mid = (int) ((end-start)/2.f)+start;
-     //g2.drawLine(start, ypos, end, ypos);
-     g2.drawLine(start, ypos, mid, ypos-5);
-     g2.drawLine(mid, ypos-5, end, ypos);
-     g2.setComposite(origComposite);
-   }
--  
-+
-   /**
-    * Display the SNPs for the given read.
-    * @param snps
-@@ -2375,18 +2374,18 @@ public class BamView extends JPanel
-     final Stroke originalStroke = g2.getStroke();
-     final BasicStroke stroke = new BasicStroke(
-         1.3f,
--        BasicStroke.CAP_BUTT, 
-+        BasicStroke.CAP_BUTT,
-         BasicStroke.JOIN_MITER);
-     g2.setStroke(stroke);
--    
-+
-     g2.setColor(Color.red);
-     for(int pos: snps)
-       g2.drawLine((int) (pos * pixPerBase), ypos + 2,
-                   (int) (pos * pixPerBase), ypos - 2);
-     g2.setStroke(originalStroke);
-   }
--  
--  
-+
-+
-   /**
-    * Get the SNP positions
-    * @param samRecord
-@@ -2399,7 +2398,7 @@ public class BamView extends JPanel
-     int rend = samRecord.getAlignmentEnd();
-     int offset = getSequenceOffset(samRecord.getReferenceName());
-     ArrayList<Integer> snps = null;
--    
-+
-     // use alignment blocks of the contiguous alignment of
-     // subsets of read bases to a reference sequence
-     try
-@@ -2440,8 +2439,8 @@ public class BamView extends JPanel
-     }
-     return snps;
-   }
--  
--  
-+
-+
-   /**
-    * Add the alignment view to the supplied <code>JPanel</code> in
-    * a <code>JScrollPane</code>.
-@@ -2454,7 +2453,7 @@ public class BamView extends JPanel
-   {
-     final JComponent topPanel = bamTopPanel(frame);
-     mainPanel.setPreferredSize(new Dimension(900, 400));
--    
-+
-     setDisplay(1, nbasesInView, null);
-     mainPanel.setLayout(new BorderLayout());
- 
-@@ -2469,7 +2468,7 @@ public class BamView extends JPanel
-     //
-     snpPanel = new SnpPanel(this, bases);
-     bottomPanel.add(snpPanel, BorderLayout.NORTH);
--    
-+
-     if(feature_display == null)
-     {
-       scrollBar = new JScrollBar(JScrollBar.HORIZONTAL, 1, nbasesInView, 1,
-@@ -2514,7 +2513,7 @@ public class BamView extends JPanel
-                 "The length of the sequence loaded does not match the length of",
-                 "the default reference sequence in the BAM/CRAM ("+seqNames.get(0)+").",
-                 (newIndex == -1 ? "" : "The length does match the reference "+
--                    seqNames.get(newIndex)+" so this has been set as the default.") 
-+                    seqNames.get(newIndex)+" so this has been set as the default.")
-             };
-             new NonModalDialog(frame, label);
-           }
-@@ -2532,13 +2531,13 @@ public class BamView extends JPanel
-     jspView.getVerticalScrollBar().setValue(
-         jspView.getVerticalScrollBar().getMaximum());
-   }
--  
-+
-   private void addToViewMenu(final short thisBamIndex)
-   {
-     final File f = new File(bamList.get(thisBamIndex));
-     final JCheckBoxMenuItem cbBam = new JCheckBoxMenuItem(
--                                     f.getName(), 
--                                     getImageIcon(getColourByCoverageColour(thisBamIndex)), 
-+                                     f.getName(),
-+                                     getImageIcon(getColourByCoverageColour(thisBamIndex)),
-                                      true);
-     bamFilesMenu.add(cbBam);
-     cbBam.addItemListener(new ItemListener() {
-@@ -2549,10 +2548,10 @@ public class BamView extends JPanel
-           hideBamList.add(new Short(thisBamIndex));
-         laststart = -1;
-         repaint();
--      } 
-+      }
-     });
-   }
--  
-+
-   /**
-    * Refresh the colour of the icons used to identify the
-    * BAM/CRAM files.
-@@ -2571,7 +2570,7 @@ public class BamView extends JPanel
-       }
-     }
-   }
--  
-+
-   protected Color getColorByJCheckBoxMenuItem(JCheckBoxMenuItem cbBam)
-   {
-     final String bam = cbBam.getText();
-@@ -2583,7 +2582,7 @@ public class BamView extends JPanel
-     }
-     return null;
-   }
--  
-+
-   /**
-    * Create an icon of a box using the given colour.
-    * @param c
-@@ -2610,16 +2609,16 @@ public class BamView extends JPanel
-             null, false, "BamView", "BAM/CRAM");
-         List<String> bamFiles = bamFileSelection.getFiles(BAM_SUFFIX);
-         short count = (short) bamList.size();
--       
-+
-         bamList.addAll(bamFileSelection.getFiles(BAM_SUFFIX));
--        
-+
-         for(short i=0; i<bamFiles.size(); i++)
-           addToViewMenu((short) (i+count));
--        laststart = -1; 
-+        laststart = -1;
-         repaint();
--      } 
-+      }
-     });
--    
-+
-     bamFilesMenu.setFont(addBam.getFont());
- 
-     final JMenuItem groupBams = new JMenuItem("Group BAMs/CRAMs ...");
-@@ -2633,7 +2632,7 @@ public class BamView extends JPanel
-     bamFilesMenu.addSeparator();
-     menu.add(bamFilesMenu);
- 
--  
-+
-     final JMenu analyse = new JMenu("Analyse");
-     menu.add(analyse);
-     final JMenuItem readCount = new JMenuItem("Read count of selected features ...");
-@@ -2652,18 +2651,18 @@ public class BamView extends JPanel
-         Box yBox = Box.createVerticalBox();
-         yBox.add(overlap);
-         yBox.add(spliced);
--        
-+
-         final ReadCountDialog opts = new ReadCountDialog(new JFrame(),
-             "Read Count Options", feature_display, yBox);
-         if(opts.getStatus() == -1)
-           return;
-         //JOptionPane.showMessageDialog(null, yBox, "Read Count Option", JOptionPane.INFORMATION_MESSAGE);
--        
-+
-         new MappedReads(BamView.this, features,
-             !overlap.isSelected(), spliced.isSelected(), colourByStrandTag.isSelected());
--      } 
-+      }
-     });
--    
-+
-     final JMenuItem rpkm = new JMenuItem("RPKM value of selected features ...");
-     analyse.add(rpkm);
-     if(feature_display == null)
-@@ -2678,14 +2677,14 @@ public class BamView extends JPanel
-         overlap.setToolTipText("Include reads that partially overlap the feature");
-         JCheckBox spliced = new JCheckBox("Introns included", true);
-         JCheckBox allRefSeqs = new JCheckBox("Use reads mapped to all reference sequences", false);
--        
-+
-         Box yBox = Box.createVerticalBox();
-         yBox.add(overlap);
-         yBox.add(spliced);
--        
-+
-         if(seqLengths.size() > 1)
-           yBox.add(allRefSeqs);
--     
-+
-         final ReadCountDialog opts = new ReadCountDialog(new JFrame(),
-             "RPKM Options", feature_display, yBox);
-         if(opts.getStatus() == -1)
-@@ -2696,7 +2695,7 @@ public class BamView extends JPanel
-           seqlen = feature_display.getSequenceLength();
-         else if(bases != null)
-           seqlen = bases.getLength();
--        
-+
-         new MappedReads(BamView.this, features, seqlen,
-             !overlap.isSelected(), spliced.isSelected(), allRefSeqs.isSelected(),
-             colourByStrandTag.isSelected());
-@@ -2714,14 +2713,14 @@ public class BamView extends JPanel
-         if(feature_display == null)
-           return;
-         new CreateFeatures(groupsFrame);
--      } 
-+      }
-     });
- 
-     for(short i=0; i<bamList.size(); i++)
-       addToViewMenu(i);
--    
-+
-     menu.add(new JSeparator());
--    
-+
-     JMenu viewMenu = new JMenu("Views");
-     cbStackView.setFont(viewMenu.getFont());
-     cbIsizeStackView.setFont(viewMenu.getFont());
-@@ -2730,13 +2729,13 @@ public class BamView extends JPanel
-     cbCoverageView.setFont(viewMenu.getFont());
-     cbCoverageStrandView.setFont(viewMenu.getFont());
-     cbCoverageHeatMap.setFont(viewMenu.getFont());
--    
-+
-     baseQualityColour.setFont(viewMenu.getFont());
-     colourByReadGrp.setFont(viewMenu.getFont());
-     colourByCoverageColour.setFont(viewMenu.getFont());
-     colourByStrandTag.setFont(viewMenu.getFont());
-     markInsertions.setFont(viewMenu.getFont());
--    
-+
-     cbIsizeStackView.addActionListener(new ActionListener()
-     {
-       public void actionPerformed(ActionEvent e)
-@@ -2748,8 +2747,8 @@ public class BamView extends JPanel
-       }
-     });
-     viewMenu.add(cbIsizeStackView);
--    
--    
-+
-+
-     cbStackView.addActionListener(new ActionListener()
-     {
-       public void actionPerformed(ActionEvent e)
-@@ -2763,7 +2762,7 @@ public class BamView extends JPanel
-       }
-     });
-     viewMenu.add(cbStackView);
--    
-+
- 
-     cbPairedStackView.addActionListener(new ActionListener()
-     {
-@@ -2777,7 +2776,7 @@ public class BamView extends JPanel
-       }
-     });
-     viewMenu.add(cbPairedStackView);
--    
-+
-     cbStrandStackView.addActionListener(new ActionListener()
-     {
-       public void actionPerformed(ActionEvent e)
-@@ -2793,7 +2792,7 @@ public class BamView extends JPanel
-       }
-     });
-     viewMenu.add(cbStrandStackView);
--    
-+
-     cbCoverageView.addActionListener(new ActionListener()
-     {
-       public void actionPerformed(ActionEvent e)
-@@ -2811,7 +2810,7 @@ public class BamView extends JPanel
-       }
-     });
-     viewMenu.add(cbCoverageView);
--    
-+
-     cbCoverageStrandView.addActionListener(new ActionListener()
-     {
-       public void actionPerformed(ActionEvent e)
-@@ -2830,8 +2829,8 @@ public class BamView extends JPanel
-       }
-     });
-     viewMenu.add(cbCoverageStrandView);
--    
--    
-+
-+
-     cbCoverageHeatMap.addActionListener(new ActionListener()
-     {
-       public void actionPerformed(ActionEvent e)
-@@ -2849,20 +2848,20 @@ public class BamView extends JPanel
-       }
-     });
-     viewMenu.add(cbCoverageHeatMap);
--    
-+
-     menu.add(viewMenu);
-- 
-+
-     final JCheckBoxMenuItem checkBoxSNPs = new JCheckBoxMenuItem("SNP marks", isSNPs);
--    // 
-+    //
-     final JMenu colourMenu = new JMenu("Colour By");
--    
-+
-     final JCheckBoxMenuItem colourDefault = new JCheckBoxMenuItem ("Default", true);
-     final ButtonGroup grp = new ButtonGroup();
-     grp.add(colourByReadGrp);
-     grp.add(colourByCoverageColour);
-     grp.add(colourByStrandTag);
-     grp.add(colourDefault);
--    
-+
-     colourMenu.add(colourDefault);
-     colourDefault.addActionListener(new ActionListener()
-     {
-@@ -2871,7 +2870,7 @@ public class BamView extends JPanel
-         repaintBamView();
-       }
-     });
--    
-+
-     colourMenu.add(colourByReadGrp);
-     colourByReadGrp.addActionListener(new ActionListener()
-     {
-@@ -2880,7 +2879,7 @@ public class BamView extends JPanel
-         repaintBamView();
-       }
-     });
--    
-+
-     colourMenu.add(colourByCoverageColour);
-     colourByCoverageColour.addActionListener(new ActionListener()
-     {
-@@ -2889,7 +2888,7 @@ public class BamView extends JPanel
-         repaintBamView();
-       }
-     });
--    
-+
-     colourMenu.add(colourByStrandTag);
-     colourByStrandTag.addActionListener(new ActionListener()
-     {
-@@ -2932,7 +2931,7 @@ public class BamView extends JPanel
-       }
-     });
-     showMenu.add(checkBoxOrientation);
--    
-+
-     JCheckBoxMenuItem checkBoxSingle = new JCheckBoxMenuItem("Single Reads");
-     checkBoxSingle.addActionListener(new ActionListener()
-     {
-@@ -2943,7 +2942,7 @@ public class BamView extends JPanel
-       }
-     });
-     showMenu.add(checkBoxSingle);
--    
-+
-     checkBoxSNPs.addActionListener(new ActionListener()
-     {
-       public void actionPerformed(ActionEvent e)
-@@ -2955,14 +2954,14 @@ public class BamView extends JPanel
-               JOptionPane.INFORMATION_MESSAGE);
-         }
-         isSNPs = !isSNPs;
--        
-+
-         if(isSNPs)
-           baseQualityColour.setSelected(false);
-         repaint();
-       }
-     });
-     showMenu.add(checkBoxSNPs);
--    
-+
-     markInsertions.addActionListener(new ActionListener()
-     {
-       public void actionPerformed(ActionEvent e)
-@@ -2972,7 +2971,7 @@ public class BamView extends JPanel
-     });
-     showMenu.add(markInsertions);
-     menu.add(showMenu);
--    
-+
-     //
-     JMenu graphMenu = new JMenu("Graph");
-     JCheckBoxMenuItem checkBoxCoverage = new JCheckBoxMenuItem("Coverage", isCoverage);
-@@ -2982,9 +2981,9 @@ public class BamView extends JPanel
-       {
-         isCoverage = !isCoverage;
-         coveragePanel.setVisible(isCoverage);
--        
--        if( isCoverage && 
--            !cbCoverageView.isSelected() && 
-+
-+        if( isCoverage &&
-+            !cbCoverageView.isSelected() &&
-             !cbCoverageStrandView.isSelected() &&
-             !cbCoverageHeatMap.isSelected())
-           laststart = -1;
-@@ -2992,7 +2991,7 @@ public class BamView extends JPanel
-       }
-     });
-     graphMenu.add(checkBoxCoverage);
--    
-+
-     JCheckBoxMenuItem checkBoxSNP = new JCheckBoxMenuItem("SNP", isSNPplot);
-     checkBoxSNP.addActionListener(new ActionListener()
-     {
-@@ -3006,8 +3005,8 @@ public class BamView extends JPanel
-     });
-     graphMenu.add(checkBoxSNP);
-     menu.add(graphMenu);
--    
--    
-+
-+
-     if(feature_display != null)
-     {
-       final JCheckBoxMenuItem checkBoxSync =
-@@ -3021,15 +3020,15 @@ public class BamView extends JPanel
-       });
-       menu.add(checkBoxSync);
-     }
--    
-+
-     menu.add(new JSeparator());
- 
-     JMenu maxHeightMenu = new JMenu("BamView Height");
-     menu.add(maxHeightMenu);
--    
-+
-     final String hgts[] =
-        {"500", "800", "1000", "1500", "2500", "5000", "50000"};
--    
-+
-     ButtonGroup bgroup = new ButtonGroup();
-     for(int i=0; i<hgts.length; i++)
-     {
-@@ -3049,12 +3048,12 @@ public class BamView extends JPanel
-         }
-       });
-     }
--    
-+
-     menu.add(new JSeparator());
-     logMenuItem.setFont(menu.getFont());
-     menu.add(logMenuItem);
-     logMenuItem.setEnabled(isIsizeStackView());
--    
-+
-     logMenuItem.addActionListener(new ActionListener()
-     {
-       public void actionPerformed(ActionEvent e)
-@@ -3063,7 +3062,7 @@ public class BamView extends JPanel
-         repaint();
-       }
-     });
--    
-+
-     final JMenuItem readGroupsMenu = new JMenuItem("Read Groups ...");
-     readGroupsMenu.addActionListener(new ActionListener(){
-       public void actionPerformed(ActionEvent arg0)
-@@ -3073,7 +3072,7 @@ public class BamView extends JPanel
-       }
-     });
-     menu.add(readGroupsMenu);
--    
-+
-     JMenuItem filter = new JMenuItem("Filter Reads ...");
-     menu.add(filter);
-     filter.addActionListener(new ActionListener()
-@@ -3084,9 +3083,9 @@ public class BamView extends JPanel
-           filterFrame = new SAMRecordFilter(BamView.this);
-         else
-           filterFrame.setVisible(true);
--      } 
-+      }
-     });
--      
-+
-     JMenuItem maxReadCoverage = new JMenuItem("Read Coverage Threshold ...");
-     menu.add(maxReadCoverage);
-     maxReadCoverage.addActionListener(new ActionListener()
-@@ -3095,7 +3094,7 @@ public class BamView extends JPanel
-       {
-         final TextFieldInt maxRead = new TextFieldInt();
-         maxRead.setValue(MAX_COVERAGE);
--        int status = JOptionPane.showConfirmDialog(null, maxRead, 
-+        int status = JOptionPane.showConfirmDialog(null, maxRead,
-             "Read Coverage Threshold", JOptionPane.OK_CANCEL_OPTION);
-         if(status == JOptionPane.OK_OPTION &&
-            maxRead.getValue() != MAX_COVERAGE)
-@@ -3106,9 +3105,9 @@ public class BamView extends JPanel
-           laststart = -1;
-           repaint();
-         }
--      } 
-+      }
-     });
--    
-+
-     JMenuItem readList = new JMenuItem("List Reads ...");
-     menu.add(readList);
-     readList.addActionListener(new ActionListener()
-@@ -3125,7 +3124,7 @@ public class BamView extends JPanel
-       public void actionPerformed(ActionEvent e)
-       {
-         openBamView(new Vector<String>(bamList));
--      } 
-+      }
-     });
-     menu.add(new JSeparator());
-     menu.add(bamSplitter);
-@@ -3137,14 +3136,14 @@ public class BamView extends JPanel
-     viewMenu.add(new JSeparator());
-     viewMenu.add(coverageMenu);
-   }
--  
-+
-   private ReadGroupsFrame getReadGroupFrame()
-   {
-     if(readGrpFrame == null)
-       readGrpFrame = new ReadGroupsFrame(readGroups, BamView.this);
-     return readGrpFrame;
-   }
--  
-+
-   private JComponent bamTopPanel(final JFrame frame)
-   {
-     final JComponent topPanel;
-@@ -3152,13 +3151,13 @@ public class BamView extends JPanel
-     {
-       topPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 0));
-       if(feature_display != null)
--        this.selection = feature_display.getSelection(); 
-+        this.selection = feature_display.getSelection();
-     }
-     else
--    { 
-+    {
-       topPanel = new JMenuBar();
-       frame.setJMenuBar((JMenuBar)topPanel);
--      
-+
-       JMenu fileMenu = new JMenu("File");
-       topPanel.add(fileMenu);
- 
-@@ -3170,21 +3169,21 @@ public class BamView extends JPanel
-         {
-           String[] s = { "NEW-BAMVIEW" };
-           BamView.main(s);
--        } 
-+        }
-       });
--      
--      
-+
-+
-       JMenuItem saveAs = new JMenuItem("Save As Image File (png/jpeg/svg) ...");
-       fileMenu.add(saveAs);
-       saveAs.addActionListener(new ActionListener()
-       {
-         public void actionPerformed(ActionEvent e)
-         {
--          PrintBamView.print((JPanel)mainPanel.getParent()); 
-+          PrintBamView.print((JPanel)mainPanel.getParent());
-         }
-       });
- 
--      
-+
-       JMenuItem close = new JMenuItem("Close");
-       fileMenu.add(close);
-       close.addActionListener(new ActionListener()
-@@ -3202,15 +3201,15 @@ public class BamView extends JPanel
-       {
-         public void actionPerformed(ActionEvent e)
-         {
--          int status = JOptionPane.showConfirmDialog(BamView.this, 
--              "Exit BamView?", "Exit", 
-+          int status = JOptionPane.showConfirmDialog(BamView.this,
-+              "Exit BamView?", "Exit",
-               JOptionPane.OK_CANCEL_OPTION);
-           if(status != JOptionPane.OK_OPTION)
-             return;
-           System.exit(0);
--        } 
-+        }
-       });
--      
-+
-       addKeyListener(new KeyAdapter()
-       {
-         public void keyPressed(final KeyEvent event)
-@@ -3231,13 +3230,13 @@ public class BamView extends JPanel
-         }
-       });
-     }
--    
-+
-     if(seqNames.size() > 1)
-     {
-       int len = 0;
-       for(int i=0; i<seqNames.size(); i++)
-         len += seqLengths.get(seqNames.get(i));
--      
-+
-       if(feature_display != null &&
-          len == feature_display.getSequenceLength())
-         concatSequences = true;
-@@ -3255,7 +3254,7 @@ public class BamView extends JPanel
-       {
-         handleCanvasMouseDrag(event);
-       }
--      
-+
-       public void mouseMoved(MouseEvent e)
-       {
-         lastMousePoint = e.getPoint();
-@@ -3362,10 +3361,10 @@ public class BamView extends JPanel
-       });
-       topPanel.add(zoomOut);
-     }
--    
-+
-     topPanel.add(buttonAutoHide);
--    
--    
-+
-+
-     final JSlider slider = new JSlider(13, 52, (int) (readLnHgt*10));
-     slider.addChangeListener(new ChangeListener(){
-       public void stateChanged(ChangeEvent arg0)
-@@ -3376,7 +3375,7 @@ public class BamView extends JPanel
-     });
-     topPanel.add(new JLabel(" Read Height:"));
-     topPanel.add(slider);
--    
-+
-     if(feature_display != null)
-     {
-       JButton close = new JButton("Close");
-@@ -3397,26 +3396,26 @@ public class BamView extends JPanel
-     }
-     return topPanel;
-   }
--  
-+
-   public void setVisible(boolean visible)
-   {
-     super.setVisible(visible);
-     mainPanel.setVisible(visible);
-   }
--  
-+
-   private void setViewportMidPoint()
-   {
-     Point p = jspView.getViewport().getLocation();
-     p.y = (getHeight() - jspView.getViewport().getViewRect().height)/2;
-     jspView.getViewport().setViewPosition(p);
-   }
--  
-+
-   private void setViewportBtm()
-   {
-     jspView.getVerticalScrollBar().setValue(
-         jspView.getVerticalScrollBar().getMaximum());
-   }
--  
-+
-   protected int getBaseAtStartOfView()
-   {
-     if(feature_display != null)
-@@ -3424,7 +3423,7 @@ public class BamView extends JPanel
-     else
-       return scrollBar.getValue();
-   }
--  
-+
-   /**
-    * Set the panel size based on the number of bases visible
-    * and repaint.
-@@ -3434,14 +3433,14 @@ public class BamView extends JPanel
-   {
-     int startValue = getBaseAtStartOfView();
-     this.nbasesInView = nbasesInView;
--    float pixPerBase = getPixPerBaseByWidth(); 
-+    float pixPerBase = getPixPerBaseByWidth();
- 
-     if(isBaseAlignmentView(pixPerBase))
-     {
-       pixPerBase = ALIGNMENT_PIX_PER_BASE;
-       this.nbasesInView = (int)(mainPanel.getWidth()/pixPerBase);
-       jspView.getVerticalScrollBar().setValue(0);
--      
-+
-       if(ruler == null)
-         ruler = new Ruler();
-       jspView.setColumnHeaderView(ruler);
-@@ -3475,14 +3474,14 @@ public class BamView extends JPanel
- 
-     if(scrollBar != null)
-     {
--      scrollBar.setValues(startValue, nbasesInView, 1, 
-+      scrollBar.setValues(startValue, nbasesInView, 1,
-              getMaxBasesInPanel(getSequenceLength()));
-       scrollBar.setUnitIncrement(nbasesInView/20);
-       scrollBar.setBlockIncrement(nbasesInView);
-     }
-   }
- 
--  
-+
-   /**
-    * Set the start and end base positions to display.
-    * @param start
-@@ -3508,32 +3507,32 @@ public class BamView extends JPanel
-       else
-         pixPerBase = feature_display.getWidth()/(float)(end-start+1);
-     }
--    
-+
-     Dimension d = new Dimension();
-     d.setSize(nbasesInView*pixPerBase, maxHeight);
-     setPreferredSize(d);
--    
-+
-     if(event == null)
-     {
-       this.startBase = -1;
-       this.endBase   = -1;
-     }
-   }
--  
-+
-   /**
--   * Return an Artemis entry from a file 
-+   * Return an Artemis entry from a file
-    * @param entryFileName
-    * @param entryGroup
-    * @return
-    * @throws NoSequenceException
-    */
--  private Entry getEntry(final String entryFileName, final EntryGroup entryGroup) 
-+  private Entry getEntry(final String entryFileName, final EntryGroup entryGroup)
-                    throws NoSequenceException
-   {
-     final Document entry_document = DocumentFactory.makeDocument(entryFileName);
-     final EntryInformation artemis_entry_information =
-       Options.getArtemisEntryInformation();
--    
-+
-     //System.out.println(entryFileName);
-     final uk.ac.sanger.artemis.io.Entry new_embl_entry =
-       EntryFileDialog.getEntryFromFile(null, entry_document,
-@@ -3548,7 +3547,7 @@ public class BamView extends JPanel
-     {
-       if(entryGroup.getSequenceEntry() != null)
-         bases = entryGroup.getSequenceEntry().getBases();
--      
-+
-       if(bases == null)
-       {
-         entry = new Entry(new_embl_entry);
-@@ -3556,10 +3555,10 @@ public class BamView extends JPanel
-       }
-       else
-         entry = new Entry(bases,new_embl_entry);
--      
-+
-       entryGroup.add(entry);
--    } 
--    catch(OutOfRangeException e) 
-+    }
-+    catch(OutOfRangeException e)
-     {
-       new MessageDialog(null, "read failed: one of the features in " +
-           entryFileName + " has an out of range " +
-@@ -3567,7 +3566,7 @@ public class BamView extends JPanel
-     }
-     return entry;
-   }
--  
-+
-   private boolean isShowScale()
-   {
-     return (feature_display == null ? true : false);
-@@ -3611,17 +3610,17 @@ public class BamView extends JPanel
-     int seqLength = getSequenceLength();
-     float pixPerBase = getPixPerBaseByWidth();
-     int start = (int) ( ( (event.getPoint().getX())/pixPerBase) + getBaseAtStartOfView() );
--    
-+
-     if(start < 1)
-       start = 1;
-     if(start > seqLength)
-       start = seqLength;
--    
-+
-     if (dragStart < 0 && (event.getModifiersEx() & onmask) == onmask)
-       dragStart = start;
-     else if((event.getModifiersEx() & onmask) != onmask)
-       dragStart = -1;
--    
-+
-     MarkerRange drag_range;
-     try
-     {
-@@ -3637,7 +3636,7 @@ public class BamView extends JPanel
-       e.printStackTrace();
-     }
-   }
--  
-+
-   /**
-    * Get the colour for the given read given to it by the coverage plot.
-    * @param samRecord
-@@ -3648,60 +3647,60 @@ public class BamView extends JPanel
-     short fileIndex = 0;
-     if(bamList.size()>1)
-       fileIndex = samRecord.bamIndex;
--    return getColourByCoverageColour(fileIndex); 
-+    return getColourByCoverageColour(fileIndex);
-   }
--  
-+
-   private Color getColourByCoverageColour(final short fileIndex)
-   {
-     LineAttributes lines[] = CoveragePanel.getLineAttributes(bamList.size());
--    return lines[fileIndex].getLineColour(); 
-+    return lines[fileIndex].getLineColour();
-   }
--  
-+
- 
-   protected int getMaxBases()
-   {
-     return MAX_BASES;
-   }
--  
-+
-   protected void setMaxBases(int max)
-   {
-     MAX_BASES = max;
-   }
--  
-+
-   private boolean isStackView()
-   {
--    return cbStackView.isSelected();  
-+    return cbStackView.isSelected();
-   }
--  
-+
-   private boolean isPairedStackView()
-   {
-     return cbPairedStackView.isSelected();
-   }
--  
-+
-   private boolean isStrandStackView()
-   {
-     return cbStrandStackView.isSelected();
-   }
--  
-+
-   private boolean isCoverageView(float pixPerBase)
-   {
-     if(isBaseAlignmentView(pixPerBase))
-       return false;
-     return cbCoverageView.isSelected() || cbCoverageStrandView.isSelected() || cbCoverageHeatMap.isSelected();
-   }
--  
-+
-   private boolean isIsizeStackView()
-   {
-     return cbIsizeStackView.isSelected();
-   }
--  
-+
-   private boolean isBaseAlignmentView(float pixPerBase)
-   {
-     if(pixPerBase*1.08f >= ALIGNMENT_PIX_PER_BASE)
-       return true;
-     return false;
-   }
--  
-+
-   private JCheckBoxMenuItem getSelectedCheckBoxMenuItem()
-   {
-     if(isStackView())
-@@ -3718,37 +3717,37 @@ public class BamView extends JPanel
-       return cbCoverageHeatMap;
-     return cbCoverageStrandView;
-   }
--  
-+
-   protected Selection getSelection()
-   {
-     return selection;
-   }
--  
-+
-   protected List<BamViewRecord> getReadsInView()
-   {
-     return readsInView;
-   }
--  
-+
-   protected int getBasesInView()
-   {
-     return nbasesInView;
-   }
--  
-+
-   protected void setHighlightSAMRecord(BamViewRecord highlightSAMRecord)
-   {
-     this.highlightSAMRecord = highlightSAMRecord;
-   }
--  
-+
-   protected BamViewRecord getHighlightSAMRecord()
-   {
-     return highlightSAMRecord;
-   }
--  
-+
-   protected FeatureDisplay getFeatureDisplay()
-   {
-     return feature_display;
-   }
--  
-+
-   /**
-    * @return the combo
-    */
-@@ -3798,13 +3797,13 @@ public class BamView extends JPanel
-     }
-     return null;
-   }
--  
-+
-   /**
-    * Open another BamView window
-    */
-   public void openBamView(final List<String> bamsList)
-   {
--    BamView bamView = new BamView(bamsList, 
-+    BamView bamView = new BamView(bamsList,
-         null, nbasesInView, entry_edit,
-         feature_display, bases, (JPanel) mainPanel.getParent(), null);
-     bamView.getJspView().getVerticalScrollBar().setValue(
-@@ -3818,10 +3817,10 @@ public class BamView extends JPanel
-     {
-       feature_display.addDisplayAdjustmentListener(bamView);
-       feature_display.getSelection().addSelectionChangeListener(bamView);
--      
-+
-       if(entry_edit != null)
-         entry_edit.getOneLinePerEntryDisplay().addDisplayAdjustmentListener(bamView);
--      if(feature_display.getEntryGroup().getSequenceEntry().getEMBLEntry().getSequence() 
-+      if(feature_display.getEntryGroup().getSequenceEntry().getEMBLEntry().getSequence()
-           instanceof uk.ac.sanger.artemis.io.IndexFastaStream)
-       {
-         if(entry_edit != null)
-@@ -3833,7 +3832,7 @@ public class BamView extends JPanel
-       }
-     }
-   }
--  
-+
-   /**
-    * Artemis event notification
-    */
-@@ -3841,8 +3840,8 @@ public class BamView extends JPanel
-   {
-     if(event.getType() == DisplayAdjustmentEvent.REV_COMP_EVENT &&
-        event.isRevCompDisplay())
--      JOptionPane.showMessageDialog(this, 
--          "Flipping the display is not supported by BamView.", "Warning", 
-+      JOptionPane.showMessageDialog(this,
-+          "Flipping the display is not supported by BamView.", "Warning",
-           JOptionPane.WARNING_MESSAGE);
- 
-     if(!asynchronous)
-@@ -3851,7 +3850,7 @@ public class BamView extends JPanel
-       displayAdjustmentWork(event);
-       return;
-     }
--    
-+
-     SwingWorker worker = new SwingWorker()
-     {
-       public Object construct()
-@@ -3864,13 +3863,13 @@ public class BamView extends JPanel
-         {
-           e.printStackTrace();
-         }
--        
-+
-         if(event.getStart() != ((FeatureDisplay)event.getSource()).getForwardBaseAtLeftEdge())
-         {
-           waitingFrame.showWaiting("waiting...", mainPanel);
-           return null;
-         }
--      
-+
-         displayAdjustmentWork(event);
-         waitingFrame.setVisible(false);
-         return null;
-@@ -3878,7 +3877,7 @@ public class BamView extends JPanel
-     };
-     worker.start();
-   }
--  
-+
-   /**
-    * Carry out the display agjustment event action.
-    * @param event
-@@ -3898,17 +3897,17 @@ public class BamView extends JPanel
-     }
-     else
-     {
--      setDisplay(event.getStart(), 
-+      setDisplay(event.getStart(),
-         event.getStart()+feature_display.getMaxVisibleBases(), event);
-       repaint();
-     }
-   }
--  
-+
-   public void selectionChanged(SelectionChangeEvent event)
-   {
-     repaint();
-   }
--  
-+
-   private class Ruler extends JPanel
-   {
-     private static final long serialVersionUID = 1L;
-@@ -3941,14 +3940,14 @@ public class BamView extends JPanel
-         int xpos = (i-start)*ALIGNMENT_PIX_PER_BASE;
-         g2.drawString(Integer.toString(i), xpos, ypos);
-       }
--        
-+
-       for(int i=startMark; i<end; i+=10)
-       {
-         int xpos = (i-start)*ALIGNMENT_PIX_PER_BASE;
-         xpos+=(ALIGNMENT_PIX_PER_BASE/2);
-         g2.drawLine(xpos, ypos+1, xpos, ypos+5);
-       }
--      
-+
-       if(refSeq != null)
-       {
-         ypos+=15;
-@@ -3963,7 +3962,7 @@ public class BamView extends JPanel
-       }
-     }
-   }
--  
-+
-   /**
-   * Popup menu listener
-   */
-@@ -3973,17 +3972,17 @@ public class BamView extends JPanel
- 	private JMenuItem showDetails;
- 	private JMenu coverageMenu;
- 	private JMenuItem createGroup;
--	
-+
-     public void mouseClicked(MouseEvent e)
-     {
-       if(e.isPopupTrigger() ||
-          e.getButton() == MouseEvent.BUTTON3)
-         return;
--      
-+
-       BamView.this.requestFocus();
--      
-+
-       if(e.getClickCount() > 1)
--        getSelection().clear(); 
-+        getSelection().clear();
-       else if(e.getButton() == MouseEvent.BUTTON1)
-       {
-         if(isCoverageView(getPixPerBaseByWidth()))
-@@ -4017,7 +4016,7 @@ public class BamView extends JPanel
-     private void maybeShowPopup(MouseEvent e)
-     {
-       if(e.isPopupTrigger())
--      {       
-+      {
-         //
-         // main menu options
-         if(popup == null)
-@@ -4036,11 +4035,11 @@ public class BamView extends JPanel
-           {
-             coverageMenu = new JMenu("Coverage HeatMap");
-             coverageView.createMenus(coverageMenu);
--            
-+
-             final JCheckBoxMenuItem coverageGrid = new JCheckBoxMenuItem("Show heatmap grid", false);
-             coverageGrid.addActionListener(new ActionListener()
-             {
--              public void actionPerformed(ActionEvent e) 
-+              public void actionPerformed(ActionEvent e)
-               {
-                 coverageView.showLabels(coverageGrid.isSelected());
-               }
-@@ -4051,7 +4050,7 @@ public class BamView extends JPanel
-             createGroup.addActionListener(new ActionListener()
-             {
-               private int n = 1;
--              public void actionPerformed(ActionEvent e) 
-+              public void actionPerformed(ActionEvent e)
-               {
-                 String groupName = "group_"+n;
-                 groupsFrame.addGroup(groupName);
-@@ -4084,7 +4083,7 @@ public class BamView extends JPanel
-               thisSAMRecord.sam.getReadName());
-           gotoMateMenuItem.addActionListener(new ActionListener()
-           {
--			public void actionPerformed(ActionEvent e) 
-+			public void actionPerformed(ActionEvent e)
- 			{
- 			  String name = thisSAMRecord.sam.getMateReferenceName();
- 			  if(name.equals("="))
-@@ -4097,13 +4096,13 @@ public class BamView extends JPanel
- 			    scrollBar.setValue(
- 			        thisSAMRecord.sam.getMateAlignmentStart()+offset-
- 			        (nbasesInView/2));
--			  
--			  highlightSAMRecord = thisSAMRecord; 
--			}  
-+
-+			  highlightSAMRecord = thisSAMRecord;
-+			}
-           });
-           popup.add(gotoMateMenuItem);
--        }  
--          
-+        }
-+
-         if( mouseOverSAMRecord != null)
-         {
-         	  highlightSAMRecord = mouseOverSAMRecord;
-@@ -4145,16 +4144,16 @@ public class BamView extends JPanel
-       }
-     }
-   }
--  
-+
-   protected static void openFileViewer(SAMRecord readRecord, SAMRecord mateRecord, List<String> bamList)
-   {
-     FileViewer viewDetail = new FileViewer(readRecord.getReadName(), true, false, false);
-     appendToDetailView(readRecord, mateRecord, viewDetail, bamList);
-   }
--  
--  private static void appendToDetailView(final SAMRecord sam, 
--                                         final SAMRecord mate, 
--                                         final FileViewer viewer, 
-+
-+  private static void appendToDetailView(final SAMRecord sam,
-+                                         final SAMRecord mate,
-+                                         final FileViewer viewer,
-                                          final List<String> bamList)
-   {
-     if(bamList.size() > 1 && sam.getAttribute("FL") != null)
-@@ -4163,7 +4162,7 @@ public class BamView extends JPanel
-       if(bamIdx < bamList.size())
-         viewer.appendString("File                  "+bamList.get(bamIdx)+"\n\n", Level.INFO);
-     }
--    
-+
-     viewer.appendString("Read Name             "+sam.getReadName()+"\n", Level.INFO);
-     viewer.appendString("Coordinates           "+sam.getAlignmentStart()+".."+
-                                                  sam.getAlignmentEnd()+"\n", Level.DEBUG);
-@@ -4176,9 +4175,9 @@ public class BamView extends JPanel
-     viewer.appendString("Cigar String          "+sam.getCigarString()+"\n", Level.DEBUG);
-     viewer.appendString("Strand                "+
-         (sam.getReadNegativeStrandFlag() ? "-\n\n" : "+\n\n"), Level.DEBUG);
--    
-+
-     if(sam.getReadPairedFlag())
--    {     
-+    {
-       if(mate != null)
-       {
-         viewer.appendString("Mate Coordinates      "+mate.getAlignmentStart()+".."+
-@@ -4277,7 +4276,7 @@ public class BamView extends JPanel
-     }
-     return mate;
-   }
--  
-+
-   protected SAMRecordPredicate getSamRecordFlagPredicate()
-   {
-     return samRecordFlagPredicate;
-@@ -4290,7 +4289,7 @@ public class BamView extends JPanel
-     lastend = -1;
-     this.samRecordFlagPredicate = samRecordFlagPredicate;
-   }
--  
-+
-   protected SAMRecordMapQPredicate getSamRecordMapQPredicate()
-   {
-     return samRecordMapQPredicate;
-@@ -4303,7 +4302,7 @@ public class BamView extends JPanel
-     lastend = -1;
-     this.samRecordMapQPredicate = samRecordMapQPredicate;
-   }
--  
-+
-   /**
-    * @return the concatSequences
-    */
-@@ -4332,7 +4331,7 @@ public class BamView extends JPanel
-     BamViewRecord sam1;
-     BamViewRecord sam2;
-   }
--  
-+
-   class CreateFeatures
-   {
-     CreateFeatures(final GroupBamFrame groupsFrame)
-@@ -4394,15 +4393,15 @@ public class BamView extends JPanel
-       gridPanel.add(cbOpposite, c);
- 
-       int status =
--          JOptionPane.showConfirmDialog(feature_display, gridPanel, 
-+          JOptionPane.showConfirmDialog(feature_display, gridPanel,
-               "Options", JOptionPane.OK_CANCEL_OPTION);
-       if(status == JOptionPane.CANCEL_OPTION)
-         return;
--      
-+
-       if(!useGroup.isSelected() && minBams.getValue() > bamList.size())
-       {
-         status =
--            JOptionPane.showConfirmDialog(feature_display, 
-+            JOptionPane.showConfirmDialog(feature_display,
-                 "The minimum number of BAMs setting can not be\n"+
-                 "greater than the total number of BAM files.\n"+
-                 "Set this to the number of BAMs (i.e. "+bamList.size()+").",
-@@ -4414,7 +4413,7 @@ public class BamView extends JPanel
-       else if(useGroup.isSelected() && minBams.getValue() > groupsFrame.getMaximumBamsInGroup())
-       {
-         status =
--            JOptionPane.showConfirmDialog(feature_display, 
-+            JOptionPane.showConfirmDialog(feature_display,
-                 "Minimum number of BAMs setting can not be greater than\n"+
-                 "the total number of BAM files found in any of the groups.\n"+
-                 "Set this to the greatest number of BAM files in any\n"+
-@@ -4572,7 +4571,7 @@ public class BamView extends JPanel
-     boolean covPlot     = false;
-     boolean snpPlot     = false;
-     int base = 0;
--    
-+
-     for(int i=0;i<args.length; i++)
-     {
-       if(args[i].equals("-a"))
-@@ -4639,7 +4638,7 @@ public class BamView extends JPanel
-     final BamView view = new BamView(alignmentFileList, reference, nbasesInView, null, null,
-         (JPanel)frame.getContentPane(), frame);
-     frame.setTitle("BamView v"+view.getVersion());
--    
-+
-     if(chr != null)
-       view.combo.setSelectedItem(chr);
-     if(vw != null)
+     // Iterate through the provided list of features to look at


=====================================
debian/patches/series
=====================================
@@ -1,7 +1,4 @@
-class-path.patch
-jar-rules.patch
-test-classpath.patch
 samreader.patch
 use-lang3.patch
-build-test.patch
-disable-tests.patch
+#build-test.patch
+#disable-tests.patch


=====================================
debian/patches/use-lang3.patch
=====================================
@@ -2,8 +2,8 @@ Description: use lang3
 Author: Sascha Steinbiss
 Last-Update: 2016-12-07 23:37:09 +0000
 
---- a/uk/ac/sanger/artemis/io/GFF3Encoder.java
-+++ b/uk/ac/sanger/artemis/io/GFF3Encoder.java
+--- a/src/main/java/uk/ac/sanger/artemis/io/GFF3Encoder.java
++++ b/src/main/java/uk/ac/sanger/artemis/io/GFF3Encoder.java
 @@ -22,7 +22,7 @@
  
  package uk.ac.sanger.artemis.io;


=====================================
debian/rules
=====================================
@@ -35,15 +35,19 @@ CLASSPATH += /usr/share/EMBOSS/jemboss/lib/jemboss.jar \
 export CLASSPATH := $(subst $(space),:,$(strip $(CLASSPATH)))
 
 %:
-	dh $@ --with javahelper
+	dh $@
 
-override_dh_auto_build:
+__override_dh_auto_build:
 	dh_auto_build -- jar
 	sed 's|@CLASSPATH@|$(subst :,$(space),$(subst $(CURDIR),/usr/share/java/artemis.jar,$(CLASSPATH)))|g' debian/artemis.manifest.in > \
 		debian/artemis.manifest
-	convert images/helix.gif -resize 96x96\! images/helix.png
 
-override_dh_auto_test:
+override_dh_install:
+	dh_install
+	mkdir -p debian/$(DEB_SOURCE)/usr/share/icons/hicolor/96x96/apps/
+	convert src/main/resources/images/helix.gif -resize 96x96\! debian/$(DEB_SOURCE)/usr/share/icons/hicolor/96x96/apps/helix.png
+
+__override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	ln -s /usr/share/javascript/jquery/jquery.js test/coverage-report/evosuite-auto-tests/files/jquery.js
 	ln -s /usr/share/javascript/jquery/jquery.js test/coverage-report/evosuite-auto-tests/html/files/jquery.js
@@ -53,7 +57,7 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	rm test/coverage-report/evosuite-auto-tests/files/jquery.js test/coverage-report/evosuite-auto-tests/html/files/jquery.js
 endif
 
-override_dh_auto_clean:
+__override_dh_auto_clean:
 	dh_auto_clean
 	$(RM) debian/artemis.manifest
 	$(RM) images/helix.png


=====================================
debian/upstream/edam
=====================================
@@ -7,10 +7,10 @@ scopes:
     function:
       - Genome visualisation
       - Genome annotation
-    inputs:
+    input:
       - data: Sequence
         formats: [BAM, FASTA, GFF, EMBL format, VCF, BCF]
-    outputs:
+    output:
       - data: Sequence
         formats: [GFF, EMBL format, FASTA, GenBank format]
       - data: Sequence image



View it on GitLab: https://salsa.debian.org/med-team/artemis/commit/bc46cc86da3873bd0aba46d09796fc664048f23f

-- 
View it on GitLab: https://salsa.debian.org/med-team/artemis/commit/bc46cc86da3873bd0aba46d09796fc664048f23f
You're receiving this email because of your account on salsa.debian.org.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190411/e54a5a4e/attachment-0001.html>


More information about the debian-med-commit mailing list