Description Usage Arguments Value Examples
find closely matching locus names between two files
1 | CompareLocusNames(First, Second, maxD = 7)
|
First |
Either a vector of locus names, or a data frame in which the loci start in column 1 and the column for the second allele at a locus named "LocusX" is "LocusX.1". Thus, it is the sort of data frame that would result from reading in a two-column (ToolKit) format file while setting the first column to be the row names, and using R's default method for making column names unique |
Second |
a vector of locus names or a data frame
formatted like |
maxD |
The maximum string distance between two locus names that are still considered an approximate match |
A list with three components:
InFirstButNotSecond
: Loci appearing in First but with no exact matches in Second
RemainingInSecondButNotInFirst
: Any loci in second that had neither approximate nor exact matches
to any loci in First.
InBoth
: Loci that have an exact matching name in both First and Second.
Each component of the returned list has a matrix with 5 columns with headers as follows:
NameInFirst
: Locus name as it appears in First
NameInSecond
: Locus name as it appears in Second
StringSimilarity
: The distance between the two approximately matching names. Lower means more similar.
ColumnsInFirst
: If First is a data.frame, these correspond to the columns in an excel file that hold the original data table.
ColumnsInSecond
: See above, but for second.
1 2 3 4 5 | # look for closely matching locus names between the two steelhead example data sets
CompareLocusNames(sthd.geno.A, sthd.geno.B)
# look for the standard Omykiss locus names in sthd.geno.B
CompareLocusNames(sthd.geno.B, Omykiss.Standard.Loci)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.