simpleLibs: Converted format of NGS libraries

Description Usage Arguments Details Value Examples

Description

Export as either .ofst, .bedo or .bedoc files.
Export files as .bedo files: It is a bed file with 2 score columns. Gives a massive speedup when cigar string and bam flags are not needed.
Export files as .bedoc files: If cigar is needed, gives you replicates and cigar, so a fast way to load a GAlignment object, other bam flags are lost. If type is bedoc addSizeColumn and method will be ignored.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
simpleLibs(
  df,
  out.dir = dirname(df$filepath[1]),
  addScoreColumn = TRUE,
  addSizeColumn = TRUE,
  must.overlap = NULL,
  method = "None",
  type = "ofst",
  reassign.when.saving = FALSE,
  envir = .GlobalEnv
)

Arguments

df

an ORFik experiment

out.dir

optional output directory, default: dirname(df$filepath[1]), if it is NULL, it will just reassign R objects to simplified libraries.

addScoreColumn

logical, default TRUE, if FALSE will not add replicate numbers as score column, see ORFik::convertToOneBasedRanges.

addSizeColumn

logical, default TRUE, if FALSE will not add size (width) as size column, see ORFik::convertToOneBasedRanges. Does not apply for .ofst or .bedoc.

must.overlap

default (NULL), else a GRanges / GRangesList object, so only reads that overlap (must.overlap) are kept. This is useful when you only need the reads over transcript annotation or subset etc.

method

character, default "None", the method to reduce ranges, for more info see convertToOneBasedRanges

type

a character of format, default "ofst". Alternatives: "ofst", "wig","bedo" or "bedoc". Which format you want. Will make a folder within out.dir with this name containing the files.

reassign.when.saving

logical, default FALSE. If TRUE, will reassign library to converted form after saving. Ignored when out.dir = NULL.

envir

which environment to save to, default .GlobalEnv

Details

See export.bedo and export.bedoc for information on file formats

Value

NULL (saves files to disc or R .GlobalEnv)

Examples

1
2
3
4
df <- ORFik.template.experiment()
#convertLibs(df)
# Keep only 5' ends of reads
#convertLibs(df, method = "5prime")

ORFik documentation built on March 27, 2021, 6 p.m.