Skip to content
Snippets Groups Projects
Commit 77bc9c94 authored by tcarver's avatar tcarver
Browse files

implement -DbamX option

parent 9c57b2b7
No related branches found
No related tags found
No related merge requests found
......@@ -491,19 +491,41 @@ public class EntryEdit extends JFrame
Utilities.centreFrame(this);
if(System.getProperty("bam") != null)
if(System.getProperty("bam") != null || System.getProperty("bam1") != null)
{
SwingWorker worker = new SwingWorker()
{
public Object construct()
{
EntryEdit.this.setCursor(new Cursor(Cursor.WAIT_CURSOR));
final String ngs[] = System.getProperty("bam").split("[\\s,]");
final FileSelectionDialog fileChooser = new FileSelectionDialog(ngs);
final List<String> listBams = fileChooser.getFiles(".*\\.(bam|cram)$");
final String ngs[];
final int idx;
if(System.getProperty("bam") != null)
{
idx = 1;
ngs = System.getProperty("bam").split("[\\s,]");
}
else
{
idx = 2;
ngs = System.getProperty("bam1").split("[\\s,]");
}
FileSelectionDialog fileChooser = new FileSelectionDialog(ngs);
List<String> listBams = fileChooser.getFiles(".*\\.(bam|cram)$");
final List<String> vcfFiles = fileChooser.getFiles(VCFview.VCFFILE_SUFFIX);
loadBamAndVcf(listBams, vcfFiles);
for(int i=idx; i<20; i++)
{
if(System.getProperty("bam"+i) != null)
{
fileChooser = new FileSelectionDialog(
System.getProperty("bam"+i).split("[\\s,]"));
bamView.openBamView(fileChooser.getFiles(".*\\.(bam|cram)$"));
}
}
if(System.getProperty("bamClone") != null)
{
int nclone = 2;
......@@ -518,7 +540,7 @@ public class EntryEdit extends JFrame
System.getProperty("bamClone"));
for(int i=1;i<nclone;i++)
bamView.cloneBamView();
bamView.openBamView(listBams);
}
EntryEdit.this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment