View source: R/ChIPseqSpikeInFree.R
ChIPseqSpikeInFree | R Documentation |
This function wraps all steps. If you run ChIPseqSpikeInFree() seperately for two batches, the scaling factors will be not comparable between two batches. The correct way is to combine bamFiles parameter and create a new metadata file to include all bam files. Then re-run ChIPseqSpikeInFree().
ChIPseqSpikeInFree( bamFiles, chromFile = "hg19", metaFile = "sample_meta.txt", prefix = "test", binSize = 1000, cutoff_QC = 1.2, maxLastTurn = 0.99, ncores = 2 )
bamFiles |
a vector of bam filenames. |
chromFile |
chrom.size file. Given "hg19","mm10","mm9" or "hg38", will load chrom.size file from package folder. |
metaFile |
a filename of metadata file. the file must have three columns: ID (bam filename without full path), ANTIBODY and GROUP |
prefix |
prefix of output filename. |
binSize |
size of bins (bp). Recommend a value bwteen 200 and 10000 |
cutoff_QC |
a numeric value [between 0.95 and 1.20] to identiy sample of QC failure or poor enrichment [1.2 by default]. Slightly smaller cutoff_QC value (like 1) may imporve result when the enrichment is not ideal. |
maxLastTurn |
a numeric value [between 0.95 and 0.99] to define maximum fraction of reads to be included for identifying last turning point [0.99 by default]. Slightly smaller maxLastTurn value may imporve result when the enrichment is not ideal. |
ncores |
number of cores for parallel computing. |
A data.frame of the updated metaFile with scaling factor
## 1 first You need to generate a sample_meta.txt (tab-delimited txt file). # metaFile <- "your/path/sample_meta.txt" # meta <- ReadMeta(metaFile) # head(meta) # ID ANTIBODY GROUP # ChIPseq1.bam H3K27me3 WT # ChIPseq2.bam H3K27me3 K27M ## 2. bam files # bams <- c("ChIPseq1.bam","ChIPseq2.bam") # prefix <- "test" ## 3. run ChIPseqSpikeInFree pipeline # ChIPseqSpikeInFree(bamFiles=bams, chromFile="mm9",metaFile=metaFile,prefix="test") ## 4. run ChIPseqSpikeInFree pipeline with custom arguments for H3K9me3 with unideal enrichment # ChIPseqSpikeInFree(bamFiles=bams, chromFile="mm9", # metaFile=metaFile,prefix="test_manual_cutoffs", # cutoff_QC = 1, maxLastTurn=0.97)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.