BED2RangedData
2
0
Entering edit mode
Guest User ★ 13k
@guest-user-4897
Last seen 10.2 years ago
Deal All, I have a bed-file which is the putput from SISSRS peak calling that looks like this: chr1 24619151 24619191 55 chr1 24619551 24619591 66 chr1 24619951 24619991 71 chr1 24620831 24620871 56 chr1 24622451 24622751 54 chr1 48938391 48938431 43 chr1 58670811 58670851 33 chr1 84971591 84971631 22 chr1 84976011 84976051 20 chr1 84979971 84980051 22 when I try to convert it using BED2RangedData in R I get the following error: Error in `rownames<-`(`*tmp*`, value = c("55", "66", "71", "56", "54", : duplicate rownames not allowed -- output of sessionInfo(): > sessionInfo() R version 2.15.3 (2013-03-01) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=nb_NO.UTF-8 LC_NUMERIC=C LC_TIME=nb_NO.UTF-8 [4] LC_COLLATE=nb_NO.UTF-8 LC_MONETARY=nb_NO.UTF-8 LC_MESSAGES=nb_NO.UTF-8 [7] LC_PAPER=C LC_NAME=C LC_ADDRESS=C [10] LC_TELEPHONE=C LC_MEASUREMENT=nb_NO.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] grid stats graphics grDevices utils datasets methods base other attached packages: [1] ChIPpeakAnno_2.6.1 limma_3.14.1 [3] org.Hs.eg.db_2.8.0 GO.db_2.8.0 [5] RSQLite_0.11.2 DBI_0.2-5 [7] AnnotationDbi_1.20.3 BSgenome.Ecoli.NCBI.20080805_1.3.17 [9] BSgenome_1.26.1 GenomicRanges_1.10.7 [11] Biostrings_2.26.3 IRanges_1.16.4 [13] multtest_2.14.0 Biobase_2.18.0 [15] biomaRt_2.14.0 BiocGenerics_0.4.0 [17] VennDiagram_1.5.1 BiocInstaller_1.8.3 loaded via a namespace (and not attached): [1] MASS_7.3-22 parallel_2.15.3 RCurl_1.95-4.1 splines_2.15.3 stats4_2.15.3 [6] survival_2.36-14 tools_2.15.3 XML_3.96-0.2 -- Sent via the guest posting facility at bioconductor.org.
GO convert GO convert • 1.9k views
ADD COMMENT
0
Entering edit mode
Ou, Jianhong ★ 1.3k
@ou-jianhong-4539
Last seen 9 days ago
United States
Hi, You input is not a standard BED data. Please refer to http://genome.ucsc.edu/FAQ/FAQformat#format1 for details. Yours sincerely, Jianhong Ou LRB 710 Program in Gene Function and Expression 364 Plantation Street Worcester, MA 01605 On 3/27/13 11:08 AM, "R [guest]" <guest at="" bioconductor.org=""> wrote: >chr1 24619151 24619191 55 >chr1 24619551 24619591 66 >chr1 24619951 24619991 71 >chr1 24620831 24620871 56 >chr1 24622451 24622751 54 >chr1 48938391 48938431 43 >chr1 58670811 58670851 33 >chr1 84971591 84971631 22 >chr1 84976011 84976051 20 >chr1 84979971 84980051 22
ADD COMMENT
0
Entering edit mode
R ▴ 40
@r-5604
Last seen 3.7 years ago
Germany
It hast has the three required columns: chr, chrStart, chrEnd, right? I also tried the following file which is the output from bamtobed in bedtools: chr1 68003859 68003910 DJDP4KN1: 153:D1NRJACXX:3:1101:1661:2231 55 + chrX 85661697 85661748 DJDP4KN1: 153:D1NRJACXX:3:1101:2319:2241 255 - chr9 3014548 3014599 DJDP4KN1: 153:D1NRJACXX:3:1101:2854:2242 255 and got: Error in BED2RangedData("/media/seagate/seq/H3K27 ChipSeq/Project_Mjelle-ChIP-2012-11-06/ Sample_Mjelle-Chip-TCF7-Chip-Control/Mapped.bed", : No valid data.BED passed in, which is a data frame as BED format file with at least 3 fields in the order of: chromosome, start and end. Optional fields are name, score and strand etc. Please refer to http://genome.ucsc.edu/FAQ/FAQformat#format1 for details.
ADD COMMENT
0
Entering edit mode
Hi, Here is code that should work for you. YourPeaks = BED2RangedData(read.table("/media/seagate/seq/H3K27ChipSeq /Project_Mjelle-Ch IP-2012-11-06/Sample_Mjelle-Chip-TCF7-Chip- Control/Mapped.bed",sep="\t", header=FALSE)) Please let me know it works out for you. Thanks! Best regards, Julie On 3/27/13 11:34 AM, "R" <robinmjelle at="" gmail.com=""> wrote: > It hast has the three required columns: > chr, chrStart, chrEnd, right? > > I also tried the following file which is > the output from bamtobed in bedtools: > > chr1 68003859 68003910 DJDP4KN1: > 153:D1NRJACXX:3:1101:1661:2231 > 55 + > chrX 85661697 85661748 DJDP4KN1: > 153:D1NRJACXX:3:1101:2319:2241 > 255 - > chr9 3014548 3014599 DJDP4KN1: > 153:D1NRJACXX:3:1101:2854:2242 255 > and got: > Error in > BED2RangedData("/media/seagate/seq/H3K27 > ChipSeq/Project_Mjelle-ChIP-2012-11-06/ > Sample_Mjelle-Chip-TCF7-Chip-Control/Mapped.bed", > : > No valid data.BED passed in, which is a > data frame as BED format file with at > least 3 fields in the order of: chromosome, > start and end. Optional fields are > name, score and strand etc. Please refer to > http://genome.ucsc.edu/FAQ/FAQformat#format1 > for details. > > _______________________________________________ > 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
ADD REPLY
0
Entering edit mode
Yes, It must has the three required columns, and the 9 additional optional columns must be the same order as the it defined. If you missed any of them, just insert an empty one, except strand column, which can only accept '1' '+' '-1' '-' and '*'. You can download the develop version to accept a file name as inputs, otherwise, you must feed the function an object of data.frame. Yours sincerely, Jianhong Ou LRB 710 Program in Gene Function and Expression 364 Plantation Street Worcester, MA 01605 On 3/27/13 11:34 AM, "R" <robinmjelle at="" gmail.com=""> wrote: >It hast has the three required columns: >chr, chrStart, chrEnd, right? > >I also tried the following file which is >the output from bamtobed in bedtools: > >chr1 68003859 68003910 DJDP4KN1: >153:D1NRJACXX:3:1101:1661:2231 >55 + >chrX 85661697 85661748 DJDP4KN1: >153:D1NRJACXX:3:1101:2319:2241 > 255 - >chr9 3014548 3014599 DJDP4KN1: >153:D1NRJACXX:3:1101:2854:2242 255 >and got: >Error in >BED2RangedData("/media/seagate/seq/H3K27 >ChipSeq/Project_Mjelle-ChIP-2012-11-06/ >Sample_Mjelle-Chip-TCF7-Chip-Control/Mapped.bed", > : > No valid data.BED passed in, which is a >data frame as BED format file with at >least 3 fields in the order of: chromosome, >start and end. Optional fields are >name, score and strand etc. Please refer to >http://genome.ucsc.edu/FAQ/FAQformat#format1 >for details. > >_______________________________________________ >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
ADD REPLY
0
Entering edit mode
This file is not a valid BED file, but it *is* a valid BEDgraph file. Load it with: peaks <- rtracklayer::import("[cut]/Mapped.bed", format = "bedGraph") Michael On Wed, Mar 27, 2013 at 9:01 AM, Ou, Jianhong <jianhong.ou@umassmed.edu>wrote: > Yes, It must has the three required columns, and the 9 additional optional > columns must be the same order as the it defined. If you missed any of > them, just insert an empty one, except strand column, which can only > accept '1' '+' '-1' '-' and '*'. > > You can download the develop version to accept a file name as inputs, > otherwise, you must feed the function an object of data.frame. > > Yours sincerely, > > Jianhong Ou > > LRB 710 > Program in Gene Function and Expression > 364 Plantation Street Worcester, > MA 01605 > > > > > On 3/27/13 11:34 AM, "R" <robinmjelle@gmail.com> wrote: > > >It hast has the three required columns: > >chr, chrStart, chrEnd, right? > > > >I also tried the following file which is > >the output from bamtobed in bedtools: > > > >chr1 68003859 68003910 DJDP4KN1: > >153:D1NRJACXX:3:1101:1661:2231 > >55 + > >chrX 85661697 85661748 DJDP4KN1: > >153:D1NRJACXX:3:1101:2319:2241 > > 255 - > >chr9 3014548 3014599 DJDP4KN1: > >153:D1NRJACXX:3:1101:2854:2242 255 > >and got: > >Error in > >BED2RangedData("/media/seagate/seq/H3K27 > >ChipSeq/Project_Mjelle-ChIP-2012-11-06/ > >Sample_Mjelle-Chip-TCF7-Chip-Control/Mapped.bed", > > : > > No valid data.BED passed in, which is a > >data frame as BED format file with at > >least 3 fields in the order of: chromosome, > >start and end. Optional fields are > >name, score and strand etc. Please refer to > >http://genome.ucsc.edu/FAQ/FAQformat#format1 > >for details. > > > >_______________________________________________ > >Bioconductor mailing list > >Bioconductor@r-project.org > >https://stat.ethz.ch/mailman/listinfo/bioconductor > >Search the archives: > >http://news.gmane.org/gmane.science.biology.informatics.conductor > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
Btw, the error is a bug in the BED2RangedData function. It should not assume that all values in the BED name column are unique. Michael On Wed, Mar 27, 2013 at 1:08 PM, Michael Lawrence <michafla@gene.com> wrote: > This file is not a valid BED file, but it *is* a valid BEDgraph file. > Load it with: > > peaks <- rtracklayer::import("[cut]/Mapped.bed", format = "bedGraph") > > Michael > > > > On Wed, Mar 27, 2013 at 9:01 AM, Ou, Jianhong <jianhong.ou@umassmed.edu>wrote: > >> Yes, It must has the three required columns, and the 9 additional optional >> columns must be the same order as the it defined. If you missed any of >> them, just insert an empty one, except strand column, which can only >> accept '1' '+' '-1' '-' and '*'. >> >> You can download the develop version to accept a file name as inputs, >> otherwise, you must feed the function an object of data.frame. >> >> Yours sincerely, >> >> Jianhong Ou >> >> LRB 710 >> Program in Gene Function and Expression >> 364 Plantation Street Worcester, >> MA 01605 >> >> >> >> >> On 3/27/13 11:34 AM, "R" <robinmjelle@gmail.com> wrote: >> >> >It hast has the three required columns: >> >chr, chrStart, chrEnd, right? >> > >> >I also tried the following file which is >> >the output from bamtobed in bedtools: >> > >> >chr1 68003859 68003910 DJDP4KN1: >> >153:D1NRJACXX:3:1101:1661:2231 >> >55 + >> >chrX 85661697 85661748 DJDP4KN1: >> >153:D1NRJACXX:3:1101:2319:2241 >> > 255 - >> >chr9 3014548 3014599 DJDP4KN1: >> >153:D1NRJACXX:3:1101:2854:2242 255 >> >and got: >> >Error in >> >BED2RangedData("/media/seagate/seq/H3K27 >> >ChipSeq/Project_Mjelle-ChIP-2012-11-06/ >> >Sample_Mjelle-Chip-TCF7-Chip-Control/Mapped.bed", >> > : >> > No valid data.BED passed in, which is a >> >data frame as BED format file with at >> >least 3 fields in the order of: chromosome, >> >start and end. Optional fields are >> >name, score and strand etc. Please refer to >> >http://genome.ucsc.edu/FAQ/FAQformat#format1 >> >for details. >> > >> >_______________________________________________ >> >Bioconductor mailing list >> >Bioconductor@r-project.org >> >https://stat.ethz.ch/mailman/listinfo/bioconductor >> >Search the archives: >> >http://news.gmane.org/gmane.science.biology.informatics.conductor >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor@r-project.org >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> > > [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

Traffic: 528 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6