Hi I'm sure this is simple but I am quite new to the area so be gentle I have a list of accession numbers corresponding to full length sequences. I want to use these to download the protein sequences for all of the full length sequences using Rentrez. I can do this easily for one accession number:
search1 <- entrez_search(db="nuccore", term="JQ348844", [ACCN]) protein_links <- entrez_link(dbfrom='nuccore', id=search1$ids, db='all') protein_seq <- entrez_fetch(db="protein", rettype="fasta", id=protein_links$links$nuccore_protein)
You can't input more than one accession into the term field of the first search. I'm sure you can do this by a simple loop or something similar but I want one file in the end with all the protein sequences from all the input accession numbers.
Sorry if this is a stupid question! Thanks in advance