AssignSampleIDs is an R package that provides tools for generating, assigning, and managing sample IDs in laboratory workflows. It includes functions for creating unique identifiers, handling sample metadata, and ensuring consistency in data management.
You can install the development version of the package from GitHub using the devtools package:
# Install devtools if not already installed
install.packages("devtools")
# Install AssignSampleIDs from GitHub
devtools::install_github("mattssca/assign_sample_id")Alternatively, if you have the package source files, you can install it locally:
# Replace "path/to/AssignSampleIDs" with the path to the package directory
install.packages("path/to/AssignSampleIDs", repos = NULL, type = "source")
Load the package and start using its functions:
# Load package
library(AssignSampleIDs)
# Example: load test data
test_data = AssignSampleIDs::test_data
# Run funciton on test data
result <- assign_sample_id(
this_data = test_data,
start_id = 100,
lab_id_col = "lab_id",
personal_id_col = "personal_id",
date_col = "date_of_sample",
verbose = TRUE
)
- Generate unique sample IDs.
- Assign and manage metadata for laboratory workflows.
- Ensure consistency in data management.
After installing the package, you can view the vignette using:
browseVignettes("AssignSampleIDs")
For an interactive user experience, give the shiny app a go!
The shiny app is also available as a Docker container. Follow the next steps to pull the image and run the Docker image.
- Docker must be installed on your computer.
- Download and install Docker Desktop from: https://www.docker.com/products/docker-desktop/
- After installation, start Docker Desktop and ensure it is running.
-
Load the Docker image
Open a terminal (Command Prompt, PowerShell, or Terminal) and run:
docker pull mattssca/assignsampleids-app:latest -
Run the Docker container
docker run -d -p 3838:3838 mattssca/assignsampleids-app:latest -
Access the app
Open your web browser and go to: http://localhost:3838
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request.
This package is licensed under the MIT License. See the LICENSE file for details.
