[BioC] error in coverting readaligned object to GenomeData
Martin Morgan
mtmorgan at fhcrc.org
Tue Jul 19 00:25:35 CEST 2011
Hi Andreia --
On 07/18/2011 11:04 AM, Andreia Fonseca wrote:
> Dear all,
>
> I am newby in analysing chip-seq data and I am getting an error in coverting
> my readaligned object to a GenomeData object
>
> the commands that I am using are:
> library(ShortRead)
> library(PICS)
> library(ChIPpeakAnno)
> library(snowfall)
> exDir<-("/RAID/Paula_chip_seq_data/")
>
> dataIP_JKA<-readAligned(dirPath=exDir, type="Bowtie",
> pattern="110402_SN365_B_s_2_seq_GQG-1")
> dataIP_JKA<- as(dataIP_JKA, "GenomeData")
>
> Error in as.list.default(from) :
> no method for coercing this S4 class to a vector
> In addition: Warning message:
> Storing reads only by their start positions is deprecated. Please use a
> range representation like GRanges.
I'm not sure where you're getting the instructions to coerce to a
'GenomicData' object, but these are no longer supported. For a
reproducible example, I ran
library(ShortRead)
example(readAligned)
and then
as(aln2, "GRanges")
But likely you'll want to (a) get Bowtie to export sam or bam files and
(b) use GenomicRanges::readGappedAlignments to read the aligned data.
This will be a much smaller object, and already closer to the format
you're interested in.
>> dataCont_JKA
> class: AlignedRead
> length: 6443227 reads; width: 50 cycles
> chromosome: chr20 chr17 ... chr8 chr21
> position: 41162388 77764636 ... 59583233 34102674
> strand: - - ... - +
> alignQuality: NumericQuality
> alignData varLabels: similar mismatch
>
>
> I am getting also an error when trying to convert the map file into a
> RangeData object
>
> map<-read.table("/RAID/Paula_chip_seq_data/hg19.fa-50.bed", header =
> TRUE,colClasses = c("factor", "integer", "integer", "NULL"))
>> map<- as(map, "RangedData")
here I think you want to use rtracklayer::import().
Martin
>
> thanks for the help.
> Andreia
>
>
>
> sessionInfo()
> R version 2.13.1 (2011-07-08)
> 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] snowfall_1.84 snow_0.3-5
> [3] ChIPpeakAnno_1.8.0 limma_3.8.2
> [5] org.Hs.eg.db_2.5.0 GO.db_2.4.1
> [7] RSQLite_0.9-1 DBI_0.2-5
> [9] AnnotationDbi_1.14.1 BSgenome.Ecoli.NCBI.20080805_1.3.17
> [11] multtest_2.8.0 Biobase_2.12.2
> [13] biomaRt_2.8.1 PICS_1.6.0
> [15] BSgenome_1.20.0 ShortRead_1.10.4
> [17] Rsamtools_1.4.2 lattice_0.19-30
> [19] Biostrings_2.20.1 GenomicRanges_1.4.6
> [21] IRanges_1.10.4
>
> loaded via a namespace (and not attached):
> [1] grid_2.13.1 hwriter_1.2 MASS_7.3-13 RCurl_1.4-2
> [5] splines_2.13.1 survival_2.36-9 XML_3.1-0
>
>
>
>
>
--
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