Hello again Biostars,
I have what should be a simple sed question but I'm having some difficulty. Please take a look and let me know if you have a solution. I'm trying to use sed to remove bootstrap values from a nexus tree file which was created in MrBayes. Apparently, the newest version of MrBayes does not allow you to omit these bootstraps from your output. This is proving problematic since the next program in my pipeline is having difficulty parsing those bootstraps. So given the following, I would like to remove the value between all instances of ":" and ",". However, I want to conserve the ",". The sed edited solution should read as below. My attempt thus far have been too greedy such as sed -e 's/:.*,//g'. Thanks!
72 BE982029,
73 RIMD,
74 TX2103,
75 3631,
76 3646,
77 T3937;
tree gen.0 = (28:1.000000000000000e-01,((33:1.000000000000000e-01,(((64:1.000000000000000e-01,54:1.000000000000000e-01):1.000000000000000e-01,35:1.000000000000000e-01):1.000000000000000e-01,(((61:1.000000000000000e-01,55:1.000000000000000e-01):1.000000000000000e-01,47:1.000000000000000e-01):1.000000000000000e-01,((31:1.000000000000000e-01,(77:1.000000000000000e-01,30:1.000000000000000e-01):1.000000000000000e-01)
72 BE982029,
73 RIMD,
74 TX2103,
75 3631,
76 3646,
77 T3937;
tree gen.0 = (28,((33,(((64,54),35),(((61,55),47),((31,(77,30))
sorry, it doesn't work on my debian 64-bit. Which system did you test on?
CenOS 6.1 using GNU sed.
Try again, the markup swallowed some backslashes earlier on.
sorry, doesn't work yet! :) spits me back the same line.
The backslash before the + has to be removed, then it works fine: 's/:[0-9\.e\-]+//g'