Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add command line VM options show_snps, show_snp_plot, show_cov_plot

  • Loading branch information...
commit e6fa5e492f8908344e9188cfcf784c9ab6f6491d 1 parent eefe308
tcarver authored
Showing with 18 additions and 4 deletions.
  1. +18 −4 uk/ac/sanger/artemis/components/alignment/BamView.java
22 uk/ac/sanger/artemis/components/alignment/BamView.java
View
@@ -279,7 +279,7 @@ public BamView(List<String> bamList,
containerPanel.setLayout(new BoxLayout(containerPanel, BoxLayout.Y_AXIS));
containerPanel.add(mainPanel);
-
+
// filter out unmapped reads by default
setSamRecordFlagPredicate(
new SAMRecordFlagPredicate(SAMRecordFlagPredicate.READ_UNMAPPED_FLAG));
@@ -369,6 +369,20 @@ public BamView(List<String> bamList,
jspView.getVerticalScrollBar().setUnitIncrement(8);
addBamToPanel(frame);
+
+ // apply command line options
+ if(System.getProperty("show_snps") != null)
+ isSNPs = true;
+ if(System.getProperty("show_snp_plot") != null)
+ {
+ isSNPplot = true;
+ snpPanel.setVisible(isSNPplot);
+ }
+ if(System.getProperty("show_cov_plot") != null)
+ {
+ isCoverage = true;
+ coveragePanel.setVisible(isCoverage);
+ }
}
public String getToolTipText()
@@ -2658,7 +2672,7 @@ public void actionPerformed(ActionEvent e)
menu.add(viewMenu);
- final JCheckBoxMenuItem checkBoxSNPs = new JCheckBoxMenuItem("SNP marks");
+ final JCheckBoxMenuItem checkBoxSNPs = new JCheckBoxMenuItem("SNP marks", isSNPs);
//
JMenu colourMenu = new JMenu("Colour By");
colourMenu.add(colourByCoverageColour);
@@ -2733,7 +2747,7 @@ public void actionPerformed(ActionEvent e)
//
JMenu graphMenu = new JMenu("Graph");
- JCheckBoxMenuItem checkBoxCoverage = new JCheckBoxMenuItem("Coverage");
+ JCheckBoxMenuItem checkBoxCoverage = new JCheckBoxMenuItem("Coverage", isCoverage);
checkBoxCoverage.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -2751,7 +2765,7 @@ public void actionPerformed(ActionEvent e)
});
graphMenu.add(checkBoxCoverage);
- JCheckBoxMenuItem checkBoxSNP = new JCheckBoxMenuItem("SNP");
+ JCheckBoxMenuItem checkBoxSNP = new JCheckBoxMenuItem("SNP", isSNPplot);
checkBoxSNP.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
Please sign in to comment.
Something went wrong with that request. Please try again.