import_IBD {polyqtlR} | R Documentation |
Import IBD probabilities as estimated by TetraOrigin or PolyOrigin
Description
Imports the IBD probability output of TetraOrigin (Mathematica software) or PolyOrigin (julia software) into the same format as natively-estimated IBD probabilities from the polyqtlR package.
Usage
import_IBD(
method,
folder = NULL,
filename,
bivalent_decoding = TRUE,
error = 0.01,
log = NULL
)
Arguments
method |
The method used for IBD estimation, either "TO" for TetraOrigin or "PO" for PolyOrigin |
folder |
The path to the folder in which the Tetra/PolyOrigin (ie. TetraOrigin or PolyOrigin) output is contained,
default is |
filename |
If method = "TO", the (vector of) character filename stem(s) of the |
bivalent_decoding |
Logical, if method = "TO" you must specify |
error |
If method = "TO", the offspring error prior used in the offspring decoding step of TetraOrigin, by default assumed to be 0.01. For method = "PO", this is automatically read in. |
log |
Character string specifying the log filename to which standard output should be written. If |
Value
Returns a list with the following items:
IBDtype : |
Always "genotypeIBD" for the output of TetraOrigin |
IBDarray : |
An array of IBD probabilities. The dimensions of the array are: markers, genotype classes and individuals. |
map : |
Integrated linkage map positions of markers used in IBD calculation |
parental_phase : |
The parental marker phasing as used by TetraOrigin, recoded in 1 and 0's |
marginal.likelihoods : |
A list of marginal likelihoods of different valencies, currently |
valency : |
The predicted valency that maximised the marginal likelihood, per offspring. Currently |
offspring : |
Offspring names |
biv_dec : |
Logical, the bivalent_decoding parameter specified. |
gap : |
The gap size used in IBD interpolation if performed by |
genocodes : |
Ordered list of genotype codes used to represent different genotype classes. |
pairing : |
log likelihoods of each of the different pairing scenarios considered (can be used e.g. for post-mapping check of preferential pairing) |
ploidy : |
The ploidy of parent 1, by default assumed to be 4 |
ploidy2 : |
The ploidy of parent 2, by default assumed to be 4 |
method : |
The method used, either "hmm_TO" (TetraOrigin) or "hmm_PO" (PolyOrigin) |
error : |
The error prior used in the calculation in TetraOrigin, assumed to be 0.01 |
Examples
## Not run:
## These examples demonstrate the function call for both methods, but won't run without input files
## from either package, hence this call will normally result in an Error:
IBD_TO <- import_IBD(method = "TO", filename = paste0("test_LinkageGroup",1:5,"_Summary"),
bivalent_decoding = FALSE, error = 0.05)
## Equivalent call for PolyOrigin output:
IBD_PO <- import_IBD(method = "PO",filename = "test")
## End(Not run)