Convert Bam to Bed

bamtobed(file, outFile = gsub("\\.bam", ".bed", file), filtDup = FALSE)

Arguments

file

path to file to process (BAM).

outFile

path to output file (BED).

filtDup

output index name.

Value

path to BED.

Author

Kathryn Rozen-Gagnon

Examples

testFasta <- system.file("extdata/hg19Small.fa",package="CLIPflexR")
myIndex <- suppressWarnings(bowtie2_index(testFasta, overwrite = TRUE))
testFQ <- system.file("extdata/Fox3_Std_small.fq.gz",package="CLIPflexR")
FqFile <- decompress(testFQ,overwrite=TRUE)
FqFile_QF <- fastq_quality_filter(FqFile)
FqFile_QFCollapsed <- fastx_collapser(FqFile_QF)
FqFile_QFColStripped <- ctk_stripBarcode(FqFile_QFCollapsed)
FqFile_QFColStpClipped <- fastx_clipper(FqFile_QFColStripped)
bam <- suppressWarnings(bowtie_align(FqFile_QFColStpClipped,myIndex, overwrite = TRUE))
bamtobed(bam)
#> [1] "/Users/runner/work/_temp/Library/CLIPflexR/extdata/QF_Fox3_Std_small_collapse_rm5_clip.bed"