On 09/29/2011 05:26 PM, Janet Young wrote:
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...

yep, should be in 1.5.68 when it becomes available. Thanks for the suggestion. Martin


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


--
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109

Location: M1-B861
Telephone: 206 667-2793

_______________________________________________
Bioc-sig-sequencing mailing list
Bioc-sig-sequencing@r-project.org
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing

Reply via email to