I have seen many tools of filtering a fasta file based on a sequence list, which excludes the provided list of ids from the original file however, I have a list of ids to keep and I want to remove all the rest from the fasta file. I prefer to do that in R, had a look at the functions of the package "ShortRead" but couldn't figure it out which function to use, can anyone give me a hint?
I haven't tried this but you can have a look at it.
subset.fasta function form FastaUtils package.
ah it doesn't want to be installed on my version of R, however, I tried this:
but I have problem extracting it: