importAnnotations {RcisTarget} | R Documentation

## Imports the annotations of motifs to transcription factors

### Description

RcisTarget package includes the motif annotations for the rankings using motif collection version 9 ('mc9nr', 24453 motifs):

- Human: `data(motifAnnotations_hgnc)`

- Mouse: `data(motifAnnotations_mgi)`

- Fly: `data(motifAnnotations_dmel)`

- Previous versions (Annotations for motif collection version 8: motifAnnotations_hgnc_v8 (Human), motifAnnotations_mgi_v8 (Mouse), motifAnnotations_dmel_v8 (Fly)

This function (importAnnotations) allows to import annotations for other versions of the rankings, or to keep extra data columns.

e.g. Source of the annotations (motif collection 9 'mc9nr'):

- Human: https://resources.aertslab.org/cistarget/motif2tf/motifs-v9-nr.hgnc-m0.001-o0.0.tbl

- Mouse: https://resources.aertslab.org/cistarget/motif2tf/motifs-v9-nr.mgi-m0.001-o0.0.tbl

### Usage

    importAnnotations(annotFile, motifsInRanking = NULL, columnsToKeep = NULL)

### Arguments

`annotFile` | File containing the motif annotations corresponding to the rankings. They should match in organism and version.
`motifsInRanking` | Subset of motifs to keep. e.g. `motifsInRanking=getRanking(motifRankings)$features`
`columnsToKeep` | Other colums from the file to keep

### Value

data.table with the annotations of the motifs to transcription factors

Columns:

- motif: Motif ID.

- TF: Transcription factor (or inferred gene).

- directAnnotation, inferred_Orthology, inferred_MotifSimil: Boolean values indicating whether the motif is annotated to the TF in the source database ("directAnnotation"), or whether it was inferred by orthology ("inferred_Orthology") or motif similarity ("inferred_MotifSimil").

- Description: Description of the source of the annotation.

- annotationSource: Source of the annotation formatted as factor (e.g. for subsetting). Levels: directAnnotation, inferredBy_Orthology, inferredBy_MotifSimilarity, inferredBy_MotifSimilarity_n_Orthology.

### See Also

See iRegulon paper and documentation for details on how the rankings and annotations were built.

### Examples

    # motifAnnotations <- importAnnotations("motifs-v9-nr.hgnc-m0.001-o0.0.tbl")

    ## To save (decrease from ~100MB to 1MB):
    # attr(motifAnnotations, "version") <- "motifs-v9-nr.hgnc-m0.001-o0.0.tbl"
    # save(motifAnnotations, file="hgnc_motifAnnotations.RData", compress='xz')

    # This code would generate the equivalent to
    data(motifAnnotations_hgnc)

[Package RcisTarget version 1.12.0 Index]