View source: R/script - gene-match-o-matic 2000.R
create_similarityMatrix | R Documentation |
Compares two dataframes with SNP data (rows=individuals, columns=snp genotypes) and finds the genetics similarity between all individuals in set a and b (total checkups is nrow(samples) x nrow(lookup)). Returns a dataframe that contains all possible combinations between individuals of the sample set and the lookup set together with the similarity between them. Output is then: ID_sample (A given individual from the sample set), ID_match (which individual from lookup it was check against) and similarity (a number from 1 to 0 where 1 is a perfect match)
create_similarityMatrix(df_samples, df_lookup, naCutoff = 50)
df_samples |
A dataframe with individuals (rows) and snp genotypces (columns). Must contain a column "ID" that gives each individual a unique ID |
df_lookup |
The dataframe the df_sample is looked up against. Must be formated like df_samples |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.