Run full method for detecting significant interactions in capture Hi-C experiments, starting
either from a BAM file or preprocessed data from prepare.data
chicane(
bam = NULL,
baits = NULL,
fragments = NULL,
interactions = NULL,
replicate.merging.method = "sum",
distribution = "negative-binomial",
include.zeros = "none",
bait.filters = c(0, 1),
target.filters = c(0, 1),
distance.bins = NULL,
multiple.testing.correction = c("bait-level", "global"),
adjustment.terms = NULL,
remove.adjacent = FALSE,
temp.directory = NULL,
keep.files = FALSE,
maxit = 100,
epsilon = 1e-08,
cores = 1,
trace = FALSE,
verbose = FALSE,
interim.data.dir = NULL
)
Path to a BAM file
Path to a BED file containing the baits
Path to a BED file containing all restriction fragments in the genome
Data table or path to a text file detailing fragment interactions, typically from prepare.data
.
Can be used instead of bam/baits/fragments specification if the text files have already been prepared.
Method that should be used for merging replicates, if applicable
Name of distribution of the counts. Options are 'negative-binomial', 'poisson', 'truncated-poisson', and 'truncated-negative-binomial'
String specifying what zero counts to include. Options are none (default), cis, and all.
Vector of length two, where the first element corresponds to the lower-end filter and the second to the upper-end filter. When global multiple testing correction is performed, altering the bait filtering settings may affect the number of significant results.
Vector of length two, giving lower and higher filter, respectively. Changing this filtering setting may affect multiple testing correction by altering the number of tests performed.
Number of bins to split distance into. Models are fit separately in each bin.
String specifying how multiple testing correction should be performed, by bait or globally.
Character vector of extra terms to adjust for in the model fit.
Logical indicating whether to remove all reads mapping to adjacent restriction fragments.
Directory where temporary files should be stored. Defaults to current directory.
Logical indicating whether to keep temporary files
Maximum number of IWLS iterations for fitting the model (passed to glm.control
)
Positive convergence tolerance for Poisson and negative binomial models. Passed to glm.control
Integer value specifying how many cores to use to fit model for cis-interactions.
Logical indicating if output should be produced for each of model fitting procedure. Passed to glm.control
or gamlss.control
Logical indicating whether to print progress reports.
Path to directory to store intermediate QC data and plots. NULL indicate skip intermediate results.
Data table with columns
String in chrN:start-end format identifying target fragment
String in chrN:start-end format identifying bait fragment
Chromosome of target fragment
Start coordinate of target fragment (zero-based)
End coordinate of target fragment
Chromosome of bait fragment
Start coordinate of bait fragment (zero-based)
End coordinate of bait fragment
Boolean indicating if the interaction is bait-to-bait (i.e. the fragment listed as target is also a bait)
The number of reads linking the bait to fragments in trans (a measure of "interactibility")
The number of reads linking the target to fragments in trans (a measure of "interactibility")
Distance between the midpoints of the bait and target fragments (basepairs). NA for trans interactions
The number of reads linking the two fragments
The expected number of reads linking the two fragments under the fitted model
P-value for test of the observed number of reads significantly exceeding the expected count
FDR-corrected p-value
# NOT RUN {
if( bedtools.installed() ) {
# start from BAM file
bam <- system.file('extdata', 'Bre80_2q35.bam', package = 'chicane');
baits <- system.file('extdata', '2q35.bed', package = 'chicane');
fragments <- system.file('extdata', 'GRCh38_HindIII_chr2.bed.gz', package = 'chicane');
results <- chicane(
bam = bam,
baits = baits,
fragments = fragments
);
}
# start from pre-processed data
data(bre80);
results <- chicane(interactions = bre80);
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab