compute_near_integrations {ISAnalytics} | R Documentation |
This function scans the input integration matrix to detect eventual
integration sites that are too "near" to each other and merges them
into single integration sites adjusting their values if needed.
compute_near_integrations( x, threshold = 4, keep_criteria = "max_value", strand_specific = TRUE, value_columns = c("seqCount", "fragmentEstimate"), max_value_column = "seqCount", map_as_file = TRUE, file_path = default_report_path() )
x |
An integration matrix |
threshold |
A single integer that represents an absolute
number of bases for which two integrations are considered distinct.
If the threshold is set to 3 it means, provided fields |
keep_criteria |
While scanning, which integration should be kept? The 2 possible choices for this parameter are:
|
strand_specific |
Should strand be considered? If yes,
for example these two integration sites
|
value_columns |
Character vector, contains the names of the numeric experimental columns |
max_value_column |
The column that has to be considered for searching the maximum value |
map_as_file |
Produce recalibration map as a .tsv file? |
file_path |
String representing the path were the file will be
saved. Can be either a folder or a file. Relevant only if |
The whole matrix is scanned with a sliding window mechanism:
for each row in the integration matrix an interval is calculated
based on the threshold
value, then a "look ahead" operation is
performed to detect subsequent rows which integration locuses fall
in the interval. If CompleteAmplificationID
s of the near integrations
are different only the locus value (and optionally
GeneName
and GeneStrand
if the matrix is annotated) is modified,
otherwise rows with the same id are aggregated and values are summed.
The function will also
produce a re-calibration map: this data frame contains the reference
of pre-recalibration values for chr
, strand
and integration_locus
and
the value to which that integration was changed to.
An integration matrix with same or less number of rows
We do recommend to use this function in combination with comparison_matrix to automatically perform re-calibration on all quantification matrices.
data("integration_matrices", package = "ISAnalytics") rec <- compute_near_integrations( x = integration_matrices, map_as_file = FALSE ) head(rec)