| Title: | Auto-Adaptive Parentage Inference Software Tolerant to Missing Parents |
|---|---|
| Description: | Parentage assignment package. Parentage assignment is performed based on observed average Mendelian transmission probability distributions or Exclusion. The main functions of this package are the function APIS_2n(), APIS_3n() and launch_APIShiny(), which perform parentage assignment. |
| Authors: | Julien Roche [aut, cre], Ronan Griot [aut], Mathieu Besson [aut], François Allal [aut], Marc Vandeputte [aut], Jonathan D'Ambrosio [aut], Romain Morvezen [aut], Florence Phocas [aut], Sophie Brard-Fudulea [aut], Pierrick Haffray [aut] |
| Maintainer: | Julien Roche <[email protected]> |
| License: | GPL |
| Version: | 2.0.8 |
| Built: | 2026-05-13 09:12:14 UTC |
| Source: | https://github.com/cran/APIS |
APIS for diploids
APIS_2n( offspring_genotype, sire_genotype, dam_genotype, method = "mendel", exclusion_threshold = NULL, error = 0.05, simulation_if_small = FALSE, number_offspring_simulated = max(0, 500 - nrow(offspring_genotype)), number_cores = 2, verbose = FALSE )APIS_2n( offspring_genotype, sire_genotype, dam_genotype, method = "mendel", exclusion_threshold = NULL, error = 0.05, simulation_if_small = FALSE, number_offspring_simulated = max(0, 500 - nrow(offspring_genotype)), number_cores = 2, verbose = FALSE )
offspring_genotype |
matrix of the offspring genotypes |
sire_genotype |
matrix of the sire genotypes |
dam_genotype |
matrix of the offspring genotypes |
method |
method : "mendel" i.e. likelihood or "exclusion" (default : "mendel"). Can also be "" to select the method a posteriori. |
exclusion_threshold |
threshold for "exclusion" method (default : NULL). Override the error parameter if not NULL |
error |
error accepted (default : 0.05) |
simulation_if_small |
simulate individuals (TRUE or FALSE) |
number_offspring_simulated |
number of offspring simulated (default : 500) |
number_cores |
number of cores |
verbose |
verbose |
list of 2 elements : a pedigree file and the log file
data("APIS_offspring") data("APIS_sire") data("APIS_dam") assignment <- APIS_2n(offspring_genotype = APIS_offspring[1:35,1:50], sire_genotype = APIS_sire[ ,1:50], dam_genotype = APIS_dam[ ,1:50], simulation_if_small = FALSE)data("APIS_offspring") data("APIS_sire") data("APIS_dam") assignment <- APIS_2n(offspring_genotype = APIS_offspring[1:35,1:50], sire_genotype = APIS_sire[ ,1:50], dam_genotype = APIS_dam[ ,1:50], simulation_if_small = FALSE)
APIS for triploids
APIS_3n( offspring_genotype, sire_genotype, dam_genotype, method = "mendel", exclusion_threshold = NULL, error = 0.05, simulation_if_small = FALSE, number_offspring_simulated = max(0, 500 - nrow(offspring_genotype)), number_cores = 2, verbose = FALSE, t_recom = 0.5 )APIS_3n( offspring_genotype, sire_genotype, dam_genotype, method = "mendel", exclusion_threshold = NULL, error = 0.05, simulation_if_small = FALSE, number_offspring_simulated = max(0, 500 - nrow(offspring_genotype)), number_cores = 2, verbose = FALSE, t_recom = 0.5 )
offspring_genotype |
matrix of the offspring genotypes |
sire_genotype |
matrix of the sire genotypes |
dam_genotype |
matrix of the dam genotypes |
method |
method : "mendel" i.e. likelihood or "exclusion" (default : "mendel"). Can also be "" to select the method a posteriori. |
exclusion_threshold |
threshold for "exclusion" method (default : NULL). Override the error parameter if not NULL |
error |
error accepted (default : 0.05) |
simulation_if_small |
simulate individuals (TRUE or FALSE) (default : TRUE) |
number_offspring_simulated |
number of offspring simulated (default : 500) |
number_cores |
number of cores |
verbose |
verbose |
t_recom |
recombination rate |
list of 2 elements : a pedigree file and the log file
data("APIS_offspring3n") data("APIS_sire") data("APIS_dam") assignment <- APIS_3n(offspring_genotype = APIS_offspring3n[1:35,1:50], sire_genotype = APIS_sire[ ,1:50], dam_genotype = APIS_dam[ ,1:50], simulation_if_small = FALSE)data("APIS_offspring3n") data("APIS_sire") data("APIS_dam") assignment <- APIS_3n(offspring_genotype = APIS_offspring3n[1:35,1:50], sire_genotype = APIS_sire[ ,1:50], dam_genotype = APIS_dam[ ,1:50], simulation_if_small = FALSE)
Example dam genotypes
APIS_damAPIS_dam
A matrix with 14 rows (one row = one dam) and 100 columns (one column = one marker)
Example offspring genotypes
APIS_offspringAPIS_offspring
A matrix with 500 rows (one row = one offspring) and 100 columns (one column = one marker)
Example offspring 3n genotypes
APIS_offspring3nAPIS_offspring3n
A matrix with 50 rows (one row = one offspring) and 100 columns (one column = one marker)
Example sire genotypes
APIS_sireAPIS_sire
A matrix with 39 rows (one row = one sire) and 100 columns (one column = one marker)
Assignment power
assignment_power( sire_genotype, dam_genotype, ploidy_level = 2, verbose = FALSE )assignment_power( sire_genotype, dam_genotype, ploidy_level = 2, verbose = FALSE )
sire_genotype |
matrix of the sire genotypes |
dam_genotype |
matrix of the dam genotypes |
ploidy_level |
ploidy level of the parents |
verbose |
verbose |
the theoretical assignment power calculated with the formula proposed in Vandeputte (2012)
data("APIS_sire") data("APIS_dam") P = assignment_power(sire_genotype = APIS_sire, dam_genotype = APIS_dam)data("APIS_sire") data("APIS_dam") P = assignment_power(sire_genotype = APIS_sire, dam_genotype = APIS_dam)
Import from Plink .ped
import_from_ped( ped_file, no_fid = FALSE, no_parents = FALSE, no_sex = FALSE, no_pheno = FALSE, marker_names = NULL )import_from_ped( ped_file, no_fid = FALSE, no_parents = FALSE, no_sex = FALSE, no_pheno = FALSE, marker_names = NULL )
ped_file |
name of the ped file (from Plink) |
no_fid |
if "no_fid" parameter was used in plink (default : FALSE) |
no_parents |
if "no_parents" parameter was used in plink (default : FALSE) |
no_sex |
if "no_sex" parameter was used in plink (default : FALSE) |
no_pheno |
if "no_pheno" parameter was used in plink (default : FALSE) |
marker_names |
list of marker names (default : NULL) |
matrix of genotypes for APIS
Import from .vcf
import_from_vcf(vcf_file)import_from_vcf(vcf_file)
vcf_file |
name of the vcf file |
matrix of genotypes for APIS
Launch the shiny interface to use APIS interactively
launch_APIShiny()launch_APIShiny()
void : most results are automatically saved
Plot deltas
plot_delta(log_file, threshold = NULL, simulated_individuals = NULL)plot_delta(log_file, threshold = NULL, simulated_individuals = NULL)
log_file |
log file from the APIS_2n() or APIS_3n function |
threshold |
threshold |
simulated_individuals |
names of the simulated individuals |
plot of the distribution of delta
Plot mismatches
plot_mismatches(log_file, threshold = NULL, simulated_individuals = NULL)plot_mismatches(log_file, threshold = NULL, simulated_individuals = NULL)
log_file |
log file from the APIS_2n() or APIS_3n function |
threshold |
threshold |
simulated_individuals |
names of the simulated individuals |
plot of the distribution of mismatches
Plot probabilities
plot_probabilities(log_file, threshold = NULL, simulated_individuals = NULL)plot_probabilities(log_file, threshold = NULL, simulated_individuals = NULL)
log_file |
log file from the APIS_2n() or APIS_3n function |
threshold |
threshold |
simulated_individuals |
names of the simulated individuals |
plot of the distribution of probabilities
Simulate offspring
simulate_offspring( sire_genotype, dam_genotype, number_offspring, ploidy_level = 2, sire_contribution = 1, dam_contribution = 1, recombination_rate = 0.5, genotyping_error = 0.01 )simulate_offspring( sire_genotype, dam_genotype, number_offspring, ploidy_level = 2, sire_contribution = 1, dam_contribution = 1, recombination_rate = 0.5, genotyping_error = 0.01 )
sire_genotype |
sire genotype |
dam_genotype |
dam genotype |
number_offspring |
number of offspring to simulate |
ploidy_level |
ploidy level of offspring |
sire_contribution |
sire contribution |
dam_contribution |
dam contribution |
recombination_rate |
recombination rate (only important for tri/tetra ploids offspring) |
genotyping_error |
genotyping error |
list with matrix with simulated offspring and pedigree
data("APIS_sire") data("APIS_dam") # For diploide offspring simulate_offspring(sire_genotype=APIS_sire, dam_genotype=APIS_dam, number_offspring=10, ploidy_level = 2, sire_contribution = 1, dam_contribution = 1, recombination_rate = 0.5, genotyping_error = 0.01) # For triploide offspring simulate_offspring(sire_genotype=APIS_sire, dam_genotype=APIS_dam, number_offspring=10, ploidy_level = 3, sire_contribution = 1, dam_contribution = 2, recombination_rate = 0.5, genotyping_error = 0.01)data("APIS_sire") data("APIS_dam") # For diploide offspring simulate_offspring(sire_genotype=APIS_sire, dam_genotype=APIS_dam, number_offspring=10, ploidy_level = 2, sire_contribution = 1, dam_contribution = 1, recombination_rate = 0.5, genotyping_error = 0.01) # For triploide offspring simulate_offspring(sire_genotype=APIS_sire, dam_genotype=APIS_dam, number_offspring=10, ploidy_level = 3, sire_contribution = 1, dam_contribution = 2, recombination_rate = 0.5, genotyping_error = 0.01)