Skip to content

Commit

Permalink
Merge pull request #99 from teddyCodex/issue-55-rename-functions
Browse files Browse the repository at this point in the history
Refactor function names in R/blastWrapper.R
- fixes #55
  • Loading branch information
the-mayer authored Oct 22, 2024
2 parents 4c3d0b4 + 85620a1 commit 8e9901b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 31 deletions.
4 changes: 2 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export(renameFA)
export(rename_fasta)
export(replaceQuestionMarks)
export(reverseOperonSeq)
export(run_deltablast)
export(run_rpsblast)
export(runDeltaBlast)
export(runRPSBlast)
export(selectLongestDuplicate)
export(sendJobStatusEmail)
export(shortenLineage)
Expand Down
43 changes: 20 additions & 23 deletions R/blastWrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
#' @export
#'
#' @examples
run_deltablast <- function(deltablast_path, db_search_path,
db = "refseq", query, evalue = "1e-5",
out, num_alignments, num_threads = 1) {

start <- Sys.time()

runDeltaBlast <- function(deltablast_path, db_search_path,
db = "refseq", query, evalue = "1e-5",
out, num_alignments, num_threads = 1) {
start <- Sys.time()

system(paste0("export BLASTDB=/", db_search_path))

Expand Down Expand Up @@ -57,22 +55,21 @@ run_deltablast <- function(deltablast_path, db_search_path,
#' @export
#'
#' @examples
run_rpsblast <- function(rpsblast_path, db_search_path,
db = "refseq", query, evalue = "1e-5",
out, num_threads = 1) {

start <- Sys.time()
system(paste0("export BLASTDB=/", db_search_path))

system2(
command = rpsblast_path,
args = c(
"-db", db,
"-query", query,
"-evalue", evalue,
"-out", out,
"-num_threads", num_threads
runRPSBlast <- function(rpsblast_path, db_search_path,
db = "refseq", query, evalue = "1e-5",
out, num_threads = 1) {
start <- Sys.time()
system(paste0("export BLASTDB=/", db_search_path))
system2(
command = rpsblast_path,
args = c(
"-db", db,
"-query", query,
"-evalue", evalue,
"-out", out,
"-num_threads", num_threads
# , "-outfmt", outfmt
)
)
)
print(Sys.time() - start)
print(Sys.time() - start)
}
6 changes: 3 additions & 3 deletions man/run_deltablast.Rd → man/runDeltaBlast.Rd

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

6 changes: 3 additions & 3 deletions man/run_rpsblast.Rd → man/runRPSBlast.Rd

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

0 comments on commit 8e9901b

Please sign in to comment.