Description Usage Arguments Value Examples
Detects genomic regions shared IBD between pairs.
1 2 3 | getIBDsegments(ped.genotypes, parameters, model = NULL, chromosomes = NULL,
number.cores = 1, minimum.snps = 20, minimum.length.bp = 50000,
error = 0.001, posterior = FALSE)
|
ped.genotypes |
a named list containing |
parameters |
a data frame containing meioses and IBD probability estimates for all pairwise combinations of samples.
See |
model |
an integer of either 1 or 2 denoting which of the two models should be run.
The default is |
chromosomes |
a numeric vector containing a subset of chromosomes to perform IBD analysis on. The
default is |
number.cores |
the number of cores used for parallel execution. |
minimum.snps |
the minimum number of SNPs in an IBD segment for it to be reported. The default value is 20 SNPs. |
minimum.length.bp |
the minimum length of a reported IBD segment. The default value is 50,000 bp. |
error |
the genotyping error rate. The default value is 0.001. |
posterior |
a logical value indicating whether posterior probabilities for each pairwise analysis should be returned.
The posterior probability is calculated for each SNP as posteriorPr(IBD=1)/2 + posteriorPr(IBD=2) using the
forward and backward variables (Rabiner, 1989).
A data frame containing probabilities for each SNP and each pairwise analysis is returned.
This data frame can be very large when there are many SNPs and many pairwise analyses, and the run-time of
|
A named list of 1 object when posterior=FALSE
and 2 objects when posterior=TRUE
.
The first object in the list, ibd_segments
, is a data frame with information:
Family 1 ID (type "character"
)
Individual 1 ID (type "character"
)
Family 2 ID (type "character"
)
Individual 2 ID (type "character"
)
Chromosome (type "numeric"
or integer
)
SNP identifier (type "character"
)
Start SNP (type "character"
)
End SNP (type "character"
)
Start position bp (type "numeric"
or integer
)
End position bp (type "numeric"
or integer
)
Start position M (type "numeric"
)
End position M (type "numeric"
)
Number of SNPs (type "numeric"
or integer
)
Length bp (type "numeric"
or integer
)
Length M (type "numeric"
)
IBD status (1 = one allele shared IBD, 2 = two alleles shared IBD) (type "numeric"
or integer
)
where each row is a unique IBD segment for a pair of individuals. The data frame is headed
fid1, iid1, fid2, iid2, chr, start.snp, end.snp, start.position.bp, end.position.bp, start.position.M, end.position.M,
number.snps, length.bp, length.M, ibd.status
. The second object (returned when posterior=TRUE
), posterior_probabilities
, is a
data frame with the first four columns
Chromosome (type "numeric"
or integer
)
SNP identifier (type "character"
)
Genetic map distance (type "numeric"
)
Base-pair positions (type "numeric"
or integer
)
and columns 5 onwards are the posterior probabilities for each pair with pair identifier headers. Rows correspond to SNPs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
# infer IBD
my_ibd <- getIBDsegments(ped.genotypes = example_genotypes,
parameters = example_parameters,
model = NULL,
chromosomes = NULL,
number.cores = 1,
minimum.snps = 20,
minimum.length.bp = 50000,
error = 0.001,
posterior = FALSE)
str(my_ibd)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.