This function will produce very different results depending on the parameters
provided by the user (elongationSize, midpoint) and the type of experiment
(paired-ends or single-ends).First, the specified elongationSize can induce different piling strategies.
The value '0' is special and interpreted as 'no elongation'. The piling result
will only represent the sequenced reads region. Internally the elongation value
is replaced by each read size.
If the user asks for midpoint piling strategy with elongationSize 0, the result
will only represent scores corresponding to the first leftmost or rightmost
base for reads respectively on positive and negative strand.
A strictly positive value is only valid for single-ends experiments
(paired-ends objects are assumed to carry their own insert size based on the
difference of coordinates between a read and its mate, hence NA is expected for
paired-ends experiments, if not, a warning is raised and the value is ignored).
This value represents the average DNA fragments (inserts) size in the
experiment (eventually computed with estimateElongationSize). For classic
elongation process (no midpoint) this value will be used to elongate the read
prior to pileup in order to represent the full DNA fragment in the results.
A value lower than the reads size is technically possible but scientifically
improbable, and can induce misleading interpretations, specially when compared
to elongation 0.
For midpoint piling, only the the first leftmost or rightmost base (for reads
respectively on positive and negative strand) are taken in account during
piling. However the elongationSize (coming from corresponding argument for
singleEnds or from object for paired-ends) is used to shift this score to the
expected 'center' or DNA fragment (ie. DNA fragment size size divided by 2).
As written earlier, NA is expected for paired-ends experiments but NOT for
single-ends ones which need an elongation value. Otherwise an error will stop
the execution.
All these cases are documented and represented as graphics in the pdf file
attached to this package.