ofst_merge: Merge multiple ofst file

ofst_mergeR Documentation

Merge multiple ofst file

Description

Collapses and sums the score column of each ofst file It is required that each file is of same ofst type. That is if one file has cigar information, all must have it.

Usage

ofst_merge(
  file_paths,
  lib_names = sub(pattern = "\\.ofst$", replacement = "", basename(file_paths)),
  keep_all_scores = TRUE,
  keepCigar = TRUE,
  sort = TRUE,
  max_splits = 20
)

Arguments

file_paths

Full path to .ofst files wanted to merge

lib_names

character, the name to give the resulting score columns. Default: sub(pattern = "\.ofst$", replacement = "", basename(file_paths))

keep_all_scores

logical, default TRUE, keep all library scores in the merged file. These score columns are named the libraries full name from bamVarName(df).

keepCigar

logical, default TRUE. If CIGAR is defined, keep column. Setting to FALSE compresses the file much more usually.

sort

logical, default TRUE. Sort the ranges. Will make the file smaller and faster to load, but some additional merging time is added.

max_splits

integer, default 20. If number of rows to merge > 2^31, how many times can you allow split merging to try to "rescue" the merging process?

Value

a data.table of merged result, it is merged on all columns except "score". The returned file will contain the scores of each file + the aggregate sum score.


Roleren/ORFik documentation built on Dec. 18, 2024, 11:39 p.m.