2 ms·
I'm not in bioinformatics and don't do string processing, so I can't really help too much here. I'd really urge you to come ask this on the julia Discourse For
by eigenspace 6y ago
I'm not in bioinformatics and don't do string processing, so I can't really help too much here.
I'd really urge you to come ask this on the julia Discourse Forum or Zulip and I promise you'll get high quality useful responses from people who understand your needs better than I.
> How do I find substrings & replace them efficiently? How do you split a string with delimiters? Regular Expressions?
This is something that the BioJulia people have put a lot of work into. Yes, you can use regular expressions, but they've managed to squeeze a lot of performance out of more specialized approaches, e.g.
https://github.com/BioJulia/Automa.jl https://github.com/BioJulia/Automa.jl
https://github.com/jakobnissen/ScanByte.jl https://github.com/jakobnissen/ScanByte.jl
But for more straightforward usage, julia has the `findfirst` function which can search for occurrences of a substring, `replace` which can do replacements either with a literal pattern or a regex, and `split` which can split a string with delimiters.
- valarauko 6y agoThank you! Automa.jl & ScanByte.jl sound like a good fit for some of the future projects I have lined up. My current needs are fairly simple, and I can work with stuff like `findfirst` and `split`. It was more an issue that string handling wasn't covered in any of the Julia courses I did, geared as they were towards mathematics. DataFrames.jl would probably cover 80% of my other needs.