Steve, here is a simple example on what I'd like to do: I want to eliminate the
duplicated IRanges from the IRanges list. R-2.9.2 seems to have the "unique"
function visible to the end user, but not the R-2.11.0 version which has all
our current installation:
> x <- IRanges(start=c(20L, 8L, 20L, 22L), width=c(5L, 3L, 5L, 2L))
> x
IRanges object:
start end width
[1] 20 24 5
[2] 8 10 3
[3] 20 24 5
[4] 22 23 2
> unique(x)
IRanges object:
start end width
[1] 20 24 5
[2] 8 10 3
[3] 22 23 2
> sessionInfo()
R version 2.9.2 (2009-08-24)
x86_64-unknown-linux-gnu
locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ShortRead_1.2.1 lattice_0.17-26 BSgenome_1.12.5 Biostrings_2.12.10
[5] IRanges_1.2.3
loaded via a namespace (and not attached):
[1] Biobase_2.4.1 grid_2.9.2 hwriter_1.2 tools_2.9.2
>
-----Original Message-----
From: Steve Lianoglou [mailto:[email protected]]
Sent: Wednesday, November 03, 2010 9:38 AM
To: Kunbin Qu
Cc: [email protected]
Subject: Re: [Bioc-sig-seq] how to access the "unique" function in IRanges
Hi,
On Wed, Nov 3, 2010 at 12:12 PM, Kunbin Qu <[email protected]> wrote:
> Dear All,
>
> I have a RangedDataList which has many duplicated IRanges. I would like to
> have a unique set from the original IRanges. I was trying to use the "unique"
> function, by IRanges::unique (see below), but somehow it was still called
> from the base. Is there a way to access the unique function, or some other
> functions I can use to get a unique set of the original IRanges? Thanks.
Can you give a small example of the data that you, and also the result
you expect so we can try to work with it? Maybe you can dput() the
first few elements of your list, or just give a simple toy example in
another way that we could paste into an R session easily.
I'm not sure what you want your end result to be -- do you want to
remove elements in your RangedDataList that contain IRanges that
appear in other parts of the list? Also, why aren't you using an
IRangesList if you are storing IRanges in a list(?))
-steve
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
______________________________________________________________________
The contents of this electronic message, including any attachments, are
intended only for the use of the individual or entity to which they are
addressed and may contain confidential information. If you are not the intended
recipient, you are hereby notified that any use, dissemination, distribution,
or copying of this message or any attachment is strictly prohibited. If you
have received this transmission in error, please send an e-mail to
[email protected] and delete this message, along with any
attachments, from your computer.
_______________________________________________
Bioc-sig-sequencing mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing