Hi everyone,
I'm working on a project for my MSc Thesis in Population Genomics to produce RoH and RoHet with R package "detectRUNS".
I used "slidingRUNS.run()" function and it seems work, looking at the output;
then I used plotRuns() to save and see the graphics produces, but, like said in the title, plotRuns produces an unreadble file.pdf. Whenever I try to open it says "impossible to open file.pdf: it is possible that the file is damaged, or its format is unrecognized".
I am working on macOS Monterey 12.0.1, and Rstudio v. 4.2.2, and detectRUNS v. 0.9.6
the followed steps represent my code:
library(detectRUNS)
genotypeFilePath <- "dati/MMC1_notab.ped"
mapFilePath <- "dati/MMC1_fixed.map"
slidingRuns <- slidingRUNS.run(
genotypeFile = genotypeFilePath,
mapFile = mapFilePath,
windowSize = 15,
threshold = 0.01,
minSNP = 5,
ROHet = FALSE,
maxOppWindow = 1,
maxMissWindow = 1,
maxGap = 10^6,
minLengthBps = 250000,
minDensity = 1/1000, # SNP/kbps
maxOppRun = NULL,
maxMissRun = NULL
)
plot_Runs(runs = slidingRuns,
suppressInds = FALSE,
savePlots = TRUE,
outputName = "RoH")
the output of head(slidingRuns) looks like this:
group id chrom nSNP start end length
Wolf_11 | Wolf_11 | 994383.1 | 1112 | 6456102 | 6874518 | 412916
Wolf_11 | Wolf_11 | 994383.1 | 1162 | 12055005 | 124596395 | 404090
Wolf_11 | Wolf_11 | 994383.1 | 323 | 22510224 | 27845146 | 334522
Thank you for the answers!
Hi everyone,
I'm working on a project for my MSc Thesis in Population Genomics to produce RoH and RoHet with R package "detectRUNS".
I used "slidingRUNS.run()" function and it seems work, looking at the output;
then I used plotRuns() to save and see the graphics produces, but, like said in the title, plotRuns produces an unreadble file.pdf. Whenever I try to open it says "impossible to open file.pdf: it is possible that the file is damaged, or its format is unrecognized".
I am working on macOS Monterey 12.0.1, and Rstudio v. 4.2.2, and detectRUNS v. 0.9.6
the followed steps represent my code:
library(detectRUNS)
genotypeFilePath <- "dati/MMC1_notab.ped"
mapFilePath <- "dati/MMC1_fixed.map"
slidingRuns <- slidingRUNS.run(
genotypeFile = genotypeFilePath,
mapFile = mapFilePath,
windowSize = 15,
threshold = 0.01,
minSNP = 5,
ROHet = FALSE,
maxOppWindow = 1,
maxMissWindow = 1,
maxGap = 10^6,
minLengthBps = 250000,
minDensity = 1/1000, # SNP/kbps
maxOppRun = NULL,
maxMissRun = NULL
)
plot_Runs(runs = slidingRuns,
suppressInds = FALSE,
savePlots = TRUE,
outputName = "RoH")
the output of head(slidingRuns) looks like this:
Wolf_11 | Wolf_11 | 994383.1 | 1112 | 6456102 | 6874518 | 412916
Wolf_11 | Wolf_11 | 994383.1 | 1162 | 12055005 | 124596395 | 404090
Wolf_11 | Wolf_11 | 994383.1 | 323 | 22510224 | 27845146 | 334522
Thank you for the answers!