Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Depends:
R (>= 4.5.0)
URL: https://um-applied-algorithms-lab.github.io/PTMsToPathways/
BugReports: https://github.com/UM-Applied-Algorithms-Lab/PTMsToPathways/issues/new
LazyData: true
Config/testthat/edition: 3
Additional_repositories: https://bioconductor.org/packages/3.21/bioc
biocViews: Software, Proteomics, PostTranslationalModifications, Pathways, Network
2 changes: 1 addition & 1 deletion man/BRCA_PCN.data.Rd

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

2 changes: 1 addition & 1 deletion man/BRCA_genemania.edges.Rd

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

2 changes: 1 addition & 1 deletion man/BRCA_stringdb.edges.Rd

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

2 changes: 1 addition & 1 deletion man/brca_CCCN_data.Rd

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

2 changes: 1 addition & 1 deletion man/brca_clusterlist_data.Rd

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

2 changes: 1 addition & 1 deletion man/ex_PCNedgelist.Rd

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

2 changes: 1 addition & 1 deletion man/ex_adj_consensus.Rd

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

2 changes: 1 addition & 1 deletion man/ex_bioplanet.Rd

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

2 changes: 1 addition & 1 deletion man/ex_cfn.Rd

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

2 changes: 1 addition & 1 deletion man/ex_combined_ppi.Rd

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

2 changes: 1 addition & 1 deletion man/ex_common_clusters.Rd

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

2 changes: 1 addition & 1 deletion man/ex_full_ptm_table.Rd

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

2 changes: 1 addition & 1 deletion man/ex_gene_cccn_edges.Rd

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

2 changes: 1 addition & 1 deletion man/ex_gene_cccn_nodes.Rd

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

2 changes: 1 addition & 1 deletion man/ex_genemania_edges.Rd

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

2 changes: 1 addition & 1 deletion man/ex_pathway_crosstalk_network.Rd

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

2 changes: 1 addition & 1 deletion man/ex_pathways_list.Rd

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

2 changes: 1 addition & 1 deletion man/ex_ptm_cccn_edges.Rd

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

2 changes: 1 addition & 1 deletion man/ex_ptm_correlation_matrix.Rd

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

2 changes: 1 addition & 1 deletion man/ex_small_ptm_table.Rd

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

2 changes: 1 addition & 1 deletion man/ex_stringdb_edges.Rd

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

2 changes: 1 addition & 1 deletion man/ex_tiny_ptm_table.Rd

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

2 changes: 1 addition & 1 deletion man/function_key.Rd

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

6 changes: 3 additions & 3 deletions tests/testthat/test_buildclusterfilterednetwork.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

test_that("BuildClusterFilteredNetwork() gives right answer", {

# Get example data
# Run the function to test

gene_cccn_edges <- PTMsToPathways::ex_gene_cccn_edges
stringdb_edges <- PTMsToPathways::ex_stringdb_edges
genemania_edges <- PTMsToPathways::ex_genemania_edges

# Run the function to test

output <- BuildClusterFilteredNetwork(gene_cccn_edges, stringdb_edges, genemania_edges, NULL)

# Test the combined PPI output
Expand Down
15 changes: 5 additions & 10 deletions tests/testthat/test_buildpathwaycrosstalknetwork.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
# THESE USE DATA GENERATED FROM THE SMALL PTM TABLE

# Get data from package
common_clusters <- PTMsToPathways::ex_common_clusters
pathways_list <- PTMsToPathways::ex_pathways_list


test_that("BuildPathwayCrosstalkNetwork() gives right answer", {

output <- suppressMessages(BuildPathwayCrosstalkNetwork(common_clusters, pathways_list, createfile = FALSE))
output <- suppressMessages(BuildPathwayCrosstalkNetwork(ex_common_clusters, ex_pathways_list, createfile = FALSE))

pathway_crosstalk_network <- output[[1]]

Expand Down Expand Up @@ -53,9 +48,9 @@ test_that("BuildPathwayCrosstalkNetwork() gives right answer", {
test_that("ReadBioplanetFile() gives right answer", {
# read pathways.csv from inst/extdata and compare to ex_pathways_list
bioplanet_pathways <- ReadBioplanetFile(system.file("extdata", "pathway.csv", package = "PTMsToPathways"))
expect_equal(length(bioplanet_pathways), length(pathways_list))
for (pathway_name in names(pathways_list)) {
expect_equal(length(bioplanet_pathways), length(ex_pathways_list))
for (pathway_name in names(ex_pathways_list)) {
expect_true(pathway_name %in% names(bioplanet_pathways))
expect_equal(sort(bioplanet_pathways[[pathway_name]]), sort(pathways_list[[pathway_name]]))
expect_equal(sort(bioplanet_pathways[[pathway_name]]), sort(ex_pathways_list[[pathway_name]]))
}
})
10 changes: 3 additions & 7 deletions tests/testthat/test_gatherppidata.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# THESE USE DATA GENERATED FROM THE SMALL PTM TABLE

# Get data from package
gene_cccn_edges <- PTMsToPathways::ex_gene_cccn_edges
gene_cccn_nodes <- PTMsToPathways::ex_gene_cccn_nodes

test_that("GetGeneMANIA.edges() gives right answer", {

path <- system.file('extdata/ex_genemania_interactions.txt', package='PTMsToPathways') # Accesses the path to this file even run on github or devtools::test
genemania_edges <- GetGeneMANIA.edges(path, gene_cccn_nodes) # Run function and filter data
genemania_edges <- GetGeneMANIA.edges(path, ex_gene_cccn_nodes) # Run function and filter data
col_1 <- as.list(genemania_edges[,1])
row_2 <- as.list(genemania_edges[2,])

Expand All @@ -23,7 +19,7 @@ test_that("GetGeneMANIA.edges() gives right answer", {
test_that("GetSTRINGdb.edges() gives right answer with local file", {

path <- system.file('extdata/small_string_hs_hugo.tsv', package='PTMsToPathways')
stringdb_edges <- suppressMessages(GetSTRINGdb.edges(gene_cccn_edges, gene_cccn_nodes, local = TRUE, string.local.path = path))
stringdb_edges <- suppressMessages(GetSTRINGdb.edges(ex_gene_cccn_edges, ex_gene_cccn_nodes, local = TRUE, string.local.path = path))

# Expected values
exp_row_100 <- data.frame(source = "PLEKHA7", target = "EPB41L2", interaction = "experimental", Weight = 292)
Expand All @@ -36,7 +32,7 @@ test_that("GetSTRINGdb.edges() gives right answer with local file", {
test_that("GetKinsub.edges() gives right answer", {

path <- system.file('extdata/Kinase_Substrate_Dataset.txt', package='PTMsToPathways')
kinsub_edges <- GetKinsub.edges(path, gene_cccn_nodes)
kinsub_edges <- GetKinsub.edges(path, ex_gene_cccn_nodes)

# Expected values
exp_row_1 <- data.frame(source = "EGFR", target = "PLCG1", interaction = "pp", Weight = 1)
Expand Down
3 changes: 1 addition & 2 deletions tests/testthat/test_makeclusterlist.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ test_that("MakeClusterList() gives right answer", {
clust1 <- list("RACK1 p T229", "ATP6V1H p Y388", "TNK2 p T829", "IRS2 p Y632")
clust2 <- list("EIF2S1 p Y147", "ACTG1 p T297; ACTB p T297", "PDLIM5 p T248", "LSR p S365", "DCP1A p Y64", "MAPK13 p T185", "ALK p S1509", "GAREM1 p S700")

# Get data from package
ptmtable <- PTMsToPathways::ex_tiny_ptm_table
ptmtable <- ex_tiny_ptm_table

clusterlist_data <- suppressMessages(MakeClusterList(ptmtable, keeplength = 2, toolong = 3.5))
common_clusters <- clusterlist_data[[1]]
Expand Down
8 changes: 2 additions & 6 deletions tests/testthat/test_makecorrelationnetwork.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@

test_that("MakeCorrelationNetwork() gives right answer", {

# Get data from package
adj_consensus <- PTMsToPathways::ex_adj_consensus
ptm_correlation_matrix <- PTMsToPathways::ex_ptm_correlation_matrix

# Run the function and get results
correlationnetwork_data <- suppressMessages(MakeCorrelationNetwork(adj_consensus, ptm_correlation_matrix))
# now run MakeCorrelationNetwork
correlationnetwork_data <- suppressMessages(MakeCorrelationNetwork(ex_adj_consensus, ex_ptm_correlation_matrix))
ptm_cccn_edges <- correlationnetwork_data[[1]]
gene_cccn_edges <- correlationnetwork_data[[2]]
gene_cccn_nodes <- correlationnetwork_data[[3]]
Expand Down
2 changes: 0 additions & 2 deletions vignettes/BRCANetworks.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ available:

```{r eval = TRUE}
library(PTMsToPathways)
data_names <- data(package = "PTMsToPathways")$results[, "Item"]
data(list = data_names, package = "PTMsToPathways")
```

### Preprocess data for PTMsToPathways functions
Expand Down
2 changes: 0 additions & 2 deletions vignettes/CreatingNetworks.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ And load the package:

```{r eval = TRUE, echo = TRUE}
library(PTMsToPathways)
data_names <- data(package = "PTMsToPathways")$results[, "Item"]
data(list = data_names, package = "PTMsToPathways")
```

# Starting Data
Expand Down
3 changes: 0 additions & 3 deletions vignettes/CytoscapeGraphing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ built-in P2P function [ReadBioplanetFile()](reference/ReadBioplanetFile.html).

```{r eval = TRUE, echo = FALSE}
library(PTMsToPathways)
data_names <- data(package = "PTMsToPathways")$results[, "Item"]
data(list = data_names, package = "PTMsToPathways")
funckey <- function_key
pathways.list <- ReadBioplanetFile(system.file("extdata", "bioplanet_pathway_June2025.csv", package = "PTMsToPathways"))
```

Expand Down
2 changes: 0 additions & 2 deletions vignettes/RawDataProcessing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ data will dictate the names of modifications.
First, let's load the P2P package, since it contains some helpful pre-processing functions.
```{r eval = TRUE}
library(PTMsToPathways)
data_names <- data(package = "PTMsToPathways")$results[, "Item"]
data(list = data_names, package = "PTMsToPathways")
```

The example raw data file for this
Expand Down
Loading