-
Notifications
You must be signed in to change notification settings - Fork 1
1. Introduction
This wiki is for developers.
Note that this is mainly written with Applied Algorithms employees in mind, so some information (such as suggested git and coding practices) may not be helpful for solo developers.
Links you will likely be re-visiting these links multiple times during your development process as they contain extremely useful information for understanding elements of this project.
- Mark's Paper: The biology paper for the science for these tools comes from.
- Git Resources: Contains information on how to use Git and Github (required).
- Hellgate: May also be helpful for you, please ask your employer for more information.
- R Textbook: Good if you're new to R. We've taken a few things from this textbook, such creating a website and package.
- Howard: For moral support.
Copying the steps from Readme.md will not allow to edit the package directly. To work on the package, you first need to clone from the github repository by running:
git clone https://github.com/UM-Applied-Algorithms-Lab/PTMsToPathways
This will create a local version of your package. The Helpful Sources section has some tutorials on git, so it is recommended to watch those before making changes to the package, as this wiki will not cover that topic. Next, you will need to open a new R console. This can be done with the command
R in your terminal
Or, if you have R Studio, the console there is an R console by default. This console will allow you to run R commands and functions included in the package. Now, in the R console, change your working directory (It must be in the PTMsToPathways directory) and install the package devtools, which is required to document the package, along with other dependencies using BiocManager:
setwd("PTMsToPathways")
install.packages("devtools")
if (!require("BiocManager", quietly = TRUE)) install.packages("BiocManager")
BiocManager::install("STRINGdb")
BiocManager::install("RCy3")
devtools::load_all()
You can now edit the code by editing the files in the ~/PTMsToPathways/R directory. Like github repositories, R packages exist both locally and remotely. However, changing this code will not immediately affect your local copy of the package. Instead, after you have made changes to the code, run this command in your R console:
devtools::document()
This will turn your local git repository into an R package and replace the PTMsToPathways package with a version where your changes are live. If you want to test how the package works, you will need to run devtools::document() first to make sure it is up to date. If you are just testing code, you should source whatever function are testing to the global enviroment, then run it on the R console (More on this later). Note that using
git push
After running devtools::document() will update the remote version of the package with any changes you have made.
Some important things to note when starting out. First, the package is structured by segmenting related parts into "steps" (1 step per file), such as Step 1: Make Cluster Lists, Step 2: Make Correlation Network, etc. We generally choose to separate after we create data that may be helpful for a biologist to analyze, i.e. after the Correlation Network because a biologist may want to view that data. Please keep this in mind if you add functions to the package. The package contains examples of all this data along with some intermediate steps. They can be viewed as long as the package is installed (either directly or with devtools::document()). You can see all example data by clicking global environment -> package::PTMsToPathways in the Environments tab.
All example data starts with "ex." Everything else is a function. You can view any of these by running the view command in your R console, such as:
View(ex.ptmtable)
Good luck!