Learn R Programming

⚠️There's a newer version (0.4.1) of this package.Take me there.

MAPpoly

MAPpoly (v. 0.3.2) is an R package to construct genetic maps in autopolyploids with even ploidy levels. In its current version, MAPpoly can handle ploidy levels up to 8 when using hidden Markov models (HMM) and up to 12 when using the two-point simplification. When dealing with large numbers of markers (> 10,000), we strongly recommend using high-performance computing (HPC).

In its current version, MAPpoly can handle the following types of datasets:

  1. CSV files
  2. MAPpoly files
    • Dosage based
    • Probability based
  3. fitPoly files
  4. VCF files

MAPpoly also is capable of importing objects generated by the following R packages

  1. updog
  2. polyRAD
  3. polymapR
    • Datasets
    • Maps

The mapping strategy uses pairwise recombination fraction estimation as the first source of information to position allelic variants in specific homologs sequentially. The algorithm relies on the multilocus likelihood obtained through a hidden Markov model (HMM) for situations where pairwise analysis has limited power. The derivation of the HMM used in MAPpoly can be found in Mollinari and Garcia, 2019. The computation of the offspring's genotypes probabilities and haplotype reconstruction, as well as the preferential pairing profiles, is presented in Mollinari et al., 2020.

Installation

From CRAN (stable version)

To install MAPpoly from the The Comprehensive R Archive Network (CRAN) use

install.packages("mappoly")

From GitHub (development version)

You can install the development version from Git Hub. Within R, you need to install devtools:

install.packages("devtools")

If you are using Windows, please install the the latest recommended version of Rtools.

To install MAPpoly from Git Hub use

devtools::install_github("mmollina/mappoly", dependencies=TRUE)

For further QTL analysis, we recommend our QTLpoly package. QTLpoly performs random-effect multiple interval mapping (REMIM) in full-sib families of autopolyploid species based on restricted maximum likelihood (REML) estimation and score statistics, as described in Pereira et al. 2020.

We recently released VIEWpoly. VIEWpoly provides a graphical user interface to integrate, visualize and explore results from linkage and quantitative trait loci analysis, together with genomic information for autopolyploid (and diploid) species. The app is meant for interactive use and allows users to optionally upload different sources of information, including gene annotation and alignment files, enabling the exploitation and search for candidate genes in a genome browser. VIEWpoly supports inputs other than MAPpoly's, including polymapR, diaQTL, QTLpoly, and polyqtlR.

MAPpoly's workflow

Vignettes

Related software

# Enable this universe
options(repos = c(
    polyploids = 'https://polyploids.r-universe.dev',
    CRAN = 'https://cloud.r-project.org'))

# Install some packages
install.packages('mappoly')

Miscellaneous

Articles referencing MAPpoly

  1. Rose Rosette Disease Resistance Loci Detected in Two Interconnected Tetraploid Garden Rose Populations (Lau et al., 2022)
  2. VIEWpoly: a visualization tool to integrate and explore results of polyploid genetic analysis. (Taniguti et al., 2022)
  3. Genetic Dissection of Early Blight Resistance in Tetraploid Potato. (Xue et al., 2022)
  4. Haplotype reconstruction in connected tetraploid F1 populations (Zheng et al., 2021)
  5. QTL mapping in outbred tetraploid (and diploid) diallel populations (Amadeu et al., 2021)
  6. Using probabilistic genotypes in linkage analysis of polyploids. (Liao et al., 2021)
  7. Discovery of a major QTL for root-knot nematode Meloidogyne incognita resistance in cultivated sweetpotato Ipomoea batatas. (Oloka, et al., 2021)
  8. Quantitative trait locus mapping for common scab resistance in a tetraploid potato full-sib population. (Pereira et al., 2021)
  9. The recombination landscape and multiple QTL mapping in a Solanum tuberosum cv.'Atlantic'-derived F1 population. (Pereira et al., 2021)
  10. High-Resolution Linkage Map and QTL Analyses of Fruit Firmness in Autotetraploid Blueberry (Cappai et al., 2020)
  11. When a phenotype is not the genotype: Implications of phenotype misclassification and pedigree errors in genomics-assisted breeding of sweetpotato Ipomoea batatas (L.) Lam.(Gemenet et al., 2020)
  12. Quantitative trait loci and differential gene expression analyses reveal the genetic basis for negatively associated beta-carotene and starch content in hexaploid sweetpotato [Ipomoea batatas (L.) Lam.] (Gemenet et al., 2020)
  13. Multiple QTL Mapping in Autopolyploids: A Random-Effect Model Approach with Application in a Hexaploid Sweetpotato Full-Sib Population. (Pereira et al., 2020)

Acknowledgment

This package has been developed as part of the Genomic Tools for Sweetpotato Improvement project (GT4SP) and SweetGAINS, both funded by Bill & Melinda Gates Foundation. Its continuous improvement is made possible by Tools for polyploids, funded by USDA NIFA Specialty Crop Research Initiative Award.


NC State University promotes equal opportunity and prohibits discrimination and harassment based upon one’s age, color, disability, gender identity, genetic information, national origin, race, religion, sex (including pregnancy), sexual orientation and veteran status.

Copy Link

Version

Install

install.packages('mappoly')

Monthly Downloads

360

Version

0.3.2

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Marcelo Mollinari

Last Published

December 2nd, 2022

Functions in mappoly (0.3.2)

drop_marker

Remove markers from a map
elim_conf_using_two_pts

Eliminate configurations using two-point information
check_data_sanity

Data sanity check
check_data_dist_sanity

Checks the consistency of dataset (probability distribution)
check_if_rf_is_possible

Check if it is possible to estimate the recombination fraction between neighbor markers using two-point estimation
check_pairwise

Check if all pairwise combinations of elements of input.seq are contained in twopt
est_pairwise_rf

Pairwise two-point analysis
draw_cross

Draw simple parental linkage phase configurations
check_ls_phase

Compare a list of linkage phases and return the markers for which they are different.
est_haplo_hmm

Estimate a genetic map given a sequence of block markers
est_pairwise_rf2

Pairwise two-point analysis - RcppParallel version
draw_phases

Plot the linkage phase configuration given a list of homologous chromosomes
est_map_haplo_given_genoprob

Estimate a genetic map given a sequence of block markers given the conditional probabilities of the genotypes
filter_missing

Filter missing genotypes
filter_missing_ind

Filter individuals based on missing genotypes
est_rf_hmm_single

Multipoint analysis using Hidden Markov Models (single phase)
elim_equiv

Eliminates equivalent linkage phase configurations
filter_non_conforming_classes

Filter non-conforming classes in F1, non double reduced population.
filter_missing_mrk

Filter markers based on missing genotypes
est_full_hmm_with_prior_prob

Re-estimate genetic map using dosage prior probability distribution
est_full_hmm_with_global_error

Re-estimate genetic map given a global genotyping error
export_qtlpoly

Export to QTLpoly
extract_map

Extract the maker position from an object of class 'mappoly.map'
filter_segregation

Filter markers based on chi-square test
check_data_dose_sanity

Checks the consistency of dataset (dosage)
concatenate_new_marker

Concatenate new marker
est_rf_hmm_single_one_parent

Multilocus analysis using Hidden Markov Models (single parent, single phase)
concatenate_ph_list

concatenate two linkage phase lists
find_blocks

Allocate markers into linkage blocks
est_rf_hmm

Multipoint analysis using Hidden Markov Models in autopolyploids
est_rf_hmm_sequential

Multipoint analysis using Hidden Markov Models: Sequential phase elimination
filter_individuals

Filter out individuals
get_indices_from_selected_phases

Get the indices of selected linkage phases given a threshold
get_LOD

Extract the LOD Scores in a 'mappoly.map' object
get_cache_two_pts_from_web

Access a remote server to get Counts for recombinant classes
filter_map_at_hmm_thres

remove maps under a certain threshold
get_ols_map

Get weighted ordinary least squared map give a sequence and rf matrix
format_rf

Format results from pairwise two-point estimation in C++
export_data_to_polymapR

Export data to polymapR
elim_redundant

Eliminate redundant markers
get_dosage_type

Get dosage type in a sequence
get_full_info_tail

Get the tail of a marker sequence up to the point where the markers provide no additional information.
get_states_and_emission_one_parent

Get states and emission in one informative parent
get_genomic_order

Get the genomic position of markers in a sequence
get_w_m

Get the number of bivalent configurations
imf_m

Map functions
get_ij

Given a pair of character indicating the numbers i and j : 'i-j', returns a numeric pair c(i,j)
gg_color_hue

Color pallet ggplot-like
get_counts_all_phases

Counts for recombinant classes
generate_all_link_phase_elim_equivalent

Generate all possible linkage phases in matrix form given the dose and the number of shared alleles between a inserted marker and a pre-computed linkage configuration.
get_tab_mrks

Get table of dosage combinations
import_data_from_polymapR

Import data from polymapR
export_map_list

Export a genetic map to a CSV file
get_submap

Extract sub-map from map
get_counts_two_parents

Counts for recombinant classes
get_counts

Counts for recombinant classes
hexafake

Simulated autohexaploid dataset.
get_counts_one_parent

Counts for recombinant classes in a polyploid parent.
genotyping_global_error

Prior probability for genotyping error
group_mappoly

Assign markers to linkage groups
ls_linkage_phases

List of linkage phases
generate_all_link_phases_elim_equivalent_haplo

Eliminate equivalent linkage phases
get_ph_conf_ret_sh

Given a homology group in matrix form, it returns the number shared homologous for all pairs of markers in this group
hexafake.geno.dist

Simulated autohexaploid dataset with genotype probabilities.
mds_mappoly

Estimates loci position using Multidimensional Scaling
maps.hexafake

Resulting maps from hexafake
mp_pallet3

MAPpoly pallet 3
make_mat_mappoly

Subset recombination fraction matrices
merge_datasets

Merge datasets
merge_maps

Merge two maps
mf_m

Map functions
mp_pallet1

MAPpoly pallet 1
mf_h

Map functions
mp_pallet2

MAPpoly pallet 2
make_pairs_mappoly

Subset pairwise recombination fractions
loglike_hmm

Multipoint log-likelihood computation
make_seq_mappoly

Create a sequence of markers
plot_genome_vs_map

Physical versus genetic distance
get_rf_from_list

Get the recombination fraction for a sequence of markers given an object of class mappoly.twopt and a list containing the linkage phase configuration. This list can be found in any object of class two.pts.linkage.phases, in x$config.to.test$'Conf-i', where x is the object of class two.pts.linkage.phases and i is one of the possible configurations.
imf_k

Map functions
imf_h

Map functions
is.prob.data

Is it a probability dataset?
get_ph_list_subset

subset of a linkage phase list
get_rf_from_mat

Get recombination fraction from a matrix
mf_k

Map functions
plot_map_list

Plot a genetic map
mrk_chisq_test

Chi-square test
perm_pars

N!/2 combination
perm_tot

N! combination
msg

Msg function
plot_compare_haplotypes

Plot two overlapped haplotypes
plot_GIC

Genotypic information content
read_fitpoly

Data Input in fitPoly format
print_ph

cat for graphical representation of the phases
sim_cross_two_informative_parents

Simulate mapping population (tow parents)
rf_snp_filter

Remove markers that do not meet a LOD criteria
rf_list_to_matrix

Recombination fraction list to matrix
poly_cross_simulate

Simulate an autopolyploid full-sib population
sim_homologous

Simulate homology groups
tetra.solcap.geno.dist

Autotetraploid potato dataset with genotype probabilities.
update_ph_list_at_hmm_thres

makes a phase list from map, selecting only configurations under a certain threshold
ph_list_to_matrix

Linkage phase format conversion: list to matrix
ph_matrix_to_list

Linkage phase format conversion: matrix to list
v_2_m

Conversion: vector to matrix
read_geno_prob

Data Input
tetra.solcap

Autotetraploid potato dataset.
summary_maps

Summary maps
import_from_updog

Import from updog
reest_rf

Re-estimate the recombination fractions in a genetic map
poly_hmm_est

Estimate genetic map using as input the probability distribution of genotypes (wrapper function to C++)
import_phased_maplist_from_polymapR

Import phased map list from polymapR
table_to_mappoly

Conversion of data.frame to mappoly.data
read_vcf

Data Input VCF
paralell_pairwise_discrete

Wrapper function to discrete-based pairwise two-point estimation in C++
paralell_pairwise_probability

Wrapper function to probability-based pairwise two-point estimation in C++
parallel_block

Auxiliary function to estimate a map in a block of markers using parallel processing
plot_mrk_info

Plot marker information
plot.mappoly.homoprob

Plots mappoly.homoprob
plot.mappoly.prefpair.profiles

Plots mappoly.prefpair.profiles
plot_one_map

plot a single linkage group with no phase
prepare_map

prepare maps for plot
read_geno_csv

Data Input in CSV format
read_geno

Data Input
print_mrk

Summary of a set of markers
segreg_poly

Polysomic segregation frequency
solcap.dose.map

Resulting maps from tetra.solcap
rev_map

Reverse map
paralell_pairwise_discrete_rcpp

Wrapper function to discrete-based pairwise two-point estimation in C++
sim_cross_one_informative_parent

Simulate mapping population (one parent)
select_rf

Select rf and lod based on thresholds
split_and_rephase

Divides map in sub-maps and re-phase them
update_map

Update map
split_mappoly

Split map into sub maps given a gap threshold
solcap.mds.map

Resulting maps from tetra.solcap
sample_data

Random sampling of dataset
solcap.err.map

Resulting maps from tetra.solcap
update_missing

Update missing information
solcap.prior.map

Resulting maps from tetra.solcap.geno.dist
aggregate_matrix

Aggregate matrix cells (lower the resolution by a factor)
calc_genoprob

Compute conditional probabilities of the genotypes
add_marker

Add a single marker to a map
calc_homologprob

Homolog probabilities
calc_genoprob_one_parent

Compute conditional probabilities of the genotype (one informative parent)
calc_genoprob_error

Compute conditional probabilities of the genotypes using global error
calc_genoprob_dist

Compute conditional probabilities of the genotypes using probability distribution of dosages
cache_counts_twopt

Frequency of genotypes for two-point recombination fraction estimation
compare_maps

Compare a list of maps
compare_haplotypes

Compare two polyploid haplotypes stored in list format
add_mrk_at_tail_ph_list

add a single marker at the tail of a linkage phase list
calc_genoprob_haplo

Compute conditional probabilities of the genotypes given a sequence of block markers
create_map

Create a map with pseudomarkers at a given step
dist_prob_to_class

Returns the class with the highest probability in a genotype probability distribution
calc_prefpair_profiles

Preferential pairing profiles
cat_phase

cat for phase information