simpleLibs {ORFik} | R Documentation

## Converted format of NGS libraries

### 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

    simpleLibs(
      df,
      out.dir = dirname(df$filepath[1]),
      addScoreColumn = TRUE,
      addSizeColumn = TRUE,
      must.overlap = NULL,
      method = "None",
      type = "ofst"
    )

### 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.

### Details

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

### Value

NULL (saves files to disc or R .GlobalEnv)

### Examples

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

[Package ORFik version 1.8.6 Index]