View source: R/analysis-functions.R
iss_source | R Documentation |
The function computes the sharing between a reference group of interest for each time point and a selection of groups of interest. In this way it is possible to observe the percentage of shared integration sites between reference and each group and identify in which time point a certain IS was observed for the first time.
iss_source(
reference,
selection,
ref_group_key = c("SubjectID", "CellMarker", "Tissue", "TimePoint"),
selection_group_key = c("SubjectID", "CellMarker", "Tissue", "TimePoint"),
timepoint_column = "TimePoint",
by_subject = TRUE,
subject_column = "SubjectID"
)
reference |
A data frame containing one or more groups of reference.
Groups are identified by |
selection |
A data frame containing one or more groups of interest
to compare.
Groups are identified by |
ref_group_key |
Character vector of column names that identify a
unique group in the |
selection_group_key |
Character vector of column names that identify a
unique group in the |
timepoint_column |
Name of the column holding time point info? |
by_subject |
Should calculations be performed for each subject separately? |
subject_column |
Name of the column holding subjects information.
Relevant only if |
A list of data frames or a data frame
Other Analysis functions:
CIS_grubbs()
,
HSC_population_size_estimate()
,
compute_abundance()
,
cumulative_is()
,
gene_frequency_fisher()
,
is_sharing()
,
sample_statistics()
,
top_integrations()
,
top_targeted_genes()
data("integration_matrices", package = "ISAnalytics")
data("association_file", package = "ISAnalytics")
aggreg <- aggregate_values_by_key(
x = integration_matrices,
association_file = association_file,
value_cols = c("seqCount", "fragmentEstimate")
)
df1 <- aggreg |>
dplyr::filter(.data$Tissue == "BM")
df2 <- aggreg |>
dplyr::filter(.data$Tissue == "PB")
source <- iss_source(df1, df2)
source
ggplot2::ggplot(source$PT001, ggplot2::aes(
x = as.factor(g2_TimePoint),
y = sharing_perc, fill = g1
)) +
ggplot2::geom_col() +
ggplot2::labs(
x = "Time point", y = "Shared IS % with MNC BM",
title = "Source of is MNC BM vs MNC PB"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.