Description Usage Arguments Value Examples
This function takes in input either the run results or the output from
the function snpInsideRuns
(proportion of times a SNP is inside a run)
in the population/group, and returns a subset of the runs most commonly
found in the group/population. The parameter threshold
controls the definition
of most common (e.g. in at least 50%, 70% etc. of the sampled individuals)
1 2 |
runs |
R object (dataframe) with results on detected runs |
SnpInRuns |
dataframe with the proportion of times each SNP falls inside a
run in the population (output from |
genotypeFile |
Plink ped file (for SNP position) |
mapFile |
Plink map file (for SNP position) |
threshold |
value from 0 to 1 (default 0.7) that controls the desired proportion of individuals carrying that run (e.g. 70%) |
A dataframe with the most common runs detected in the sampled individuals (the group/population, start and end position of the run, chromosome and number of SNP included in the run are reported in the output dataframe)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # getting map and ped paths
genotypeFile <- system.file("extdata", "Kijas2016_Sheep_subset.ped", package = "detectRUNS")
mapFile <- system.file("extdata", "Kijas2016_Sheep_subset.map", package = "detectRUNS")
# calculating runs of Homozygosity
## Not run:
# skipping runs calculation
runs <- slidingRUNS.run(genotypeFile, mapFile, windowSize = 15, threshold = 0.1, minSNP = 15,
ROHet = FALSE, maxOppositeGenotype = 1, maxMiss = 1, minLengthBps = 100000, minDensity = 1/10000)
## End(Not run)
# loading pre-calculated data
runsFile <- system.file("extdata", "Kijas2016_Sheep_subset.sliding.csv", package="detectRUNS")
runsDF = readExternalRuns(inputFile = runsFile, program = 'detectRUNS')
tableRuns(runs = runsDF, genotypeFile = genotypeFile, mapFile = mapFile, threshold = 0.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.