Is there a way to incorporate online BLAST search using an R script which takes FASTA sequences as input and returns the BLAST hits?
Why do you wish to automate a web crawl on BLAST when blast has a command line utility with online search enabled?
I'm trying to develop an R package for extracting annotations for proteins based on results from BLAST searches. So I need to incorporate BLAST inside the R package.
Why not take BLAST results as input instead? Why not accept a FASTA file instead of a sequence? Use R for data processing, not reinventing the wheel on existing processes. For example, while an R package to parse BAM files is useful, an R package to call variants from BAM is not - not everything needs to be re-implemented in every language.
Maybe this helps https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/system2 or this https://www.r-bloggers.com/2020/01/working-with-windows-cmd-system-commands-in-r/
metablastr is probably what you're looking for. Or you could try using the BLAST API.
I agree with Ram though. You're probably better off telling your users to do their own sequence searches, and just bring your package the output in a standardized format (which you can prescribe). Especially if you're just going to end up telling them to run BLAST locally (in which case you should be telling them to use MMseqs2 at this point because it's faster and lightweight).
Login before adding your answer.
Use of this site constitutes acceptance of our User Agreement and Privacy