readMeths: A function for reading data from the YAMA methylation aligner...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/processTags.R

Description

This function takes as input a set of files that describe the number of times a set of cytosines are observed to be methylated or unmethylated in some high-throughput sequencing data. It merges the data from these files into an object of 'alignmentMeth' class which can then be further processed to identify methylation loci.

Usage

1
readMeths(files, dir = ".", libnames, replicates, nonconversion, chrs)

Arguments

files

A character vector defining the file names of the alignment files to be read in.

dir

The directory in which the files are located.

libnames

A character vector giving the names of the samples to be read in.

replicates

A vector defining the replicate structure of the data. The ‘i’th and ‘j’th libraries are treated as replicates if and only if replicates[i] == replicates[j].

nonconversion

A numeric vector (all members should lie between 0 and 1) defining the non-conversion rate of each library. See alignmentMeth-class for details.

chrs

An (optional) character vector giving the names of the chromosomes to be read from the files. If ommitted, all chromosomes will be read in.

Value

An object of class alignmentMeth.

Author(s)

Thomas J. Hardcastle

See Also

alignmentMeth-class.

Examples

1
2
3
4
5
6
7
8
9
datadir <- system.file("extdata", package = "segmentSeq")
files <- c("short_18B_C24_C24_trim.fastq_CG_methCalls.gz",
"short_Sample_17A_trimmed.fastq_CG_methCalls.gz",
"short_13_C24_col_trim.fastq_CG_methCalls.gz",
"short_Sample_28_trimmed.fastq_CG_methCalls.gz")

mD <- readMeths(files = files, dir = datadir,
libnames = c("A1", "A2", "B1", "B2"), replicates = c("A","A","B","B"),
nonconversion = c(0.004777, 0.005903, 0.016514, 0.006134))

segmentSeq documentation built on Nov. 17, 2017, 8:51 a.m.