pvdiv_bigsnp_subset: Make a SNP dataframe subset from annotation table or a...

Description Usage Arguments Value Note

View source: R/pvdiv_gwas_results.R

Description

Given a dataframe created using pvdiv_table_topsnps(), this function creates a dataframe of SNP calls for the subset of SNPs from this annotation table.

Usage

1
pvdiv_bigsnp_subset(snp, type = c("anno", "range"), anno_df, chr, pos1, pos2)

Arguments

snp

A FBM.code256 object. Genomic information for Panicum virgatum. SNP data is available at doi:10.18738/T8/ET9UAU

type

One of "anno" or "range", depending on if you are using an annotation dataframe from pvdiv_table_topsnps() or a genomic interval.

anno_df

One dataframe of annotations from pvdiv_table_topsnps(). This dataframe needs to contain the columns CHR and region_start. It's recommended that you set rangevector = 0 in pvdiv_table_topsnps() to get the SNP itself using this function.

chr

Character string. The chromsome (e.g., "Chr01K") to get SNPs from.

pos1

Integer. The low position to start getting SNPs from.

pos2

Integer. The high position to stop getting SNPs from.

Value

A FBM.code256 object for the subset of SNPs in the annotation data frame or in the genomic interval.

Note

This function is a wrapper around bigsnpr functions to subset its SNP file format that may be useful if you have a small interval to look at or a small number of SNPs from an annotation table.


Alice-MacQueen/switchgrassGWAS documentation built on Jan. 23, 2022, 7:55 p.m.