mutateeach.Rd
Internally create or transform metadata of a GenomicRangesList
mutateeach(x, ...)
GRangesList object
Name-value pairs of expressions. The name of each argument will be the name of a new metadata column, and the value will be its corresponding value.
Transformed GRangesList object
# Load dataset
data(query_exons)
# Create chr:start-end id for each entry
mutateeach(query_exons, id = paste0(seqnames, ":", start, "-", end))
#> GRangesList object of length 4:
#> $transcript1
#> GRanges object with 14 ranges and 7 metadata columns:
#> seqnames ranges strand | type transcript_id
#> <Rle> <IRanges> <Rle> | <factor> <character>
#> [1] chr10 79854427-79854721 + | exon transcript1
#> [2] chr10 79856504-79856534 + | exon transcript1
#> [3] chr10 79858752-79858824 + | exon transcript1
#> [4] chr10 79858952-79859271 + | exon transcript1
#> [5] chr10 79859352-79859522 + | exon transcript1
#> ... ... ... ... . ... ...
#> [10] chr10 79862014-79862047 + | exon transcript1
#> [11] chr10 79862449-79862541 + | exon transcript1
#> [12] chr10 79862653-79862869 + | exon transcript1
#> [13] chr10 79862978-79863055 + | exon transcript1
#> [14] chr10 79863145-79864432 + | exon transcript1
#> gene_id old_gene_id match_level gene_name
#> <character> <character> <numeric> <character>
#> [1] ENSMUSG00000006498.14 GeneA 4 Ptbp1
#> [2] ENSMUSG00000006498.14 GeneA 4 Ptbp1
#> [3] ENSMUSG00000006498.14 GeneA 4 Ptbp1
#> [4] ENSMUSG00000006498.14 GeneA 4 Ptbp1
#> [5] ENSMUSG00000006498.14 GeneA 4 Ptbp1
#> ... ... ... ... ...
#> [10] ENSMUSG00000006498.14 GeneA 4 Ptbp1
#> [11] ENSMUSG00000006498.14 GeneA 4 Ptbp1
#> [12] ENSMUSG00000006498.14 GeneA 4 Ptbp1
#> [13] ENSMUSG00000006498.14 GeneA 4 Ptbp1
#> [14] ENSMUSG00000006498.14 GeneA 4 Ptbp1
#> id
#> <character>
#> [1] chr10:79854427-79854..
#> [2] chr10:79856504-79856..
#> [3] chr10:79858752-79858..
#> [4] chr10:79858952-79859..
#> [5] chr10:79859352-79859..
#> ... ...
#> [10] chr10:79862014-79862..
#> [11] chr10:79862449-79862..
#> [12] chr10:79862653-79862..
#> [13] chr10:79862978-79863..
#> [14] chr10:79863145-79864..
#> -------
#> seqinfo: 1 sequence from an unspecified genome; no seqlengths
#>
#> ...
#> <3 more elements>