Utility function that provides support for creating internal GRanges for
transgene and FASTA spike-in sequences.
Usage
emptyRanges(
names,
seqname = c("unknown", "transgene", "spike"),
mcolnames = NULL
)Arguments
- names
character. Gene or transcript names.- seqname
character(1). Name of the alternative chromosome to be defined inseqnameswhere these ranges will be grouped. Defaults to"unknown"but"transgene"(transgenes) and"spike"(spike-ins) are also supported.- mcolnames
characterorNULL. Metadata column names to be defined in themcolsof theGRangesreturn. Normally this does not need to be defined; useful when combining with anotherGRangesthat contains metadata.
Examples
## Unknown/dead genes.
emptyRanges("ENSG00000000000", seqname = "unknown")
#> GRanges object with 1 range and 0 metadata columns:
#> seqnames ranges strand
#> <Rle> <IRanges> <Rle>
#> ENSG00000000000 unknown 1-100 *
#> -------
#> seqinfo: 1 sequence from an unspecified genome; no seqlengths
## Transgenes.
emptyRanges(c("EGFP", "TDTOMATO", "GAL4"), seqname = "transgene")
#> GRanges object with 3 ranges and 0 metadata columns:
#> seqnames ranges strand
#> <Rle> <IRanges> <Rle>
#> EGFP transgene 1-100 *
#> TDTOMATO transgene 101-200 *
#> GAL4 transgene 201-300 *
#> -------
#> seqinfo: 1 sequence from an unspecified genome; no seqlengths
## Spike-ins.
emptyRanges("ERCC", seqname = "spike")
#> GRanges object with 1 range and 0 metadata columns:
#> seqnames ranges strand
#> <Rle> <IRanges> <Rle>
#> ERCC spike 1-100 *
#> -------
#> seqinfo: 1 sequence from an unspecified genome; no seqlengths