getFASTA: Fetch FASTA Sequence from the UniProt Database

View source: R/getFASTA.R

getFASTAR Documentation

Fetch FASTA Sequence from the UniProt Database

Description

This function retrieves protein sequences in FASTA format directly from the UniProt database via UniProt protein IDs. This function also checks if the amino-acid composition of protein sequences is in the 20 default types.

Usage

getFASTA(uniprot.id, filename = "FASTA.RData", path = "FASTASeq")

Arguments

uniprot.id

A character vector of UniProt identifiers.

filename

A character string, indicating the output filename as an RData object to store the retrieved sequences.

path

A character string indicating the path to the project directory that contains the interaction data. If the directory is missing, it will be stored in the current directory. Default is FASTASeq.

Details

getFASTA

Value

A list containing protein FASTA sequences.

Author(s)

Matineh Rahmatbakhsh, matinerb.94@gmail.com

Examples

# get fasta sequences for three proteins of SARS-Cov-2
local = tempdir()
uniprot.id <- c("P0DTC4", "P0DTC5", "P0DTC9")
fasta_df <- getFASTA(uniprot.id, filename = 'FASTA.RData', path = local)
head(fasta_df)

mrbakhsh/HPiP documentation built on March 28, 2023, 4:35 p.m.