easyRNASeq AnnotParam constructor {easyRNASeq} | R Documentation

## AnnotParam constructor

### Description

This constructs a `AnnotParam` object. The datasource parameter (see details) is mandatory, however other parameters, i.e. when the datasource is not a `GRanges` default to "genes" and gff3", indicating that the datasource is in the gff3 format and that the contained information needs to be grouped by "genes". This representing the most common use case. Hence, it is left to the user to refine the parameters accordingly to the annotation he is providing or whishes to retrieve.

### Usage

    ## S4 method for signature 'character'
    AnnotParam(
      datasource = character(0),
      type = c("gff3", "biomaRt", "gtf", "rda")
    )

### Arguments

`datasource` | a character or a `GRanges` object. See details.
`type` | one of NULL, biomaRt, gff3, gtf or rda. Default to NULL. See details.

### Details

Note that calling the constructor without argument fails, as the datasource is a mandatory parameter. Calling the constructor with additional (not all) parameters will affect the value of the selected parameters, leaving the other parameters unaffected. There are three parameters for an `AnnotParam` object:

- datasourceIf no type is provided, the datasource should be `GRanges` object containing the genic information. These can be obtained using the `getAnnotation` function.

- typeOne of biomaRt, gff3, gtf or rda. The default is "gff3". In all cases, the datasource is a `character` describing:

  - For biomaRt, the name of the organism as known by the ensembl Mart, e.g. dmelanogaster or hsapiens.

  - For gff3, gtf or rda, the filename (including the full or relative path).

### See Also

- `GRanges`

- `getAnnotation`

### Examples

    # create an object to retrieve annotation from biomaRt
    annotParam <- AnnotParam(datasource="Hsapiens",type="biomaRt")

    # get the datasource and type
    datasource(annotParam)
    type(annotParam)

    # create an object to retrieve annotation from an rda object
    # fetch the example data
    gAnnot.rda <- fetchData("gAnnot.rda")
    annotParam <- AnnotParam(datasource=gAnnot.rda,type="rda")

[Package easyRNASeq version 2.24.1 Index]