❝本节来介绍一个用于多个基因组的共线性和直系同源模式分析及可视化的R包「GENESPACE」,软件运行需要依赖其它软件如「OrthoFinder、MCScanX」等,分析环境配置好可以一站式完成数据的分析及可视化同时具有很高的自定性。小编下面进行部分的结果展示,软件安装等更多的详细内容请参考作者的官方文档。 ❞
❝https://github.com/jtlovell/GENESPACE (https://htmlpreview.github.io/?https://github.com/jtlovell/tutorials/blob/main/riparianGuide.html) ❞
if (!requireNamespace("devtools", quietly = TRUE))
install.packages("devtools")
devtools::install_github("jtlovell/GENESPACE")
library(GENESPACE)
genomeRepo <- "~/path/to/store/rawGenomes"
wd <- "~/path/to/genespace/workingDirectory"
path2mcscanx <- "~/path/to/MCScanX/"
urls <- c(
human ="000/001/405/GCF_000001405.40_GRCh38.p14/GCF_000001405.40_GRCh38.p14_",
mouse = "000/001/635/GCF_000001635.27_GRCm39/GCF_000001635.27_GRCm39_",
platypus = "004/115/215/GCF_004115215.2_mOrnAna1.pri.v4/GCF_004115215.2_mOrnAna1.pri.v4_",
chicken = "016/699/485/GCF_016699485.2_bGalGal1.mat.broiler.GRCg7b/GCF_016699485.2_bGalGal1.mat.broiler.GRCg7b_",
sandLizard = "009/819/535/GCF_009819535.1_rLacAgi1.pri/GCF_009819535.1_rLacAgi1.pri_")
genomes2run <- names(urls)
urls <- file.path("https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF", urls)
translatedCDS <- sprintf("%stranslated_cds.faa.gz", urls)
geneGff <- sprintf("%sgenomic.gff.gz", urls)
names(translatedCDS) <- genomes2run
names(geneGff) <- genomes2run
writeDirs <- file.path(genomeRepo, genomes2run)
names(writeDirs) <- genomes2run
for(i in genomes2run){
print(i)
if(!dir.exists(writeDirs[i]))
dir.create(writeDirs[i])
download.file(
url = geneGff[i],
destfile = file.path(writeDirs[i], basename(geneGff[i])))
download.file(
url = translatedCDS[i],
destfile = file.path(writeDirs[i], basename(translatedCDS[i])))
}
genomes2run <- c("human", "mouse", "platypus", "chicken", "sandLizard")
parsedPaths <- parse_annotations(
rawGenomeRepo = genomeRepo,
genomeDirs = genomes2run,
genomeIDs = genomes2run,
presets = "ncbi",
genespaceWd = wd)
gpar <- init_genespace(
wd = wd,
ploidy = 1,
path2mcscanx = path2mcscanx)
out <- run_genespace(gpar, overwrite = T)
ripDat <- plot_riparian(
gsParam = out,
refGenome = "human",
forceRecalcBlocks = FALSE)
ripDat <- plot_riparian(
out,
refGenome = "human",
useOrder = FALSE,
useRegions = FALSE)
ripDat <- plot_riparian(
gsParam = out,
refGenome = "mouse",
genomeIDs = c("mouse", "human", "platypus", "chicken"),
forceRecalcBlocks = FALSE)
ripDat <- plot_riparian(
gsParam = out,
#reorderBySynteny = FALSE,
syntenyWeight = 0,
refGenome = "human")
ggthemes <- ggplot2::theme(
panel.background = ggplot2::element_rect(fill = "white"))
customPal <- colorRampPalette(
c("darkorange", "skyblue", "darkblue", "purple", "darkred", "salmon"))
ripDat <- plot_riparian(
gsParam = out,
palette = customPal,
braidAlpha = .75,
chrFill = "lightgrey",
addThemes = ggthemes,
refGenome = "human")
roi <- data.frame(
genome = c("human", "chicken"),
chr = c("X", "Z"),
color = c("#FAAA1D", "#17B5C5"))
ripDat <- plot_riparian(
gsParam = out,
highlightBed = roi,
refGenome = "human",
genomeIDs = c("sandLizard", "chicken", "human", "mouse", "platypus"),
customRefChrOrder = c("X", 1:22))