ClonalStats¶
Visualize the clonal information.
Using scplotter
to visualize the clonal
information.
Input¶
screpfile
: ThescRepertoire
object in RDS/qs format
Output¶
outdir
: Default:{{in.screpfile | stem}}.clonalstats
.
The output directory containing the plots
Environment Variables¶
mutaters
(type=json;order=-9
): Default:{}
.
The mutaters passed todplyr::mutate()
to add new variables.
When the object loaded formin.screpfile
is a list, the mutaters will be applied to each element.
The keys are the names of the new variables, and the values are the expressions.
When it is aSeurat
object, typically an output ofscRepertoire::combineExpression()
, the mutaters will be applied to themeta.data
.viz_type
(choice
): The type of visualization to generate.volume
: The volume of the clones usingClonalVolumePlot
abundance
: The abundance of the clones usingClonalAbundancePlot
length
: The length of the CDR3 sequences usingClonalLengthPlot
residency
: The residency of the clones usingClonalResidencyPlot
dynamics
: The dynamics of the clones usingClonalDynamicsPlot
composition
: The composition of the clones usingClonalCompositionPlot
overlap
: The overlap of the clones usingClonalOverlapPlot
diversity
: The diversity of the clones usingClonalDiversityPlot
geneusage
: The gene usage of the clones usingClonalGeneUsagePlot
positional
: The positional information of the clones usingClonalPositionalPlot
kmer
: The kmer information of the clones usingClonalKmerPlot
rarefaction
: The rarefaction curve of the clones usingClonalRarefactionPlot
subset
: An expression to subset the data before plotting.
Similar tomutaters
, it will be applied to each element bydplyr::filter()
if the object loaded formin.screpfile
is a list; otherwise, it will be applied tosubset(sobj, subset = <expr>)
if the object is aSeurat
object.devpars
(ns
): The parameters for the plotting device.width
(type=int
): The width of the deviceheight
(type=int
): The height of the deviceres
(type=int
): Default:100
.
The resolution of the device
more_formats
(list
): Default:[]
.
The extra formats to save the plots in, other than PNG.save_code
(flag
): Default:False
.
Whether to save the code used to generate the plots Note that the data directly used to generate the plots will also be saved in anrda
file.
Be careful if the data is large as it may take a lot of disk space.descr
: The description of the plot, used to show in the report.<more>
: The arguments for the plot function See the documentation of the corresponding plot function for the detailscases
(type=json
): Default:{'Clonal Volume': Diot({'viz_type': 'volume'}), 'Clonal Abundance': Diot({'viz_type': 'abundance'}), 'CDR3 Length': Diot({'viz_type': 'length'}), 'Clonal Diversity': Diot({'viz_type': 'diversity'})}
.
The cases to generate the plots if we have multiple cases.
The keys are the names of the cases, and the values are the arguments for the plot function.
The arguments inenvs
will be used if not specified incases
, except formutaters
.
Sections can be specified as the prefix of the case name, separated by::
.
For example, if you have a case namedClonal Volume::Case1
, the plot will be put in the sectionClonal Volume
. By default, when there are multiple cases for the same 'viz_type', the name of the 'viz_type' will be used as the default section name (for example, when 'viz_type' is 'volume', the section name will be 'Clonal Volume').
When there is only a single case, the section name will default to 'DEFAULT', which will not be shown in the report.