Hi Joseph,

I cannot reproduce this (but I'm still using R-2.12.0):

> library(GenomicRanges)
> z <- GRanges(seqnames=paste("chr",seq(3), sep=""),
+              ranges=IRanges(start=c(1,300,600), width=50),
+              strand=c("+", "-", "*"))
> strand(z)
'factor' Rle of length 3 with 3 runs
  Lengths: 1 1 1
  Values : + - *
Levels(3): + - *
> strand(z) <- "*"
>
> z
GRanges with 3 ranges and 0 elementMetadata values
    seqnames     ranges strand |
       <Rle>  <IRanges>  <Rle> |
[1]     chr1 [  1,  50]      * |
[2]     chr2 [300, 349]      * |
[3]     chr3 [600, 649]      * |

seqlengths
 chr1 chr2 chr3
   NA   NA   NA
> sessionInfo()
R version 2.12.0 (2010-10-15)
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] GenomicRanges_1.2.3 IRanges_1.8.8

What's puzzling me is all those packages loaded via a namespace
that you get. Could it be that something went wrong with your update
from R-2.12.0 to R-2.12.1? I would suggest you reinstall IRanges and
GenomicRanges from scratch see if that solves the problem (and if
it does, then I would suggest you reinstall all your packages from
scratch).

Cheers,
H.

On 01/17/2011 04:05 PM, Joseph Scandura wrote:
I recently updated BioC to 2.12.1 and now find a new issue when assigning 
strand to a GRanges object.

The problem must be something straightforward but I have not been able to track 
it down.

################### Example:
z=GRanges(seqnames=paste("chr",seq(3), sep=""), ranges = IRanges(start=c(1,300,600), width=50), 
strand=c("+", "-", "*"))
strand(z)
        'factor' Rle of length 3 with 3 runs
          Lengths: 1 1 1
          Values : + - *
        Levels(3): + - *
strand(z) = "*"  #this used to assign a strand of "*" to all elements in z
Error in x[[name, exact = FALSE]] :
   missing '[[' method for Sequence class GRanges

traceback()
10: stop("missing '[[' method for Sequence class ", class(x))
9: x[[name, exact = FALSE]]
8: x[[name, exact = FALSE]]
7: object$call
6: object$call
5: update.default(x, strand = value)
4: update(x, strand = value)
3: update(x, strand = value)
2: `strand<-`(`*tmp*`, value = "*")
1: `strand<-`(`*tmp*`, value = "*")

sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-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   utils   methods base

other attached packages:
[1] GenomicRanges_1.2.3 IRanges_1.8.8       Biobase_2.10.0

loaded via a namespace (and not attached):
  [1] annotate_1.28.0                     AnnotationDbi_1.12.0                
biomaRt_2.6.0
  [4] Biostrings_2.18.2                   BSgenome_1.18.2                     
BSgenome.Ecoli.NCBI.20080805_1.3.16
  [7] ChIPpeakAnno_1.6.0                  DBI_0.2-5                           
DESeq_1.2.1
[10] gdata_2.8.1                         genefilter_1.32.0                   
geneplotter_1.28.0
[13] GO.db_2.4.5                         gplots_2.8.0                        
graphics_2.12.1
[16] grDevices_2.12.1                    grid_2.12.1                         
gtools_2.6.2
[19] limma_3.6.9                         MASS_7.3-9                          
multtest_2.6.0
[22] org.Hs.eg.db_2.4.6                  RColorBrewer_1.0-2                  
RCurl_1.5-0
[25] RMySQL_0.7-5                        RSQLite_0.9-4                       
splines_2.12.1
[28] survival_2.36-2                     tools_2.12.1                        
XML_3.2-0
[31] xtable_1.5-6
###################
Joe

_______________________________________________
Bioc-sig-sequencing mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing


--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: [email protected]
Phone:  (206) 667-5791
Fax:    (206) 667-1319

_______________________________________________
Bioc-sig-sequencing mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing

Reply via email to