View source: R/func__getAllelesPerPattern.R
getAllelesPerPattern | R Documentation |
This functions reformats the data frame "alle.pat" or mapping[, c("allele", "pattern")] in outputs of the findPhysLink function. It is useful when a user wants to list all alleles under each particular pattern.
For example, given an input data frame: allele | pattern; a1 | 1; a2 | 1
The function returns a data frame containing a row: pattern | alleles; 1 | a1,a2
getAllelesPerPattern(mapping, sep = ",")
mapping |
the data frame alle.pat or mapping in outputs of the findPhysLink function. It can be other data frames, but must contain names "allele" and "pattern". |
sep |
the delimiter for alleles that belong to the same pattern in the output. It is a comma by default. |
Yu Wan (wanyuac@126.com)
assoc <- findPhysLink(...) ap1 <- getAllelesPerPattern(assoc[["mapping"]], sep = ",") ap2 <- getAllelesPerPattern(assoc[["alleles"]][["alle.pat"]], sep = ",") # alternatively
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.