This was raised by @PeteHaitch on Slack.
Currently when we create a SPE object containing multiple Visium samples with read10xVisium(), the column names (barcode IDs) are repeated, since 10x Genomics uses the same set of 4992 barcode IDs for each capture area.
We could think about disambiguating this in read10xVisium(), e.g. using something like key_id <- paste(sample_id, barcode_id, sep = "_") for the column names, which is how we have done it in our spatialLIBD Shiny apps with @lcolladotor (where column names need to be unique).
There is also the following (slightly different) precedent from DropletUtils::read10xCounts() from single-cell, also mentioned by @PeteHaitch on Slack: "If col.names=TRUE and length(sample)==1, each column is named by the cell barcode. For multiple samples, the index of each sample in samples is concatenated to the cell barcode to form the column name. This avoids problems with multiple instances of the same cell barcodes in different samples." Note that in our case Space Ranger already appends a -1 to all barcode IDs for Visium data.
This was raised by @PeteHaitch on Slack.
Currently when we create a SPE object containing multiple Visium samples with
read10xVisium(), the column names (barcode IDs) are repeated, since 10x Genomics uses the same set of 4992 barcode IDs for each capture area.We could think about disambiguating this in
read10xVisium(), e.g. using something likekey_id <- paste(sample_id, barcode_id, sep = "_")for the column names, which is how we have done it in ourspatialLIBDShiny apps with @lcolladotor (where column names need to be unique).There is also the following (slightly different) precedent from
DropletUtils::read10xCounts()from single-cell, also mentioned by @PeteHaitch on Slack:"If col.names=TRUE and length(sample)==1, each column is named by the cell barcode. For multiple samples, the index of each sample in samples is concatenated to the cell barcode to form the column name. This avoids problems with multiple instances of the same cell barcodes in different samples."Note that in our case Space Ranger already appends a-1to all barcode IDs for Visium data.