StreamFind Developer Guide
Implementation of processing methods and
algorithms
Ricardo Cunha
cunha@iuta.de29 November, 2024
Source:vignettes/articles/developer_guide.Rmd
developer_guide.Rmd
StreamFind
The StreamFind is an R package and can be used for data management, processing, visualization and reporting. This guide uses mass spectrometry (MS) data as example and aims to instruct developers to implement new processing modules and additional processing algorithms for new or existing processing methods in StreamFind.
Setup
The R package is in the StreamFind GitHub repository of the ODEA Project. For development, the recommendation is to download the repository locally using git tracking for version control. The GitHub desktop tool can be used for more easily install and configure git with your GitHub account, which is recommended for authoring contributions. Since it is an R package, the RStudio IDE is recommended for development. Yet, others (e.g., VS Code) will also work. When using RStudio, the repository can be downloaded via new project, selecting version control, then git and finally adding the GitHub url https://github.com/odea-project/StreamFind. This should create a local image of the StreamFind repository directly with git tracking, if git or GitHub desktop were properly installed and configured. When using RStudio, the project should directly be identified as package development where all tools are available to support development. We recommend setting the Use devtools package functions if available and generate documentation via Roxygen (in the configure bottom you select all options) located in the Build tab under the Configure Build Tools…. For other IDEs, we recommend using the package devtools. Considering that the local image of the StreamFind repository is installed with git tracking, the first step for development is to create a dedicated branch for implementation of new processing modules and/or algorithms. The master branch should not be changed directly but modified by pull requests from the dedicated development branch, giving the opportunity for code revision.
Structure
The streamFind R package is centered around the R6 class system, which brings object oriented programming to R. For MS, the MassSpecEngine R6 class is used to encapsulate both the data and methods. The data is stored in private fields within the MassSpecEngine and can be accessed and processed via the public methods/fields. Below the creation of a MassSpecEngine object and the way to access and change data is briefly shown.
ms <- MassSpecEngine$new()
# print method. Note that MS data files were not yet added!
ms
##
## MassSpecEngine
## File:
## NA
##
## Headers:name: NA
## author: NA
## date: 2024-11-29 10:05:01.42179
##
##
## Workflow:
## empty
##
## Analyses:
## empty
Under development…