remove_collisions {ISAnalytics} | R Documentation

## Identifies and removes collisions based on the sequence count matrix.

### Description

A collision is an integration (aka a unique combination of chr, integration_locus and strand) which is observed in more than one independent sample (a unique pair of ProjectID and SubjectID). The function tries to decide to which subject an integration should be assigned and if no decision can be taken, the integration is completely removed from the data frame.

### Usage

    remove_collisions(
      x,
      association_file,
      date_col = "SequencingDate",
      reads_ratio = 10,
      seq_count_col = "seqCount",
      max_rows_reports = 50,
      save_widget_path = NULL
    )

### Arguments

`x` | A named list of matrices (names must be quantification types), a single integration matrix representing the sequence count matrix of interest or a multi-quantification matrix obtained via comparison_matrix
`association_file` | The association file imported via `import_association_file`
`date_col` | The date column that should be considered for the analysis. Must be one value in `date_columns_coll()`
`reads_ratio` | A single numeric value that represents the ratio that has to be considered when deciding between seqCount value.
`seq_count_col` | For support of multi-quantification matrix - the name of the sequence count values column
`max_rows_reports` | A numeric value, represents the maximum number of rows of the reports data frames that can be printed on console if the option `ISAnalytics.verbose` is active. If the data frames are too large they won't be printed on console - we recommend using widgets for detailed and more accessible info.
`save_widget_path` | Either NULL or a path where the html report file should be saved. If NULL the report is visualized via browser ONLY (not saved on disk).

### Details

If you don't want the function to show details and messages do: `options(ISAnalitics.verbose = FALSE)`. To restore to the original value: `options(ISAnalitics.verbose = TRUE)`. For more details on how to use collision removal functionality: `vignette("Collision removal functionality", package = "ISAnalytics")`

### Value

A list of tibbles with removed collisions

### See Also

`date_columns_coll`

Other Collision removal: `realign_after_collisions()`

### Examples

    op <- options("ISAnalytics.widgets" = FALSE)
    path <- system.file("extdata", "ex_association_file.tsv",
        package = "ISAnalytics"
    )
    root_pth <- system.file("extdata", "fs.zip", package = "ISAnalytics")
    root <- unzip_file_system(root_pth, "fs")
    association_file <- import_association_file(path, root,
        dates_format = "dmy"
    )
    matrices <- import_parallel_Vispa2Matrices_auto(
        association_file = association_file, root = NULL,
        quantification_type = c("fragmentEstimate", "seqCount"),
        matrix_type = "annotated", workers = 2,
        patterns = NULL, matching_opt = "ANY",
        multi_quant_matrix = FALSE
    )
    matrices <- remove_collisions(matrices, association_file)
    options(op)

[Package ISAnalytics version 1.2.1 Index]