Get the annotation from a ChromatinAssay
Annotation(object, ...)
Annotation(object, ...) <- value
# S3 method for ChromatinAssay
Annotation(object, ...)
# S3 method for Seurat
Annotation(object, ...)
# S3 method for ChromatinAssay
Annotation(object, ...) <- value
# S3 method for Seurat
Annotation(object, ...) <- value
A Seurat object or ChromatinAssay object
Arguments passed to other methods
A value to set. Can be NULL, to remove the current annotation
information, or a GRanges
object. If a
GRanges
object is supplied and the genome information is stored in the
assay, the genome of the new annotations must match the genome of the assay.
Returns a GRanges
object
if the annotation data is present, otherwise returns NULL
# \donttest{
Annotation(atac_small[["peaks"]])
#> GRanges object with 100 ranges and 5 metadata columns:
#> seqnames ranges strand | tx_id gene_name
#> <Rle> <IRanges> <Rle> | <character> <character>
#> ENSE00001947070 chr1 29554-30039 + | ENST00000473358 MIR1302-10
#> ENSE00001841699 chr1 30267-30667 + | ENST00000469289 MIR1302-10
#> ENSE00003695741 chr1 30366-30503 + | ENST00000607096 MIR1302-10
#> ENSE00001922571 chr1 30564-30667 + | ENST00000473358 MIR1302-10
#> ENSE00001890064 chr1 30976-31109 + | ENST00000469289 MIR1302-10
#> ... ... ... ... . ... ...
#> ENSE00001651491 chr1 450887-451086 + | ENST00000453935 RP4-669L17.10
#> ENSE00001720138 chr1 453217-453318 + | ENST00000431321 RP4-669L17.10
#> ENSE00001787178 chr1 453633-454166 - | ENST00000450983 RP4-669L17.2
#> ENSE00001656291 chr1 453645-453948 + | ENST00000431321 RP4-669L17.10
#> ENSE00001651822 chr1 453645-453722 + | ENST00000440163 RP4-669L17.10
#> gene_id gene_biotype type
#> <character> <character> <factor>
#> ENSE00001947070 ENSG00000243485 lincRNA exon
#> ENSE00001841699 ENSG00000243485 lincRNA exon
#> ENSE00003695741 ENSG00000243485 lincRNA exon
#> ENSE00001922571 ENSG00000243485 lincRNA exon
#> ENSE00001890064 ENSG00000243485 lincRNA exon
#> ... ... ... ...
#> ENSE00001651491 ENSG00000237094 lincRNA exon
#> ENSE00001720138 ENSG00000237094 lincRNA exon
#> ENSE00001787178 ENSG00000236601 lincRNA exon
#> ENSE00001656291 ENSG00000237094 lincRNA exon
#> ENSE00001651822 ENSG00000237094 lincRNA exon
#> -------
#> seqinfo: 25 sequences from hg19 genome
# }
# \donttest{
Annotation(atac_small)
#> GRanges object with 100 ranges and 5 metadata columns:
#> seqnames ranges strand | tx_id gene_name
#> <Rle> <IRanges> <Rle> | <character> <character>
#> ENSE00001947070 chr1 29554-30039 + | ENST00000473358 MIR1302-10
#> ENSE00001841699 chr1 30267-30667 + | ENST00000469289 MIR1302-10
#> ENSE00003695741 chr1 30366-30503 + | ENST00000607096 MIR1302-10
#> ENSE00001922571 chr1 30564-30667 + | ENST00000473358 MIR1302-10
#> ENSE00001890064 chr1 30976-31109 + | ENST00000469289 MIR1302-10
#> ... ... ... ... . ... ...
#> ENSE00001651491 chr1 450887-451086 + | ENST00000453935 RP4-669L17.10
#> ENSE00001720138 chr1 453217-453318 + | ENST00000431321 RP4-669L17.10
#> ENSE00001787178 chr1 453633-454166 - | ENST00000450983 RP4-669L17.2
#> ENSE00001656291 chr1 453645-453948 + | ENST00000431321 RP4-669L17.10
#> ENSE00001651822 chr1 453645-453722 + | ENST00000440163 RP4-669L17.10
#> gene_id gene_biotype type
#> <character> <character> <factor>
#> ENSE00001947070 ENSG00000243485 lincRNA exon
#> ENSE00001841699 ENSG00000243485 lincRNA exon
#> ENSE00003695741 ENSG00000243485 lincRNA exon
#> ENSE00001922571 ENSG00000243485 lincRNA exon
#> ENSE00001890064 ENSG00000243485 lincRNA exon
#> ... ... ... ...
#> ENSE00001651491 ENSG00000237094 lincRNA exon
#> ENSE00001720138 ENSG00000237094 lincRNA exon
#> ENSE00001787178 ENSG00000236601 lincRNA exon
#> ENSE00001656291 ENSG00000237094 lincRNA exon
#> ENSE00001651822 ENSG00000237094 lincRNA exon
#> -------
#> seqinfo: 25 sequences from hg19 genome
# }
genes <- Annotation(atac_small)
Annotation(atac_small[["peaks"]]) <- genes
genes <- Annotation(atac_small)
Annotation(atac_small) <- genes