produce a barplot of cell barcode demultiplex statistics
Examples
outdir <- tempfile()
dir.create(outdir)
bc_allow <- file.path(outdir, "bc_allow.tsv")
R.utils::gunzip(filename = system.file("extdata/bc_allow.tsv.gz", package = "FLAMES"), destname = bc_allow, remove = FALSE)
find_barcode(
fastq = system.file("extdata/fastq", package = "FLAMES"),
stats_out = file.path(outdir, "bc_stat"),
reads_out = file.path(outdir, "demultiplexed.fq.gz"),
barcodes_file = bc_allow
)
#> FLEXIPLEX 0.96.2
#> Setting max barcode edit distance to 2
#> Setting max flanking sequence edit distance to 8
#> Setting read IDs to be replaced
#> Setting number of threads to 1
#> Search pattern:
#> primer: CTACACGACGCTCTTCCGATCT
#> BC: NNNNNNNNNNNNNNNN
#> UMI: NNNNNNNNNNNN
#> polyT: TTTTTTTTT
#> Setting known barcodes from /tmp/Rtmpg58CKQ/file1a582dd8de18/bc_allow.tsv
#> Number of known barcodes: 143
#> Searching for barcodes...
#> Number of reads processed: 393
#> Number of reads where a barcode was found: 368
#> Number of reads where more than one barcode was found: 4
#> All done!
#> Skipping TSO trimming...
plot_demultiplex(stats_file = file.path(outdir, "bc_stat"))
#> $knee_plot
#>
#> $editdistance_plot
#>