Hi Michael,

Thank you for your reply.  I think my object may have been set up 
incorrectly as your suggested command does not give work on my data.

On 2/04/2011 12:08 AM, Michael Lawrence wrote:
>
>
> On Thu, Mar 31, 2011 at 8:34 PM, Lavinia Gordon 
> <lavinia.gordon@mcri.edu.au <mailto:lavinia.gordon@mcri.edu.au>> wrote:
>
>     Dear Bioconductors,
>
>     I am trying to export a RangedData object as a WIG track, but I am
>     getting this error:
>     > wig <- export.wig(B18mtrack, mycon, dataFormat = "auto")
>     Error in export.ucsc(object, con, subformat, append, ...) :
>      Track not compatible with WIG/bedGraph: Overlapping features must
>     be on separate strands and every feature width must be positive
>     > B18mtrack
>     RangedData with 33608 rows and 2 value columns across 1 space
>                space               ranges   |         chr         score
>     <character> <IRanges>   | <character> <numeric>
>     1               1     [ 15865,  15866]   |        chr1   0.003188034
>     2               1     [ 18827,  18828]   |        chr1   0.013269155
>     3               1     [ 29407,  29408]   |        chr1   0.006626525
>     4               1     [ 29425,  29426]   |        chr1   0.004264605
>     5               1     [ 29435,  29436]   |        chr1  -0.004953431
>     6               1     [ 69591,  69592]   |        chr1   0.013326089
>     7               1     [135252, 135253]   |        chr1   0.035002515
>     8               1     [533950, 533951]   |        chr1   0.002628425
>     9               1     [534242, 534243]   |        chr1   0.020180509
>     ...           ...                  ... ...         ...           ...
>     33600           1 [46361270, 46361271]   |       chr10  0.0051111176
>     33601           1 [46616291, 46616292]   |       chr10 -0.0518829821
>     33602           1 [46762634, 46762635]   |       chr10  0.0082029002
>     33603           1 [46762703, 46762704]   |       chr10  0.0017677983
>     33604           1 [46763197, 46763198]   |       chr10 -0.0079985873
>     33605           1 [46763211, 46763212]   |       chr10 -0.0001168199
>     33606           1 [46776799, 46776800]   |       chr10  0.0929834798
>     33607           1 [46915981, 46915982]   |       chr10 -0.0077882567
>     33608           1 [46951477, 46951478]   |       chr10 -0.0025202364
>
>     However, if I take away the last line of this object, it works:
>     > B18mtrack
>     RangedData with 33607 rows and 2 value columns across 1 space
>                space               ranges   |         chr         score
>     <character> <IRanges>   | <character> <numeric>
>     1               1     [ 15865,  15866]   |        chr1   0.003188034
>     2               1     [ 18827,  18828]   |        chr1   0.013269155
>     3               1     [ 29407,  29408]   |        chr1   0.006626525
>     4               1     [ 29425,  29426]   |        chr1   0.004264605
>     5               1     [ 29435,  29436]   |        chr1  -0.004953431
>     6               1     [ 69591,  69592]   |        chr1   0.013326089
>     7               1     [135252, 135253]   |        chr1   0.035002515
>     8               1     [533950, 533951]   |        chr1   0.002628425
>     9               1     [534242, 534243]   |        chr1   0.020180509
>     ...           ...                  ... ...         ...           ...
>     33599           1 [46344329, 46344330]   |       chr10 -0.0091757753
>     33600           1 [46361270, 46361271]   |       chr10  0.0051111176
>     33601           1 [46616291, 46616292]   |       chr10 -0.0518829821
>     33602           1 [46762634, 46762635]   |       chr10  0.0082029002
>     33603           1 [46762703, 46762704]   |       chr10  0.0017677983
>     33604           1 [46763197, 46763198]   |       chr10 -0.0079985873
>     33605           1 [46763211, 46763212]   |       chr10 -0.0001168199
>     33606           1 [46776799, 46776800]   |       chr10  0.0929834798
>     33607           1 [46915981, 46915982]   |       chr10 -0.0077882567
>
>     (The .wig file loads perfectly into the UCSC genome browser)
>
>     Can anyone tell me what is wrong?
>
>
> It's hard to say without having your complete dataset. Are you sure 
> none of the ranges are overlapping?
yes
> What happens if you try just the last 10 ranges?
The wig track loads without problem.
>
> What does this return: isDisjoint(ranges(B18mtrack)$chr10)

 > isDisjoint(ranges(B18mtrack)$chr10)
Error in function (classes, fdef, mtable)  :
   unable to find an inherited method for function "isDisjoint", for 
signature "NULL"
 > ranges(B18mtrack)$chr10
NULL

I thought I had followed the examples in the IRanges reference 
correctly, but I'll go back through and check.

Many thanks for your time,

Lavinia.


>
> Thanks,
> Michael
>
>     I thought it might be related to this post:
>     https://stat.ethz.ch/pipermail/bioconductor/2009-July/028470.html
>     but I can't see anything like this in my data.
>
>     With thanks for your time,
>
>     Lavinia Gordon.
>
>     R version 2.12.0 (2010-10-15)
>     Platform: x86_64-unknown-linux-gnu (64-bit)
>
>     locale:
>      [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>      [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>      [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
>      [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
>      [9] LC_ADDRESS=C               LC_TELEPHONE=C
>     [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
>     attached base packages:
>     [1] stats     graphics  grDevices utils     datasets  methods   base
>
>     other attached packages:
>     [1] IRanges_1.8.9      rtracklayer_1.10.6 RCurl_1.5-0      
>      bitops_1.0-4.1
>
>     loaded via a namespace (and not attached):
>     [1] Biobase_2.10.0      Biostrings_2.18.4   BSgenome_1.18.3
>     [4] GenomicRanges_1.2.3 XML_3.2-0
>
>
>
>
>     -- 
>     Senior Bioinformatics Officer
>     Murdoch Childrens Research Institute
>     Royal Children's Hospital
>     Flemington Road
>     Parkville
>     Victoria 3052
>     Australia
>     www.mcri.edu.au <http://www.mcri.edu.au>
>
>
>     ______________________________________________________________________
>     This email has been scanned by the MessageLabs Email Security System.
>     For more information please visit http://www.messagelabs.com/email
>
>     _______________________________________________
>     Bioconductor mailing list
>     Bioconductor@r-project.org <mailto:Bioconductor@r-project.org>
>     https://stat.ethz.ch/mailman/listinfo/bioconductor
>     Search the archives:
>     http://news.gmane.org/gmane.science.biology.informatics.conductor
>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
>
> If you have any question, please contact MCRI IT Helpdesk for further 
> assistance.
> ______________________________________________________________________


-- 
Senior Bioinformatics Officer
Murdoch Childrens Research Institute
Royal Children's Hospital
Flemington Road
Parkville
Victoria 3052
Australia
www.mcri.edu.au



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
	[[alternative HTML version deleted]]

