makeCNEDensity {CNEr} | R Documentation

## Make ‘Bed’, ‘bedGraph’ and ‘BigWig’ files

### Description

Make ‘Bed’, ‘bedGraph’, ‘BigWig’ files from `GRangePairs` for display in other Genome Browser.

### Usage

      makeCNEDensity(x, outputDir = ".",
                     genomeFirst = "first", genomeSecond = "second",
                     threshold = "50_50",
                     windowSizeFirst = 300L, windowSizeSecond = 300L)

### Arguments

`x` | `GRangePairs` object of CNEs.
`outputDir` | `character`(1): the output directory of ‘Bed’, ‘bedGraph’ and ‘BigWig’ files.
`genomeFirst,genomeSecond` | `character`(1): the genome name of the first and second species.
`threshold` | `character`(1): the threshold used to identify the CNEs in format of "50_50".
`windowSizeFirst,windowSizeSecond` | `integer`(1): the smoothing window size for generating the CNE density in kb.

### Details

The CNE density is defined as the percentage of regions covered by CNEs within the smoothing window.

### Value

The filenames of output ‘Bed’, ‘bedGraph’ and ‘BigWig’ files.

### Note

This function is mainly for internal use in Lenhard group.

### Author(s)

Ge Tan

### See Also

`readAncora`

### Examples

      ## Not run:
      dbName <- file.path(system.file("extdata", package="CNEr"),
                          "danRer10CNE.sqlite")
      qAssemblyFn <- file.path(system.file("extdata",
                                           package="BSgenome.Hsapiens.UCSC.hg38"),
                               "single_sequences.2bit")
      tAssemblyFn <- file.path(system.file("extdata",
                                 package="BSgenome.Drerio.UCSC.danRer10"),
                               "single_sequences.2bit")
      cneGRangePairs <- readCNERangesFromSQLite(dbName=dbName,
                                                tableName="danRer10_hg38_45_50",
                                                tAssemblyFn=tAssemblyFn,
                                                qAssemblyFn=qAssemblyFn)
      makeCNEDensity(cneGRangePairs[1:1000])

    ## End(Not run)

[Package CNEr version 1.22.0 Index]