readSNPTable: Load SNP table

Description Usage Arguments Value Author(s) Examples

View source: R/readSNPTable.R

Description

Loading SNPs from tab-delimited file or saved GRanges object

Usage

1
readSNPTable(FileName, seqLengths, format = "text")

Arguments

FileName

File Name.

seqLengths

A named vector indicating the chromosome lengths of the genome used.

format

File format. If format is set to "text", the argument FileName should refer to a tab-delimited text file in the format: chromosome position, where each line stands for a SNP. If format="GRanges", the file is assumed to be a GRanges object, containing the SNP coordinates, saved in rds format.

Value

A GRanges object containing the coordinates of the SNPs.

Author(s)

Lukas Burger lukas.burger@fmi.ch

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(MethylSeekR)

# get chromosome lengths
library("BSgenome.Hsapiens.UCSC.hg18")
sLengths=seqlengths(Hsapiens)

#read SNP data
snpFname <- system.file("extdata", "SNVs_hg18_chr22.tab",
package="MethylSeekR")
snps.gr <- readSNPTable(FileName=snpFname, seqLengths=sLengths)

LukasBurger/MethylSeekR documentation built on June 23, 2021, 8:46 a.m.