@@ -244,6 +244,13 @@ if (is.null(subTitles)) {
244
244
subTitles <- unlist(strsplit(opt [[" subTitles" ]], " ," ))
245
245
}
246
246
247
+ if (" HTAN" %in% formats ) {
248
+ if (! (" FlatFile" %in% formats )) {
249
+ message(" Notice: HTAN specified as output without FlatFile. Automatically including FlatFile export." )
250
+ formats <- append(formats , " FlatFile" )
251
+ }
252
+ }
253
+
247
254
# # Parse parameters for QC algorithms
248
255
if (! is.null(yamlFile )) {
249
256
arguments <- c(' Params' )
@@ -328,7 +335,7 @@ level3Meta <- list()
328
335
level4Meta <- list ()
329
336
330
337
if (! is.null(flatFiles )) {
331
- flatFiles <- split(flatFiles , ceiling(seq_along(flatFiles )/ 3 ))
338
+ flatFiles <- split(flatFiles , ceiling(seq_along(flatFiles )/ 6 ))
332
339
}
333
340
334
341
for (i in seq_along(process )) {
@@ -358,7 +365,7 @@ for(i in seq_along(process)) {
358
365
mitoInfo <- .importMito(MitoImport = MitoImport , MitoType = MitoType )
359
366
360
367
cellQCAlgos <- c(" QCMetrics" , " scDblFinder" , " cxds" , " bcds" , " scrublet" , " doubletFinder" ,
361
- " cxds_bcds_hybrid" , " decontX" , " decontX_bg" , " soupX" , " soupX_bg" )
368
+ " cxds_bcds_hybrid" , " decontX" , " decontX_bg" , " soupX" , " soupX_bg" ) # scrublet
362
369
363
370
# Checking to see if the input is a file instead of a directory, for RDS and H5AD reading
364
371
# also check to see if the sample name is specified, and if so, set it
@@ -633,6 +640,7 @@ if (!isTRUE(split)) {
633
640
getSceParams(inSCE = cellSCE , directory = directory , samplename = samplename , writeYAML = TRUE )
634
641
635
642
# # generate meta data
643
+ # generate HTAN level3/level4 output
636
644
if (" FlatFile" %in% formats ) {
637
645
if (" HTAN" %in% formats ) {
638
646
meta <- generateHTANMeta(dropletSCE = dropletSCE , cellSCE = cellSCE , samplename = samplename ,
@@ -680,6 +688,7 @@ if (!isTRUE(split)) {
680
688
}
681
689
682
690
exportSCE(inSCE = cellSCE , samplename = samplename , directory = directory , type = " Cells" , format = formats )
691
+ # generate HTAN level3/level4 output
683
692
if (" FlatFile" %in% formats ) {
684
693
if (" HTAN" %in% formats ) {
685
694
meta <- generateHTANMeta(dropletSCE = NULL , cellSCE = cellSCE , samplename = samplename ,
@@ -714,6 +723,7 @@ if (!isTRUE(split)) {
714
723
names(metadata(dropletSCE )$ sctk $ runBarcodeRankDrops ) <- sample
715
724
716
725
exportSCE(inSCE = dropletSCE , samplename = samplename , directory = directory , type = " Droplets" , format = formats )
726
+ # generate HTAN level3/level4 output
717
727
if (" FlatFile" %in% formats ) {
718
728
if (" HTAN" %in% formats ) {
719
729
meta <- generateHTANMeta(dropletSCE = dropletSCE , cellSCE = NULL , samplename = samplename ,
0 commit comments