Hi, I have a suggestion to make ScanBamParam easier to use for coding amateurs like myself (I'm still sometimes confused with the many ways to encode genomic regions):
Is it easy/possible to change bamWhich function to accept GRanges objects, rather than requiring RangesList? See below... thanks, as usual, Janet ############ library(Rsamtools) myGR <- GRanges(seqnames="chr1",ranges=IRanges(start=1,end=100)) # I can use GRanges as the "which" argument if I do it when I create the ScanBamParam object myparams1 <- ScanBamParam(which=myGR) #but not if I try to set later myparams2 <- ScanBamParam() bamWhich(myparams2) <- myGR ### Error in checkSlotAssignment(object, name, value) : ### assignment of an object of class "GRanges" is not valid for slot "which" ### in an object of class "ScanBamParam"; is(value, "RangesList") is not TRUE ## it's OK, though coercion does work. bamWhich(myparams2) <- as(myGR,"RangesList") sessionInfo() R version 2.13.1 (2011-07-08) Platform: i386-apple-darwin9.8.0/i386 (32-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] Rsamtools_1.4.3 Biostrings_2.20.4 GenomicRanges_1.4.8 IRanges_1.10.6 ########### _______________________________________________ Bioc-sig-sequencing mailing list Bioc-sig-sequencing@r-project.org https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing