summariseCSR | R Documentation |
The function summarise the CSR details from getSummaryFromBatch
.
summariseCSR(
tree_stats,
cloneID_column = "CloneID",
dist_column = "dist",
summarise_variables
)
tree_stats |
data.frame, output of |
cloneID_column |
Character, column name in |
dist_column |
Character, column name in |
summarise_variables |
Character vector, names of columns in |
A data.frame with each row corresponding to one specific CSR switch (i.e. distinct combination of start- and end-points of the switch) in different subset of the data defined by the summarise_variables
column(s). The following summaries were sought and stored in separate columns:
Numeric, total number of switches involving the two named isotypes in the dataset subset in question.
Numeric, mean distance-from-germline of CSR events involving the two named isotypes.
Numeric, total number of clonotypes in the dataset subset (should be the same across all rows for the same subset of data).
Numeric, between 0 and 1, the proportion of clones with the named CSR switch observed.
## Not run:
# we provide doBatchCloneAnalysis results for data from the
# two individuals included here in this vignette
cv233 <- system.file( "extdata/CV233_batchAnalysis.rds", package = "BrepPhylo")
cv325 <- system.file( "extdata/CV325_batchAnalysis.rds", package = "BrepPhylo")
# the getSummaryFromBatch function flattens the output to two
# elements: a table containing distance-from-germline (demonstrated
# above) and another table of all CSR events observed in lineages
cv233 <- getSummaryFromBatch( cv233 )
cv233 <- cv233$csr_events
cv325 <- getSummaryFromBatch( cv325 )
cv325 <- cv325$csr_events
# just add an extra column with PatientID
cv233$PatientID <- "CV233"
cv325$PatientID <- "CV325"
# we can combine the two tables
csr_details <- rbind( cv233, cv325 )
csr_summary <- summariseCSR( csr_details,
dist_column = "distFromGermline",
cloneID_column = "CloneID",
summarise_variables = "PatientID")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.