Entering edit mode
6.8 years ago
kristin
•
0
Hi All,
How do you split fasta string into variables by using R?
For an example:
Input fasta string:
">VFG000871(gb|NP_757239) (fimB) Type 1 fimbriae Regulatory protein fimB [Type 1 fimbriae (VF0221)] [Escherichia coli CFT073]"
Goal to get this:
[1] ">VFG000871" "(gb|N_757239)" "(fimB)" "[Type 1 fimbriae (VF0221)]" "[Escherichia coli CFT073]"
I'm struggling to split the string by using sub() because of '(' ... It would show the error that ')' is missing. I have only to make ">VFG000871" as variable. Do you have any better suggestion for me?
Thank you for your input