ClonalStats

Visualize the clonal information.

Using scplotter to visualize the clonal information.

Input

  • screpfile: The scRepertoire 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 to dplyr::mutate() to add new variables.
    When the object loaded form in.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 a Seurat object, typically an output of scRepertoire::combineExpression(), the mutaters will be applied to the meta.data.
  • viz_type (choice): The type of visualization to generate.
  • subset: An expression to subset the data before plotting.
    Similar to mutaters, it will be applied to each element by dplyr::filter() if the object loaded form in.screpfile is a list; otherwise, it will be applied to subset(sobj, subset = <expr>) if the object is a Seurat object.
  • devpars (ns): The parameters for the plotting device.
    • width (type=int): The width of the device
    • height (type=int): The height of the device
    • res (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 an rda 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 details
  • cases (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 in envs will be used if not specified in cases, except for mutaters.
    Sections can be specified as the prefix of the case name, separated by ::.
    For example, if you have a case named Clonal Volume::Case1, the plot will be put in the section Clonal 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.