I have a collection (of about 61000) strings that look like
"(((((((((.(((((.&.)))))))))))))) 11,26 : 6,20 (-9.37 = -16.05 + 6.56 + 0.13) GCCAACUGACGUUGUU&AAUAAUUCAGUUGGU"
There are a variable number of spaces (1-3) between each part of the string.
Ultimately what I want is to convert this string to a javascript object:
{
parens: "(((((((((.(((((.&.))))))))))))))",
sRNAstart: 11,
sRNAend: 26,
mRNAstart: 6,
mRNAend: 20,
netEnergy: -9.37,
bindingEnergy: -16.05,
sRNAOpenEnergy: 6.56,
mRNAOpenEnergy: 0.13,
sequences: "GCCAACUGACGUUGUU&AAUAAUUCAGUUGGU"
}
This sounds like a job for RegEx man, bust sadly I am not him. Can anyone help me figure out a way to accomplish this?