mergeAllRDSFilesFromDirectory {RJMCMCNucleosomes} | R Documentation

## Merge nucleosome information from all RDS files present in a same directory. Beware that only nucleosome information from same chromosome should be merged together.

### Description

Merge nucleosome information, from all RDS files present in a same directory, into one object of `class` "rjmcmcNucleosomesMerge".

### Usage

    mergeAllRDSFilesFromDirectory(directory)

### Arguments

`directory` | a `character`, the name of the directory (relative or absolute path) containing RDS files. The RDS files must contain R object of `class` "rjmcmcNucleosomes" or "rjmcmcNucleosomesMerge".

### Value

a `list` of `class` "rjmcmcNucleosomesMerge" containing:

- k a `integer`, the number of nucleosomes.

- `mu` a `GRanges` containing the positions of the nucleosomes.

### Author(s)

Pascal Belleau, Astrid Deschenes

### Examples

    ## Use a directory present in the RJMCMC package
    directoryWithRDSFiles <- system.file("extdata",
    package = "RJMCMCNucleosomes")

    ## Merge nucleosomes info from RDS files present in directory
    ## It is assumed that all files present in the directory are nucleosomes
    ## result for the same chromosome
    result <- mergeAllRDSFilesFromDirectory(directoryWithRDSFiles)

    ## Print the number and the position of the nucleosomes
    result$k
    result$mu

    ## Class of the output object
    class(result)

[Package RJMCMCNucleosomes version 1.4.0 Index]