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
)

Arguments

file_paths

Full path to .ofst files wanted to merge

lib_names

the name to give the resulting score columns

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.

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 April 25, 2024, 8:41 p.m.