Get SNPs from a data frame.

get_snp(df, row = NULL, top = NULL, col.snp = SNPs, col.pmid = PMID)

Arguments

df

Data frame containing SNPs. If top is set, df must also contain PubMed IDs.

row

Integer. Optional. Specifies row from which SNP shall be obtained. Works best with a data frame listing counts only as from count_snp(). If neither row nor top is given, row is automatically set to 1.

top

Integer. Optional. Specifies number of most frequent SNPs to return.

col.snp

Symbol. Column containing SNPs.

col.pmid

Symbol. Column containing PubMed IDs. Necessary if the data frame provided is not a count data frame.

Value

String or character vector containing SNPs.

Details

Get SNPs from a data frame.

  • If a data frame containing SNP counts as from count_snp() is provided, these SNPs are specified by the row they are listed in. To get the SNPs by row, set the row argument.

  • If a data frame with PubMed IDs is provided, these SNPs are specified by their top occurrence. To get the SNPs by frequency, set the top argument.

If neither row nor top is provided, row is automatically set to 1.

See also