[Bioc-sig-seq] Rsamtools append
burak kutlu
burak_kutlu at yahoo.com
Sat Apr 3 01:17:36 CEST 2010
Hi
Following the example given in this thread:
http://www.mail-archive.com/bioc-sig-sequencing@r-project.org/msg00805.html
I am trying to "append" the scanned bam files, but somehow I can't.
The code runs but I only have reads from the first chromosome
Any ideas?
Many thanks in advance
-burak
Here's what I am trying to do:
my.bam.file <- paste(barcodeDir, "/", bfFiles[2], "/output/mapping/solid0444_20100121_bcSample1_F3.bam",sep="")
lens <- org.Mm.egCHRLENGTHS
lens <- lens[c(1:19,"X","Y")]
i=2
which <- RangesList(IRanges(start=1,end=lens[i]))
names(which) <- paste("chr",names(lens)[i],sep="")
params <- ScanBamParam(which=which)
myReads <<- scanBam(my.bam.file,param=params)
for(i in c(2:length(lens))){
which <- RangesList(IRanges(start=1,end=lens[i]))
names(which) <- paste("chr",names(lens)[i],sep="")
params <- ScanBamParam(which=which)
myReads <<- append(myReads,scanBam(my.bam.file,param=params)[[1]])
}#i
R version 2.11.0 alpha (2010-03-29 r51485)
x86_64-unknown-linux-gnu
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] grid stats graphics grDevices datasets utils methods
[8] base
other attached packages:
[1] rtracklayer_1.7.11
[2] RCurl_1.3-1
[3] bitops_1.0-4.1
[4] Rsamtools_0.2.0
[5] ggplot2_0.8.7
[6] digest_0.4.2
[7] reshape_0.8.3
[8] plyr_0.1.9
[9] proto_0.3-8
[10] org.Mm.eg.db_2.4.0
[11] RSQLite_0.8-4
[12] DBI_0.2-5
[13] AnnotationDbi_1.9.6
[14] Biobase_2.7.5
[15] ShortRead_1.5.21
[16] lattice_0.18-3
[17] BSgenome.Mmusculus.UCSC.mm9_1.3.16
[18] BSgenome_1.15.20
[19] GenomicFeatures.Mmusculus.UCSC.mm9_0.1.2
[20] GenomicFeatures_0.5.1
[21] GenomicRanges_0.1.0
[22] Biostrings_2.15.26
[23] IRanges_1.5.73
loaded via a namespace (and not attached):
[1] biomaRt_2.3.5 hwriter_1.2 tools_2.11.0 XML_2.8-1
More information about the Bioc-sig-sequencing
mailing list