# using the toy example of the singleCellHaystack package
# define a logical matrix with detection of each gene (rows) in each cell (columns)
dat.detection <- dat.expression > 1
# running haystack in default mode
res <- haystack(dat.tsne, detection=dat.detection, method = "2D")
outfile <- file.path(tempdir(), "output.csv")
# write result to file outfile.csv
write_haystack(res, file = outfile)
# read in result from file
res.copy <- read_haystack(file = outfile)
Run the code above in your browser using DataLab