calculatePairwiseSimilarities {Fluidigm}R Documentation

Run plink to Calculate Pairwise Similarities

Description

This function serves as a wrapper to the 'PLINK' software, which is a free, open-source whole genome association analysis toolset. It specifically uses 'PLINK' to calculate pairwise similarities between genotypes.

Usage

calculatePairwiseSimilarities(
  file,
  db = NA,
  map = NA,
  out = NA,
  sexing = TRUE,
  verbose = TRUE,
  verbosity = 1
)

Arguments

file

A string representing the path to the filtered ped/map file pair (without ped/map file extension).

db

A string representing the path to an existing genotype database. If not provided, the function will proceed with the existing data.

map

A string representing the filepath to PlateDnoY.map file. If not provided, the function will use the map file with the same name as the ped file.

out

A string representing the path to the output. If not provided, the output will be written to a file with the same name as the input file, appended with "_oDB".

sexing

A logical value indicating whether the function should try to perform sexing. Default is FALSE.

verbose

A logical value indicating whether the output should be verbose. Default is TRUE.

verbosity

An integer representing the level of verbosity. Set to a higher number for more detailed output. Default is 1.

Details

The function first checks the input parameters and sets default values if necessary. It then constructs and executes a PLINK command to merge the genotype output with the existing genotype database if one is provided. Finally, it calculates pairwise similarities for all samples (and database individuals) using another PLINK command. If the 'sexing' parameter is set to TRUE, the function will also attempt to determine the sex of the individuals.

Value

A list containing the following elements: gensim, a matrix indicating if genotypes are called correctly for replicates and/or if genotypes are missing summs, a matrix with summary statistics

References

Examples

## Not run: 

  outdir <- tempdir()

  calculatePairwiseSimilarities(file=file.path(outdir, "example_data.csv.GOOD"))

## End(Not run)


[Package Fluidigm version 0.2 Index]