finish_linkage_analysis {polymapR}R Documentation

Linkage analysis between all markertypes within a linkage group.

Description

finish_linkage_analysis is a wrapper for linkage, or in the case of probabilistic genotypes, linkage.gp. The function performs linkage calculations between all markertypes within a linkage group.

Usage

finish_linkage_analysis(
  input_type = "discrete",
  marker_assignment,
  dosage_matrix,
  probgeno_df,
  chk,
  marker_combinations = NULL,
  parent1 = "P1",
  parent2 = "P2",
  which_parent = 1,
  ploidy,
  ploidy2 = NULL,
  convert_palindrome_markers = TRUE,
  pairing = "random",
  prefPars = c(0, 0),
  LG_number,
  verbose = TRUE,
  log = NULL,
  ...
)

Arguments

input_type

Can be either one of 'discrete' or 'probabilistic'. For the former (default), dosage_matrix must be supplied, while for the latter probgeno_df and chk must be supplied.

marker_assignment

A marker assignment matrix with markernames as rownames and at least containing the column "Assigned_LG".

dosage_matrix

A named integer matrix with markers in rows and individuals in columns.

probgeno_df

A data frame as read from the scores file produced by function saveMarkerModels of R package fitPoly, or alternatively, a data frame containing the following columns:

SampleName

Name of the sample (individual)

MarkerName

Name of the marker

P0

Probabilities of dosage score '0'

P1...

Probabilities of dosage score '1' etc. (up to max dosage, e.g. P4 for tetraploid population)

maxP

Maximum genotype probability identified for a particular individual and marker combination

maxgeno

Most probable dosage for a particular individual and marker combination

geno

Most probable dosage for a particular individual and marker combination, if maxP exceeds a user-defined threshold (e.g. 0.9), otherwise NA

chk

Output list as returned by function checkF1. This argument is only needed if probabilistic genotypes are used.

marker_combinations

A matrix with four columns specifying marker combinations to calculate linkage. If NULL all combinations are used for which there are rf functions. Dosages of markers should be in the same order as specified in the names of rf functions. E.g. if using 1.0_2.0 and 1.0_3.0 types use: matrix(c(1,0,2,0,1,0,3,0), byrow = TRUE, ncol = 4)

parent1

Character string specifying the identifier of parent 1, by default "P1"

parent2

Character string specifying the identifier of parent 2, by default "P2"

which_parent

Integer, either 1 or 2, with default 1, where 1 or 2 refers to parent1 or parent2 respectively.

ploidy

Integer ploidy level of parent1, and also by default parent2. Argument ploidy2 can be used if parental ploidies differ.

ploidy2

Integer, by default NULL. If parental ploidies differ, use this to specify the ploidy of parent2.

convert_palindrome_markers

Logical. Should markers that behave the same for both parents be converted to a workable format for that parent? E.g.: should 3.1 markers be converted to 1.3?

pairing

Type of pairing at meiosis, with options "random" or "preferential". By default, random pairing is assumned.

prefPars

The estimates for preferential pairing parameters for parent 1 and 2, in range 0 <= p < 2/3. By default this is c(0,0) (so, no preferential pairing). See the function test_prefpairing and the vignette for more details.

LG_number

Number of linkage groups (chromosomes).

verbose

Should messages be sent to stdout or log?

log

Character string specifying the log filename to which standard output should be written. If NULL log is send to stdout.

...

(Other) arguments passed to linkage

Value

Returns a matrix with marker assignments. Number of linkages of 1.0 markers are artificial.

Examples

## Not run: 
data("screened_data3", "marker_assignments_P1")
linkages_list_P1<-finish_linkage_analysis(marker_assignment=marker_assignments_P1,
                                          dosage_matrix=screened_data3,
                                          parent1="P1",
                                          parent2="P2",
                                          which_parent=1,
                                          convert_palindrome_markers=FALSE,
                                          ploidy=4,
                                          pairing="random",
                                          LG_number=5)
                                          
## End(Not run)

[Package polymapR version 1.1.6 Index]