Skip to content

Commit 7613887

Browse files
authored
Merge pull request #101 from teddyCodex/issue-49-rename-functions
Refactored function names in msa.R | networks_domarch.R | networks_gencontext.R - fixes #49
2 parents 8e9901b + 2250486 commit 7613887

10 files changed

+53
-48
lines changed

NAMESPACE

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Generated by roxygen2: do not edit by hand
22

3-
export(BinaryDomainNetwork)
43
export(GCA2Lineage)
5-
export(GenContextNetwork)
64
export(IPG2Lineage)
75
export(acc2FA)
86
export(acc2Lineage)
@@ -30,31 +28,33 @@ export(convertAlignment2FA)
3028
export(convertAlignment2Trees)
3129
export(convertFA2Tree)
3230
export(countByColumn)
31+
export(createBinaryDomainNetwork)
32+
export(createDomainNetwork)
3333
export(createFA2Tree)
34+
export(createGenomicContextNetwork)
3435
export(createJobResultsURL)
3536
export(createJobStatusEmailMessage)
3637
export(createLineageLookup)
38+
export(createMSA_Kalign)
39+
export(createMSA_PDF)
3740
export(createRepresentativeAccNum)
41+
export(createUndirectedGenomicContextNetwork)
3842
export(createWordCloud2Element)
3943
export(createWordCloudElement)
40-
export(domain_network)
4144
export(downloadAssemblySummary)
4245
export(efetchIPG)
4346
export(extractAccNum)
4447
export(filterByDomains)
4548
export(filterByFrequency)
4649
export(findParalogs)
4750
export(formatJobArgumentsHTML)
48-
export(gc_undirected_network)
4951
export(generateAllAlignments2FA)
50-
export(generate_msa)
5152
export(getAccNumFromFA)
5253
export(getProcessRuntimeWeights)
5354
export(getTopAccByLinDomArch)
5455
export(mapAcc2Name)
5556
export(mapAdvOption2Process)
5657
export(mapOption2Process)
57-
export(msa_pdf)
5858
export(plotEstimatedWallTimes)
5959
export(plotIPR2Viz)
6060
export(plotIPR2VizWeb)

R/msa.R

+10-10
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#############
2525

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

2929
#########################################
3030
## Generates MSA PDF from a Fasta file ##
@@ -34,7 +34,7 @@
3434
#' @description
3535
#' Generates a multiple sequence alignment from a fasta file
3636
#'
37-
#' msa_pdf is a function that reads a fasta file and generates a multiple sequence alignment as
37+
#' createMSA_PDF is a function that reads a fasta file and generates a multiple sequence alignment as
3838
#' a pdf
3939
#'
4040
#'
@@ -55,9 +55,9 @@
5555
#'
5656
#' @examples
5757
#' \dontrun{
58-
#' msa_pdf()
58+
#' createMSA_PDF()
5959
#' }
60-
msa_pdf <- function(fasta_path, out_path = NULL,
60+
createMSA_PDF <- function(fasta_path, out_path = NULL,
6161
lowerbound = NULL, upperbound = NULL) {
6262
## SAMPLE ARGUMENTS to test run
6363
# fasta_path=here("../molevol_data/project_data/phage_defense/full_analysis_20210108/g3d.both_lin.gen.da_sub.fa")
@@ -196,12 +196,12 @@ msa_pdf <- function(fasta_path, out_path = NULL,
196196
#' @export
197197
#'
198198
#' @examples
199-
generate_msa <- function(fa_file = "", outfile = "") {
200-
prot_aa <- readAAStringSet(
201-
fa_file,
202-
format = "fasta"
203-
)
204-
prot_aa
199+
createMSA_Kalign <- function(fa_file = "", outfile = "") {
200+
prot_aa <- readAAStringSet(
201+
path = fa_file,
202+
format = "fasta"
203+
)
204+
prot_aa
205205

206206
## Install kalign ?rMSA_INSTALL
207207
## Messed up! Reimplement from kalign.R

R/networks_domarch.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
#'
4747
#' @examples
4848
#' \dontrun{
49-
#' domain_network(pspa)
49+
#' createDomainNetwork(pspa)
5050
#' }
51-
domain_network <- function(prot, column = "DomArch", domains_of_interest, cutoff = 70, layout = "nice", query_color = adjustcolor("green", alpha.f = .5)) {
51+
createDomainNetwork <- function(prot, column = "DomArch", domains_of_interest, cutoff = 70, layout = "nice", query_color = adjustcolor("green", alpha.f = .5)) {
5252
# by domain networks or all, as required.
5353
tryCatch(
5454
{
@@ -250,9 +250,9 @@ domain_network <- function(prot, column = "DomArch", domains_of_interest, cutoff
250250
#'
251251
#' @examples
252252
#' \dontrun{
253-
#' domain_network(pspa)
253+
#' createDomainNetwork(pspa)
254254
#' }
255-
BinaryDomainNetwork <- function(prot, column = "DomArch", domains_of_interest, cutoff = 70,
255+
createBinaryDomainNetwork <- function(prot, column = "DomArch", domains_of_interest, cutoff = 70,
256256
layout = "nice", query_color = adjustcolor("yellow", alpha.f = .5),
257257
partner_color = adjustcolor("skyblue", alpha.f = .5),
258258
border_color = adjustcolor("grey", alpha.f = .8),

R/networks_gencontext.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
## GC Undirected Network ##
99
###########################
1010

11-
#' Domain Network
11+
#' createUndirectedGenomicContextNetwork
1212
#'
1313
#' @description
1414
#' This function creates a domain network from the 'DomArch' column.
@@ -37,9 +37,9 @@
3737
#'
3838
#' @examples
3939
#' \dontrun{
40-
#' domain_network(pspa)
40+
#' createUndirectedGenomicContextNetwork(pspa)
4141
#' }
42-
gc_undirected_network <- function(prot, column = "GenContext", domains_of_interest, cutoff_type = "Lineage", cutoff = 1, layout = "grid") {
42+
createUndirectedGenomicContextNetwork <- function(prot, column = "GenContext", domains_of_interest, cutoff_type = "Lineage", cutoff = 1, layout = "grid") {
4343
# by domain networks or all, as required.
4444
# ye is either all of prot.list or centered on one domain
4545

@@ -146,7 +146,7 @@ gc_undirected_network <- function(prot, column = "GenContext", domains_of_intere
146146
#' \dontrun{
147147
#' gc_directed_network(pspa, column = "GenContex", cutoff = 55)
148148
#' }
149-
GenContextNetwork <- function(prot, domains_of_interest, column = "GenContext",
149+
createGenomicContextNetwork <- function(prot, domains_of_interest, column = "GenContext",
150150
cutoff = 40,
151151
layout = "grid",
152152
directed = TRUE) {

man/BinaryDomainNetwork.Rd man/createBinaryDomainNetwork.Rd

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/domain_network.Rd man/createDomainNetwork.Rd

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/GenContextNetwork.Rd man/createGenomicContextNetwork.Rd

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/generate_msa.Rd man/createMSA_Kalign.Rd

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/msa_pdf.Rd man/createMSA_PDF.Rd

+10-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/gc_undirected_network.Rd man/createUndirectedGenomicContextNetwork.Rd

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)