Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/expectedGenotypes.R
expectedGenotypes
constructs expected genotypes according to
known allele variants, which can be quite tedious with large number of
allele variants. It can handle different level of ploidy.
1 2 3 4 | expectedGenotypes(x, alleles=allele.names(x), ploidy=2, sort=TRUE,
haplotype=FALSE)
expectedHaplotypes(x, alleles=allele.names(x), ploidy=2, sort=TRUE,
haplotype=TRUE)
|
x |
genotype or haplotype |
alleles |
character, vector of allele names |
ploidy |
numeric, number of chromosome sets i.e. 2 for human autosomal genes |
sort |
logical, sort genotypes according to order of alleles in
|
haplotype |
logical, construct haplotypes i.e. ordered genotype |
At least one of x
or alleles
must be given.
expectedHaplotypes()
just calls expectedGenotypes()
with
argument haplotype=TRUE
.
A character vector with genotype names as "alele1/alele2" for diploid example. Length of output is (n*(n+1))/2 for genotype (unordered genotype) and n*n for haplotype (ordered genotype) for n allele variants.
Gregor Gorjanc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## On genotype
prp <- c("ARQ/ARQ", "ARQ/ARQ", "ARR/ARQ", "AHQ/ARQ", "ARQ/ARQ")
alleles <- c("ARR", "AHQ", "ARH", "ARQ", "VRR", "VRQ")
expectedGenotypes(as.genotype(prp))
expectedGenotypes(as.genotype(prp, alleles=alleles))
expectedGenotypes(as.genotype(prp, alleles=alleles, reorder="yes"))
## Only allele names
expectedGenotypes(alleles=alleles)
expectedGenotypes(alleles=alleles, ploidy=4)
## Haplotype
expectedHaplotypes(alleles=alleles)
expectedHaplotypes(alleles=alleles, ploidy=4)[1:20]
|
Loading required package: combinat
Attaching package: 'combinat'
The following object is masked from 'package:utils':
combn
Loading required package: gdata
sh: 1: cannot create /dev/null: Permission denied
gdata: Unable to locate valid perl interpreter
gdata:
gdata: read.xls() will be unable to read Excel XLS and XLSX files
gdata: unless the 'perl=' argument is used to specify the location of a
gdata: valid perl intrpreter.
gdata:
gdata: (To avoid display of this message in the future, please ensure
gdata: perl is installed and available on the executable search path.)
sh: 1: cannot create /dev/null: Permission denied
gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLX' (Excel 97-2004) files.
gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLSX' (Excel 2007+) files.
gdata: Run the function 'installXLSXsupport()'
gdata: to automatically download and install the perl
gdata: libaries needed to support Excel XLS and XLSX formats.
Attaching package: 'gdata'
The following object is masked from 'package:stats':
nobs
The following object is masked from 'package:utils':
object.size
The following object is masked from 'package:base':
startsWith
Loading required package: gtools
Loading required package: MASS
Loading required package: mvtnorm
NOTE: THIS PACKAGE IS NOW OBSOLETE.
The R-Genetics project has developed an set of enhanced genetics
packages to replace 'genetics'. Please visit the project homepage
at http://rgenetics.org for informtion.
Attaching package: 'genetics'
The following objects are masked from 'package:base':
%in%, as.factor, order
[1] "ARQ/ARQ" "ARQ/ARR" "ARQ/AHQ" "ARR/ARR" "ARR/AHQ" "AHQ/AHQ"
[1] "ARQ/ARQ" "ARQ/ARR" "ARQ/AHQ" "ARQ/ARH" "ARQ/VRR" "ARQ/VRQ" "ARR/ARR"
[8] "ARR/AHQ" "ARR/ARH" "ARR/VRR" "ARR/VRQ" "AHQ/AHQ" "AHQ/ARH" "AHQ/VRR"
[15] "AHQ/VRQ" "ARH/ARH" "ARH/VRR" "ARH/VRQ" "VRR/VRR" "VRR/VRQ" "VRQ/VRQ"
[1] "ARR/ARR" "ARR/AHQ" "ARR/ARH" "ARR/ARQ" "ARR/VRR" "ARR/VRQ" "AHQ/AHQ"
[8] "AHQ/ARH" "AHQ/ARQ" "AHQ/VRR" "AHQ/VRQ" "ARH/ARH" "ARH/ARQ" "ARH/VRR"
[15] "ARH/VRQ" "ARQ/ARQ" "ARQ/VRR" "ARQ/VRQ" "VRR/VRR" "VRR/VRQ" "VRQ/VRQ"
[1] "ARR/ARR" "ARR/AHQ" "ARR/ARH" "ARR/ARQ" "ARR/VRR" "ARR/VRQ" "AHQ/AHQ"
[8] "AHQ/ARH" "AHQ/ARQ" "AHQ/VRR" "AHQ/VRQ" "ARH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