Skip to content

Commit

Permalink
Functions names changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
YoannPa committed Aug 31, 2021
1 parent e91f35f commit 697708d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: NCBI.BLAST2DT
Type: Package
Title: Submit DNA sequences to NCBI BLAST and get results in an R data.table.
Version: 0.0.17
Version: 0.0.18
Authors@R:
person(given = "Yoann",
family = "Pageaud",
Expand Down
4 changes: 2 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Generated by roxygen2: do not edit by hand

S3method(split,queries)
S3method(split,queries.df)
export(NCBI_BLAST_XML2DT)
export(aggregate_NCBI_BLAST_XMLs2DT)
export(get.NCBI.BLAST2DT)
export(prepare.gb.access)
export(split_queries)
export(split_queries.df)
export(submit_NCBI_BLAST)
10 changes: 5 additions & 5 deletions R/submit_NCBI_BLAST_request.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ prepare.gb.access <- function(GBaccess.bed, ncores = 1){
#' @export
#' @examples
#' #Using an example data.frame of 1 Genbank ID
#' split.queries.df(
#' split_queries.df(
#' df = data.frame("GB.access" = "AC073318", "Start" = 71401, "End" = 120576),
#' by = 7025)

split.queries.df <- function(df, by = 7000){
split_queries.df <- function(df, by = 7000){
ls.dt <- lapply(X = seq(nrow(df)), FUN = function(i){
#Compute breaks
brks <- seq(from = df[i, 2], to = df[i, 3], by = by)
Expand Down Expand Up @@ -105,17 +105,17 @@ split.queries.df <- function(df, by = 7000){
#' @export
#' @examples
#' #Using an example data.frame of 1 Genbank ID
#' ls.seq <- split.queries(
#' 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)
#' ls.seq <- split_queries(x = ls.seq, by = 10)

split.queries <- function(x = x, by = 7000, ncores = 1){
split_queries <- function(x = x, by = 7000, ncores = 1){
if(is.data.frame(x)){
dt.res <- split.queries.df(df = x, by = by)
#Convert to list of sequences
Expand Down
10 changes: 5 additions & 5 deletions man/split.queries.Rd → man/split_queries.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions man/split.queries.df.Rd → man/split_queries.df.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 697708d

Please sign in to comment.