easyRNASeq GenomicRanges package extension {easyRNASeq} | R Documentation

## Extension of the GenomicRanges package

### Description

Describes extensions to the `GenomicRanges` package. For `GRanges` and `GRangesList` objects:

- `colnames` returns the column name of a `GRanges` or `GRangesList` object.

- `unsafeAppend` appends two `GAlignments` object together bypassing most sanity checks. Faster than the standard `c` or `append` function.

### Usage

    colnames(x, do.NULL = TRUE, prefix = "col")
    unsafeAppend(obj1,obj2)

### Arguments

`x` | An object of the `GRanges` or `GRangesList` class
`do.NULL` | see `row_colnames` for details
`prefix` | see `row_colnames` for details
`obj1` | A `GAlignments` object
`obj2` | A `GAlignments` object

### Details

- `colnames` returns the actual column names of the elementMetadata slot of the `GRanges` or `GRangesList` object. The elementMetadata contains a `DataFrame` object used to store additional information provided by the user, such as exon ID in our case.

- `unsafeAppend` appends two `GAlignments` objects.

### Value

- `colnames`: A vector of column names.

- `unsafeAppend`: A `GAlignments` object

### Author(s)

Nicolas Delhomme

### See Also

- `DataFrame`

- `GRanges`

- `GRangesList`

- `GAlignments` `row_colnames`

### Examples

     # an example of annotation
    	grngs <- GRanges(seqnames=c("chr01","chr01","chr02"),
                         ranges=IRanges(
                                 start=c(10,30,100),
                                 end=c(21,53,123)),
                              strand=c("+","+","-"),
                              transcripts=c("trA1","trA2","trB"),
                              gene=c("gA","gA","gB"),
                              exon=c("e1","e2","e3")
                              )

    	# accessing the colnames
    	colnames(grngs)

    	# creating a GRangesList
    	grngsList<-split(grngs,seqnames(grngs))

    	# accessing the colnames
    	colnames(grngsList)

    # For unsafeAppend
    library(GenomicAlignments)
    unsafeAppend(GAlignments(),GAlignments())

[Package easyRNASeq version 2.24.1 Index]