Skip to main content

Timeline for String manipulation problem

Current License: CC BY-SA 4.0

10 events
when toggle format what by license comment
May 15, 2021 at 9:03 comment added Marla Sjoerd Smit: No, this doesn't fix the problem, because the Import tool of Nexus in Mathematica only applies to sequence data etc., not to the trees provided in Nexus format, and I am only interested in the trees. Moreover, I do not simply want to import them (which I actually do! I downloaded thousands of trees from TreeBase), but I also want to manipulate them so that they work with my code. That's why I needed an answer to my question, which has been solved now.
May 14, 2021 at 10:04 comment added Sjoerd Smit The TreeBASE website notes that all data are available in NEXUS format and the WL documentation notes this as an available import format. Maybe it would be easier if you used the built-in import tools?
May 13, 2021 at 21:56 comment added Carl Woll Is it possible to download the data in JSON format?
May 13, 2021 at 21:22 history edited David G. Stork CC BY-SA 4.0
deleted 27 characters in body
May 13, 2021 at 19:49 comment added Bob Hanlon Or StringReplace[string, ")" ~~ __?(StringFreeQ[#, ":"] &) ~~ ":" -> ")"]
May 13, 2021 at 19:26 comment added Rohit Namjoshi Crossposted here.
May 13, 2021 at 19:22 history edited creidhne CC BY-SA 4.0
improve formatting
May 13, 2021 at 19:22 answer added Daniel Huber timeline score: 2
May 13, 2021 at 18:57 comment added Shredderroy I am not very clear on what you are trying to do, but something tells me you should toss in a Shortest in your string pattern. Try StringReplace[string, Shortest[")"~~__~~":"] -> ")"]. I get the following output: (Vitis_vinifera_VvNAC09_GSVIVT01009651001:1.174911034,((Musa_\ acuminata_GSMUA_Achr7T26050_001:0.1846057474,Musa_acuminata_GSMUA_\ Achr4T07148_001:0.2741664889)0.2005997307,(Oryza_sativa_Os10g21560_1:\ 0.9733414222,Musa_acuminata_GSMUA_Achr2T06610_001:0.4881902598)0.\ 0623981619)0.13917144990000008);
May 13, 2021 at 18:45 history asked Marla CC BY-SA 4.0