Skip to content

Commit fc7b77a

Browse files
author
JamesOpz
committed
input multiple read totals
1 parent cd40240 commit fc7b77a

File tree

4 files changed

+29
-14
lines changed

4 files changed

+29
-14
lines changed

R/run_split_pipe.R

+5-11
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#' @param filtering_mode String of either 'knee' or 'manual' to filter data based in UMI per cell. Knee fits model from `DropletUtils`, 'manual' let user specify the cutoff selected in `filter_value`.
1010
#' @param filter_value Integer specifying the UMI cutoff to filter cells/barcodes by based on UMI per cell if `filtering_mode` is set to 'manual'.
1111
#' @param count_reads Boolean specifying whether to count the reads on R1 of sublibrary folders in the directory `fastq_path`.
12-
#' @param total_reads This currently only works for 'single' mode.
12+
#' @param total_reads_df This is a dataframe with one column "sl_name" ID and the second column "reads" containing the number of reads per sublibrary.
1313
#' @param fastq_path File path specifying a master folder with FASTQ files within folder labelled by sublibrary zUMI experiment name, format like `data_folder`. Only used if `count_reads = TRUE`. The pipeline will then count the number of FASTQ reads in R1 of each folder. This can be very slow.
1414
#' @param rt_bc File path specifying the barcode layout for the RT1 plate, see file included in package for example.
1515
#' @param lig_bc File path specifying the barcode layout for the L2 and L3 plates, see file included in package for example.
@@ -39,7 +39,7 @@ run_split_pipe <- function(
3939
filtering_mode = "knee",
4040
filter_value = 1000,
4141
count_reads = FALSE,
42-
total_reads,
42+
total_reads_df,
4343
fastq_path,
4444
rt_bc = "../test_data_sp_5_miseq/barcodes_v1.csv",
4545
lig_bc = "../test_data_sp_5_miseq/barcodes_v1.csv",
@@ -125,15 +125,9 @@ run_split_pipe <- function(
125125

126126
}
127127

128-
# Plot the raw reads -- this is edited out for time
129-
# This takes a really long time and need to be modified
130-
# Not sustainable in current format
131-
#raw_bc_hist(sub_lib_fp = dirs[1],
132-
# output_folder = output_folder_abs,
133-
# exp_name = exp_name)
134-
135-
# Binning stats visualisations
136-
# TODO
128+
# Mach reads to sublib name
129+
reads_idx <- match(exp_name, total_reads_df[,"sl_name"])
130+
total_reads <- total_reads_df[,"reads"][reads_idx]
137131

138132
# Get the overall run_stats
139133
# Found in general_utils.R

man/label_sce_data.Rd

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/merge_sparse.Rd

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/run_split_pipe.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)