find.exe.path: Find path to program This function searches the system path...

View source: R/run_fastStructure.R

find.exe.pathR Documentation

Find path to program This function searches the system path and the settings file of the misc.wrappers program for a usable path to a program with a specified name.

Description

Find path to program

This function searches the system path and the settings file of the misc.wrappers program for a usable path to a program with a specified name.

Usage

find.exe.path(program)

Arguments

program

Character string with name of program to find

Value

Character string with path to the program's executable file, or 1 if path not found.

Examples

library(misc.wrappers)
## Example 1:
# Path to VCF with SNPs
vcf.path    <- file.path(system.file("extdata", package = "misc.wrappers"),"simK4.vcf.gz")
# Run fastStructure 30 times each for K=1-10
run_fastStructure(x=vcf.path,kmax=10,reps=30,save.as="fs_simK4.pdf",include.out=c(".pdf"))

## Example 2: Same SNP dataset as example 1, but here we also provide Lon/Lat coordinates of individuals to geographically interpolate admixture coefficients.
vcf.path    <- file.path(system.file("extdata", package = "misc.wrappers"), "simK4.vcf.gz")
coords.path <- file.path(system.file("extdata", package = "misc.wrappers"), "simK4_coords.txt")
run_fastStructure(x=vcf.path, coords=coords.path, kmax=10, reps=30, save.as="fs_simK4_withCoords.pdf", include.out=c(".pdf"))

JeffWeinell/misc.wrappers documentation built on Sept. 20, 2023, 12:42 p.m.