get.seq(ids, outfile = "seqs.fasta", db = "nr", verbose = FALSE)
Downloads FASTA sequence files from the NR, or SWISSPROT/UNIPROT databases.
This is a basic function to automate sequence file download from the NR and SWISSPROT/UNIPROT databases.
This is similar to that returned by read.fasta
. However,
if some files were not successfully downloaded then a vector detailing
which ids were not found is returned.
Grant, B.J. et al. (2006) Bioinformatics 22, 2695--2696.
For a description of FASTA format see: http://www.ncbi.nlm.nih.gov/BLAST/blastcgihelp.shtml. When reading alignment files, the dash - is interpreted as the gap character.
## Sequence identifiers (GI or PDB codes e.g. from blast.pdb etc.) get.seq( c("P01112", "Q61411", "P20171") )|======================================================================| 100%1 . . . . 50 [Truncated_Name:1]gi|131869| MTEYKLVVVGAGGVGKSALTIQLIQNHFVDEYDPTIEDSYRKQVVIDGET [Truncated_Name:2]gi|3419417 MTEYKLVVVGAGGVGKSALTIQLIQNHFVDEYDPTIEDSYRKQVVIDGET [Truncated_Name:3]gi|3419417 MTEYKLVVVGAGGVGKSALTIQLIQNHFVDEYDPTIEDSYRKQVVIDGET ************************************************** 1 . . . . 50 51 . . . . 100 [Truncated_Name:1]gi|131869| CLLDILDTAGQEEYSAMRDQYMRTGEGFLCVFAINNTKSFEDIHQYREQI [Truncated_Name:2]gi|3419417 CLLDILDTAGQEEYSAMRDQYMRTGEGFLCVFAINNTKSFEDIHQYREQI [Truncated_Name:3]gi|3419417 CLLDILDTAGQEEYSAMRDQYMRTGEGFLCVFAINNTKSFEDIHQYREQI ************************************************** 51 . . . . 100 101 . . . . 150 [Truncated_Name:1]gi|131869| KRVKDSDDVPMVLVGNKCDLAARTVESRQAQDLARSYGIPYIETSAKTRQ [Truncated_Name:2]gi|3419417 KRVKDSDDVPMVLVGNKCDLAARTVESRQAQDLARSYGIPYIETSAKTRQ [Truncated_Name:3]gi|3419417 KRVKDSDDVPMVLVGNKCDLAARTVESRQAQDLARSYGIPYIETSAKTRQ ************************************************** 101 . . . . 150 151 . . . 189 [Truncated_Name:1]gi|131869| GVEDAFYTLVREIRQHKLRKLNPPDESGPGCMSCKCVLS [Truncated_Name:2]gi|3419417 GVEDAFYTLVREIRQHKLRKLNPPDESGPGCMSCKCVLS [Truncated_Name:3]gi|3419417 GVEDAFYTLVREIRQHKLRKLNPPDESGPGCMSCKCVLS *************************************** 151 . . . 189 Call: read.fasta(file = outfile) Class: fasta Alignment dimensions: 3 sequence rows; 189 position columns (189 non-gap, 0 gap) + attr: id, ali, call#aa <-get.seq( c("4q21", "5p21") ) #aa$id #aa$ali