From 208b9e02d0bedfd6d16d663dfb109fcce23040ac Mon Sep 17 00:00:00 2001 From: teddyCodex Date: Tue, 8 Oct 2024 18:42:40 +0100 Subject: [PATCH 1/3] refactor function names in R/ipr2vis.R --- R/ipr2viz.R | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/R/ipr2viz.R b/R/ipr2viz.R index bf3650f7..5d8a0a03 100644 --- a/R/ipr2viz.R +++ b/R/ipr2viz.R @@ -13,7 +13,7 @@ ################################# ## Modified gggenes::theme_genes ################################# -## theme_genes2 adapted from theme_genes (w/o strip.text()) +## themeGenes2 adapted from theme_genes (w/o strip.text()) ## https://github.com/wilkox/gggenes/blob/master/R/theme_genes.R #' Theme Genes2 #' @@ -23,7 +23,7 @@ #' @export #' #' @examples -theme_genes2 <- function() { +themeGenes2 <- function() { ggplot2::theme_grey() + ggplot2::theme( panel.background = ggplot2::element_blank(), panel.grid.major.y = ggplot2::element_line(colour = "grey80", size = 0.2), @@ -58,7 +58,7 @@ theme_genes2 <- function() { #' @export #' #' @examples -find_top_acc <- function(infile_full, +getTopAccByLinDomArch <- function(infile_full, DA_col = "DomArch.Pfam", lin_col = "Lineage_short", n = 20, @@ -113,7 +113,7 @@ find_top_acc <- function(infile_full, #' @export #' #' @examples -ipr2viz <- function(infile_ipr = NULL, infile_full = NULL, accessions = c(), +plotIPR2Viz <- function(infile_ipr = NULL, infile_full = NULL, accessions = c(), analysis = c("Pfam", "Phobius", "TMHMM", "Gene3D"), group_by = "Analysis", # "Analysis" topn = 20, name = "Name", text_size = 15, query = "All") { @@ -141,8 +141,8 @@ ipr2viz <- function(infile_ipr = NULL, infile_full = NULL, accessions = c(), ## To filter by Analysis analysis <- paste(analysis, collapse = "|") ## @SAM: This can't be set in stone since the analysis may change! - ## Getting top n accession numbers using find_top_acc() - top_acc <- find_top_acc( + ## Getting top n accession numbers using getTopAccByLinDomArch() + top_acc <- getTopAccByLinDomArch( infile_full = infile_full, DA_col = "DomArch.Pfam", ## @SAM, you could pick by the Analysis w/ max rows! @@ -202,7 +202,7 @@ ipr2viz <- function(infile_ipr = NULL, infile_full = NULL, accessions = c(), # , ncol = 1 + #scales = "free", scale_fill_manual(values = CPCOLS, na.value = "#A9A9A9") + theme_minimal() + - theme_genes2() + + themeGenes2() + theme( legend.position = "bottom", legend.box = "horizontal", @@ -232,7 +232,7 @@ ipr2viz <- function(infile_ipr = NULL, infile_full = NULL, accessions = c(), ) + scale_fill_manual(values = CPCOLS, na.value = "#A9A9A9") + theme_minimal() + - theme_genes2() + + themeGenes2() + theme( legend.position = "bottom", legend.box = "horizontal", @@ -268,7 +268,7 @@ ipr2viz <- function(infile_ipr = NULL, infile_full = NULL, accessions = c(), #' @export #' #' @examples -ipr2viz_web <- function(infile_ipr, +plotIPR2VizWeb <- function(infile_ipr, accessions, analysis = c("Pfam", "Phobius", "TMHMM", "Gene3D"), group_by = "Analysis", name = "Name", @@ -344,7 +344,7 @@ ipr2viz_web <- function(infile_ipr, # , ncol = 1 + #scales = "free", scale_fill_manual(values = CPCOLS, na.value = "#A9A9A9") + theme_minimal() + - theme_genes2() + + themeGenes2() + theme( legend.position = "bottom", legend.box = "horizontal", @@ -374,7 +374,7 @@ ipr2viz_web <- function(infile_ipr, ) + scale_fill_manual(values = CPCOLS, na.value = "#A9A9A9") + theme_minimal() + - theme_genes2() + + themeGenes2() + theme( legend.position = "bottom", legend.box = "horizontal", From 44f0a766f29b36cdab6d7fbddc9c31cd4d0df20d Mon Sep 17 00:00:00 2001 From: teddyCodex Date: Tue, 8 Oct 2024 18:51:23 +0100 Subject: [PATCH 2/3] update namespace and rd files with roxygen2 --- NAMESPACE | 8 ++-- man/countbycolumn.Rd | 22 ---------- man/filterbydomains.Rd | 44 ------------------- man/filterbyfrequency.Rd | 22 ---------- man/findparalogs.Rd | 26 ----------- ...nd_top_acc.Rd => getTopAccByLinDomArch.Rd} | 6 +-- man/{ipr2viz.Rd => plotIPR2Viz.Rd} | 6 +-- man/{ipr2viz_web.Rd => plotIPR2VizWeb.Rd} | 6 +-- man/summarizebylineage.Rd | 25 ----------- man/{theme_genes2.Rd => themeGenes2.Rd} | 6 +-- man/totalgencontextordomarchcounts.Rd | 42 ------------------ man/words2wordcounts.Rd | 25 ----------- 12 files changed, 16 insertions(+), 222 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/{find_top_acc.Rd => getTopAccByLinDomArch.Rd} (79%) rename man/{ipr2viz.Rd => plotIPR2Viz.Rd} (87%) rename man/{ipr2viz_web.Rd => plotIPR2VizWeb.Rd} (85%) delete mode 100644 man/summarizebylineage.Rd rename man/{theme_genes2.Rd => themeGenes2.Rd} (72%) delete mode 100644 man/totalgencontextordomarchcounts.Rd delete mode 100644 man/words2wordcounts.Rd diff --git a/NAMESPACE b/NAMESPACE index 53332439..ddbd1dd5 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -46,22 +46,22 @@ export(extractAccNum) export(filterByDomains) export(filterByFrequency) export(findParalogs) -export(find_top_acc) export(formatJobArgumentsHTML) export(gc_undirected_network) export(generateAllAlignments2FA) export(generate_all_aln2fa) export(generate_msa) +export(getTopAccByLinDomArch) export(get_accnums_from_fasta_file) export(get_proc_medians) export(get_proc_weights) -export(ipr2viz) -export(ipr2viz_web) export(make_opts2procs) export(mapAcc2Name) export(map_acc2name) export(map_advanced_opts2procs) export(msa_pdf) +export(plotIPR2Viz) +export(plotIPR2VizWeb) export(plotLineageDA) export(plotLineageDomainRepeats) export(plotLineageHeatmap) @@ -97,7 +97,7 @@ export(summarizeDomArch_ByLineage) export(summarizeGenContext) export(summarizeGenContext_ByDomArchLineage) export(summarizeGenContext_ByLineage) -export(theme_genes2) +export(themeGenes2) export(to_titlecase) export(totalGenContextOrDomArchCounts) export(validateCountDF) 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/find_top_acc.Rd b/man/getTopAccByLinDomArch.Rd similarity index 79% rename from man/find_top_acc.Rd rename to man/getTopAccByLinDomArch.Rd index 780cde11..a00da5c7 100644 --- a/man/find_top_acc.Rd +++ b/man/getTopAccByLinDomArch.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/ipr2viz.R -\name{find_top_acc} -\alias{find_top_acc} +\name{getTopAccByLinDomArch} +\alias{getTopAccByLinDomArch} \title{Group by lineage + DA then take top 20} \usage{ -find_top_acc( +getTopAccByLinDomArch( infile_full, DA_col = "DomArch.Pfam", lin_col = "Lineage_short", diff --git a/man/ipr2viz.Rd b/man/plotIPR2Viz.Rd similarity index 87% rename from man/ipr2viz.Rd rename to man/plotIPR2Viz.Rd index 79063497..22297312 100644 --- a/man/ipr2viz.Rd +++ b/man/plotIPR2Viz.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/ipr2viz.R -\name{ipr2viz} -\alias{ipr2viz} +\name{plotIPR2Viz} +\alias{plotIPR2Viz} \title{IPR2Viz} \usage{ -ipr2viz( +plotIPR2Viz( infile_ipr = NULL, infile_full = NULL, accessions = c(), diff --git a/man/ipr2viz_web.Rd b/man/plotIPR2VizWeb.Rd similarity index 85% rename from man/ipr2viz_web.Rd rename to man/plotIPR2VizWeb.Rd index 896445bd..4b4394ad 100644 --- a/man/ipr2viz_web.Rd +++ b/man/plotIPR2VizWeb.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/ipr2viz.R -\name{ipr2viz_web} -\alias{ipr2viz_web} +\name{plotIPR2VizWeb} +\alias{plotIPR2VizWeb} \title{IPR2Viz Web} \usage{ -ipr2viz_web( +plotIPR2VizWeb( infile_ipr, accessions, analysis = c("Pfam", "Phobius", "TMHMM", "Gene3D"), 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/theme_genes2.Rd b/man/themeGenes2.Rd similarity index 72% rename from man/theme_genes2.Rd rename to man/themeGenes2.Rd index 29f79673..1553e019 100644 --- a/man/theme_genes2.Rd +++ b/man/themeGenes2.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/ipr2viz.R -\name{theme_genes2} -\alias{theme_genes2} +\name{themeGenes2} +\alias{themeGenes2} \title{Theme Genes2} \usage{ -theme_genes2() +themeGenes2() } \description{ Theme Genes2 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() -} - -} From 2d00b6fa42b124acf8cd3cd63e60cec745d71a10 Mon Sep 17 00:00:00 2001 From: David Mayer Date: Fri, 11 Oct 2024 13:46:03 -0600 Subject: [PATCH 3/3] modify .Rd names --- R/ipr2viz.R | 9 ++++---- man/countByColumn.Rd | 38 +++++++++++++++++++++++++++++++ man/filterByDomains.Rd | 44 ++++++++++++++++++++++++++++++++++++ man/filterByFrequency.Rd | 28 +++++++++++++++++++++++ man/findParalogs.Rd | 26 +++++++++++++++++++++ man/getTopAccByLinDomArch.Rd | 2 +- man/plotIPR2Viz.Rd | 4 ++-- man/plotIPR2VizWeb.Rd | 4 ++-- man/themeGenes2.Rd | 4 ++-- man/words2WordCounts.Rd | 32 ++++++++++++++++++++++++++ 10 files changed, 180 insertions(+), 11 deletions(-) create mode 100644 man/countByColumn.Rd create mode 100644 man/filterByDomains.Rd create mode 100644 man/filterByFrequency.Rd create mode 100644 man/findParalogs.Rd create mode 100644 man/words2WordCounts.Rd diff --git a/R/ipr2viz.R b/R/ipr2viz.R index dff6e67a..9b625d4e 100644 --- a/R/ipr2viz.R +++ b/R/ipr2viz.R @@ -15,7 +15,7 @@ ################################# ## themeGenes2 adapted from theme_genes (w/o strip.text()) ## https://github.com/wilkox/gggenes/blob/master/R/theme_genes.R -#' Theme Genes2 +#' themeGenes2 #' #' @importFrom ggplot2 element_blank element_line theme theme_grey #' @@ -41,7 +41,8 @@ themeGenes2 <- function() { ################################## ## Get Top N AccNum by Lin+DomArch ################################## -#' Group by lineage + DA then take top 20 +#' getTopAccByLinDomArch +#' @description Group by lineage + DA then take top 20 #' #' @param infile_full #' @param DA_col @@ -92,7 +93,7 @@ getTopAccByLinDomArch <- function(infile_full, ############################################# ## IPR + FULL files --> DomArch Visualization ############################################# -#' IPR2Viz +#' plotIPR2Viz #' #' @param infile_ipr #' @param infile_full @@ -248,7 +249,7 @@ plotIPR2Viz <- function(infile_ipr = NULL, infile_full = NULL, accessions = c(), return(plot) } -#' IPR2Viz Web +#' plotIPR2VizWeb #' #' @param infile_ipr #' @param accessions diff --git a/man/countByColumn.Rd b/man/countByColumn.Rd new file mode 100644 index 00000000..57ff9ac4 --- /dev/null +++ b/man/countByColumn.Rd @@ -0,0 +1,38 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/summarize.R +\name{countByColumn} +\alias{countByColumn} +\title{countByColumn} +\usage{ +countByColumn(prot = prot, column = "DomArch", min.freq = 1) +} +\arguments{ +\item{prot}{A data frame containing the dataset to analyze, typically with +multiple columns including the one specified by the \code{column} parameter.} + +\item{column}{A character string specifying the name of the column to analyze. +The default is "DomArch".} + +\item{min.freq}{An integer specifying the minimum frequency an element must +have to be included in the output. Default is 1.} +} +\value{ +A tibble with two columns: +\describe{ +\item{\code{column}}{The unique elements from the specified column +(e.g., "DomArch").} +\item{\code{freq}}{The frequency of each element, i.e., the number of times +each element appears in the specified column.} +} +The tibble is filtered to only include elements that have a frequency +greater than or equal to \code{min.freq} and does not include elements with \code{NA} +values or those starting with a hyphen ("-"). +} +\description{ +Function to obtain element counts (DA, GC) +} +\examples{ +\dontrun{ +countByColumn(prot = my_data, column = "DomArch", min.freq = 10) +} +} diff --git a/man/filterByDomains.Rd b/man/filterByDomains.Rd new file mode 100644 index 00000000..afb3e5cb --- /dev/null +++ b/man/filterByDomains.Rd @@ -0,0 +1,44 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/summarize.R +\name{filterByDomains} +\alias{filterByDomains} +\title{filterByDomains} +\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 new file mode 100644 index 00000000..15d06d67 --- /dev/null +++ b/man/filterByFrequency.Rd @@ -0,0 +1,28 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/summarize.R +\name{filterByFrequency} +\alias{filterByFrequency} +\title{filterByFrequency} +\usage{ +filterByFrequency(x, min.freq) +} +\arguments{ +\item{x}{A tibble (tbl_df) containing at least two columns: one for +elements (e.g., \code{words}) and one for their frequency (e.g., \code{freq}).} + +\item{min.freq}{A numeric value specifying the minimum frequency threshold. +Only elements with frequencies greater than or equal to this value will be +retained.} +} +\value{ +A tibble with the same structure as \code{x}, but filtered to include +only rows where the frequency is greater than or equal to \code{min.freq}. +} +\description{ +Function to filter based on frequencies +} +\examples{ +\dontrun{ +filterByFrequency() +} +} diff --git a/man/findParalogs.Rd b/man/findParalogs.Rd new file mode 100644 index 00000000..d92edf71 --- /dev/null +++ b/man/findParalogs.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/summarize.R +\name{findParalogs} +\alias{findParalogs} +\title{findParalogs} +\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/getTopAccByLinDomArch.Rd b/man/getTopAccByLinDomArch.Rd index a00da5c7..b8571350 100644 --- a/man/getTopAccByLinDomArch.Rd +++ b/man/getTopAccByLinDomArch.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/ipr2viz.R \name{getTopAccByLinDomArch} \alias{getTopAccByLinDomArch} -\title{Group by lineage + DA then take top 20} +\title{getTopAccByLinDomArch} \usage{ getTopAccByLinDomArch( infile_full, diff --git a/man/plotIPR2Viz.Rd b/man/plotIPR2Viz.Rd index 22297312..7ed420c9 100644 --- a/man/plotIPR2Viz.Rd +++ b/man/plotIPR2Viz.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/ipr2viz.R \name{plotIPR2Viz} \alias{plotIPR2Viz} -\title{IPR2Viz} +\title{plotIPR2Viz} \usage{ plotIPR2Viz( infile_ipr = NULL, @@ -20,5 +20,5 @@ plotIPR2Viz( \item{query}{} } \description{ -IPR2Viz +plotIPR2Viz } diff --git a/man/plotIPR2VizWeb.Rd b/man/plotIPR2VizWeb.Rd index 4b4394ad..3b94a5a7 100644 --- a/man/plotIPR2VizWeb.Rd +++ b/man/plotIPR2VizWeb.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/ipr2viz.R \name{plotIPR2VizWeb} \alias{plotIPR2VizWeb} -\title{IPR2Viz Web} +\title{plotIPR2VizWeb} \usage{ plotIPR2VizWeb( infile_ipr, @@ -20,5 +20,5 @@ plotIPR2VizWeb( \item{rows}{} } \description{ -IPR2Viz Web +plotIPR2VizWeb } diff --git a/man/themeGenes2.Rd b/man/themeGenes2.Rd index 1553e019..64ae9273 100644 --- a/man/themeGenes2.Rd +++ b/man/themeGenes2.Rd @@ -2,10 +2,10 @@ % Please edit documentation in R/ipr2viz.R \name{themeGenes2} \alias{themeGenes2} -\title{Theme Genes2} +\title{themeGenes2} \usage{ themeGenes2() } \description{ -Theme Genes2 +themeGenes2 } diff --git a/man/words2WordCounts.Rd b/man/words2WordCounts.Rd new file mode 100644 index 00000000..370dec7f --- /dev/null +++ b/man/words2WordCounts.Rd @@ -0,0 +1,32 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/summarize.R +\name{words2WordCounts} +\alias{words2WordCounts} +\title{words2WordCounts} +\usage{ +words2WordCounts(string) +} +\arguments{ +\item{string}{A character string containing the elements (words) to count. +This would typically be a space-delimited string representing domain +architectures or genomic contexts.} +} +\value{ +A tibble (tbl_df) with two columns: +\describe{ +\item{\code{words}}{A column containing the individual words +(domains or domain architectures).} +\item{\code{freq}}{A column containing the frequency counts for each word.} +} +} +\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() +} + +}