Skip to content

Arguments

Stefan Hoj-Edwards edited this page Oct 20, 2016 · 4 revisions

Filenames: file vs. fn: file for connections, fn for filenames.

  • phasefn Filename of input file, every two rows are for same animal.
  • genofn Filename of intended output.
  • rawfn Output file from plink. Most likely plink.raw if PLINK command line argument --output is not used.
  • outfn Filename of new file.
  • truefn Filename to true matrix. NB! Max. 255 characters!
  • imputefn Filename to imputed matrix.
  • fn Filename of genotype matrix (0,1,2) with first column denoting ID.
  • file Name of file to read from or connection.
  • fn Filename to read from. May be text, gz, or bz2.
  • fn Filename or connection of file to write to.

Lines: nlines: Number of lines.

  • nrow Number of rows to maximally read from phasefn. If NULL, no limit is used.
  • nlines Number of lines to process.
  • nAnimals Integer, number of rows. If NULL (default), detected from truefn.
  • nlines Lines in fn; if NULL (default), number is retrieved with get_nlines.
  • nlines Integer. If positive, the maximum number of line to read.

Columns: ncol: Number of columns

  • ncol Number of SNPs in file, if NULL (default), number is estimated from file.
  • ncol Number of SNP columns in rawfn. Is total number of columns minus 6.
  • nSNPs Integer, number of snps (i.e. number of columns minus 1). If NULL (default), detected from truefn.
  • ncols Number of SNP columns in fn; if NULL (default), number is retrieved with get_ncols.
  • ncols Integer, default NULL. Number of columns in input file, including ID column. If NULL and file is string, automagically detected.

Format:

  • int Logical (default TRUE), read and write integers.
  • numeric.format Character describing .. Default '5.2'. Has no effect when int=TRUE.

Missing values: na: Missing values

  • naval Missing value, default 9.
  • naval Integer scalar to use for NA values.
  • NAval Integer, value of missing genotype.
  • na Character to write in-place of missing values, defaults '9'.
  • na If not NA (default), entries with the value are replaced with NA.

convert_plinkA:

newID Integer scalar (default 0) for automatically assigning new IDs. See description for more.

imputation_accuracy:

standardized Logical, whether to center and scale genotypes by dataset in true-matrix. Currently by subtracting column mean and dividing by column standard deviation. adaptive Use adaptive method (default) that stores truefn and compares rows by ID in first column.

heterozygosity:

population Vector of same length as rows in fn; defaults to 1, coerced from factor to integer.

auxfunc:

showWarning Logical, whether to display a warning if reading file is erroneous. doError Logical, if error occured while reading file, will it stop class Character vector of classes to use for column(s), see colClasses in read.table. ... Parameters sent to read.table.

write.snps

x The matrix to write.

row.names If genotype matrix is "raw" and has first column with animals IDs, set this to False. ... Passed on to write.table.

read.snps:

what Type of internal storage for matrix. Use integer() or numeric(), but expect issues if ID column contains alphabetical components. extractIDs Logical, default TRUE, trim of first column and use as rownames? quiet Logical, default TRUE. If FALSE, scan will print a line saying how may items have been read. ... Passed on to scan.

Clone this wiki locally