collapse.bed | R Documentation |
Merge overlapping peaks in a provided .bed file.
collapse.bed(
bed,
maximal.distance = 0,
keep.strandness = FALSE,
only.one.strand = NULL,
score.operation = "mean",
bed.header = FALSE,
sep = "\t",
return.bed = TRUE,
export.file.name = NULL,
export.header = FALSE,
verbose = TRUE
)
bed |
Two options are possible: |
maximal.distance |
Maximal distance between regions allowed for regions to be merged. By default |
keep.strandness |
Logic value to indicate whether to force to only merge regions that are in the same strand. By default |
only.one.strand |
Atomic string to indicate whether to force merge for one specific strand only. It must be indicated the wished strand (e.g., '+', '-', '.'). Regions in the other strand/s will be kept without any modification. By default |
score.operation |
Applicable only if the regions contain scores. Atomic string to indicate the operation to apply to the scores of merged regions. Possible choices: 'mean', 'median', 'sum'. By default |
bed.header |
Logic value to define whether the .bed file contains an header or not. By default |
sep |
String containing the separator character for a .bed file. By default |
return.bed |
Logic value to define if to return the bed as a data.frame. By default |
export.file.name |
Optional: string to define the path to the file to be exported, if required. By default |
export.header |
Logic value to define whether the header should be exported in the sorted bed file. By default |
verbose |
Logic value to indicate whether messages should be printed or not. By default |
The function pre-sorts the bed and keeps only unique rows and only up to 6 columns (chr, start, end, name, score, strand).
The names of the regions (if available) of merged regions corresponds to the concatenation of all original region's name.
To get more information about the bed file format see the following page:
https://genome.ucsc.edu/FAQ/FAQformat.html#format1.
If required, returns a data.frame corresponding to the collapsed .bed file.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.