This function downloads, extracts, and loads a misha genome database for the specified genome.
A character string specifying the genome to download. Supported genomes are "mm9", "mm10", "mm39", "hg19", and "hg38".
A character string specifying the directory where the genome will be extracted. Defaults to genome name (e.g. "mm10") in the current working directory.
A character string specifying the directory for storing temporary files. This is used for storing the downloaded genome file.
None.
The function checks if the specified genome is available. If tmpdir, it constructs the download URL, downloads the genome file,
extracts it to the specified directory, and loads the genome database using gsetroot
. The function also calls gdb.reload
to reload the genome database.
# \donttest{
mm10_dir <- tempdir()
gdb.create_genome("mm10", path = mm10_dir)
#> Downloading mm10 genome...
#> Extracting mm10 genome...
#> Loading misha root...
#> mm10 genome has been successfully downloaded and extracted to /tmp/RtmpPF84g0/mm10
list.files(file.path(mm10_dir, "mm10"))
#> [1] "chrom_sizes.txt" "downloads" "pssms" "seq"
#> [5] "tracks"
gsetroot(file.path(mm10_dir, "mm10"))
gintervals.ls()
#> [1] "exons" "intervs.global.exons" "intervs.global.tss"
#> [4] "intervs.global.utr3" "intervs.global.utr5" "tss"
#> [7] "utr3" "utr5"
# }