readExternalRuns: Read runs from external files

Description Usage Arguments Value Examples

View source: R/funktionen.R

Description

Function to read in, from external files, the output of software for ROH:

  1. detectRUNS: output saved out to a file (e.g. write.table)

  2. Plink: output from the --homozyg option (.hom files)

  3. BCFtools: output from the roh option

Usage

1
2
readExternalRuns(inputFile = NULL, program = c("plink", "BCFtools",
  "detectRUNS"))

Arguments

inputFile

name of (path to) external file

program

source program that produced the ROH file (one of detectRUNS, Plink, BCFtools)

Value

dataframe in the correct format to be used with plots and statistics functions from detectRUNS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# getting map and ped paths
## Not run: 
genotypeFile <- system.file("extdata", "Kijas2016_Sheep_subset.ped", package = "detectRUNS")
mapFile <- system.file("extdata", "Kijas2016_Sheep_subset.map", package = "detectRUNS")

# calculating runs of Homozygosity
runs <- slidingRUNS.run(genotypeFile, mapFile, windowSize = 15, threshold = 0.1,  minSNP = 15,
ROHet = FALSE,  maxMissRun = 1, maxMissWindow = 1,  minLengthBps = 100000,  minDensity = 1/10000)

write.table(x= runs,file = 'RunsFileTest.txt', quote=F, row.names = F)
newData=readRunsFromFile(runsFile = 'RunsFileTest.txt', program = 'detectRUNS')

## End(Not run)

detectRUNS documentation built on Oct. 30, 2019, 11:41 a.m.