Skip to content

Commit

Permalink
Merge branch 'develop' - version 1.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
iimog committed Mar 7, 2017
2 parents c71db8e + a396b5a commit 438effb
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 6 deletions.
8 changes: 8 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<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).
Expand Down Expand Up @@ -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>
Expand Down
Binary file modified bcgTreeGUI/bcgTree.jar
Binary file not shown.
16 changes: 13 additions & 3 deletions bcgTreeGUI/src/bcgTree/gui/BcgTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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("")){
Expand Down
14 changes: 13 additions & 1 deletion bin/bcgTree.pl
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,17 @@ =head1 OPTIONS

=back
=item [--raxml-args "<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
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions lib/bcgTree.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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.");
}
Expand Down

0 comments on commit 438effb

Please sign in to comment.