homologue_lg_assignment: Assign markers to linkage groups and homologues.

View source: R/exported_functions.R

homologue_lg_assignmentR Documentation

Assign markers to linkage groups and homologues.

Description

This is a wrapper combining linkage (or linkage.gp) and assign_linkage_group. It is used to assign all marker types to linkage groups by using linkage information with 1.0 markers. It allows for input of marker assignments for which this analysis has already been performed.

Usage

homologue_lg_assignment(
  input_type = "discrete",
  dosage_matrix,
  probgeno_df,
  chk,
  assigned_list,
  assigned_markertypes,
  SN_functions = NULL,
  LG_hom_stack,
  target_parent = "P1",
  other_parent = "P2",
  convert_palindrome_markers = TRUE,
  ploidy,
  ploidy2 = NULL,
  pairing = "random",
  LG_number,
  LOD_threshold = 3,
  write_intermediate_files = 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.

dosage_matrix

An 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.

assigned_list

List of data.frames with marker assignments for which the assignment analysis is already performed.

assigned_markertypes

List of integer vectors of length 2. Specifying the markertypes in the same order as assigned_list.

SN_functions

A vector of function names to be used. If NULL all remaining linkage functions with SN markers are used.

LG_hom_stack

A data.frame with markernames ("SxN_Marker"), linkage group ("LG") and homologue ("homologue")

target_parent

A character string specifying the target parent.

other_parent

A character string specifying the other parent.

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?

ploidy

Ploidy level of parent 1. If parent 2 has the same ploidy level, then also the ploidy level of parent 2.

ploidy2

Integer, by default NULL. If parental ploidies differ, use this to specify the ploidy of parent 2. Note that in cross-ploidy situations, ploidy2 must be smaller than ploidy.

pairing

Type of pairing. Either "random" or "preferential".

LG_number

Expected number of chromosomes (linkage groups).

LOD_threshold

LOD threshold at which a linkage is considered significant.

write_intermediate_files

Logical. Write intermediate linkage files to working directory?

log

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

...

Arguments passed to linkage

Value

A data.frame specifying marker assignments to linkage group and homologue.

Examples

## Not run: 
data("screened_data3", "P1_SxS_Assigned", "P1_DxN_Assigned", "LGHomDf_P1_1")
Assigned_markers<-homologue_lg_assignment(dosage_matrix = screened_data3,
                                          assigned_list = list(P1_SxS_Assigned, P1_DxN_Assigned),
                                          assigned_markertypes = list(c(1,1), c(2,0)),
                                          LG_hom_stack = LGHomDf_P1_1,ploidy=4,LG_number = 5,
                                          write_intermediate_files=FALSE)
                         
## End(Not run)

polymapR documentation built on Nov. 5, 2023, 1:09 a.m.