|
9 | 9 | #' @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`.
|
10 | 10 | #' @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'.
|
11 | 11 | #' @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. |
13 | 13 | #' @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.
|
14 | 14 | #' @param rt_bc File path specifying the barcode layout for the RT1 plate, see file included in package for example.
|
15 | 15 | #' @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(
|
39 | 39 | filtering_mode = "knee",
|
40 | 40 | filter_value = 1000,
|
41 | 41 | count_reads = FALSE,
|
42 |
| - total_reads, |
| 42 | + total_reads_df, |
43 | 43 | fastq_path,
|
44 | 44 | rt_bc = "../test_data_sp_5_miseq/barcodes_v1.csv",
|
45 | 45 | lig_bc = "../test_data_sp_5_miseq/barcodes_v1.csv",
|
@@ -125,15 +125,9 @@ run_split_pipe <- function(
|
125 | 125 |
|
126 | 126 | }
|
127 | 127 |
|
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] |
137 | 131 |
|
138 | 132 | # Get the overall run_stats
|
139 | 133 | # Found in general_utils.R
|
|
0 commit comments