Class constructor - build Genome object
Class constructor - build Genome object
root_path
A path to a directory containing chromosome-separated fasta files.
genome_name
A genome name.
paths
Individual chromosome sequence files.
seq
A chromosome-named list of sequences.
seq_len
A chromosome-named vector of sequence length.
load_limit
Maximum chromosome sequences loaded.
mask
Genome mask status: "hard", "soft", or "none".
info_file
Path to info file with pre-computed values.
chr_names
Chromosome names.
new()
Create a new Genome class
UCSC_Genome$new(genome.name, root.path, mask, load.limit)
genome.name
A genome name. UCSC genome is included with kmeRtone.
root.path
Path to a directory of user-provided genome FASTA files or the destination to save the NCBI/UCSC downloaded reference genome files.
mask
Genome mask status: "hard", "soft", or "none". Default is "none".
load.limit
Maximum chromosome sequences loaded. Default is 1.
A new Genome
object.
[()
Calling chromosome sequence by loading on demand. Maximum load is determine by load_limit field.
UCSC_Genome$[(chr.names, reload = FALSE)
chr.names
Chromosome name. It can be a vector of chromosomes.
reload
Reload the sequence from the root_path. Default is FALSE.
A single or list of sequence of requested chromosome.
Message of Genome
object summary.
get_length()
Get chromosome length from pre-calculated length
UCSC_Genome$get_length(chr.names, recalculate = FALSE)
chr.names
Chromosome name. It can be a vector of chromosomes.
recalculate
Recalculate the pre-calculated length.
A chromosome-named vector of length value.
get_content()
Get pre-calculated sequence content e.g. G+C content
UCSC_Genome$get_content(chr.names, seq, recalculate = FALSE)
chr.names
Chromosome name. It can be a vector of chromosomes.
seq
Sequence to count. e.g. c("G", "C")
recalculate
Recalculate the pre-calculated length.
A chromosome-named vector of sequence content.
clone()
The objects of this class are cloneable with this method.
UCSC_Genome$clone(deep = FALSE)
deep
Whether to make a deep clone.