Skip to content

-w option in RAxML requires absolute path - #73

Closed
Jingping wants to merge 2 commits into
biopython:masterfrom
Jingping:patch-1
Closed

Jingping wants to merge 2 commits into
biopython:masterfrom
Jingping:patch-1

Conversation

@Jingping

Copy link
Copy Markdown
Contributor

-w FULL (!) path to the directory into which RAxML shall write its output files

          DEFAULT: current directory

@peterjc

peterjc commented Sep 25, 2012

Copy link
Copy Markdown
Member

What does needing a full path have to do with the change you're suggesting? Perhaps an example would help? Thanks!

@Jingping

Copy link
Copy Markdown
Contributor Author

currently w=path transfers to -w=/=/path, I guess related to the "filename=True" setting for this option, while in fact because the external software requires full path, it should really be treated as a string?

@peterjc

peterjc commented Sep 25, 2012

Copy link
Copy Markdown
Member

I don't understand what you have typed with all the slashes and equals. Can you show a small Python example using the command line wrapper object?

@Jingping

Copy link
Copy Markdown
Contributor Author

Here is an example:

from Biopython_future import RaxmlCommandline
import os.path as op
raxml_cl = RaxmlCommandline(sequences="dna.phy", algorithm="a",
model="GTRGAMMA",parsimony_seed=12345,
rapid_bootstrap_seed=12345,num_replicates=100,
name="aln",working_dir=op.dirname(op.abspath("dna.phy")))
print raxml_cl
raxmlHPC -f a -m GTRGAMMA -n aln -p 12345 -s dna.phy
-w=/home/jingping/projects/playground/raxml -x 12345 -N 100

Then when raxml_cl actually executes, there is this error below:
$ raxmlHPC -f a -m GTRGAMMA -n aln -p 12345 -s dna.phy -w=/home/raxml -x
12345 -N 100
The file _/=/_home/raxml/RAxML_info.aln RAxML wants to open for writing or
appending can not be opened [mode: ab], exiting ...

Notice the extra "/=" in the commandline print-out? However if using the
change I patched the command line translates correctly as:

print raxml_cl
raxmlHPC -f a -m GTRGAMMA -n aln -p 12345 -s dna.phy -w
/home/jingping/projects/playground/raxml -x 12345 -N 100

Notice the difference?

On Tue, Sep 25, 2012 at 3:40 PM, Peter Cock [email protected]:

I don't understand what you have typed with all the slashes and equals.
Can you show a small Python example using the command line wrapper object?

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/73#issuecomment-8867382.

@Jingping

Copy link
Copy Markdown
Contributor Author

I think the reason is that RAxML will automatically add a slash to the path given after -w if it does not start with /. So for -w=/fullpath when RAxML reads it, it becomes -w /=/fullpath. So when wrapping around this option the equals sign should not be used.

@peterjc

peterjc commented Sep 26, 2012

Copy link
Copy Markdown
Member

That could be a bug in RAxML... what happens if you have quotes (which are needed if there are spaces in the path)? e.g.

raxmlHPC -f a -m GTRGAMMA -n aln -p 12345 -s dna.phy -w "/home/jingping/projects/my playground/raxml" -x 12345 -N 100

If that works, then we'd want filename=True (to get the quotes added automatically) and equate=False (don't add the equals sign after the -w).

If you have access to a Windows machine it would be interesting to test this if the argument refers to a different drive (and to see what RAxML does with the two kinds of slashes). CC @etal

@Jingping

Copy link
Copy Markdown
Contributor Author

On Sep 26, 2012 5:01 AM, "Peter Cock" [email protected] wrote:

That could be a bug in RAxML... what happens if you have quotes (which are
needed if there are spaces in the path)? e.g.

raxmlHPC -f a -m GTRGAMMA -n aln -p 12345 -s dna.phy -w
"/home/jingping/projects/my playground/raxml" -x 12345 -N 100

Spaces inside quotes work!

If that works, then we'd want filename=True (to get the quotes added
automatically) and equate=False (don't add the equals sign after the -w).

If you have access to a Windows machine it would be interesting to test
this if the argument refers to a different drive (and to see what RAxML
does with the two kinds of slashes). CC @etal https://github.com/etal

No I don't...

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/73#issuecomment-8883412.

@peterjc

peterjc commented Sep 27, 2012

Copy link
Copy Markdown
Member

Would you like to revise your patch to just add the equate=False line (but keep the filename=True line)?

Or would you be happy for me to do that and just credit you?

@etal

etal commented Sep 28, 2012

Copy link
Copy Markdown
Contributor

I agree with this change. If RAxML insists on absolute paths, then we should probably document that, and/or add a call to os.path.abspath automatically when setting the working_dir attribute.

@peterjc

peterjc commented Sep 28, 2012

Copy link
Copy Markdown
Member

Great - committed as one step:
9f43f59

Thanks:
5af03e7

@peterjc peterjc closed this Sep 28, 2012
@peterjc

peterjc commented Aug 30, 2019

Copy link
Copy Markdown
Member

@Jingping would you agree to dual license your Biopython contributions as discussed on #898 so we can switch to the standard 3-clause BSD license? (Apologies if you already have done so, and I have overlooked this)

@peterjc peterjc mentioned this pull request Dec 3, 2019
3 tasks done
peterjc added a commit to peterjc/biopython that referenced this pull request Nov 15, 2020
Original author Eric Talevich and contributors since
tracked with version control (with one exception noted
below) have all agreed:

 - Adhemar Zerlotini (@azneto)
   biopython#1412 (comment)
 - Andrey Raspopov (@Andrey-Raspopov)
   biopython#2444
 - Chris Daley (@chebizarro)
   biopython#2349
 - Christian Brueffer (@cbrueffer)
   biopython#898 (comment)
 - Eric Talevich (@etal)
   biopython#898 (comment)
 - Peter Cock (@peterjc)
   biopython#898 (comment)
 - Sergio Valqui (@svalqui)
   biopython#1749
 - Sujan Dulal (@Dsujan)
   biopython#2430

We have not had explicit permission from Jingping Li
(@Jingping) for the one line change applied in
biopython#73 and
credited to them. The change was suggested by me, but
the recorded authorship was more to recognise their
work in identifying the problem and testing the solution.
peterjc added a commit that referenced this pull request Dec 3, 2020
Original author Eric Talevich and contributors since
tracked with version control (with one exception noted
below) have all agreed:

 - Adhemar Zerlotini (@azneto)
   #1412 (comment)
 - Andrey Raspopov (@Andrey-Raspopov)
   #2444
 - Chris Daley (@chebizarro)
   #2349
 - Christian Brueffer (@cbrueffer)
   #898 (comment)
 - Eric Talevich (@etal)
   #898 (comment)
 - Peter Cock (@peterjc)
   #898 (comment)
 - Sergio Valqui (@svalqui)
   #1749
 - Sujan Dulal (@Dsujan)
   #2430

We have not had explicit permission from Jingping Li
(@Jingping) for the one line change applied in
#73 and
credited to them. The change was suggested by me, but
the recorded authorship was more to recognise their
work in identifying the problem and testing the solution.
JoaoRodrigues pushed a commit to JoaoRodrigues/biopython that referenced this pull request Jun 3, 2021
Original author Eric Talevich and contributors since
tracked with version control (with one exception noted
below) have all agreed:

 - Adhemar Zerlotini (@azneto)
   biopython#1412 (comment)
 - Andrey Raspopov (@Andrey-Raspopov)
   biopython#2444
 - Chris Daley (@chebizarro)
   biopython#2349
 - Christian Brueffer (@cbrueffer)
   biopython#898 (comment)
 - Eric Talevich (@etal)
   biopython#898 (comment)
 - Peter Cock (@peterjc)
   biopython#898 (comment)
 - Sergio Valqui (@svalqui)
   biopython#1749
 - Sujan Dulal (@Dsujan)
   biopython#2430

We have not had explicit permission from Jingping Li
(@Jingping) for the one line change applied in
biopython#73 and
credited to them. The change was suggested by me, but
the recorded authorship was more to recognise their
work in identifying the problem and testing the solution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants