phangorn icon indicating copy to clipboard operation
phangorn copied to clipboard

Problems importing tree from Splitstree

Open ywx1 opened this issue 4 years ago • 3 comments

I have a nexus file which I opened and subsequently saved on Splitstree. I have therefore confirmed that this file can be read by Splitstree. However, when I tried to open it using phangorn in R, I am unable to. I have tried the read.nexus.networx command, but it gives me the error "NAs introduced by coercion". Opening it by read.nexus gives me Error in start:end : argument of length 0. However, I do not get an error when I print only the splits with the read.nexus.splits command. Is there any reason why I get this error? Is there a problem with the file itself? Sorry about this - I am very new to programming!

ywx1 avatar Sep 12 '19 17:09 ywx1

Hi @ywx1, which version of Splitstree do you use? Can you send me or share the nexus file?

KlausVigo avatar Sep 13 '19 01:09 KlausVigo

I use SplitsTree4, version 4.15.1. I am unable to upload a .nex file here, however. What I have observed is that the nexus file ("File A") which I download straight from a website VS the nexus file ("File B") which I save from Splitstree after opening File A on Splitstree gives me a different error when I attempt to open them on R.

ywx1 avatar Sep 13 '19 07:09 ywx1

Hi @KlausVigo ! Does this file work for you? Ecolitree - Copy.txt Thank you!

ywx1 avatar Sep 17 '19 15:09 ywx1

Hi I can read Ecolitree - Copy.txt using read.nexus.networx from phangorn R pakage, but trying to read splitree6 or nex files generated by Splitree 6 with this command results in:

Error in start:end : NA/NaN argument

Thank you Hanan

dosshra avatar Jan 13 '23 15:01 dosshra

Dear @dosshra, can you send me an example file. Unfortunately Splitstree 6 seems not documented well so far, not sure what they changed. Kind regards, Klaus

KlausVigo avatar Jan 13 '23 16:01 KlausVigo

4splitree.stree6.gz Thank you for your email Please see file attached Hanan Sela PhD

Institute of Evolution,

University of Haifa

Multi-Purpose Building, room 214

199 Abba-Hushi Avenue

Haifa 3498838

Israel @.*** Mobile: +972-50-5727458 Office +972-48240736 Internal 52736

On Fri, Jan 13, 2023 at 6:41 PM Klaus Schliep @.***> wrote:

Dear @dosshra https://github.com/dosshra, can you send me an example file. Unfortunately Splitstree 6 seems not documented well so far, not sure what they changed. Kind regards, Klaus

— Reply to this email directly, view it on GitHub https://github.com/KlausVigo/phangorn/issues/81#issuecomment-1382078536, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUBYTQVBHBC2FSWAY2M26DWSF6ELANCNFSM4IWHGYPA . You are receiving this because you were mentioned.Message ID: @.***>

dosshra avatar Jan 15 '23 08:01 dosshra

Please see tree attached 4splitree.stree6.gz Thank you Hanan

dosshra avatar Jan 19 '23 09:01 dosshra

Dear @dosshra, I made some bug fixes ba481aeb421693e2912dc2091d329ee4f9a15ae3 and 2e11abd86e3e4ff55c77e1acec5c2dbc26829b63. You need to install the development version, but I will send soon an new version to CRAN. SplitsTree6 does not return a networks object any more. However you can generate this in R:

spl <- read.nexus.splits("4splitree.stree6")
net <- as.networx(spl)
plot(net)

Regards, Klaus

KlausVigo avatar Jan 19 '23 11:01 KlausVigo

Thank you for the bug fixes I works good now.

dosshra avatar Jan 23 '23 06:01 dosshra

Dear @dosshra, it seems Splitstree6 gets a lot of updates now. Keep me up to date if something stops working again.

KlausVigo avatar Jan 23 '23 09:01 KlausVigo