diff --git a/README.org b/README.org index f058727..26ad9ee 100644 --- a/README.org +++ b/README.org @@ -161,6 +161,11 @@ Options: file to find out the actual value). Note: you can abbreviate options (as long as they stay unique) so --raxml-p=12345 is equivalent to --raxml-p-parsimonyRandomSeed=12345 + + [--raxml-args ""] + Arbitrary options to pass through to RAxML. The ARGS part should be + in quotes and is appended to the RAxML command as given. + #+END_SRC ** Results The results all end up in the directory specified via --outdir (or bcgTree if none is specified). @@ -202,6 +207,9 @@ The font is from [[fontlibrary.org]]: - [[https://fontlibrary.org/en/font/ranchers][Ranchers]] ([[http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL][SIL Open Font License]]) ** Changes [[https://travis-ci.org/molbiodiv/bcgTree][https://travis-ci.org/molbiodiv/bcgTree.svg?branch=master]] +*** v1.0.10 <2017-03-07 Di> + - Fix GUI, add scrollbar (#23) + - Add parameter --raxml-args (#22) *** v1.0.9 <2017-03-03 Fr> - Add parameters --min-proteomes and --all-proteomes (#21) *** v1.0.8 <2016-09-07 Mi> diff --git a/bcgTreeGUI/bcgTree.jar b/bcgTreeGUI/bcgTree.jar index df5c4bd..4533eb5 100644 Binary files a/bcgTreeGUI/bcgTree.jar and b/bcgTreeGUI/bcgTree.jar differ diff --git a/bcgTreeGUI/src/bcgTree/gui/BcgTree.java b/bcgTreeGUI/src/bcgTree/gui/BcgTree.java index 3333dd5..6690135 100644 --- a/bcgTreeGUI/src/bcgTree/gui/BcgTree.java +++ b/bcgTreeGUI/src/bcgTree/gui/BcgTree.java @@ -36,6 +36,7 @@ import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JProgressBar; +import javax.swing.JScrollPane; import javax.swing.JSpinner; import javax.swing.JTextField; import javax.swing.SpinnerNumberModel; @@ -45,7 +46,7 @@ public class BcgTree extends JFrame { private static final long serialVersionUID = 1L; - public static final String VERSION = "1.0.9"; + public static final String VERSION = "1.0.10"; private static final int DEFAULT_TEXTFIELD_COLUMNS = 30; public static void main(String[] args) { @@ -77,6 +78,7 @@ public static void main(String[] args) { private JTextField hmmfileTextField; private JSpinner minProteomesSpinner; private JCheckBox allProteomesCheckbox; + private JTextField raxmlArgsTextField; public BcgTree(){ self = this; @@ -107,8 +109,9 @@ public void initGUI(){ mainPanel.setLayout(new GridLayout(1, 2)); this.add(mainPanel, BorderLayout.CENTER); settingsPanel = new JPanel(); + JScrollPane settingsScrollPane = new JScrollPane(settingsPanel); settingsPanel.setLayout(new GridBagLayout()); - mainPanel.add(settingsPanel); + mainPanel.add(settingsScrollPane); JPanel logPanel = new JPanel(); logPanel.setLayout(new BorderLayout()); mainPanel.add(logPanel); @@ -211,7 +214,7 @@ public void actionPerformed(ActionEvent e) { } private JPanel getAdvancedSettingsPanel(){ - JPanel advancedSettingsPanel = new JPanel(new GridLayout(7, 2)); + JPanel advancedSettingsPanel = new JPanel(new GridLayout(8, 2)); advancedSettingsPanel.add(new JLabel("--bootstraps")); bootstrapSpinner = new JSpinner(new SpinnerNumberModel(10, 1, 1000, 1)); advancedSettingsPanel.add(bootstrapSpinner); @@ -224,6 +227,9 @@ private JPanel getAdvancedSettingsPanel(){ advancedSettingsPanel.add(new JLabel("--raxml-p-parsimonyRandomSeed")); randomSeedPTextField = new JTextField("", DEFAULT_TEXTFIELD_COLUMNS); advancedSettingsPanel.add(randomSeedPTextField); + advancedSettingsPanel.add(new JLabel("--raxml-args")); + raxmlArgsTextField = new JTextField("", DEFAULT_TEXTFIELD_COLUMNS); + advancedSettingsPanel.add(raxmlArgsTextField); advancedSettingsPanel.add(new JLabel("--hmmfile")); hmmfileTextField = new JTextField(System.getProperty("user.dir")+"/../data/essential.hmm", DEFAULT_TEXTFIELD_COLUMNS); advancedSettingsPanel.add(hmmfileTextField); @@ -283,6 +289,10 @@ public void actionPerformed(ActionEvent e) { if(! xSeed.equals("")){ writer.println("--raxml-x-rapidBootstrapRandomNumberSeed="+xSeed); } + String raxmlArgs = raxmlArgsTextField.getText(); + if(! raxmlArgs.equals("")){ + writer.println("--raxml-args=\""+raxmlArgs+"\""); + } for(String p : programPaths.keySet()){ String path = programPaths.get(p).getText(); if(!path.equals("")){ diff --git a/bin/bcgTree.pl b/bin/bcgTree.pl index 4641838..11c69f3 100755 --- a/bin/bcgTree.pl +++ b/bin/bcgTree.pl @@ -198,6 +198,17 @@ =head1 OPTIONS =back +=item [--raxml-args ""] + +Arbitrary options to pass through to RAxML. +The ARGS part should be in quotes and is appended to the RAxML command as given. + +=cut + +$options{'raxml-args=s'} = \( my $opt_raxml_args = ""); + +=back + =head1 CODE =cut @@ -242,7 +253,8 @@ =head1 CODE 'hmmfile' => $opt_hmmfile, 'raxml-p' => $opt_raxml_p, 'raxml-x' => $opt_raxml_x, - 'min-proteomes' => $opt_min_proteomes + 'min-proteomes' => $opt_min_proteomes, + 'raxml-args' => $opt_raxml_args }); $bcgTree->check_existence_of_fasta_files(); $bcgTree->rename_fasta_headers(); diff --git a/lib/bcgTree.pm b/lib/bcgTree.pm index 0d01bea..8501cca 100755 --- a/lib/bcgTree.pm +++ b/lib/bcgTree.pm @@ -11,7 +11,7 @@ use File::Path qw(make_path); use File::Spec; use Fasta::Parser; -our $VERSION = '1.0.9'; +our $VERSION = '1.0.10'; my $L = Log::Log4perl::get_logger(); @@ -276,7 +276,7 @@ sub run_raxml{ my $self = shift; my $out = $self->{'outdir'}; my $msg = "raxml on $out/full_alignment.concat.fa"; - my $cmd = $self->{'raxml-bin'}." -f a -m GTRGAMMA -p ".$self->{'raxml-p'}." -q $out/full_alignment.concat.partition -s $out/full_alignment.concat.fa -w ".File::Spec->rel2abs( $out )." -n final -T ".$self->{'threads'}." -x ".$self->{'raxml-x'}." -N ".$self->{'bootstraps'}; + my $cmd = $self->{'raxml-bin'}." -f a -m GTRGAMMA -p ".$self->{'raxml-p'}." -q $out/full_alignment.concat.partition -s $out/full_alignment.concat.fa -w ".File::Spec->rel2abs( $out )." -n final -T ".$self->{'threads'}." -x ".$self->{'raxml-x'}." -N ".$self->{'bootstraps'}." ".$self->{'raxml-args'}; $self->run_command($cmd, $msg); $L->info("Finished bcgTree."); }