Get the annotation from a ChromatinAssay5 object
Usage
Annotation(object, ...)
Annotation(object, ...) <- value
# S3 method for class 'ChromatinAssay5'
Annotation(object, ...)
# S3 method for class 'Seurat'
Annotation(object, assay = NULL, ...)
# S3 method for class 'ChromatinAssay5'
Annotation(object, ...) <- value
# S3 method for class 'Seurat'
Annotation(object, assay = NULL, ...) <- valueArguments
- object
A Seurat, GRangesAssay, or ChromatinAssay5 object
- ...
Arguments passed to other methods
- value
A value to set. Can be
NULL, to remove the current annotation information, or aGenomicRanges::GRanges()object.- assay
Name of assay to use
Value
Returns a GenomicRanges::GRanges() object
if the annotation data is present, otherwise returns NULL
Examples
# \donttest{
Annotation(atac_small[["peaks"]])
#> GRanges object with 200 ranges and 5 metadata columns:
#> seqnames ranges strand | tx_id gene_name
#> <Rle> <IRanges> <Rle> | <character> <character>
#> ENSE00003812156 chr1 65419-65433 + | ENST00000641515 OR4F5
#> ENSE00003813641 chr1 65520-65573 + | ENST00000641515 OR4F5
#> ENSE00003813949 chr1 69037-71585 + | ENST00000641515 OR4F5
#> ENSE00002319515 chr1 69055-70108 + | ENST00000335137 OR4F5
#> ENSE00002316283 chr1 450703-451697 - | ENST00000426406 OR4F29
#> ... ... ... ... . ... ...
#> ENSE00003472906 chr1 955923-956013 - | ENST00000487214 NOC2L
#> ENSE00003589494 chr1 956095-956215 - | ENST00000327044 NOC2L
#> ENSE00003497251 chr1 956095-956215 - | ENST00000477976 NOC2L
#> ENSE00003497251 chr1 956095-956215 - | ENST00000487214 NOC2L
#> ENSE00003567731 chr1 956894-957025 - | ENST00000327044 NOC2L
#> gene_id gene_biotype type
#> <character> <character> <factor>
#> ENSE00003812156 ENSG00000186092 protein_coding exon
#> ENSE00003813641 ENSG00000186092 protein_coding exon
#> ENSE00003813949 ENSG00000186092 protein_coding exon
#> ENSE00002319515 ENSG00000186092 protein_coding exon
#> ENSE00002316283 ENSG00000284733 protein_coding exon
#> ... ... ... ...
#> ENSE00003472906 ENSG00000188976 protein_coding exon
#> ENSE00003589494 ENSG00000188976 protein_coding exon
#> ENSE00003497251 ENSG00000188976 protein_coding exon
#> ENSE00003497251 ENSG00000188976 protein_coding exon
#> ENSE00003567731 ENSG00000188976 protein_coding exon
#> -------
#> seqinfo: 25 sequences (1 circular) from hg38 genome
# }
# \donttest{
Annotation(atac_small)
#> GRanges object with 200 ranges and 5 metadata columns:
#> seqnames ranges strand | tx_id gene_name
#> <Rle> <IRanges> <Rle> | <character> <character>
#> ENSE00003812156 chr1 65419-65433 + | ENST00000641515 OR4F5
#> ENSE00003813641 chr1 65520-65573 + | ENST00000641515 OR4F5
#> ENSE00003813949 chr1 69037-71585 + | ENST00000641515 OR4F5
#> ENSE00002319515 chr1 69055-70108 + | ENST00000335137 OR4F5
#> ENSE00002316283 chr1 450703-451697 - | ENST00000426406 OR4F29
#> ... ... ... ... . ... ...
#> ENSE00003472906 chr1 955923-956013 - | ENST00000487214 NOC2L
#> ENSE00003589494 chr1 956095-956215 - | ENST00000327044 NOC2L
#> ENSE00003497251 chr1 956095-956215 - | ENST00000477976 NOC2L
#> ENSE00003497251 chr1 956095-956215 - | ENST00000487214 NOC2L
#> ENSE00003567731 chr1 956894-957025 - | ENST00000327044 NOC2L
#> gene_id gene_biotype type
#> <character> <character> <factor>
#> ENSE00003812156 ENSG00000186092 protein_coding exon
#> ENSE00003813641 ENSG00000186092 protein_coding exon
#> ENSE00003813949 ENSG00000186092 protein_coding exon
#> ENSE00002319515 ENSG00000186092 protein_coding exon
#> ENSE00002316283 ENSG00000284733 protein_coding exon
#> ... ... ... ...
#> ENSE00003472906 ENSG00000188976 protein_coding exon
#> ENSE00003589494 ENSG00000188976 protein_coding exon
#> ENSE00003497251 ENSG00000188976 protein_coding exon
#> ENSE00003497251 ENSG00000188976 protein_coding exon
#> ENSE00003567731 ENSG00000188976 protein_coding exon
#> -------
#> seqinfo: 25 sequences (1 circular) from hg38 genome
# }
genes <- Annotation(atac_small)
Annotation(atac_small[["peaks"]]) <- genes
genes <- Annotation(atac_small)
Annotation(atac_small) <- genes