From e9d4e7e4ed0d4b16ebc7960c4a10ecc1af5623fc Mon Sep 17 00:00:00 2001 From: DYX Date: Fri, 1 Mar 2019 11:03:23 -0500 Subject: [PATCH] Fixed the bug in the filter cells based on genes --- inst/shiny/quick_look.R | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/inst/shiny/quick_look.R b/inst/shiny/quick_look.R index 88d74f1..46714c4 100644 --- a/inst/shiny/quick_look.R +++ b/inst/shiny/quick_look.R @@ -333,23 +333,24 @@ upload_dges_filter <- function(sample_file){ colnames(a) <- colnames(df)[acols] b <- as.data.frame(df[,bcols]) colnames(b) <- colnames(df)[bcols] + + if(keep_filter == 1){ + df <- a + } + else{ + df <- b + } + + } output_dir <- file.path(dirname(sample_list_filter[1]), "dges_filtered") dir.create(output_dir) output_file <- file.path(output_dir, paste0(sample_name, "_filtered", ".dge.txt")) - if(keep_filter == 1){ - - write.table(a, output_file, append = FALSE, sep = "\t", dec = ".", - row.names = TRUE, col.names = TRUE) - } - else{ - - write.table(b, output_file, append = FALSE, sep = "\t", dec = ".", - row.names = TRUE, col.names = TRUE) - } - + write.table(df, output_file, append = FALSE, sep = "\t", dec = ".", + row.names = TRUE, col.names = TRUE) + R.utils::gzip(output_file) }