R/clonalProportion.R
clonalProportion.Rd
This function calculates the relative clonal space occupied by the clones. The grouping of these clones is based on the parameter clonalSplit, at default, clonalSplit will group the clones into bins of 1:10, 11:100, 101:1001, etc. To adjust the clones selected, change the numbers in the variable split. If a matrix output for the data is preferred, set exportTable = TRUE.
clonalProportion(
input.data,
clonalSplit = c(10, 100, 1000, 10000, 30000, 1e+05),
cloneCall = "strict",
chain = "both",
group.by = NULL,
order.by = NULL,
exportTable = FALSE,
palette = "inferno"
)
The product of combineTCR()
,
combineBCR()
, or combineExpression()
.
The cut points for the specific clones
How to call the clone - VDJC gene (gene), CDR3 nucleotide (nt), CDR3 amino acid (aa), VDJC gene + CDR3 nucleotide (strict) or a custom variable in the data
indicate if both or a specific chain should be used - e.g. "both", "TRA", "TRG", "IGH", "IGL"
The variable to use for grouping
A vector of specific plotting order or "alphanumeric" to plot groups in order
Exports a table of the data into the global. environment in addition to the visualization
Colors to use in visualization - input any hcl.pals
ggplot of the space occupied by the specific rank of clones
#Making combined contig data
combined <- combineTCR(contig_list,
samples = c("P17B", "P17L", "P18B", "P18L",
"P19B","P19L", "P20B", "P20L"))
clonalProportion(combined, cloneCall = "gene")