[BioC] seqSegment readGeneric() function error

Martin Morgan mtmorgan at fhcrc.org
Sat Nov 19 18:15:19 CET 2011


Hi --

On 11/19/2011 07:55 AM, jiayu wen wrote:
> Dear list,
>
> I have been trying to use seqmentSeq package. Running the examples in the package was successful, but on my data gives error at "readGeneric" function:
>
> here is my test code and attached data files (was attached, but held for review because it is bigger than 40 KB).
> libfiles<- c("V010.mapped_tt.txt","V010.mapped_tt2.txt")
> libnames<- c( "tt1","tt2")
> replicates<- c("fGS_OSS","fGS_OSS")
> aD<- readGeneric(files = libfiles, dir = paste(datadir,"test/",sep=""), header = TRUE,
> 		replicates = replicates, libnames = libnames,
> 		chrs = c("chr2L","chr2R"), chrlens = c(23011544,21146708),  gap = 100,polyLength = 10)
>
>
> Reading files......done!
> Analysing tags..........done!
> Error in validObject(.Object) :
>    invalid class “GRanges” object: 'ranges' contains values outside of sequence bounds

I don't have experience with segmentSeq but this error occurs when a 
GRanges object is constructed with ranges that are outside the bounds of 
the sequence lengths (10 > 9 below)

 > GRanges("A", IRanges(1, 10), seqlengths=c(A=9))
Error in validObject(.Object) :
   invalid class "GRanges" object: 'ranges' contains values outside of 
sequence bounds

I'd guess that your reads dangled over the edges of the chromosomes a 
little, and that a work-around is to expand chrlens by a few 
nucleotides. Alternatively, this could be a real error, e.g., because 
the lengths you provide do not match the lengths of the chromosomes  in 
the alignment.

Hope that helps,

Martin

>
> debugging message:
>
> Enter a frame number, or 0 to exit
>
> 1: readGeneric(files = libfiles, dir = paste(datadir, "test/", sep = ""), head
> 2: .processTags(Tags, verbose = verbose, estimationType = estimationType, gap
> 3: `seqinfo<-`(`*tmp*`, new2old = chrmatch, value =<S4 object of class "Seqin
> 4: `seqinfo<-`(`*tmp*`, new2old = chrmatch, value =<S4 object of class "Seqin
> 5: update(x, seqnames = makeNewSeqnames(x, new2old, seqlevels(value)), seqinfo
> 6: update(x, seqnames = makeNewSeqnames(x, new2old, seqlevels(value)), seqinfo
> 7: initialize(object, ...)
> 8: initialize(object, ...)
> 9: validObject(.Object)
>
>
>> sessionInfo()
> R version 2.14.0 (2011-10-31)
> 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=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
>   [7] LC_PAPER=C                 LC_NAME=C
>   [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] grid      stats     graphics  grDevices utils     datasets  methods
> [8] base
>
> other attached packages:
>   [1] Rmpi_0.5-9          snow_0.3-7          segmentSeq_1.6.0
>   [4] ShortRead_1.12.0    latticeExtra_0.6-19 RColorBrewer_1.0-5
>   [7] Rsamtools_1.6.1     lattice_0.20-0      GenomicRanges_1.6.3
> [10] baySeq_1.8.0        ggplot2_0.8.9       proto_0.3-9.2
> [13] reshape_0.8.4       plyr_1.6            limma_3.10.0
> [16] Biostrings_2.22.0   IRanges_1.12.1
>
> loaded via a namespace (and not attached):
> [1] Biobase_2.14.0     bitops_1.0-4.1     BSgenome_1.22.0    hwriter_1.3
> [5] RCurl_1.7-0        rtracklayer_1.14.3 tools_2.14.0       XML_3.4-3
> [9] zlibbioc_1.0.0
>
>
> Thank you very much for the help,
>
> Jean
> 	[[alternative HTML version deleted]]
>
>
>
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor


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

Location: M1-B861
Telephone: 206 667-2793



More information about the Bioconductor mailing list