bin_interactions_fs: Wrapper for bin_interactions() that interacts with the...

Description Usage Arguments Value Examples

Description

Places putative interactions into equally-sized bins based on the distances they span, and stores these on disk.

Usage

1
2
3
4
5
6
7
8
bin_interactions_fs(
  interactions_file,
  fragments_file,
  output_dir,
  min_dist = 2500,
  max_dist = Inf,
  bins = 5
)

Arguments

interactions_file

Path to (tsv or csv) file containing putative interactions. Its first line must state the columns names: baitID, preyID, N. Subsequent lines report one putative interaction each: a bait fragment ID, prey fragment ID and readcount.

fragments_file

Path to (bed) file containing fragment information. Its first line must state the column names: chrom, chromStart, chromEnd, ID. Each subsequent line reports the chromosome, starting coordinate, ending coordinate and ID of a fragment.

output_dir

Directory where the generated bins will be stored. Will be created if it does not exist.

min_dist

Minimum distance interactions must span to be included in the analysis. Distance is defined between fragment midpoints.

max_dist

Maximum distance interactions can span to be included in the analysis. Distance is defined between fragment midpoints.

bins

Number of bins to place the interactions into.

Value

List containing the output directory and an overview of bins.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
base = system.file("extdata",package="peaky")

interactions_file = paste0(base,"/counts.tsv")
fragments_file = paste0(base,"/fragments.bed")
bins_dir = paste0(base,"/bins")
## Not run: 
BI = bin_interactions_fs(interactions_file, fragments_file, output_dir=bins_dir)
print(BI)

## End(Not run)

cqgd/pky documentation built on Dec. 13, 2020, 3:32 a.m.