
pairParam(fragments, discard=GRanges(), restrict=NULL, cap=NA)
:
Creates a pairParam object.
Each argument is placed in the corresponding slot, with coercion into the appropriate type.
x
is a pairParam object.
x$name
:
Returns the value in slot name
.
x
is a pairParam object.
show(x)
:
Describes the parameter settings in plain English.
reform(x, ...)
:
Creates a new pairParam object, based on the existing x
.
Any named arguments in ...
are used to modify the values of the slots in the new object, with type coercion as necessary.
fragments
:GRanges
object containing the coordinates of the restriction fragments
restrict
:
discard
:GRanges
object containing intervals in which any alignments will be discarded
cap
:
The fragments
object defines the genomic interval spanned by each restriction fragment.
All reads are generated around restriction sites, so the spatial resolution of the experiment depends on such sites.
The object can be can be obtained by applying cutGenome
on an appropriate BSgenome
object.
If restrict
is supplied, reads will only be extracted for the specified chromosomes.
This is useful to restrict the analysis to interesting chromosomes, e.g., no contigs/scaffolds or mitochondria.
restrict
can also be a n
-by-2 matrix, specifying n
pairs of chromosomes over which read pairs are to be counted.
If discard
is set, a read will be removed if the corresponding alignment is wholly contained within the supplied ranges.
Any pairs involving reads discarded in this manner will be ignored.
This is useful for removing unreliable alignments in repeat regions.
If cap
is set to a non-NA
value, an upper bound will be placed on the number of read pairs that are counted for each fragment pair (after any removal due to discard
).
This protects against spikes in the read pair density throughout the interaction space.
Such spikes may be caused by technical artifacts like PCR duplication or repeats, which were not successfully removed in prior processing steps.
cutGenome
,
squareCounts
cuts <- readRDS(system.file("exdata", "cuts.rds", package="diffHic"))
blah <- pairParam(cuts)
blah <- pairParam(cuts, discard=GRanges("chrA", IRanges(1, 10)))
blah <- pairParam(cuts, restrict='chr2')
blah$fragments
blah$restrict
blah$cap
# Use 'reform' if only some arguments need to be changed.
blah
reform(blah, restrict='chr3')
reform(blah, discard=GRanges())
reform(blah, cap=10)
# Different restrict options.
pairParam(cuts, restrict=c('chr2', 'chr3'))
pairParam(cuts, restrict=cbind('chr2', 'chr3'))
pairParam(cuts, restrict=cbind(c('chr1', 'chr2'), c('chr3', 'chr4')))
Run the code above in your browser using DataLab