Description Usage Arguments Value Examples
Writes a script to convert a BAM file to a clean bedGraph file.
1 | CleanBAMtoBG(in_bam, out_bedGraph = NA, unwanted_chromosomes = NULL)
|
in_bam |
Name of sorted BAM file to be converted to a bedGraph file. Required. |
out_bedGraph |
Name of bedGraph output file, including full directory path. Default in_bam prefix. |
unwanted_chromosomes |
A vector of unwanted chromosomes that are present in the BAM file. |
deposits bedGraph from BAM in same directory
1 2 3 4 5 6 7 8 9 10 | bam <- system.file("extdata/chr4and5.bam", package="nearBynding")
#sort BAM first
sorted_bam<-Rsamtools::sortBam(bam, "chr4and5_sorted")
CleanBAMtoBG(in_bam = sorted_bam)
## If BAM has unwanted chromosome "EBV"
## this file is from ENCODE database
CleanBAMtoBG(in_bam = "ENCFF288LEG.bam",
unwanted_chromosomes = "EBV")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.