@@ -61,13 +61,13 @@ printName <- function(datasetId) {
6161}
6262
6363savedFiles <- data.frame (datasetId = character (), datasetName = character (), filename = character (), outputFileId = character (), readsetId = character ())
64- if (file.exists(' /work/savedSeuratObjects.txt ' )) {
65- print(' Deleting pre-existing savedSeuratObjects.txt file' )
66- unlink(' /work/savedSeuratObjects.txt ' )
64+ if (file.exists(trackerFile )) {
65+ print(paste0( ' Deleting pre-existing ' , trackerFile , ' file' ) )
66+ unlink(trackerFile )
6767}
6868
69- file.create(' /work/savedSeuratObjects.txt ' )
70- print(paste0(' Total lines in savedSeuratObjects.txt on job start:' , length(readLines(' savedSeuratObjects.txt ' ))))
69+ file.create(trackerFile )
70+ print(paste0(' Total lines in ' , trackerFile , ' on job start:' , length(readLines(trackerFile ))))
7171
7272saveData <- function (seuratObj , datasetId ) {
7373 message(paste0(' Saving dataset: ' , datasetId , ' with ' , ncol(seuratObj ), ' cells' ))
@@ -101,8 +101,9 @@ saveData <- function(seuratObj, datasetId) {
101101 stop(' Error saving seurat objects, more than one row!' )
102102 }
103103
104- write.table(toAppend , file = ' savedSeuratObjects.txt' , quote = FALSE , sep = ' \t ' , row.names = FALSE , col.names = FALSE , append = TRUE )
105- print(paste0(' Total lines in savedSeuratObjects.txt after save:' , length(readLines(' savedSeuratObjects.txt' ))))
104+ print(paste0(' Total lines in ' , trackerFile , ' before save:' , length(readLines(trackerFile ))))
105+ write.table(toAppend , file = trackerFile , quote = FALSE , sep = ' \t ' , row.names = FALSE , col.names = FALSE , append = TRUE )
106+ print(paste0(' Total lines in ' , trackerFile , ' after save:' , length(readLines(trackerFile ))))
106107
107108 # Write cell barcodes and metadata:
108109 metaDf <- seuratObj @ meta.data
0 commit comments