diff --git a/NAMESPACE b/NAMESPACE index 078f971b..cfaaf650 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/R/ipr2viz.R b/R/ipr2viz.R index 0d417be0..9b625d4e 100644 --- a/R/ipr2viz.R +++ b/R/ipr2viz.R @@ -13,9 +13,9 @@ ################################# ## 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 +#' themeGenes2 #' #' @importFrom ggplot2 element_blank element_line theme theme_grey #' @@ -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), @@ -41,7 +41,8 @@ theme_genes2 <- 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 @@ -59,7 +60,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, @@ -92,7 +93,7 @@ find_top_acc <- function(infile_full, ############################################# ## IPR + FULL files --> DomArch Visualization ############################################# -#' IPR2Viz +#' plotIPR2Viz #' #' @param infile_ipr #' @param infile_full @@ -115,7 +116,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") { @@ -143,8 +144,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! @@ -204,7 +205,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", @@ -234,7 +235,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", @@ -248,7 +249,7 @@ ipr2viz <- function(infile_ipr = NULL, infile_full = NULL, accessions = c(), return(plot) } -#' IPR2Viz Web +#' plotIPR2VizWeb #' #' @param infile_ipr #' @param accessions @@ -270,7 +271,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", @@ -346,7 +347,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", @@ -376,7 +377,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", diff --git a/man/countbycolumn.Rd b/man/countByColumn.Rd similarity index 100% rename from man/countbycolumn.Rd rename to man/countByColumn.Rd diff --git a/man/filterbydomains.Rd b/man/filterByDomains.Rd similarity index 100% rename from man/filterbydomains.Rd rename to man/filterByDomains.Rd diff --git a/man/filterbyfrequency.Rd b/man/filterByFrequency.Rd similarity index 100% rename from man/filterbyfrequency.Rd rename to man/filterByFrequency.Rd diff --git a/man/findparalogs.Rd b/man/findParalogs.Rd similarity index 100% rename from man/findparalogs.Rd rename to man/findParalogs.Rd diff --git a/man/find_top_acc.Rd b/man/getTopAccByLinDomArch.Rd similarity index 70% rename from man/find_top_acc.Rd rename to man/getTopAccByLinDomArch.Rd index 780cde11..b8571350 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} -\title{Group by lineage + DA then take top 20} +\name{getTopAccByLinDomArch} +\alias{getTopAccByLinDomArch} +\title{getTopAccByLinDomArch} \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 80% rename from man/ipr2viz.Rd rename to man/plotIPR2Viz.Rd index 79063497..7ed420c9 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} -\title{IPR2Viz} +\name{plotIPR2Viz} +\alias{plotIPR2Viz} +\title{plotIPR2Viz} \usage{ -ipr2viz( +plotIPR2Viz( infile_ipr = NULL, infile_full = NULL, accessions = c(), @@ -20,5 +20,5 @@ ipr2viz( \item{query}{} } \description{ -IPR2Viz +plotIPR2Viz } diff --git a/man/ipr2viz_web.Rd b/man/plotIPR2VizWeb.Rd similarity index 77% rename from man/ipr2viz_web.Rd rename to man/plotIPR2VizWeb.Rd index 896445bd..3b94a5a7 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} -\title{IPR2Viz Web} +\name{plotIPR2VizWeb} +\alias{plotIPR2VizWeb} +\title{plotIPR2VizWeb} \usage{ -ipr2viz_web( +plotIPR2VizWeb( infile_ipr, accessions, analysis = c("Pfam", "Phobius", "TMHMM", "Gene3D"), @@ -20,5 +20,5 @@ ipr2viz_web( \item{rows}{} } \description{ -IPR2Viz Web +plotIPR2VizWeb } diff --git a/man/theme_genes2.Rd b/man/themeGenes2.Rd similarity index 55% rename from man/theme_genes2.Rd rename to man/themeGenes2.Rd index 29f79673..64ae9273 100644 --- a/man/theme_genes2.Rd +++ b/man/themeGenes2.Rd @@ -1,11 +1,11 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/ipr2viz.R -\name{theme_genes2} -\alias{theme_genes2} -\title{Theme Genes2} +\name{themeGenes2} +\alias{themeGenes2} +\title{themeGenes2} \usage{ -theme_genes2() +themeGenes2() } \description{ -Theme Genes2 +themeGenes2 } diff --git a/man/words2wordcounts.Rd b/man/words2WordCounts.Rd similarity index 100% rename from man/words2wordcounts.Rd rename to man/words2WordCounts.Rd