Search
Question: error in coverting readaligned object to GenomeData
0
gravatar for Andreia Fonseca
6.3 years ago by
Andreia Fonseca810 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. > 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") 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 -- ---------------------------------------------------------------------- ----------------------- Andreia J. Amaral, PhD BioFIG - Center for Biodiversity, Functional and Integrative Genomics Instituto de Medicina Molecular University of Lisbon Tel: +352 217500000 (ext. office: 28253) email:andreiaamaral@fm.ul.pt ; andreiaamaral@fc.ul.pt [[alternative HTML version deleted]]
ADD COMMENTlink modified 6.3 years ago by Martin Morgan ♦♦ 20k • written 6.3 years ago by Andreia Fonseca810
0
gravatar for Martin Morgan
6.3 years ago by
Martin Morgan ♦♦ 20k
United States
Martin Morgan ♦♦ 20k wrote:
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
ADD COMMENTlink written 6.3 years ago by Martin Morgan ♦♦ 20k
Hi Martin, I got the instructions in the vignette of PICS library which I want to use get my peaks object. Can PICS handle a GRanges object? Thanks Andreia On Mon, Jul 18, 2011 at 11:25 PM, Martin Morgan <mtmorgan@fhcrc.org> wrote: > 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 > -- ---------------------------------------------------------------------- ----------------------- Andreia J. Amaral, PhD BioFIG - Center for Biodiversity, Functional and Integrative Genomics Instituto de Medicina Molecular University of Lisbon Tel: +352 217500000 (ext. office: 28253) email:andreiaamaral@fm.ul.pt ; andreiaamaral@fc.ul.pt [[alternative HTML version deleted]]
ADD REPLYlink written 6.3 years ago by Andreia Fonseca810
On 07/19/2011 01:02 AM, Andreia Fonseca wrote: > Hi Martin, > > I got the instructions in the vignette of PICS library which I want to > use get my peaks object. Can PICS handle a GRanges object? Hi Andreia -- I guess I spoke too quickly; I didn't realize that PICS implemented a method to coerce from AlignedRead to GenomeData; I guess this is really in the PICS package maintainer's court, so I'll get out of the way and let Raphael reply. Martin > Thanks > Andreia > > On Mon, Jul 18, 2011 at 11:25 PM, Martin Morgan <mtmorgan at="" fhcrc.org=""> <mailto:mtmorgan at="" fhcrc.org="">> wrote: > > 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 > > > > > -- > -------------------------------------------------------------------- ------------------------- > Andreia J. Amaral, PhD > BioFIG - Center for Biodiversity, Functional and Integrative Genomics > Instituto de Medicina Molecular > University of Lisbon > Tel: +352 217500000 (ext. office: 28253) > email:andreiaamaral at fm.ul.pt <mailto:email%3aandreiaamaral at="" fm.ul.pt=""> ; > andreiaamaral at fc.ul.pt <mailto:andreiaamaral at="" fc.ul.pt=""> > -- Computational Biology Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: M1-B861 Telephone: 206 667-2793
ADD REPLYlink written 6.3 years ago by Martin Morgan ♦♦ 20k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 168 users visited in the last hour