PlotDistr: This function generates CPMW distribtion curve and barplot...

View source: R/ChIPseqSpikeInFree.R

PlotDistrR Documentation

This function generates CPMW distribtion curve and barplot using sacaling factor table.

Description

This function generates CPMW distribtion curve and barplot using sacaling factor table.

Usage

PlotDistr(data, SF = "test_SF.txt", prefix = "test", xlimMaxCPMW = NULL)

Arguments

data

a data.frame generated by function ParseReadCounts() or a file name of parsed matrix

prefix

prefix of output filename to save the plots and scaling factor values.

xlimMaxCPMW

NULL or a numeric value [ between 10 and 100 ] to define maximum CPMW in the distribtion plot (xlim).

metaFile

a data.frame of metadata by ReadMeta(); or a filename of metadata file.

Value

None

Examples

## 1. start from a parsedMatrix file

# parsedMatrixFile <- "your/path/test_parsedMatrix.txt"
# metaFile <- "your/path/sample_meta.txt"
# parsedDF <- read.table(parsedMatrixFile, sep="\t",header=TRUE,fill=TRUE,
# quote="",row.names=NULL ,check.names=F)

## use defalut setting 
# SF <- CalculateSF(data = parsedDF, metaFile = metaFile)  
# PlotDistr (data=parsedDF,SF=SF, prefix="your/path/test", xlimMaxCPMW=NULL)

## use custom setting for H3K9me3
# SF <- CalculateSF(data = parsedDF, metaFile = metaFile, 
#     maxLastTurn=0.97, cutoff_QC=1)  
# PlotDistr (data=parsedDF,SF=SF, prefix="your/path/test_manual_cutoff", xlimMaxCPMW=NULL)

## zoom out distribution curve
# PlotDistr (data=parsedDF,SF=SF, prefix="your/path/test_manual_cutoff_zoom", xlimMaxCPMW=50)


stjude/ChIPseqSpikeInFree documentation built on March 28, 2022, 5:36 a.m.