getmethmat: Makes methylation count matrix

Description Usage Arguments Details Value Examples

View source: R/withDoc.R

Description

Makes methylation count matrix using output from either BSMAP or Bismark.

Usage

1
getmethmat(filnames, sample.id, filtype = "bsmap")

Arguments

filnames

input filenames

sample.id

sample IDs

filtype

"bsmap", "bismarkCoverage","bismarkCytosineReport". Default is "bsmap". "bismarkCoverage" files, have the columns: chr,start,end, number of cytosines (methylated bases) and number of thymines (unmethylated bases). "bismarkCytosineReport" have the columns: chr,start, strand, number of cytosines (methylated bases) , number of thymines (unmethylated bases),context and trinucletide context format.

Details

Removes sites with 0 counts in all samples.

Input file from BSMAP has columns: chromosome, position, strand, context, ratio, eff_CT_count, C_count, CT_count, rev_G_count, rev_GA_count, CI_lower, CI_upper.

Input file from Bismark coverage for CG only has columns "chrBase","chr","base","strand","coverage","freqC","freqT"

Sample input files from BSMAP: sample1_methratio.txt, sample1_mehtratio.txt

For BSMAP input files, extracts CpGs and output in filname.CpG in the current working directory. Adds "Chr" to chromosome name and output in filname.CpG_chr.

Value

methylation count matrix where rows are CpG sites and columns are: chromosome, start, end, strand, number of Ts+Cs for sample 1, number of Cs for sample 1, number of Ts for sample 1, ....

Examples

1
2
3
4
5
6
## Not run: 
 file1 = system.file("extdata","sample1_methratio.txt", package="deconvSeq")
 file2 = system.file("extdata","sample2_methratio.txt", package="deconvSeq")
 methmat = getmethmat(filnames=c(file1,file2), sample.id=c("sample1","sample2"), filtype="bsmap")

## End(Not run)

rosedu1/deconvSeq documentation built on Aug. 19, 2020, 7:10 p.m.