Skip to content

Commit

Permalink
Merge pull request #101 from teddyCodex/issue-49-rename-functions
Browse files Browse the repository at this point in the history
Refactored function names in msa.R | networks_domarch.R | networks_gencontext.R
- fixes #49
  • Loading branch information
the-mayer authored Oct 22, 2024
2 parents 8e9901b + 2250486 commit 7613887
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 48 deletions.
12 changes: 6 additions & 6 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Generated by roxygen2: do not edit by hand

export(BinaryDomainNetwork)
export(GCA2Lineage)
export(GenContextNetwork)
export(IPG2Lineage)
export(acc2FA)
export(acc2Lineage)
Expand Down Expand Up @@ -30,31 +28,33 @@ export(convertAlignment2FA)
export(convertAlignment2Trees)
export(convertFA2Tree)
export(countByColumn)
export(createBinaryDomainNetwork)
export(createDomainNetwork)
export(createFA2Tree)
export(createGenomicContextNetwork)
export(createJobResultsURL)
export(createJobStatusEmailMessage)
export(createLineageLookup)
export(createMSA_Kalign)
export(createMSA_PDF)
export(createRepresentativeAccNum)
export(createUndirectedGenomicContextNetwork)
export(createWordCloud2Element)
export(createWordCloudElement)
export(domain_network)
export(downloadAssemblySummary)
export(efetchIPG)
export(extractAccNum)
export(filterByDomains)
export(filterByFrequency)
export(findParalogs)
export(formatJobArgumentsHTML)
export(gc_undirected_network)
export(generateAllAlignments2FA)
export(generate_msa)
export(getAccNumFromFA)
export(getProcessRuntimeWeights)
export(getTopAccByLinDomArch)
export(mapAcc2Name)
export(mapAdvOption2Process)
export(mapOption2Process)
export(msa_pdf)
export(plotEstimatedWallTimes)
export(plotIPR2Viz)
export(plotIPR2VizWeb)
Expand Down
20 changes: 10 additions & 10 deletions R/msa.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#############

## Sample Runs
# msa_pdf(fasta_path="data/alns/pspb.gismo.fa" )#, out_path="data/msapdf")
# createMSA_PDF(fasta_path="data/alns/pspb.gismo.fa" )#, out_path="data/msapdf")

#########################################
## Generates MSA PDF from a Fasta file ##
Expand All @@ -34,7 +34,7 @@
#' @description
#' Generates a multiple sequence alignment from a fasta file
#'
#' msa_pdf is a function that reads a fasta file and generates a multiple sequence alignment as
#' createMSA_PDF is a function that reads a fasta file and generates a multiple sequence alignment as
#' a pdf
#'
#'
Expand All @@ -55,9 +55,9 @@
#'
#' @examples
#' \dontrun{
#' msa_pdf()
#' createMSA_PDF()
#' }
msa_pdf <- function(fasta_path, out_path = NULL,
createMSA_PDF <- function(fasta_path, out_path = NULL,
lowerbound = NULL, upperbound = NULL) {
## SAMPLE ARGUMENTS to test run
# fasta_path=here("../molevol_data/project_data/phage_defense/full_analysis_20210108/g3d.both_lin.gen.da_sub.fa")
Expand Down Expand Up @@ -196,12 +196,12 @@ msa_pdf <- function(fasta_path, out_path = NULL,
#' @export
#'
#' @examples
generate_msa <- function(fa_file = "", outfile = "") {
prot_aa <- readAAStringSet(
fa_file,
format = "fasta"
)
prot_aa
createMSA_Kalign <- function(fa_file = "", outfile = "") {
prot_aa <- readAAStringSet(
path = fa_file,
format = "fasta"
)
prot_aa

## Install kalign ?rMSA_INSTALL
## Messed up! Reimplement from kalign.R
Expand Down
8 changes: 4 additions & 4 deletions R/networks_domarch.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
#'
#' @examples
#' \dontrun{
#' domain_network(pspa)
#' createDomainNetwork(pspa)
#' }
domain_network <- function(prot, column = "DomArch", domains_of_interest, cutoff = 70, layout = "nice", query_color = adjustcolor("green", alpha.f = .5)) {
createDomainNetwork <- function(prot, column = "DomArch", domains_of_interest, cutoff = 70, layout = "nice", query_color = adjustcolor("green", alpha.f = .5)) {
# by domain networks or all, as required.
tryCatch(
{
Expand Down Expand Up @@ -250,9 +250,9 @@ domain_network <- function(prot, column = "DomArch", domains_of_interest, cutoff
#'
#' @examples
#' \dontrun{
#' domain_network(pspa)
#' createDomainNetwork(pspa)
#' }
BinaryDomainNetwork <- function(prot, column = "DomArch", domains_of_interest, cutoff = 70,
createBinaryDomainNetwork <- function(prot, column = "DomArch", domains_of_interest, cutoff = 70,
layout = "nice", query_color = adjustcolor("yellow", alpha.f = .5),
partner_color = adjustcolor("skyblue", alpha.f = .5),
border_color = adjustcolor("grey", alpha.f = .8),
Expand Down
8 changes: 4 additions & 4 deletions R/networks_gencontext.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## GC Undirected Network ##
###########################

#' Domain Network
#' createUndirectedGenomicContextNetwork
#'
#' @description
#' This function creates a domain network from the 'DomArch' column.
Expand Down Expand Up @@ -37,9 +37,9 @@
#'
#' @examples
#' \dontrun{
#' domain_network(pspa)
#' createUndirectedGenomicContextNetwork(pspa)
#' }
gc_undirected_network <- function(prot, column = "GenContext", domains_of_interest, cutoff_type = "Lineage", cutoff = 1, layout = "grid") {
createUndirectedGenomicContextNetwork <- function(prot, column = "GenContext", domains_of_interest, cutoff_type = "Lineage", cutoff = 1, layout = "grid") {
# by domain networks or all, as required.
# ye is either all of prot.list or centered on one domain

Expand Down Expand Up @@ -146,7 +146,7 @@ gc_undirected_network <- function(prot, column = "GenContext", domains_of_intere
#' \dontrun{
#' gc_directed_network(pspa, column = "GenContex", cutoff = 55)
#' }
GenContextNetwork <- function(prot, domains_of_interest, column = "GenContext",
createGenomicContextNetwork <- function(prot, domains_of_interest, column = "GenContext",
cutoff = 40,
layout = "grid",
directed = TRUE) {
Expand Down

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

8 changes: 4 additions & 4 deletions man/domain_network.Rd → man/createDomainNetwork.Rd

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

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

6 changes: 3 additions & 3 deletions man/generate_msa.Rd → man/createMSA_Kalign.Rd

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

15 changes: 10 additions & 5 deletions man/msa_pdf.Rd → man/createMSA_PDF.Rd

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

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

0 comments on commit 7613887

Please sign in to comment.