PoonLab / OpenRDP

An open-source re-implementation of the RDP4 recombination detection program
GNU General Public License v3.0
45 stars 9 forks source link

3Seq: no such file or directory #39

Closed ArtPoon closed 1 year ago

ArtPoon commented 1 year ago

This exception is currently being thrown on master branch (commit 3a59bc1ae09c7fed4af4dd077c02d5abe9e097ad):

art@Wernstrom OpenRDP % python3 -i -m openrdp tests/test_neisseria.fasta test.csv -cfg tests/test_cfg.ini -all
Starting 3Seq Analysis
[Errno 2] No such file or directory: '/Users/art/git/OpenRDP/test_neisseria.fasta.3s.rec'
Finished 3Seq Analysis
ArtPoon commented 1 year ago

https://github.com/PoonLab/OpenRDP/blob/1863aca41432151c6121ddf336ebd02408ed0c74/openrdp/threeseq.py#L60-L63

ArtPoon commented 1 year ago

Well, it looks like the options being passed to 3Seq were wrong. -f is used to specify the starting (from) coordinate of sequences to analyze. We should be using -full to specify the entire input alignment for analysis.

ArtPoon commented 1 year ago

Ok I take that back. After reading the 3Seq documentation, it seems like -f is an overloaded option (I didn't think that was possible!) to specify both a full run and starting coordinate. There were other issues though - primarily that the file extension of the output file was missing (.csv) and the parser function was looking for tab delimited, not comma.
Was this a Windows thing?

ArtPoon commented 1 year ago

Fixed in dev branch.

ArtPoon commented 1 year ago

Gah. Did some more testing on my Linux machine:

ArtPoon commented 1 year ago

Ok updated code so it works for both macOS and Linux 3Seq binaries.