binarize_bam {segmenter} | R Documentation

## Binarize the bam files

### Description

Transform the aligned reads into a binary format.

### Usage

    binarize_bam(
      inputdir,
      cellmarkfiletable,
      chromsizefile,
      binsize = 200,
      outputdir
    )

### Arguments

`inputdir` | A string. The dirctory of the bam files.
`cellmarkfiletable` | A string. The path to the input files table. Only
`chromsizefile` | A string. The path to the chromosomes sizes file.
`binsize` | An integer. The number in bp used to generate binarized files.
`outputdir` | A string. The path to a directory where output will be written.

### Value

NULL. Write files to the outputdir

### See Also

Binarize binarize_bed

### Examples

    # locate input and output files
    inputdir <- system.file("extdata", package = "bamsignals")
    cellmarkfiletable <- system.file('extdata',
                                     'cell_mark_table.tsv',
                                     package = 'segmenter')
    chromsizefile <- system.file('extdata/CHROMSIZES',
                                 'hg18.txt',
                                  package = 'chromhmmData')
    outputdir <- tempdir()

    # run command
    binarize_bam(inputdir,
                 chromsizefile = chromsizefile,
                 cellmarkfiletable = cellmarkfiletable,
                 outputdir = outputdir)

    # show output files
    list.files(outputdir, pattern = '*_binary.txt')

[Package segmenter version 1.0.0 Index]