Description Usage Arguments Details Value Author(s) Examples
View source: R/prepareForHDF5.R
This function prepares the resulting array of a call to tallyBAM
for writing to an HDF5 tally file.
1 | prepareForHDF5( counts, reference )
|
counts |
An array as produced by a call to |
reference |
A DNAString object containing the reference sequence corresponding to the region that is described in the counts array – if this is |
This function performs the neccessary transformation to the array
returned by tallyBAM
to be compatible with the HDF5 tally file data structure.
A list with slots containing the Counts
,Coverages
,Deletions
and Reference
datasets for the given sample.
Paul Pyl
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(h5vc)
library(BSgenome.Hsapiens.UCSC.hg19)
files <- c("NRAS.AML.bam","NRAS.Control.bam")
bamFiles <- file.path( system.file("extdata", package = "h5vcData"), files)
chrom = "1"
startpos <- 115247090
endpos <- 115259515
theData <- lapply( bamFiles, function(bamf){
tallyBAM( file = bamf, chr = chrom, start = startpos, stop = endpos, ncycles = 10 )
})
reference <- getSeq(BSgenome.Hsapiens.UCSC.hg19, "chr1", startpos, endpos)
theData <- lapply(theData, prepareForHDF5, reference)
str(theData)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.