Performs aggregation on metadata contained in the association file.
Source:R/aggregate-functions.R
aggregate_metadata.Rd
Groups metadata by the specified grouping keys and returns a
summary of info for each group. For more details on how to use this function:
vignette("workflow_start", package = "ISAnalytics")
Usage
aggregate_metadata(
association_file,
grouping_keys = c("SubjectID", "CellMarker", "Tissue", "TimePoint"),
aggregating_functions = default_meta_agg(),
import_stats = lifecycle::deprecated()
)
Arguments
- association_file
The imported association file (via import_association_file)
- grouping_keys
A character vector of column names to form a grouping operation
- aggregating_functions
A data frame containing specifications of the functions to be applied to columns in the association file during aggregation. It defaults to default_meta_agg. The structure of this data frame should be maintained if the user wishes to change the defaults.
- import_stats
The import of VISPA2 stats has been moved to its dedicated function, see import_Vispa2_stats.
See also
Other Data cleaning and pre-processing:
aggregate_values_by_key()
,
compute_near_integrations()
,
default_meta_agg()
,
outlier_filter()
,
outliers_by_pool_fragments()
,
purity_filter()
,
realign_after_collisions()
,
remove_collisions()
,
threshold_filter()
Examples
data("association_file", package = "ISAnalytics")
aggreg_meta <- aggregate_metadata(
association_file = association_file
)
head(aggreg_meta)
#> # A tibble: 6 × 19
#> SubjectID CellMarker Tissue TimePoint FusionPrimerPCRDate_…¹ LinearPCRDate_min
#> <chr> <chr> <chr> <chr> <date> <date>
#> 1 PT001 MNC BM 0030 2016-11-03 Inf
#> 2 PT001 MNC BM 0060 2016-11-03 Inf
#> 3 PT001 MNC BM 0090 2016-11-03 Inf
#> 4 PT001 MNC BM 0180 2016-11-03 Inf
#> 5 PT001 MNC BM 0360 2017-04-21 Inf
#> 6 PT001 MNC PB 0030 2016-11-03 Inf
#> # ℹ abbreviated name: ¹FusionPrimerPCRDate_min
#> # ℹ 13 more variables: VCN_avg <dbl>, `ng DNA corrected_avg` <dbl>,
#> # Kapa_avg <dbl>, `ng DNA corrected_sum` <dbl>, ulForPool_sum <dbl>,
#> # BARCODE_MUX_sum <int>, TRIMMING_FINAL_LTRLC_sum <int>, LV_MAPPED_sum <int>,
#> # BWA_MAPPED_OVERALL_sum <int>, ISS_MAPPED_OVERALL_sum <int>,
#> # PCRMethod <chr>, NGSTechnology <chr>, DNAnumber <chr>