A package is a collection of functions that work together in a cohesive manner to achieve a goal. It (should) include detailed documentation through man pages and vignettes and (should) be tested for accuracy and efficiency. Writing R extensions is a very detailed manual provided by CRAN that explains writing packages and what the structure of a package should look like. This vignette is going to walk you through making your first package in RStudio as well as how to submitt a package to Bioconductor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addAllostericEdges <- function(allostericEdges, networkSUID, | |
64 | |
64 | |
targetlayer = "kegg_global"){ | |
65 | |
allostericTable = read.table(allostericEdges) | |
66 | |
65 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<properties> | |
<cytoscape.api.version>3.6.0</cytoscape.api.version> | |
<maven-compiler-plugin.version>3.6.1</maven-compiler-plugin.version> | |
<maven-bundle-plugin.version>5.1.1</maven-bundle-plugin.version> | |
<osgi.api.version>4.2.0</osgi.api.version> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KEGG_GLOBAL_PATHWAY_IDS <- c("01100", "01110", "01120", "01200", "01210", | |
"01212", "01230", "01220") | |
importLayer <- function(networkFilePath){ | |
fileExtension <- tools::file_ext(networkFilePath) | |
if (fileExtension %in% c("sif", "gml", "xgmml", "xml")){ | |
message("Importing ", networkFilePath) | |
suID <- RCy3::importNetworkFromFile(file = paste(getwd(), "/", | |
networkFilePath, sep="")) | |
Sys.sleep(3) |
I replaced devtools::install_github to BiocManager::install.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dash) | |
library(dashHtmlComponents) | |
library(dashCytoscape) | |
library(readr) | |
library(purrr) | |
library(dplyr) | |
app <- Dash$new() | |
nodes <- read_csv("C:/Users/kozon/Downloads/nodes.csv") |
Install software in Google Colab
!apt install xfce4 xfce4-goodies vnc4server htop
!pip install pyngrok
!pip install git+https://github.com/bdemchak/py4cytoscape
!wget https://github.com/cytoscape/cytoscape/releases/download/3.8.0/cytoscape-unix-3.8.0.tar.gz
!tar xf cytoscape-unix-3.8.0.tar.gz
# configure VNC and xfce4
!mkdir ~/.vnc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# library(testthat) | |
# testthat::with_mock( | |
# get_node_table = function(x) { | |
# transomics2cytoscape:::getNodeTableWithZheight( | |
# transomics2cytoscape:::importKgml(x)) | |
# }, | |
# expect_equal(dim(get_node_table("rno00010"))[1], 100) | |
# ) | |
testthat::with_mock( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
name: R-CMD-check | |
jobs: | |
R-CMD-check: | |
runs-on: ${{ matrix.config.os }} | |
container: ${{ matrix.config.image }} |