Skip to content

Commit

Permalink
Merge pull request #30 from molbiodiv/develop
Browse files Browse the repository at this point in the history
Version 1.1.0
  • Loading branch information
iimog authored Jul 20, 2018
2 parents 8eb043f + badaa1b commit 06cbbe1
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ install:
script:
- perl Makefile.PL
- make
- PERL5OPT=-MDevel::Cover=-coverage,statement,branch,condition,path,subroutine prove -v
- PERL5OPT=-MDevel::Cover=-coverage,statement,branch,condition,path,subroutine travis_wait 30 prove -v
- cover
#after_success:
# - cover -report coveralls
15 changes: 15 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,15 @@ Options:
(as long as they stay unique) so --raxml-p=12345 is equivalent to
--raxml-p-parsimonyRandomSeed=12345

[--raxml-aa-substitiution-model "<MODEL>"]
The aminoacid substitution model used for the partitions by RAxML.
Valid options for RAxML 8.x are: DAYHOFF, DCMUT, JTT, MTREV, WAG,
RTREV, CPREV, VT, BLOSUM62, MTMAM, LG, MTART, MTZOA, PMB, HIVB,
HIVW, JTTDCMUT, FLU, STMTREV, DUMMY, DUMMY2, AUTO, LG4M, LG4X,
PROT_FILE, GTR_UNLINKED, GTR bcgTree will not check whether the
provided option is valid but rather pass it to RAxML literally.
Default: AUTO

[--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.
Expand Down Expand Up @@ -211,6 +220,12 @@ 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.1.0 <2018-07-19 Do>
- Breaking: the default aa substitution model for RAxML changed from WAG to AUTO.
This has an impact on performance (it is faster to set this parameter to a fixed value).
To get the same behaviour as in earlier versions pass ~--raxml-aa-substitution-model=WAG~
- Add parameter ~--raxml-aa-substitution-model~ (#29)
- Add HMMs of [[https://www.ezbiocloud.net/tools/ubcg][UBCG]] (#25)
*** v1.0.10 <2017-03-07 Di>
- Fix GUI, add scrollbar (#23)
- Add parameter --raxml-args (#22)
Expand Down
Binary file modified bcgTreeGUI/bcgTree.jar
Binary file not shown.
10 changes: 9 additions & 1 deletion bcgTreeGUI/src/bcgTree/gui/BcgTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public static void main(String[] args) {
private JTextField hmmfileTextField;
private JSpinner minProteomesSpinner;
private JCheckBox allProteomesCheckbox;
private JTextField raxmlAaSubstitutionModelTextField;
private JTextField raxmlArgsTextField;

public BcgTree(){
Expand Down Expand Up @@ -214,7 +215,7 @@ public void actionPerformed(ActionEvent e) {
}

private JPanel getAdvancedSettingsPanel(){
JPanel advancedSettingsPanel = new JPanel(new GridLayout(8, 2));
JPanel advancedSettingsPanel = new JPanel(new GridLayout(9, 2));
advancedSettingsPanel.add(new JLabel("--bootstraps"));
bootstrapSpinner = new JSpinner(new SpinnerNumberModel(10, 1, 1000, 1));
advancedSettingsPanel.add(bootstrapSpinner);
Expand All @@ -227,6 +228,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-aa-substitution-model"));
raxmlAaSubstitutionModelTextField = new JTextField("AUTO", DEFAULT_TEXTFIELD_COLUMNS);
advancedSettingsPanel.add(raxmlAaSubstitutionModelTextField);
advancedSettingsPanel.add(new JLabel("--raxml-args"));
raxmlArgsTextField = new JTextField("", DEFAULT_TEXTFIELD_COLUMNS);
advancedSettingsPanel.add(raxmlArgsTextField);
Expand Down Expand Up @@ -289,6 +293,10 @@ public void actionPerformed(ActionEvent e) {
if(! xSeed.equals("")){
writer.println("--raxml-x-rapidBootstrapRandomNumberSeed="+xSeed);
}
String raxmlAaSubstitutionModel = raxmlAaSubstitutionModelTextField.getText();
if(! raxmlAaSubstitutionModel.equals("")){
writer.println("--raxml-aa-substitution-model=\""+raxmlAaSubstitutionModel+"\"");
}
String raxmlArgs = raxmlArgsTextField.getText();
if(! raxmlArgs.equals("")){
writer.println("--raxml-args=\""+raxmlArgs+"\"");
Expand Down
18 changes: 18 additions & 0 deletions bin/bcgTree.pl
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,23 @@ =head1 OPTIONS

=back
=item [--raxml-aa-substitiution-model "<MODEL>"]
The aminoacid substitution model used for the partitions by RAxML.
Valid options for RAxML 8.x are:
DAYHOFF, DCMUT, JTT, MTREV, WAG, RTREV, CPREV, VT, BLOSUM62, MTMAM, LG,
MTART, MTZOA, PMB, HIVB, HIVW, JTTDCMUT, FLU, STMTREV, DUMMY, DUMMY2, AUTO,
LG4M, LG4X, PROT_FILE, GTR_UNLINKED, GTR
bcgTree will not check whether the provided option is valid but rather pass
it to RAxML literally.
Default: AUTO
=cut

$options{'raxml-aa-substitution-model=s'} = \( my $opt_raxml_aa_subst = "AUTO");

=back
=item [--raxml-args "<ARGS>"]
Arbitrary options to pass through to RAxML.
Expand Down Expand Up @@ -254,6 +271,7 @@ =head1 CODE
'raxml-p' => $opt_raxml_p,
'raxml-x' => $opt_raxml_x,
'min-proteomes' => $opt_min_proteomes,
'raxml-aa-substitution-model' => $opt_raxml_aa_subst,
'raxml-args' => $opt_raxml_args
});
$bcgTree->check_existence_of_fasta_files();
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.10';
our $VERSION = '1.1.0';

my $L = Log::Log4perl::get_logger();

Expand Down Expand Up @@ -248,7 +248,7 @@ sub complete_and_concat_alignments{
$seq{$seq->id} = $seq->seq;
$length = length($seq->seq);
}
print PART "WAG, $gene = ".($totalpos+1)."-";
print PART $self->{'raxml-aa-substitution-model'}.", $gene = ".($totalpos+1)."-";
$totalpos += $length;
print PART $totalpos."\n";
open(OUT, ">$out/$gene.aln-gb.comp") or $L->logdie("Error opening $out/$gene.aln-gb.comp. $!");
Expand Down
3 changes: 2 additions & 1 deletion t/11_run_raxml.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ my $script_args = ['bin/bcgTree.pl',
'--proteome', 'Filifactor=t/data/NC_016630.faa',
# '--proteome', 'Acholeplasma=t/data/NC_022549.faa',
'--outdir', $tmpdir,
'--bootstrap', 10
'--bootstrap', 10,
'--raxml-aa-substitution-model', 'WAG'
];

script_runs($script_args, \%options, "Test if script executes raxml");
Expand Down

0 comments on commit 06cbbe1

Please sign in to comment.