Learn R Programming

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

MAPpoly (v. 0.2.0) 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 computation.

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 is based on using pairwise recombination fraction estimation as the first source of information to position allelic variants in specific homologues sequentially. For situations where pairwise analysis has limited power, the algorithm relies on the multilocus likelihood obtained through a hidden Markov model (HMM). The derivation of the HMM used in MAPpoly can be found in Mollinari and Garcia, 2019. Recently, we used MAPpoly to build an ultra-dense multilocus integrated genetic map containing ~30k SNPs and characterized the inheritance system in a sweetpotato full-sib family (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, you must 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 is an under development software to map quantitative trait loci (QTL) in full-sib families of outcrossing autopolyploid species based on a random-effect multiple QTL model Pereira et al. 2020.

Vignettes

Related software

Miscellaneous

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.

Copy Link

Version

Install

install.packages('mappoly')

Monthly Downloads

360

Version

0.2.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Marcelo Mollinari

Last Published

November 23rd, 2020

Functions in mappoly (0.2.1)

aggregate_matrix

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

Frequency of genotypes for two-point recombination fraction estimation
est_haplo_hmm

Estimate a genetic map given a sequence of block markers
add_marker

Add a single marker to a map
est_full_hmm_with_prior_prob

Re-estimate genetic map using dosage prior probability distribution
calc_genoprob_error

Compute conditional probabilities of the genotypes using global error
calc_genoprob_haplo

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

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

Compare two polyploid haplotypes stored in list format
concatenate_new_marker

Concatenate new marker
check_ls_phase

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

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

Homolog probabilities
filter_map_at_hmm_thres

remove maps under a certain threshold
check_data_sanity

Data sanity check
check_data_dose_sanity

Checks the consistency of dataset (dosage)
elim_conf_using_two_pts

Eliminate configurations using two-point information
est_map_haplo_given_genoprob

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

Eliminates equivalent linkage phase configurations
filter_missing

Filter missing genotypes
generate_all_link_phases_elim_equivalent_haplo

Eliminate equivalent linkage phases
calc_prefpair_profiles

Preferential pairing profiles
calc_genoprob

Compute conditional probabilities of the genotypes
get_counts_one_parent

Counts for recombinant classes in a polyploid parent.
filter_missing_ind

Filter individuals based on missing genotypes
filter_missing_mrk

Filter markers based on missing genotypes
draw_phases

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

Counts for recombinant classes
get_rf_from_list

Get the recombination fraction for a sequence of markers given an object of class poly.est.two.pts.pairwise 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.
calc_genoprob_dist

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

Remove markers from a map
cat_phase

cat for phase information
get_rf_from_mat

Get recombination fraction from a matrix
create_map

Create a map with pseudomarkers at a given step
concatenate_ph_list

concatenate two linkage phase lists
loglike_hmm

Multipoint log-likelihood computation
est_rf_hmm_single

Multipoint analysis using Hidden Markov Models (single phase)
extract_map

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

Export a genetic map to a CSV file
draw_cross

Draw simple parental linkage phase configurations
dist_prob_to_class

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

Export data to polymapR
get_LOD

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

Filter markers based on chi-square test
filter_non_conforming_classes

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

Counts for recombinant classes
elim_redundant

Eliminate redundant markers
est_full_hmm_with_global_error

Re-estimate genetic map given a global genotyping error
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
check_data_dist_sanity

Checks the consistency of dataset (probability distribution)
get_indices_from_selected_phases

Get the indices of selected linkage phases given a threshold
get_ols_map

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

Access a remote server to get Counts for recombinant classes
get_ph_list_subset

subset of a linkage phase list
import_phased_maplist_from_polymapR

Import phased map list from polymapR
get_genomic_order

Get the genomic position of markers in a sequence
get_counts_all_phases

Counts for recombinant classes
is.prob.data

Is it a probability dataset?
make_seq_mappoly

Create a sequence of markers
get_full_info_tail

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

Prior probability for genotyping error
get_dosage_type

Get dosage type in a sequence
maps.hexafake

est_rf_hmm_sequential

Multipoint analysis using Hidden Markov Models: Sequential phase elimination
est_rf_hmm

Multipoint analysis using Hidden Markov Models in autopolyploids
format_rf

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

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

Assign markers to linkage groups
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_w_m

Get the number of bivalent configurations
ls_linkage_phases

List of linkage phases
get_submap

Extract sub-map from map
get_tab_mrks

Get table of dosage combinations
mrk_chisq_test

Chi-square test
imf_k

Map functions
imf_m

Map functions
plot.mappoly.homoprob

Plots mappoly.homoprob
plot.mappoly.prefpair.profiles

Plots mappoly.prefpair.profiles
plot_map_list

Plot a genetic map
plot_mrk_info

Plot marker information
gg_color_hue

Color pallet ggplot-like
mf_k

Map functions
pos_twopt_est

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

Simulated autohexaploid dataset.
msg

Msg function
update_map

Update map
mds_mappoly

Estimates loci position using Multidimensional Scaling
update_missing

Update missing information
merge_datasets

Merge datasets
hexafake.geno.dist

Simulated autohexaploid dataset with genotype probabilities.
poly_hmm_est

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

Map functions
read_geno_prob

Data Input
read_vcf

Data Input VCF
ph_list_to_matrix

Linkage phase format conversion: list to matrix
import_data_from_polymapR

Import data from polymapR
imf_h

Map functions
make_mat_mappoly

Subset recombination fraction matrices
make_pairs_mappoly

Subset pairwise recombination fractions
paralell_pairwise_probability

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

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

Linkage phase format conversion: matrix to list
plot_compare_haplotypes

Plot two overlapped haplotypes
print_mrk

Summary of a set of markers
reest_rf

Re-estimate the recombination fractions in a genetic map
prepare_map

prepare maps for plot
plot_genome_vs_map

Physical versus genetic distance
perm_pars

N!/2 combination
perm_tot

N! combination
plot_one_map

plot a single linkage group with no phase
import_from_updog

Import from updog
merge_maps

Merge two maps
poly_cross_simulate

Simulate an autopolyploid full-sib population
sim_homologous

Simulate homology groups
sim_cross_two_informative_parents

Simulate mapping population (tow parents)
read_geno

Data Input
read_geno_csv

Data Input in CSV format
select_rf

Select rf and lod based on thresholds
rev_map

Reverse map
rf_snp_filter

Remove markers that do not meet a LOD criteria
rf_list_to_matrix

Recombination fraction list to matrix
mf_h

Map functions
solcap.dose.map

sample_data

Random sampling of dataset
segreg_poly

Polysomic segregation frequency
tetra.solcap

Autotetraploid potato dataset.
tetra.solcap.geno.dist

Autotetraploid potato dataset with genotype probabilities.
solcap.err.map

split_and_rephase

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

Simulate mapping population (one parent)
read_fitpoly

Data Input in fitPoly format
solcap.mds.map

print_ph

cat for graphical representation of the phases
update_ph_list_at_hmm_thres

makes a phase list from map, selecting only configurations under a certain threshold
solcap.prior.map

summary_maps

Summary maps
est_pairwise_rf

Pairwise two-point analysis