get.NCBI.BLAST2DT: Automatically submits all sequences and retrieves all results...

View source: R/submit_NCBI_BLAST_request.R

get.NCBI.BLAST2DTR Documentation

Automatically submits all sequences and retrieves all results in a data.table.

Description

Automatically submits all sequences and retrieves all results in a data.table.

Usage

get.NCBI.BLAST2DT(
  sequences,
  db = "genomic/9606/GCF_000001405.39",
  res.dir,
  ncores,
  auto.rm.dir = TRUE,
  delay.req = 10,
  email
)

Arguments

sequences

Either a list of DNA sequences, or a data.frame in a BED-like format containing Genbank accession IDs and coordinates to extract sequences from.
For more information about the data.frame format see 'GBaccess.bed' argument in prepare.gb.access.
For more information about the list format see the example in submit_NCBI_BLAST.

db

A character string specifying an NCBI genome or reference sequence set database on which the submitted sequences will be BLASTed (Default using GRCh38 (hg38) genome assembly database: db = "genomic/9606/GCF_000001405.39"). For more supported databases see Details section in submit_NCBI_BLAST.

res.dir

A character string specifying the directory where NCBI BLAST submission results will be stored. Each BLAST result is stored in a separate folder within the given directory. Blast hits for each submission are available as a XML file in each matching folder.

ncores

An integer specifying the number of cores or threads to be used for parallel processing.

auto.rm.dir

A logical specifying whether the results directory should be immediately deleted after function execution end (auto.rm.dir = TRUE) or not (auto.rm.dir = FALSE). If FALSE, the folder will remain available after execution with all raw results in it.

delay.req

Mandatory seconds between BLAST request submissions as an integer (Default: delay.req = 10).

email

Mandatory E-mail adress for NCBI BLAST request, specified as a character string.

Value

A data.table aggregating all NCBI BLAST results.

Author(s)

Yoann Pageaud.

References

Examples

#Create 1 row data.frame for the example
df <- data.frame("GBaccessID" = "AC073318", "Start" = 71401, "End" = 72401)
#Submit the sequence extracted from AC073318 to NCBI BLAST API
example.dt <- get.NCBI.BLAST2DT(
  sequences = df, db = "genomic/9606/GCF_000001405.25",
  res.dir = "~/result_BLAST", ncores = 2, auto.rm.dir = FALSE,
  email = "myemailadress@dkfz.de")
#example.dt is a data.table containing all BLAST hits for the sequence submitted.

YoannPa/NCBI.BLAST2DT documentation built on Sept. 14, 2024, 2:30 a.m.