| Type: | Package | 
| Title: | Auto-Adaptive Parentage Inference Software Tolerant to Missing Parents | 
| Version: | 2.0.8 | 
| 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. | 
| License: | GPL-2 | GPL-3 [expanded from: GPL] | 
| Encoding: | UTF-8 | 
| LazyData: | true | 
| RoxygenNote: | 7.2.3 | 
| Imports: | cowplot, data.table, doParallel, dplyr, DT, foreach, ggplot2, gridExtra, htmltools, methods, plotly, rlang, shiny, shinythemes | 
| Depends: | R (≥ 3.5.0), shinyBS | 
| NeedsCompilation: | yes | 
| Packaged: | 2024-11-04 09:24:31 UTC; Proprietaire | 
| Author: | 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 <julien.roche@inrae.fr> | 
| Repository: | CRAN | 
| Date/Publication: | 2024-11-04 09:40:02 UTC | 
APIS for diploids
Description
APIS for diploids
Usage
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
)
Arguments
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  | 
Value
list of 2 elements : a pedigree file and the log file
Examples
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
Description
APIS for triploids
Usage
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
)
Arguments
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  | 
Value
list of 2 elements : a pedigree file and the log file
Examples
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
Description
Example dam genotypes
Usage
APIS_dam
Format
A matrix with 14 rows (one row = one dam) and 100 columns (one column = one marker)
Example offspring genotypes
Description
Example offspring genotypes
Usage
APIS_offspring
Format
A matrix with 500 rows (one row = one offspring) and 100 columns (one column = one marker)
Example offspring 3n genotypes
Description
Example offspring 3n genotypes
Usage
APIS_offspring3n
Format
A matrix with 50 rows (one row = one offspring) and 100 columns (one column = one marker)
Example sire genotypes
Description
Example sire genotypes
Usage
APIS_sire
Format
A matrix with 39 rows (one row = one sire) and 100 columns (one column = one marker)
Assignment power
Description
Assignment power
Usage
assignment_power(
  sire_genotype,
  dam_genotype,
  ploidy_level = 2,
  verbose = FALSE
)
Arguments
sire_genotype | 
 matrix of the sire genotypes  | 
dam_genotype | 
 matrix of the dam genotypes  | 
ploidy_level | 
 ploidy level of the parents  | 
verbose | 
 verbose  | 
Value
the theoretical assignment power calculated with the formula proposed in Vandeputte (2012)
Examples
data("APIS_sire")
data("APIS_dam")
P = assignment_power(sire_genotype = APIS_sire, dam_genotype = APIS_dam)
Import from Plink .ped
Description
Import from Plink .ped
Usage
import_from_ped(
  ped_file,
  no_fid = FALSE,
  no_parents = FALSE,
  no_sex = FALSE,
  no_pheno = FALSE,
  marker_names = NULL
)
Arguments
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)  | 
Value
matrix of genotypes for APIS
Import from .vcf
Description
Import from .vcf
Usage
import_from_vcf(vcf_file)
Arguments
vcf_file | 
 name of the vcf file  | 
Value
matrix of genotypes for APIS
Shiny App for interactive session of APIS
Description
Launch the shiny interface to use APIS interactively
Usage
launch_APIShiny()
Value
void : most results are automatically saved
Plot deltas
Description
Plot deltas
Usage
plot_delta(log_file, threshold = NULL, simulated_individuals = NULL)
Arguments
log_file | 
 log file from the APIS_2n() or APIS_3n function  | 
threshold | 
 threshold  | 
simulated_individuals | 
 names of the simulated individuals  | 
Value
plot of the distribution of delta
Plot mismatches
Description
Plot mismatches
Usage
plot_mismatches(log_file, threshold = NULL, simulated_individuals = NULL)
Arguments
log_file | 
 log file from the APIS_2n() or APIS_3n function  | 
threshold | 
 threshold  | 
simulated_individuals | 
 names of the simulated individuals  | 
Value
plot of the distribution of mismatches
Plot probabilities
Description
Plot probabilities
Usage
plot_probabilities(log_file, threshold = NULL, simulated_individuals = NULL)
Arguments
log_file | 
 log file from the APIS_2n() or APIS_3n function  | 
threshold | 
 threshold  | 
simulated_individuals | 
 names of the simulated individuals  | 
Value
plot of the distribution of probabilities
Simulate offspring
Description
Simulate offspring
Usage
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
)
Arguments
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  | 
Value
list with matrix with simulated offspring and pedigree
Examples
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)