permIndices: Generate permutation indices for a 'cross' object.

Description Usage Arguments Value Permutations References See Also

View source: R/cross.R

Description

Given an input cross object with N samples, this function generates a non-redundant set of N permutation indices in the range 1-N, which can be used to permute the phenotype or genotype data of a cross object, as well as any associated data.

Usage

1
permIndices(cross)

Arguments

cross

An R/qtl cross object.

Value

Vector of sample indices that can be used to permute a cross object or associated data.

Permutations

For cross permutations in shmootl, either the phenotypes or genotypes of the cross can be permuted (but not both). The actual pattern of permutations differs depending on the number of sample replicates used, whether samples (or sample replicates) are missing, and whether the samples are formed from sets of tetrads.

If samples are tetradic, permutations are stratified by tetrad, so that a given sample (or sample replicate) must be swapped with another member of the same tetrad. Previously described by Cubillos et al. (2011), Salinas et al. (2012), and Jara et al. (2014), stratification within tetrads is done because individual samples from a tetrad are not independent, and therefore not exchangeable, which is an assumption of the permutation test (Churchill and Doerge 1994).

If one or two samples are missing from a tetrad, samples will be permuted within the remaining three or two samples, respectively. Complete tetrads should be used where possible, and a warning is output if any tetrads are incomplete. An error will result from trying to permute a tetrad with only one sample.

For non-tetradic data, samples are permuted within a single permutation stratum that includes all samples, which is equivalent to an unstratified permutation.

If sample replicates are present, each sample replicate is swapped with another sample replicate that does not originate from the same sample. When sample replicates are balanced (i.e. equal number of replicates for each sample), this is roughly equivalent to permuting each set of sample replicates as a unit. Sample replicates should be balanced where possible, although imbalanced replicates can be permuted (with a warning), provided that no single sample has more replicates than all other samples in a permutation stratum, in which case there is no valid permutation.

References

Churchill GA, Doerge RW (1994) Empirical threshold values for quantitative trait mapping. Genetics 138(3):963-71. (PubMed)

Cubillos FA, Billi E, Zorgo E, Parts L, Fargier P, Omholt S, Blomberg A, Warringer J, Louis EJ, Liti G (2011) Assessing the complex architecture of polygenic traits in diverged yeast populations. Molecular Ecology 20(7):1401-13. (PubMed)

Jara M, Cubillos FA, Garcia V, Salinas F, Aguilera O, Liti G, Martinez C (2014) Mapping genetic variants underlying differences in the central nitrogen metabolism in fermenter yeasts. PLoS One 9(1):e86533. (PubMed)

Salinas F, Cubillos FA, Soto D, Garcia V, Bergstrom A, Warringer J, Ganga MA, Louis EJ, Liti G, Martinez C (2014) The genetic basis of natural variation in oenological traits in Saccharomyces cerevisiae. PLoS One 7(11):e49640. (PubMed)

See Also

Other cross object functions: crossesEqual, getIdColIndex, getPhenoColIndices, hasTimeSeriesPhenotypes, inferStrainIndices, inferTetradIndices, inferTimeStep, interpTimeSeries, padTimeSeries, permCross, pull.alleles, pull.chr, pull.crosstype, pull.ind, readCrossCSV, readCrossHDF5, writeCrossCSV, writeCrossHDF5

Other permutation functions: permCross


gact/shmootl documentation built on Nov. 11, 2021, 6:23 p.m.