Skip to content

Commit

Permalink
edge case fix for FlatFile inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
liuming1997 committed Apr 16, 2024
1 parent bc6f8fb commit 7273626
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions exec/SCTK_runQC.R
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ if (is.null(subTitles)) {

if ("HTAN" %in% formats) {
if (!("FlatFile" %in% formats)) {
message("Notice: HTAN specified as output without FlatFile. Automatically including FlatFile export.")
message("Note: HTAN specified as output without FlatFile. Automatically including FlatFile export.")
formats <- append(formats, "FlatFile")
}
}
Expand Down Expand Up @@ -334,20 +334,18 @@ if (!is.null(gmt)) {
level3Meta <- list()
level4Meta <- list()

#if (!is.null(flatFiles)) {
# flatFiles <- split(flatFiles, ceiling(seq_along(flatFiles)/6))
#}

for(i in seq_along(process)) {

# pop elements from FlatFile input list
if (dataType %in% c("Droplet", "Cell")) {
flatFileInput <- flatFiles[c(1, 2, 3)]
flatFiles <- flatFiles[-c(1, 2, 3)]
}
else {
flatFileInput <- flatFiles[c(1, 2, 3, 4, 5, 6)]
flatFiles <- flatFiles[-c(1, 2, 3, 4, 5, 6)]
if ("FlatFile" %in% process[i]) {
if (dataType %in% c("Droplet", "Cell")) {
flatFileInput <- flatFiles[c(1, 2, 3)]
flatFiles <- flatFiles[-c(1, 2, 3)]
}
else {
flatFileInput <- flatFiles[c(1, 2, 3, 4, 5, 6)]
flatFiles <- flatFiles[-c(1, 2, 3, 4, 5, 6)]
}
}

preproc <- process[i]
Expand All @@ -356,7 +354,6 @@ for(i in seq_along(process)) {
raw <- RawDir[i]
fil <- FilterDir[i]
ref <- Reference[i]
#flatFiles <- flatFiles[[i]]
rawFile <- RawFile[i]
filFile <- FilterFile[i]
subTitle <- subTitles[i]
Expand Down

0 comments on commit 7273626

Please sign in to comment.