[BioC] error in bayespeak function

Jonathan Cairns Jonathan.Cairns at cancer.org.uk
Wed Jul 20 16:38:59 CEST 2011


Hi Andreia,

On the line "IRanges_JKA<-ranges(Granges_JKA)", you are converting a genomicRanges object to an IRanges object. BayesPeak accepts a RangedData object, as opposed to an IRanges object (in order to retain chromosome information). Replace

IRanges_JKA<-ranges(Granges_JKA)

with

IRanges_JKA<-as(Granges_JKA, "RangedData")

and it should run properly.

Hope this helps,

Jonathan


P.S. additionally, the line Library(BayesPeak) should be library(BayesPeak) - you obviously know this, else you wouldn't be getting the correct sessionInfo(), but I point this out in case anybody else tries to run the code...

________________________________________
From: Andreia Fonseca [andreia.fonseca at gmail.com]
Sent: 20 July 2011 15:24
To: Jonathan Cairns; bioconductor
Subject: error in bayespeak function

Dear all,

I am analyzing chipseq data and I am trying to use bayespeak package for peak detection.
The code that I am using is

#call libraries
library(GenomicRanges)
Library(BayesPeak)
library(ShortRead)
library(chipseq)
library(ChIPpeakAnno)
library(multicore)
library(GenomicFeatures)

#read sample JKA
JKA<-asBam("110402_SN365_B_s_2_seq_GQG-1.txt_TABLE_filtered.txt_unique_forfastq.fastq_SAM", overwrite=TRUE,destination="110402_SN365_B_s_2_seq_GQG-1.txt_TABLE_filtered.txt_unique_forfastq.fastq_SAM_BAM")
Granges_JKA<-readBamGappedAlignments(JKA)
IRanges_JKA<-ranges(Granges_JKA)

#read Input JKA
JKA_I<-asBam("110402_SN365_B_s_2_seq_GQG-2.txt_TABLE_filtered.txt_unique_forfastq.fastq_SAM", overwrite=TRUE,destination="110402_SN365_B_s_2_seq_GQG-1.txt_TABLE_filtered.txt_unique_forfastq.fastq_SAM_BAM")
Granges_JKA_I<-readBamGappedAlignments(JKA_I)
IRanges_JKA_I<-ranges(Granges_JKA_I)

#Peak Calling with BayesPeak
raw.output <- bayespeak(treatment=JKA, control=JKA_I,use.multicore = TRUE, mc.cores = 4)

after the last command I am getting the forllowing error:
Error in substring(temp[1], 1, 5) : invalid multibyte string at '<ed>'

I also tried to remove the use of parallelization but the error remains the same, can someone tell me what I am doing wrong ?
thanks for the help,
Andreia

bellow is the information concerning sessionInfo

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] BayesPeak_1.4.0                     GenomicFeatures_1.4.3
 [3] multicore_0.1-5                     ChIPpeakAnno_1.8.0
 [5] limma_3.8.2                         org.Hs.eg.db_2.5.0
 [7] GO.db_2.4.1                         RSQLite_0.9-1
 [9] DBI_0.2-5                           AnnotationDbi_1.14.1
[11] BSgenome.Ecoli.NCBI.20080805_1.3.17 multtest_2.8.0
[13] Biobase_2.12.2                      biomaRt_2.8.1
[15] chipseq_1.2.0                       BSgenome_1.20.0
[17] ShortRead_1.10.4                    Rsamtools_1.4.2
[19] lattice_0.19-30                     Biostrings_2.20.1
[21] GenomicRanges_1.4.6                 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] rtracklayer_1.12.4 splines_2.13.1     survival_2.36-9    tools_2.13.1
[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 at fm.ul.pt<mailto:email%3Aandreiaamaral at fm.ul.pt> ; andreiaamaral at fc.ul.pt<mailto:andreiaamaral at fc.ul.pt>


NOTICE AND DISCLAIMER
This e-mail (including any attachments) is intended for ...{{dropped:16}}



More information about the Bioconductor mailing list