From 6500e367effd56d9db7bada9505ec42aa3bb8dfa Mon Sep 17 00:00:00 2001 From: teddyCodex Date: Fri, 11 Oct 2024 19:50:52 -0700 Subject: [PATCH 1/2] refactor function names in R/blastWrappers.R --- R/blastWrappers.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/blastWrappers.R b/R/blastWrappers.R index 552b1ff6..dc11f589 100755 --- a/R/blastWrappers.R +++ b/R/blastWrappers.R @@ -17,7 +17,7 @@ #' @export #' #' @examples -run_deltablast <- function(deltablast_path, db_search_path, +runDeltaBlast <- function(deltablast_path, db_search_path, db = "refseq", query, evalue = "1e-5", out, num_alignments, num_threads = 1) { start <- Sys.time() @@ -54,7 +54,7 @@ run_deltablast <- function(deltablast_path, db_search_path, #' @export #' #' @examples -run_rpsblast <- function(rpsblast_path, db_search_path, +runRPSBlast <- function(rpsblast_path, db_search_path, db = "refseq", query, evalue = "1e-5", out, num_threads = 1) { start <- Sys.time() From e45bb21f97ba1ecc1e7ee5fdaaa69349a6eca0e0 Mon Sep 17 00:00:00 2001 From: teddyCodex Date: Fri, 11 Oct 2024 19:52:32 -0700 Subject: [PATCH 2/2] update .rd files and NAMESPACE --- NAMESPACE | 4 +- man/countbycolumn.Rd | 22 ----------- man/filterbydomains.Rd | 44 --------------------- man/filterbyfrequency.Rd | 22 ----------- man/findparalogs.Rd | 26 ------------ man/{run_deltablast.Rd => runDeltaBlast.Rd} | 6 +-- man/{run_rpsblast.Rd => runRPSBlast.Rd} | 6 +-- man/summarizebylineage.Rd | 25 ------------ man/totalgencontextordomarchcounts.Rd | 42 -------------------- man/words2wordcounts.Rd | 25 ------------ 10 files changed, 8 insertions(+), 214 deletions(-) delete mode 100644 man/countbycolumn.Rd delete mode 100644 man/filterbydomains.Rd delete mode 100644 man/filterbyfrequency.Rd delete mode 100644 man/findparalogs.Rd rename man/{run_deltablast.Rd => runDeltaBlast.Rd} (88%) rename man/{run_rpsblast.Rd => runRPSBlast.Rd} (89%) delete mode 100644 man/summarizebylineage.Rd delete mode 100644 man/totalgencontextordomarchcounts.Rd delete mode 100644 man/words2wordcounts.Rd diff --git a/NAMESPACE b/NAMESPACE index 53332439..dbab97b3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -85,8 +85,8 @@ export(rename_fasta) export(replaceQuestionMarks) export(reveql) export(reverse_operon) -export(run_deltablast) -export(run_rpsblast) +export(runDeltaBlast) +export(runRPSBlast) export(selectLongestDuplicate) export(sendJobStatusEmail) export(shortenLineage) diff --git a/man/countbycolumn.Rd b/man/countbycolumn.Rd deleted file mode 100644 index 34fcc3e0..00000000 --- a/man/countbycolumn.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/summarize.R -\name{countByColumn} -\alias{countByColumn} -\title{Count By Column} -\usage{ -countByColumn(prot = prot, column = "DomArch", min.freq = 1) -} -\arguments{ -\item{min.freq}{} -} -\value{ -Describe return, in detail -} -\description{ -Count By Column -} -\examples{ -\dontrun{ -countByColumn() -} -} diff --git a/man/filterbydomains.Rd b/man/filterbydomains.Rd deleted file mode 100644 index 8c885363..00000000 --- a/man/filterbydomains.Rd +++ /dev/null @@ -1,44 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/summarize.R -\name{filterByDomains} -\alias{filterByDomains} -\title{Filter by Domains} -\usage{ -filterByDomains( - prot, - column = "DomArch", - doms_keep = c(), - doms_remove = c(), - ignore.case = FALSE -) -} -\arguments{ -\item{prot}{Dataframe to filter} - -\item{column}{Column to search for domains in (DomArch column)} - -\item{doms_keep}{Vector of domains that must be identified within column in order for -observation to be kept} - -\item{doms_remove}{Vector of domains that, if found within an observation, will be removed} - -\item{ignore.case}{Should the matching be non case sensitive} -} -\value{ -Filtered data frame -} -\description{ -filterByDomains filters a data frame by identifying exact domain matches -and either keeping or removing rows with the identified domain -} -\note{ -There is no need to make the domains 'regex safe', that will be handled by this function -} -\examples{ -\dontrun{ -filterByDomains() -} -} -\author{ -Samuel Chen, Janani Ravi -} diff --git a/man/filterbyfrequency.Rd b/man/filterbyfrequency.Rd deleted file mode 100644 index d2c5f9cd..00000000 --- a/man/filterbyfrequency.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/summarize.R -\name{filterByFrequency} -\alias{filterByFrequency} -\title{Filter Frequency} -\usage{ -filterByFrequency(x, min.freq) -} -\arguments{ -\item{min.freq}{} -} -\value{ -Describe return, in detail -} -\description{ -Filter Frequency -} -\examples{ -\dontrun{ -filterByFrequency() -} -} diff --git a/man/findparalogs.Rd b/man/findparalogs.Rd deleted file mode 100644 index 4b5edbcf..00000000 --- a/man/findparalogs.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/summarize.R -\name{findParalogs} -\alias{findParalogs} -\title{Find Paralogs} -\usage{ -findParalogs(prot) -} -\arguments{ -\item{prot}{A data frame filtered by a Query, containing columns Species and Lineage} -} -\value{ -returns a dataframe containing paralogs and the counts. -} -\description{ -Creates a data frame of paralogs. -} -\note{ -Please refer to the source code if you have alternate file formats and/or -column names. -} -\examples{ -\dontrun{ -findParalogs(pspa) -} -} diff --git a/man/run_deltablast.Rd b/man/runDeltaBlast.Rd similarity index 88% rename from man/run_deltablast.Rd rename to man/runDeltaBlast.Rd index 3c934d77..8a32b954 100644 --- a/man/run_deltablast.Rd +++ b/man/runDeltaBlast.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/blastWrappers.R -\name{run_deltablast} -\alias{run_deltablast} +\name{runDeltaBlast} +\alias{runDeltaBlast} \title{Run DELTABLAST to find homologs for proteins of interest} \usage{ -run_deltablast( +runDeltaBlast( deltablast_path, db_search_path, db = "refseq", diff --git a/man/run_rpsblast.Rd b/man/runRPSBlast.Rd similarity index 89% rename from man/run_rpsblast.Rd rename to man/runRPSBlast.Rd index bc4474f1..088254ea 100644 --- a/man/run_rpsblast.Rd +++ b/man/runRPSBlast.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/blastWrappers.R -\name{run_rpsblast} -\alias{run_rpsblast} +\name{runRPSBlast} +\alias{runRPSBlast} \title{Run RPSBLAST to generate domain architectures for proteins of interest} \usage{ -run_rpsblast( +runRPSBlast( rpsblast_path, db_search_path, db = "refseq", diff --git a/man/summarizebylineage.Rd b/man/summarizebylineage.Rd deleted file mode 100644 index 2e445913..00000000 --- a/man/summarizebylineage.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/summarize.R -\name{summarizeByLineage} -\alias{summarizeByLineage} -\title{Summarize by Lineage} -\usage{ -summarizeByLineage(prot = "prot", column = "DomArch", by = "Lineage", query) -} -\arguments{ -\item{query}{} -} -\value{ -Describe return, in detail -} -\description{ -Summarize by Lineage -} -\examples{ -\dontrun{ -library(tidyverse) -tibble(DomArch = c("a+b", "a+b", "b+c", "a+b"), Lineage = c("l1", "l1", "l1", "l2")) |> - summarizeByLineage(query = "all") -} - -} diff --git a/man/totalgencontextordomarchcounts.Rd b/man/totalgencontextordomarchcounts.Rd deleted file mode 100644 index f457cb6a..00000000 --- a/man/totalgencontextordomarchcounts.Rd +++ /dev/null @@ -1,42 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/summarize.R -\name{totalGenContextOrDomArchCounts} -\alias{totalGenContextOrDomArchCounts} -\title{Total Counts} -\usage{ -totalGenContextOrDomArchCounts( - prot, - column = "DomArch", - lineage_col = "Lineage", - cutoff = 90, - RowsCutoff = FALSE, - digits = 2 -) -} -\arguments{ -\item{prot}{A data frame that must contain columns: -\itemize{\item Either 'GenContext' or 'DomArch.norep' \item count}} - -\item{column}{Character. The column to summarize} - -\item{cutoff}{Numeric. Cutoff for total count. Counts below cutoff value will not be shown. Default is 0.} - -\item{digits}{} -} -\value{ -Define return, in detail -} -\description{ -Creates a data frame with a totalcount column - -This function is designed to sum the counts column by either Genomic Context or Domain Architecture and creates a totalcount column from those sums. -} -\note{ -Please refer to the source code if you have alternate file formats and/or -column names. -} -\examples{ -\dontrun{ -totalGenContextOrDomArchCounts(pspa - gc_lin_counts, 0, "GC") -} -} diff --git a/man/words2wordcounts.Rd b/man/words2wordcounts.Rd deleted file mode 100644 index 7f60f226..00000000 --- a/man/words2wordcounts.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/summarize.R -\name{words2WordCounts} -\alias{words2WordCounts} -\title{Words 2 Word Counts} -\usage{ -words2WordCounts(string) -} -\arguments{ -\item{string}{} -} -\value{ -\link{tbl_df} table with 2 columns: 1) words & 2) counts/frequency -} -\description{ -Get word counts (wc) \link{DOMAINS (DA) or DOMAIN ARCHITECTURES (GC)} -} -\examples{ -\dontrun{ -tibble::tibble(DomArch = c("aaa+bbb", "a+b", "b+c", "b-c")) |> - elements2Words() |> - words2WordCounts() -} - -}