split_queries: Splits a set of BLAST queries into a list of smaller DNA...

View source: R/submit_NCBI_BLAST_request.R

split_queriesR Documentation

Splits a set of BLAST queries into a list of smaller DNA sequences.

Description

Splits a set of BLAST queries into a list of smaller DNA sequences.

Usage

split_queries(x = x, by = 7000, ncores = 1)

Arguments

x

Supports 2 possible formats:

  • A data.frame in a BED-like format following the same specifications as 'GBaccess.bed' in prepare.gb.access.

  • A list of DNA sequences.

by

An integer to specify the length of the output DNA sequences you wish your queries to be splitted into, in base pair (Default: by = 7000).

ncores

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

Value

A list of DNA sequences of the requested length.

Author(s)

Yoann Pageaud.

Examples

#Using an example data.frame of 1 Genbank ID
ls.seq <- split_queries(
  x = data.frame("GB.access" = "AC073318", "Start" = 71401, "End" = 120576),
  by = 7025)
#Using an example list of DNA sequences
ls.seq <- list(
  "7qtel" = "CCCTAACACTGTTAGGGTTATTATGTTGACTGTTCTCATTGCTGTCTTAG",
  "1ptel" = "GATCCTTGAAGCGCCCCCAAGGGCATCTTCTCAAAGTTGGATGTGTGCAT",
  "17qtel" = "CCCTAACCCTAAACCCTAGCCCTAGCCCTAGCCCTAGCCCTAGCCCTAGC")
ls.seq <- split_queries(x = ls.seq, by = 10)

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