#################################################################################
#################################################################################
## Random Read Reduction in R for ChIP-SEQ data ##
## ##
## Author: ahorvath (horvath.attila4444@gmail.com) ##
## ##
## Used statistical models: ##
## - 3 parameter Asymtotic model: y ~ A - (B ^ x) * C ##
## - Weibull model: y ~ A - (B ^ (x ^ d)) * C ##
## ##
#################################################################################
#################################################################################
R4ChIPSEQ-1.0.0.R -t <treatment-file> [-c <control-file>] [-b <begin>] [-e <end>]
[-o <observations>] [-n <name>] [-G <genomsize>] [-x <experiments>]
[-M <macs-program>] [-m <mfold-low-limit,mfold-low-limit>]
[-p <pvalue>] [-w <workdir>] [-k] [-L] [-N] [-T] [-S] [-j]
Example : Rscript R4ChIPSEQ-1.0.0.R -t /path/to/bedfile.bed -o 11 -n expname -w /path/to/workdir
-t|--treatment <treatment-file> --> The treatment file in BED format, mandatory parameter
-c|--control <control-file> --> The control file in BED format, optional parameter
-b|--begin <begin> --> The starting point of the reduction, the value has to be in interval [0,1), optional parameter (default=0.1)
-e|--end <end> --> The ending point of the reduction, the value has to be in interval [0,1) and greater than value begin, optional parameter (default=1.0)
-o|--observations <observations> --> Defines necessary experimental points, including begin and start points
-n|--name <name> --> Name of experiment, optional macs parameter (default="NA"), see more in the Macs Manual
-G|--genomsize <genom-size> --> Size of genome - optional macs parameter, see more in the Macs Manual
-x|--experiments <experiment-count> --> Defines count of experiments, optional parameter (default=1)
-D|--dstart --> start value of d in Weibull model, optional parameter (default=0.7)
-M|--macs <macs-program> --> Defines count of experiments, optional parameter (default="macs")
-m|--mfold <m-start,mfold-end> --> Range of mfold, optional macs parameter (default=10,30), see more in the Macs Manual
-p|--pvalue <p-value> --> P-value cutoff, optional macs parameter (default=1e-5), see more in the Macs Manual
-w|--workdir <workdir> --> Work directory of read reduction process
-k|--keepfiles --> Keeps the reduced files, optional parameter (default=false)
-L|--nolamba --> If true, MACS will use fixed background lambda as local lambda for every peak region, optional parameter (default=false)
-N|--nomodel --> Whether or not to build the shifting model, optional parameter (default=false)
-T|--tagsize --> Tag size. This will overide the auto detected tag size.
-S|--shiftsize --> The arbitrary shift size in bp. When nomodel is true, MACS will use this value as 1/2 of fragment size, optional parameter (default=100)
-j|--jump --> Jump peak calling and model building process (default=false)