[Bioc-sig-seq] reduce error on RangedData with unused space names

Ivan Gregoretti ivangreg at gmail.com
Thu Feb 24 21:14:06 CET 2011


Most bug fixes go to the devel branch. When the bug is potentially
nasty, developers fix the release version as well.

The fixes made in today's devel will become the next release version.
If you are going to work with the Bioconductor tools, I strongly
recommend to switch to the devel branch.

Convinced by an experienced R user, I did the switch and I never regretted it.

Michael may have a better informed opinion.

Ivan


Ivan Gregoretti, PhD
National Institute of Diabetes and Digestive and Kidney Diseases
National Institutes of Health
5 Memorial Dr, Building 5, Room 205.
Bethesda, MD 20892. USA.
Phone: 1-301-496-1016 and 1-301-496-1592
Fax: 1-301-496-9878



On Thu, Feb 24, 2011 at 2:14 PM, Janet Young <jayoung at fhcrc.org> wrote:
> Hi,
>
> Thanks for the feedback (and the encouragement, Ivan).
>
> This brings up a couple of more general questions about versions and development cycles: as a regular user, I'm assuming it might be not be such a good idea for me to use R-devel and associated devel bioc versions, as I want stable code for my analyses. Is that true, or should I be playing with R-devel instead?
>
> Also, if I find a bug that's been fixed in devel but is still there in the main release, is it still useful to report that to y'all?  (I might install devel in parallel just for testing these kinds of things, even if I don't use it for most of my analyses).
>
> In general, do fixes make it into the main branch when packages get updated (which seems to happen quite often in the case of IRanges?) or should we wait for the next full version upgrade?  (for example, that ChIPpeakAnno/getSeq issue - it looks like it's been fixed in devel for a while now, but not in the main branch)
>
> Janet
>
>
>
>
>
>
> On Feb 24, 2011, at 7:41 AM, Ivan Gregoretti wrote:
>
>> Hi Michael and Janet,
>>
>> I think that the reduce bug still persists in the devel branch. I
>> updated all my Bioconductor packages yesterday and yet, following her
>> steps I get
>>
>>> reduce(myregions_RD)
>> Error in endoapply(x[, by], FUN) : 'FUN' did not produce an endomorphism
>>
>> I hope the sessionInfo() helps.
>>
>> Thank you,
>>
>> Ivan
>>
>>> sessionInfo()
>> R version 2.13.0 Under development (unstable) (2010-12-02 r53747)
>> Platform: x86_64-unknown-linux-gnu (64-bit)
>>
>> locale:
>> [1] LC_CTYPE=en_US.utf8       LC_NUMERIC=C
>> [3] LC_TIME=en_US.utf8        LC_COLLATE=en_US.utf8
>> [5] LC_MONETARY=C             LC_MESSAGES=en_US.utf8
>> [7] LC_PAPER=en_US.utf8       LC_NAME=C
>> [9] LC_ADDRESS=C              LC_TELEPHONE=C
>> [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C
>>
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>> other attached packages:
>> [1] ChIPpeakAnno_1.7.0                  limma_3.7.23
>> [3] org.Hs.eg.db_2.4.6                  GO.db_2.4.5
>> [5] RSQLite_0.9-4                       DBI_0.2-5
>> [7] AnnotationDbi_1.13.13               BSgenome.Ecoli.NCBI.20080805_1.3.17
>> [9] multtest_2.7.1                      Biobase_2.11.8
>> [11] biomaRt_2.7.1                       BSgenome.Mmusculus.UCSC.mm9_1.3.17
>> [13] BSgenome_1.19.3                     Biostrings_2.19.9
>> [15] GenomicRanges_1.3.18                IRanges_1.9.22
>>
>> loaded via a namespace (and not attached):
>> [1] MASS_7.3-11     RCurl_1.5-0     splines_2.13.0  survival_2.36-5
>> [5] XML_3.2-0
>>
>>
>> Ivan Gregoretti, PhD
>> National Institute of Diabetes and Digestive and Kidney Diseases
>> National Institutes of Health
>> 5 Memorial Dr, Building 5, Room 205.
>> Bethesda, MD 20892. USA.
>> Phone: 1-301-496-1016 and 1-301-496-1592
>> Fax: 1-301-496-9878
>>
>>
>>
>> On Thu, Feb 24, 2011 at 9:46 AM, Michael Lawrence
>> <lawrence.michael at gene.com> wrote:
>>> Thanks. Seems to be fixed already in devel.
>>>
>>> On Wed, Feb 23, 2011 at 12:15 PM, Janet Young <jayoung at fhcrc.org> wrote:
>>>
>>>> Hi again,
>>>>
>>>> I noticed that "reduce" gives an error on RangedData objects if there are
>>>> space names that contain no ranges:
>>>>        Error in endoapply(x[, by], FUN) : 'FUN' did not produce an
>>>> endomorphism
>>>>
>>>> I can work around it, but it'd great not to need to do that.  All the
>>>> details are below.
>>>>
>>>> thanks very much,
>>>>
>>>> Janet
>>>>
>>>> -------------------------------------------------------------------
>>>>
>>>> Dr. Janet Young (Trask lab)
>>>>
>>>> Fred Hutchinson Cancer Research Center
>>>> 1100 Fairview Avenue N., C3-168,
>>>> P.O. Box 19024, Seattle, WA 98109-1024, USA.
>>>>
>>>> tel: (206) 667 1471 fax: (206) 667 6524
>>>> email: jayoung  ...at...  fhcrc.org
>>>>
>>>> http://www.fhcrc.org/labs/trask/
>>>>
>>>> -------------------------------------------------------------------
>>>>
>>>>
>>>>
>>>>> library(IRanges,warn.conflicts=F)
>>>>
>>>>> myregions_RD <-
>>>> RangedData(IRanges(start=c(101L,201L,101L,101L),end=c(250L,300L,220L,501L)),space=c("chr1","chr1","chr1","chr2"),strand=c("+","+","+","+")
>>>>   )
>>>>
>>>>> #### this works
>>>>> reduce(myregions_RD)
>>>> RangedData with 2 rows and 1 value column across 2 spaces
>>>>        space     ranges |      strand
>>>>  <character>  <IRanges> | <character>
>>>> 1        chr1 [101, 300] |           +
>>>> 2        chr2 [101, 501] |           +
>>>>
>>>>> ### drop regions that are bigger than 300bp (now there's nothing left on
>>>> chr2)
>>>>> myregions_RD <- myregions_RD[which(width(myregions_RD)<=300),]
>>>>
>>>>> ### this doesn't work - reduce doesn't like a space without any elements
>>>>> reduce(myregions_RD)
>>>> Error in endoapply(x[, by], FUN) : 'FUN' did not produce an endomorphism
>>>>
>>>>> ### workaround - drop the unused space names
>>>>> myregions_RD <-
>>>> RangedData(IRanges(start=start(myregions_RD),end=end(myregions_RD)),space=as.character(space(myregions_RD)),strand=myregions_RD$strand
>>>>   )
>>>>
>>>>> ### now it works
>>>>> reduce(myregions_RD)
>>>> RangedData with 1 row and 1 value column across 1 space
>>>>        space     ranges |      strand
>>>>  <character>  <IRanges> | <character>
>>>> 1        chr1 [101, 300] |           +
>>>>
>>>>> sessionInfo()
>>>> R version 2.12.1 (2010-12-16)
>>>> 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] IRanges_1.8.9
>>>>
>>>> _______________________________________________
>>>> Bioc-sig-sequencing mailing list
>>>> Bioc-sig-sequencing at r-project.org
>>>> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
>>>>
>>>
>>>        [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> Bioc-sig-sequencing mailing list
>>> Bioc-sig-sequencing at r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
>>>
>
>



More information about the Bioc-sig-sequencing mailing list