hesselberthlab / scrunchy

R toolkit for the analysis of single-cell functional heterogeneity
https://scrunchy.hesselberthlab.org/
Other
2 stars 3 forks source link

read_matrix path handling #24

Closed jayhesselberth closed 5 years ago

jayhesselberth commented 5 years ago
library(scrunchy)
library(tidyverse)

# works
x <- read_matrix(scrunchy_data("mrna"))
class(x)
#> [1] "dgTMatrix"
#> attr(,"package")
#> [1] "Matrix"

# fails with a trailing slash
read_matrix(scrunchy_data("mrna/"))
#> Error in read_matrix(scrunchy_data("mrna/")): missing required files: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/scrunchy/extdata/mrna/matrix.mtx.gz
#> missing required files: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/scrunchy/extdata/mrna/features.tsv.gz
#> missing required files: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/scrunchy/extdata/mrna/barcodes.tsv.gz

Created on 2018-12-29 by the reprex package (v0.2.1)

kriemo commented 5 years ago

Proper path handling was fixed with c075be47b75d8cce0035b178f07e336e53c937c7