View source: R/germlineDistances.R
getGermlineLikeness | R Documentation |
The function loops through each row in metadata_table
and select the subset of lineages from distFromGermline_summary
relevant to the given metadata combination,
and calculate the Germline Likeness metric for this given set of lineages.
getGermlineLikeness(
distFromGermline_summary,
metadata_table,
summarise_variables
)
distFromGermline_summary |
data.frame, output of |
metadata_table |
data.frame with meta data, 1 row per sample/donor as appropriate (see Example). |
summarise_variables |
Character vector, names of columns in |
A data.frame identical to metadata_table
with the additional column "GermlineLikeness" holding the Germline Likeness metric (numeric) of lineages matching the given combination of metadata attributes
## Not run:
# We have included in the package the pre-computed germline distances of
# sequences in the 'input' data frame, here use this as an example
distFromGermline <- system.file( "extdata/input_GermlineDistances.csv", package = "BrepPhylo")
distFromGermline <- read.csv(distFromGermline)
# set up a table containing metadata with which you want to
# obtain a summary of Germline Likeness
# here simply set up one column with PatientID
patient_details <- data.frame( PatientID = unique( distFromGermline[, c("PatientID") ] ) )
germline_likeness <- getGermlineLikeness(
germlineDistance_summary,
metadata_table = patient_details,
summarise_variables = "PatientID"
)
germline_likeness
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.