Skip to content

Commit 793037a

Browse files
committed
Always gzip seurat metadata CSV
1 parent 35255c6 commit 793037a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

singlecell/resources/chunks/Functions.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ saveData <- function(seuratObj, datasetId) {
107107
# Write cell barcodes and metadata:
108108
metaDf <- seuratObj@meta.data
109109
metaDf$cellbarcode <- colnames(seuratObj)
110-
write.table(metaDf, file = metaFile, quote = T, row.names = F, sep = ',', col.names = T)
110+
conn <- gzfile(metaDf)
111+
write.table(conn, file = metaFile, quote = T, row.names = F, sep = ',', col.names = T)
112+
close(conn)
111113
write.table(data.frame(CellBarcode = colnames(seuratObj)), file = barcodeFile, quote = F, row.names = F, sep = ',', col.names = F)
112114
}
113115

0 commit comments

Comments
 (0)