Description Usage Arguments Value Examples
Writes a script to convert a BED file to a clean bedGraph file.
1 2 3 4 5 6 | CleanBEDtoBG(
in_bed,
out_bedGraph = NA,
unwanted_chromosomes = NULL,
alignment = "hg19"
)
|
in_bed |
Name of sorted BAM file to be converted to a bedGraph file. Required. |
out_bedGraph |
Name of bedGraph output file, including full directory path; a string. Default in_bam prefix. |
unwanted_chromosomes |
A vector of unwanted chromosomes that are present in the BAM file. |
alignment |
The human genome alignment used, either "hg19" or "hg38". Default "hg19" |
deposits bedGraph from BED in same directory
1 2 3 4 5 6 7 8 9 | bam <- system.file("extdata/chr4and5.bam", package="nearBynding")
out_bed <- "bamto.bed"
## convert BAM to BED
if(suppressWarnings(system2("bedtools", "--version",
stdout = NULL, stderr = NULL)) == 0){
system2("bedtools", paste0("bamtobed -i ", bam, " > ", out_bed))
}
CleanBEDtoBG(in_bed = out_bed,
alignment = "hg38")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.