produce a barplot of cell barcode demultiplex statistics
Usage
plot_demultiplex(pipeline)
# S4 method for class 'FLAMES.SingleCellPipeline'
plot_demultiplex(pipeline)
Value
a list of ggplot objects:
reads_count_plot: stacked barplot of: demultiplexed reads
knee_plot: knee plot of UMI counts before TSO trimming
flank_editdistance_plot: flanking sequence (adaptor) edit-distance plot
barcode_editdistance_plot: barcode edit-distance plot
cutadapt_plot: if TSO trimming is performed, number of reads kept by cutadapt
Examples
pipeline <- example_pipeline("MultiSampleSCPipeline") |>
run_step("barcode_demultiplex")
#> Writing configuration parameters to: /tmp/RtmpgpEV0i/file25bf34fc587f/config_file_9663.json
#> Configured steps:
#> barcode_demultiplex: TRUE
#> genome_alignment: TRUE
#> gene_quantification: TRUE
#> isoform_identification: TRUE
#> read_realignment: TRUE
#> transcript_quantification: TRUE
#> samtools not found, will use Rsamtools package instead
#> Running step: barcode_demultiplex
#> 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/RtmpgpEV0i/file25bf34fc587f/bc_allow.tsv
#> Number of known barcodes: 143
#> Processing file: /tmp/RtmpgpEV0i/file25bf34fc587f/fastq/sample1.fq.gz
#> Searching for barcodes...
#> Processing file: /tmp/RtmpgpEV0i/file25bf34fc587f/fastq/sample2.fq.gz
#> Searching for barcodes...
#> Processing file: /tmp/RtmpgpEV0i/file25bf34fc587f/fastq/sample3.fq.gz
#> Searching for barcodes...
#> Number of reads processed: 393
#> Number of reads where at least one barcode was found: 368
#> Number of reads with exactly one barcode match: 364
#> Number of chimera reads: 1
#> All done!
#> 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/RtmpgpEV0i/file25bf34fc587f/bc_allow.tsv
#> Number of known barcodes: 143
#> Processing file: /tmp/RtmpgpEV0i/file25bf34fc587f/fastq/sample1.fq.gz
#> Searching for barcodes...
#> Number of reads processed: 100
#> Number of reads where at least one barcode was found: 92
#> Number of reads with exactly one barcode match: 91
#> Number of chimera reads: 1
#> All done!
#> 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/RtmpgpEV0i/file25bf34fc587f/bc_allow.tsv
#> Number of known barcodes: 143
#> Processing file: /tmp/RtmpgpEV0i/file25bf34fc587f/fastq/sample2.fq.gz
#> Searching for barcodes...
#> Number of reads processed: 100
#> Number of reads where at least one barcode was found: 95
#> Number of reads with exactly one barcode match: 94
#> Number of chimera reads: 0
#> All done!
#> 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/RtmpgpEV0i/file25bf34fc587f/bc_allow.tsv
#> Number of known barcodes: 143
#> Processing file: /tmp/RtmpgpEV0i/file25bf34fc587f/fastq/sample3.fq.gz
#> Searching for barcodes...
#> Number of reads processed: 193
#> Number of reads where at least one barcode was found: 181
#> Number of reads with exactly one barcode match: 179
#> Number of chimera reads: 0
#> All done!
plot_demultiplex(pipeline)
#> $reads_count_plot
#>
#> $knee_plot
#> `geom_smooth()` using formula = 'y ~ x'
#>
#> $flank_editdistance_plot
#>
#> $barcode_editdistance_plot
#>
#> $cutadapt_plot
#>