Skip to content

Commit acf591a

Browse files
Add namespace for nrow for barcodes
1 parent 813ee1b commit acf591a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

PaintSHOP/barcode.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ collect_indices <- function(barcode) {
4444
# side or 3' side gets 2 instead of 1 is also random.
4545
add_bridges <- function(probes, bridges, indices) {
4646
# choose which bridge won't be used, "randomly" for each probe
47-
dropped_bridge <- sample(c(1, 2, 3, 4), nrow(probes), replace = TRUE)
47+
dropped_bridge <- sample(c(1, 2, 3, 4), base::nrow(probes), replace = TRUE)
4848

4949
# loop over probes, adding bridges based on indices derived from barcode
50-
for (i in 1:nrow(probes)) {
50+
for (i in 1:base::nrow(probes)) {
5151
# drop the bridge
5252
curr_indices <- indices[-dropped_bridge[i]]
5353

@@ -99,7 +99,7 @@ append_barcodes <- function(probes, bridges, barcodes) {
9999

100100
# Check to make sure that there are enough barcodes
101101
validate(
102-
need(nrow(barcodes) >= length(unique_IDs),
102+
need(base::nrow(barcodes) >= length(unique_IDs),
103103
"There are not enough barcodes for the number of targets with probes.")
104104
)
105105

0 commit comments

Comments
 (0)