Title: | Generate QC Reports For Alevin Output |
---|---|
Description: | Generate QC reports summarizing the output from an alevin, alevin-fry, or simpleaf run. Reports can be generated as html or pdf files, or as shiny applications. |
Authors: | Charlotte Soneson [aut, cre] , Avi Srivastava [aut], Rob Patro [aut], Dongze He [aut] |
Maintainer: | Charlotte Soneson <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.23.1 |
Built: | 2024-12-22 03:34:28 UTC |
Source: | https://github.com/bioc/alevinQC |
Check that all required input files are available for alevin-fry
checkAlevinFryInputFiles(mapDir, permitDir, quantDir)
checkAlevinFryInputFiles(mapDir, permitDir, quantDir)
mapDir |
Path to the directory containing the map.rad file |
permitDir |
Path to the output directory of the alevin-fry generate-permit-list command. |
quantDir |
Path to the output of the alevin-fry quant command. |
Returns nothing, raises an error if any of the required files are missing.
Charlotte Soneson
checkAlevinFryInputFiles( mapDir = system.file("extdata/alevinfry_example_v0.5.0/map", package = "alevinQC"), permitDir = system.file("extdata/alevinfry_example_v0.5.0/permit", package = "alevinQC"), quantDir = system.file("extdata/alevinfry_example_v0.5.0/quant", package = "alevinQC"))
checkAlevinFryInputFiles( mapDir = system.file("extdata/alevinfry_example_v0.5.0/map", package = "alevinQC"), permitDir = system.file("extdata/alevinfry_example_v0.5.0/permit", package = "alevinQC"), quantDir = system.file("extdata/alevinfry_example_v0.5.0/quant", package = "alevinQC"))
Check that all required input files are available
checkAlevinInputFiles(baseDir)
checkAlevinInputFiles(baseDir)
baseDir |
Path to the output directory from the alevin run (should be
the directory containing the |
Returns nothing, raises an error if any of the required files are missing.
Charlotte Soneson
checkAlevinInputFiles(system.file("extdata/alevin_example_v0.14", package = "alevinQC"))
checkAlevinInputFiles(system.file("extdata/alevin_example_v0.14", package = "alevinQC"))
Plot the original frequency of each cell barcode in the original whitelist against the frequency after collapsing similar cell barcodes.
plotAlevinBarcodeCollapse( cbTable, firstSelColName = "inFirstWhiteList", countCol = "collapsedFreq" )
plotAlevinBarcodeCollapse( cbTable, firstSelColName = "inFirstWhiteList", countCol = "collapsedFreq" )
cbTable |
|
firstSelColName |
Character scalar indicating the name of the logical
column in |
countCol |
Character scalar indicating the name of the column in
|
A ggplot object
Charlotte Soneson
alevin <- readAlevinQC(system.file("extdata/alevin_example_v0.14", package = "alevinQC")) plotAlevinBarcodeCollapse(alevin$cbTable)
alevin <- readAlevinQC(system.file("extdata/alevin_example_v0.14", package = "alevinQC")) plotAlevinBarcodeCollapse(alevin$cbTable)
Histogram of selected summary statistic
plotAlevinHistogram( cbTable, plotVar = "dedupRate", axisLabel = plotVar, colName = "inFinalWhiteList", cbName = "final whitelist", firstSelColName = "inFirstWhiteList" )
plotAlevinHistogram( cbTable, plotVar = "dedupRate", axisLabel = plotVar, colName = "inFinalWhiteList", cbName = "final whitelist", firstSelColName = "inFirstWhiteList" )
cbTable |
|
plotVar |
Character scalar giving the name of a numeric column of
|
axisLabel |
Character scalar giving the label of the selected statistic (will be displayed as the axis label in the plot). |
colName |
Character scalar giving the name of a logical column of
|
cbName |
Character scalar giving the name of the set of barcodes
defined by |
firstSelColName |
Character scalar indicating the name of the logical
column in |
A ggplot object
Charlotte Soneson
alevin <- readAlevinQC(system.file("extdata/alevin_example_v0.14", package = "alevinQC")) plotAlevinHistogram(alevin$cbTable, plotVar = "dedupRate", axisLabel = "Deduplication rate", colName = "inFinalWhiteList", cbName = "final whitelist")
alevin <- readAlevinQC(system.file("extdata/alevin_example_v0.14", package = "alevinQC")) plotAlevinHistogram(alevin$cbTable, plotVar = "dedupRate", axisLabel = "Deduplication rate", colName = "inFinalWhiteList", cbName = "final whitelist")
Plot the number of detected genes per cell in decreasing order. Only cells contained in the original whitelist are considered.
plotAlevinKneeNbrGenes(cbTable, firstSelColName = "inFirstWhiteList")
plotAlevinKneeNbrGenes(cbTable, firstSelColName = "inFirstWhiteList")
cbTable |
|
firstSelColName |
Character scalar indicating the name of the logical
column in |
A ggplot object
Charlotte Soneson
alevin <- readAlevinQC(system.file("extdata/alevin_example_v0.14", package = "alevinQC")) plotAlevinKneeNbrGenes(alevin$cbTable)
alevin <- readAlevinQC(system.file("extdata/alevin_example_v0.14", package = "alevinQC")) plotAlevinKneeNbrGenes(alevin$cbTable)
Plot the raw cell barcode frequencies in decreasing order, and indicate a predetermined breakpoint (indicating barcodes included in the original whitelist) using color as well as a label.
plotAlevinKneeRaw(cbTable, firstSelColName = "inFirstWhiteList")
plotAlevinKneeRaw(cbTable, firstSelColName = "inFirstWhiteList")
cbTable |
|
firstSelColName |
Character scalar indicating the name of the logical
column in |
A ggplot object
Charlotte Soneson
alevin <- readAlevinQC(system.file("extdata/alevin_example_v0.14", package = "alevinQC")) plotAlevinKneeRaw(alevin$cbTable)
alevin <- readAlevinQC(system.file("extdata/alevin_example_v0.14", package = "alevinQC")) plotAlevinKneeRaw(alevin$cbTable)
Panel of plots with quantification summary statistics
plotAlevinQuant( cbTable, colName = "inFinalWhiteList", cbName = "final whitelist", firstSelColName = "inFirstWhiteList" )
plotAlevinQuant( cbTable, colName = "inFinalWhiteList", cbName = "final whitelist", firstSelColName = "inFirstWhiteList" )
cbTable |
|
colName |
Character scalar giving the name of a logical column of
|
cbName |
Character scalar giving the name of the set of barcodes
defined by |
firstSelColName |
Character scalar indicating the name of the logical
column in |
A ggplot object
Charlotte Soneson
alevin <- readAlevinQC(system.file("extdata/alevin_example_v0.14", package = "alevinQC")) plotAlevinQuant(alevin$cbTable, colName = "inFinalWhiteList", cbName = "final whitelist")
alevin <- readAlevinQC(system.file("extdata/alevin_example_v0.14", package = "alevinQC")) plotAlevinQuant(alevin$cbTable, colName = "inFinalWhiteList", cbName = "final whitelist")
Pairs plot with quantification summary statistics
plotAlevinQuantPairs( cbTable, colName = "inFinalWhiteList", firstSelColName = "inFirstWhiteList" )
plotAlevinQuantPairs( cbTable, colName = "inFinalWhiteList", firstSelColName = "inFirstWhiteList" )
cbTable |
|
colName |
Character scalar giving the name of a logical column of
|
firstSelColName |
Character scalar indicating the name of the logical
column in |
A ggmatrix object
Charlotte Soneson
alevin <- readAlevinQC(system.file("extdata/alevin_example_v0.14", package = "alevinQC")) plotAlevinQuantPairs(alevin$cbTable, colName = "inFinalWhiteList")
alevin <- readAlevinQC(system.file("extdata/alevin_example_v0.14", package = "alevinQC")) plotAlevinQuantPairs(alevin$cbTable, colName = "inFinalWhiteList")
Generate a report summarizing the main aspects of an alevin/alevin-fry quantification run. The report generation assumes that alevin/alevin-fry has been run with the –dumpFeatures flag to generate the necessary output files.
alevinQCReport( baseDir, sampleId, outputFile, outputDir = "./", outputFormat = NULL, showCode = FALSE, forceOverwrite = FALSE, knitrProgress = FALSE, quiet = FALSE, ignorePandoc = FALSE, customCBList = list(), ... ) simpleafQCReport( simpleafQuantDir, sampleId, outputFile, outputDir = "./", outputFormat = NULL, showCode = FALSE, forceOverwrite = FALSE, knitrProgress = FALSE, quiet = FALSE, ignorePandoc = FALSE, customCBList = list(), ... ) alevinFryQCReport( mapDir, permitDir, quantDir, sampleId, outputFile, outputDir = "./", outputFormat = NULL, showCode = FALSE, forceOverwrite = FALSE, knitrProgress = FALSE, quiet = FALSE, ignorePandoc = FALSE, customCBList = list(), ... )
alevinQCReport( baseDir, sampleId, outputFile, outputDir = "./", outputFormat = NULL, showCode = FALSE, forceOverwrite = FALSE, knitrProgress = FALSE, quiet = FALSE, ignorePandoc = FALSE, customCBList = list(), ... ) simpleafQCReport( simpleafQuantDir, sampleId, outputFile, outputDir = "./", outputFormat = NULL, showCode = FALSE, forceOverwrite = FALSE, knitrProgress = FALSE, quiet = FALSE, ignorePandoc = FALSE, customCBList = list(), ... ) alevinFryQCReport( mapDir, permitDir, quantDir, sampleId, outputFile, outputDir = "./", outputFormat = NULL, showCode = FALSE, forceOverwrite = FALSE, knitrProgress = FALSE, quiet = FALSE, ignorePandoc = FALSE, customCBList = list(), ... )
baseDir |
(Only used for alevin output) Path to the output directory
from the alevin run (should be the directory containing the
|
sampleId |
Sample ID, will be used to set the title for the report. |
outputFile |
File name of the output report. The file name extension
must be either |
outputDir |
Path to the output directory where the report will be generated. |
outputFormat |
The format of the output report. Either
|
showCode |
Logical, whether to display the R code in the report. |
forceOverwrite |
Logical, whether to force overwrite an existing report with the same name in the output directory. |
knitrProgress |
Logical, whether to display the progress of |
quiet |
Logical, whether to show progress messages. |
ignorePandoc |
Logical, determines what to do if |
customCBList |
Named list with custom set(s) of barcodes to provide summary statistics/plots for, in addition to the whitelists generated by alevin. |
... |
Other arguments that will be passed to |
simpleafQuantDir |
(Only used for simpleaf output) Path to the output
directory from the simpleaf run (should be the directory containing the
|
mapDir |
(Only used for alevin-fry output) Path to the output directory
from the salmon alevin run (should be the directory containing the
|
permitDir |
(Only used for alevin-fry output) Path to the output
directory from the permit list generation step (should be
the directory containing the |
quantDir |
(Only used for alevin-fry output) Path to the output
directory from the alevin-fry quantification step (should be
the directory containing the |
When the function is called, a .Rmd template file will be copied
into the output directory, and rmarkdown::render
will be called to
generate the final report. If there is already a .Rmd file with the same
name in the output directory, the function will raise an error and stop,
to avoid overwriting the existing file. The reason for this behaviour is
that the copied template in the output directory will be deleted once
the report is generated.
Generates a summary report in the outputDir
directory, and
returns (invisibly) the name of the generated report.
Charlotte Soneson
alevinQCReport( baseDir = system.file("extdata/alevin_example_v0.14", package = "alevinQC"), sampleId = "example", outputFile = "alevinReport.html", outputDir = tempdir(), forceOverwrite = TRUE) alevinFryQCReport( mapDir = system.file("extdata/alevinfry_example_v0.5.0/map", package = "alevinQC"), permitDir = system.file("extdata/alevinfry_example_v0.5.0/permit", package = "alevinQC"), quantDir = system.file("extdata/alevinfry_example_v0.5.0/quant", package = "alevinQC"), sampleId = "example", outputFile = "alevinFryReport.html", outputDir = tempdir(), forceOverwrite = TRUE) simpleafQCReport( simpleafQuantDir = system.file("extdata/alevinfry_example_piscem_v0.6.0", package = "alevinQC"), sampleId = "example", outputFile = "simpleafReport.html", outputDir = tempdir(), forceOverwrite = TRUE)
alevinQCReport( baseDir = system.file("extdata/alevin_example_v0.14", package = "alevinQC"), sampleId = "example", outputFile = "alevinReport.html", outputDir = tempdir(), forceOverwrite = TRUE) alevinFryQCReport( mapDir = system.file("extdata/alevinfry_example_v0.5.0/map", package = "alevinQC"), permitDir = system.file("extdata/alevinfry_example_v0.5.0/permit", package = "alevinQC"), quantDir = system.file("extdata/alevinfry_example_v0.5.0/quant", package = "alevinQC"), sampleId = "example", outputFile = "alevinFryReport.html", outputDir = tempdir(), forceOverwrite = TRUE) simpleafQCReport( simpleafQuantDir = system.file("extdata/alevinfry_example_piscem_v0.6.0", package = "alevinQC"), sampleId = "example", outputFile = "simpleafReport.html", outputDir = tempdir(), forceOverwrite = TRUE)
Generate a shiny app summarizing the main aspects of an alevin/alevin-fry quantification run. The app generation assumes that alevin has been run with the –dumpFeatures flag to generate the necessary output files.
alevinQCShiny(baseDir, sampleId, customCBList = list(), addStopButton = TRUE) alevinFryQCShiny(mapDir, permitDir, quantDir, sampleId, addStopButton = TRUE) simpleafQCShiny(simpleafQuantDir, sampleId, addStopButton = TRUE)
alevinQCShiny(baseDir, sampleId, customCBList = list(), addStopButton = TRUE) alevinFryQCShiny(mapDir, permitDir, quantDir, sampleId, addStopButton = TRUE) simpleafQCShiny(simpleafQuantDir, sampleId, addStopButton = TRUE)
baseDir |
(Only used for alevin output) Path to the output directory
from the alevin run (should be the directory containing the
|
sampleId |
Sample ID, will be used set the title for the app. |
customCBList |
Named list with custom set(s) of barcodes to provide summary statistics/plots for, in addition to the whitelists generated by alevin. |
addStopButton |
Logical scalar. If |
mapDir |
(Only used for alevin-fry output) Path to the output directory
from the salmon alevin run (should be the directory containing the
|
permitDir |
(Only used for alevin-fry output) Path to the output
directory from the permit list generation step (should be
the directory containing the |
quantDir |
(Only used for alevin-fry output) Path to the output
directory from the alevin-fry quantification step (should be
the directory containing the |
simpleafQuantDir |
(Only used for simpleaf output) Path to the output
directory from the simpleaf run (should be the directory containing the
|
A shiny app.
Charlotte Soneson
app <- alevinQCShiny( baseDir = system.file("extdata/alevin_example_v0.14", package = "alevinQC"), sampleId = "example") if (interactive()) { shiny::runApp(app) } app <- alevinFryQCShiny( mapDir = system.file("extdata/alevinfry_example_v0.5.0/map", package = "alevinQC"), permitDir = system.file("extdata/alevinfry_example_v0.5.0/permit", package = "alevinQC"), quantDir = system.file("extdata/alevinfry_example_v0.5.0/quant", package = "alevinQC"), sampleId = "example") if (interactive()) { shiny::runApp(app) } app <- simpleafQCShiny( simpleafQuantDir = system.file("extdata/alevinfry_example_piscem_v0.6.0", package = "alevinQC"), sampleId = "example") if (interactive()) { shiny::runApp(app) }
app <- alevinQCShiny( baseDir = system.file("extdata/alevin_example_v0.14", package = "alevinQC"), sampleId = "example") if (interactive()) { shiny::runApp(app) } app <- alevinFryQCShiny( mapDir = system.file("extdata/alevinfry_example_v0.5.0/map", package = "alevinQC"), permitDir = system.file("extdata/alevinfry_example_v0.5.0/permit", package = "alevinQC"), quantDir = system.file("extdata/alevinfry_example_v0.5.0/quant", package = "alevinQC"), sampleId = "example") if (interactive()) { shiny::runApp(app) } app <- simpleafQCShiny( simpleafQuantDir = system.file("extdata/alevinfry_example_piscem_v0.6.0", package = "alevinQC"), sampleId = "example") if (interactive()) { shiny::runApp(app) }
Read all alevin-fry output files required to generate the summary report or shiny app.
readAlevinFryQC(mapDir, permitDir, quantDir)
readAlevinFryQC(mapDir, permitDir, quantDir)
mapDir |
Path to the output directory from the |
permitDir |
Path to the output directory from the
|
quantDir |
Path to the output directory from the
|
A list collecting all necessary information for generating the summary report/shiny app.
Charlotte Soneson
alevinfry <- readAlevinFryQC( mapDir = system.file("extdata/alevinfry_example_v0.5.0/map", package = "alevinQC"), permitDir = system.file("extdata/alevinfry_example_v0.5.0/permit", package = "alevinQC"), quantDir = system.file("extdata/alevinfry_example_v0.5.0/quant", package = "alevinQC"))
alevinfry <- readAlevinFryQC( mapDir = system.file("extdata/alevinfry_example_v0.5.0/map", package = "alevinQC"), permitDir = system.file("extdata/alevinfry_example_v0.5.0/permit", package = "alevinQC"), quantDir = system.file("extdata/alevinfry_example_v0.5.0/quant", package = "alevinQC"))
Read all alevin output files required to generate the summary report or shiny app.
readAlevinQC(baseDir, customCBList = list())
readAlevinQC(baseDir, customCBList = list())
baseDir |
Path to the output directory from the alevin run (should be
the directory containing the |
customCBList |
Named list with custom set(s) of barcodes to provide summary statistics/plots for, in addition to the whitelists generated by alevin. |
A list collecting all necessary information for generating the summary report/shiny app.
Charlotte Soneson
alevin <- readAlevinQC(system.file("extdata/alevin_example_v0.14", package = "alevinQC"))
alevin <- readAlevinQC(system.file("extdata/alevin_example_v0.14", package = "alevinQC"))