Learn R Programming

gpyramid (version 0.0.1)

findPset: Find parent sets from the candidate cultivars

Description

Find parent sets from the candidate cultivars

Usage

findPset(gene_df1, gene_df2, line_id)

Value

`findPset()` returns a list of parental cultivar sets. Each element of list contains the parent names.

Arguments

gene_df1

Data frame of one set of haplotype. Values take 1 (target allele) or 0 (non-target).

gene_df2

Data frame of the other set of haplotype. Values take 1 or 0.

line_id

character vector of cultivar names

Examples

Run this code
gene_df1 <-
 data.frame(x1 = c(1, 1, 1, 1, 1, 0, 0),
            x2 = c(1, 1, 1, 0, 1, 1, 0),
            x3 = c(1, 1, 1, 0, 1, 1, 0),
            x4 = c(1, 1, 0, 0, 0, 0, 0),
            x5 = c(0, 0, 1, 0, 1, 1, 0),
            x6 = c(0, 0, 1, 1, 0, 0, 0),
            x7 = c(0, 1, 1, 0, 0, 0, 1))
gene_df2 <-
 data.frame(x1 = c(0, 0, 0, 0, 0, 0, 0),
            x2 = c(0, 0, 0, 0, 0, 1, 0),
            x3 = c(1, 0, 0, 0, 0, 0, 0),
            x4 = c(1, 1, 0, 0, 0, 0, 0),
            x5 = c(0, 0, 1, 0, 1, 1, 0),
            x6 = c(0, 0, 1, 1, 0, 0, 0),
            x7 = c(0, 1, 1, 0, 0, 0, 1))

line_id <- c("x1", "x2", "x3", "x4", "x5", "x6", "x7")

findPset(gene_df1, gene_df2, line_id)

Run the code above in your browser using DataLab