Description Usage Arguments Details Value Author(s) Examples
The function extractGeneRegions
writes aligns or
some part of the stored aligns in a BAM file as reads into a
BAM output file.
1 | extractGeneRegions(src, trg, gl)
|
src |
|
trg |
|
gl |
|
Reference sequence names in geneList
object must all match
sequence names in source BAM files.
Numeric. Number of written alignments for each file.
Wolfgang Kaisers
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # + + + + + + + + + + + + + + + + + + #
# A) Create sampleBamFiles objects
# + + + + + + + + + + + + + + + + + + #
bam <- system.file("extdata","accepted_hits.bam",package="rbamtools")
outdir <- tempdir()
# Input sampleBamFiles object
ibs <- sampleBamFiles(bam)
# Output sampleBamFiles object
obs <- sampleBamFiles(file.path(outdir, "outu.bam"))
# + + + + + + + + + + + + + + + + + + #
# B) Create geneList Object
# + + + + + + + + + + + + + + + + + + #
rfile <- system.file("extdata",
"hs.ucsc.small.RData",
package="refGenome")
ucr <- loadGenome(rfile)
gt <- getGeneTable(ucr)
gl <- geneList(ucr, gt$gene_id)
extractGeneRegions(ibs, obs, gl)
bamFiles(obs) <- file.path(outdir, bamSort(obs, "out"))
bamIdxFiles(obs) <- paste(bamFiles(obs), "bai", sep=".")
createIndex(obs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.