addPseudoAlignment {RIPSeeker} | R Documentation

## Add a psuedoalignment as a placeholder for the chromosome (Internal function)

### Description

Check whether chromosome has at least one alignment to prevent abnormal behaviour of the subsequent functions. In case no alignment is found on an entire chromosome, add a pseudo-alignment as a placeholder for that chromosome.

### Usage

    addPseudoAlignment(alignGR)

### Arguments

`alignGR` | GRanges object containing the alignment information.

### Details

In case no alignment is found on an entire chromosome, add an alignment with start 1 and end 20 as a placeholder for the chromosome. This step is necessary to maintian the chromosome information.

### Value

`alignGR` | Original or augmented input GRanges object with pseudoreads, depending on whether there exists empty chromosome(s).

### Author(s)

Yue Li

### See Also

`combineAlignGals, readGAlignments, readGAlignmentPairs, import`

### Examples

    # Retrieve system files
    extdata.dir <- system.file("extdata", package="RIPSeeker")

    bamFiles <- list.files(extdata.dir, ".bam$", recursive=TRUE, full.names=TRUE)

    bamFiles <- grep("PRC2", bamFiles, value=TRUE)

    alignGal <- getAlignGal(bamFiles[1], reverseComplement=TRUE, genomeBuild="mm9")

    alignGR <- as(alignGal, "GRanges")

    alignGR

    x <- addPseudoAlignment(alignGR)

    x

[Package RIPSeeker version 1.22.0 Index]