Learn R Programming

hoardeR (version 0.10)

blastSeq: Sending Genomic Sequences to NCBI Blast service

Description

This function sends genomic sequences to the NCBI Blast service.

Usage

blastSeq(seq, n_blast=20, delay_req=10, delay_rid=60, email=NULL, 
           xmlFolder=NULL, logFolder=NULL, keepInMemory=FALSE,
           database="refseq_genomes", verbose=TRUE, createLog=TRUE)

Value

An xml file that contains the the NCBI result.

Arguments

seq

The fasta sequence that should be blasted (String).

n_blast

Amount of parallel blast requests, in case seq is a vector.

delay_req

Seconds between the single Blast requests.

delay_rid

Seconds between the single result requests.

email

User email, required information from NCBI (String).

xmlFolder

Path to the result folder.

logFolder

Path to the log folder.

keepInMemory

Logical, shall the results be kept in the memory.

database

The NCBI database to use.

verbose

Shall the program give extensive feedback.

createLog

Create log files, needed for continuing a crashed program.

Author

Daniel Fischer

Details

This function sends fasta sequences to the NCBI blast service. The defaults for the delays are required by NCBI and must not be smaller than the default values. Also, NCBI asks the user to provide an email address.

The input seq can be a vector of strings. In that case the sequences are one after another processed. The option n_blast sets then the upper threshold of how many blast requests are send to the NCBI Blast service at a time and kept running there parallel. It is here in the users obligation not to misuse the service with too many parallel requests.

The xmlFolder parameter specifies the folder to where the XML results will be stored. In case the folder does not exist, R will create it.

In case the option keepInMemory is set to TRUE the Blast results will be kept in memory, otherwise they will be just written to the HDD. Especially if many sequences are send to the blast service it is recommended to drop the result from the memory, meaning to set the option keepinMemory=FALSE. The option keepinMemory=TRUE is currently still under development and should not be used.

If log files should be written (createLog=TRUE) a log path should be given in logPath. However, if a xmlPath is given and the option createLog=TRUE is set, then the log folder will be automatically created in the parental folder of the xmlFolder and is called logs.

Examples

Run this code
if (FALSE) {
blastSeq("ACGTGCATCGACTAGCTACGACTACGACTATC", email="my.name@somewhere.com")
}

Run the code above in your browser using DataLab