BaRcodeR is an open-source program to facilitate repeatable label generation and management for labelling, tracking and curating data from biological samples.
Flowchart of major functions
For a quick start, see the introduction.
A 2-page, quick-reference guide is available via Figshare
If RStudio is not available, see the introduction and
vignette("Using-baRcodeR)" for command line use.
The main baRcodeR functions for unique identifiers and QR code generation can be performed interactive via the RStudio addin found on the toolbar.
Make sure to restart RStudio after installing. Then the addin should appear in the toolbar.
Click on the add-in, and a popup window will appear.
Note the 3 tabs along the bottom, corresponding to the three main baRcodeR commands:
The first tab generates basic ID codes with user input as seen below:
As you fill in the fields, a preview of the ID codes will appear on the right-hand side along with reproducible code, which can be copied for archival purposes. Clicking ‘Create Label.csv’ will create a CSV file called ‘Label_YYYY-MM-DD.csv’, which contains a data frame with the full unique ID strings as the first column, the user-defined prefix string in the second column, and the unique ID number in the third column. This file is useful for archiving ID codes and as a starting point for data entry. For example, it can be opened in a spreadsheet program to add data measurement columns. It is also the input for creating printable, QR-coded labels with
You can switch from the simple ID code generation tab to the hierarchical ID code generation or QR code creation tabs at the bottom.
Hierarchical ID codes have a nested structure (e.g. X subsamples from Y individuals at Z time points), the information for each level is saved under the “Hierarchy” section. The “Add level” button is used to add more levels to the hierarchy, and the “Remove level” button will remove the most recently added level. The data frame output will contain ID codes in the first column, and a separate column for each level of the hierarchy, with the user-defined string as the header; as shown under ‘Preview’. As with the simple ID code tab, the output of Hierarchical ID codes is a CSV file “Labels_YYYY-MM-DD.csv”, saved in the working directory. This file is useful for archiving ID codes and as a starting point for data entry. For example, it can be opened in a spreadsheet program to add data measurement columns. It is also the input for creating printable, QR-coded labels with
The Barcode Creation tab contains all the advanced options for page layout. The default options fit a specific format: ULINE 1.75" * 0.5" WEATHER RESISTANT LABEL for laser printer; item # S-19297 (uline.ca). A text file containing ID codes is imported by clicking the “Browse” button and selecting the CSV text file in the file browser. The file is be previewed by clicking “Import File”.
After importing a CSV file, the preview shows part of the expected output PDF file based on font size and other layout options. The first column is highlighted by default and defines the column to use for the labels. Clicking on a different column will set it as the ID code column, as shown in the preview.
Clicking “Make PDF” will generate a printable PDF of all barcodes provided. This can take several minutes for >100 barcodes, depending on computer speed. The text “Done” will appear upon completion of the PDF file.
NOTE: When printing from pdf, ensure that ‘anti-aliasing’ or ‘smoothing’ options are turned OFF, and that you are not using ‘fit to page’ or similar options that will re-scale the output.
## R version 3.6.1 (2019-07-05) ## Platform: x86_64-w64-mingw32/x64 (64-bit) ## Running under: Windows 10 x64 (build 18363) ## ## Matrix products: default ## ## locale: ##  LC_COLLATE=C LC_CTYPE=English_Canada.1252 ##  LC_MONETARY=English_Canada.1252 LC_NUMERIC=C ##  LC_TIME=English_Canada.1252 ## ## attached base packages: ##  stats graphics grDevices utils datasets methods base ## ## other attached packages: ##  baRcodeR_0.1.5 qrcode_0.1.1 ## ## loaded via a namespace (and not attached): ##  Rcpp_1.0.3 png_0.1-7 digest_0.6.23 R.methodsS3_1.7.1 ##  magrittr_1.5 evaluate_0.14 highr_0.8 rlang_0.4.4 ##  stringi_1.4.3 rstudioapi_0.10 R.oo_1.23.0 R.utils_2.9.2 ##  rmarkdown_2.1 tools_3.6.1 stringr_1.4.0 xfun_0.12 ##  yaml_2.2.1 compiler_3.6.1 htmltools_0.4.0 knitr_1.28