iss_source {ISAnalytics} | 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()
,
comparison_matrix()
,
compute_abundance()
,
cumulative_count_union()
,
cumulative_is()
,
is_sharing()
,
purity_filter()
,
sample_statistics()
,
separate_quant_matrices()
,
threshold_filter()
,
top_integrations()
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" )