Problem with importing bigwig files generated in galaxy into R
1
0
Entering edit mode
d r ▴ 150
@d-r-5459
Last seen 6.3 years ago
Israel

Hello

I have several bigWig files from a ChIP-Seq expeiment. The files were generated in Galaxy using MACS and then converted from wig to bigwig using galaxy's Wig/BedGraph-to-bigWig converter.

When I attempt to import these bigwigs into R using the import.bw function I get the following error:

 

udc couldn't read 4 bytes from Galaxy215-[167_phage_input_Wig_BedGraph-to-bigWig].bigwig, did read 0


I suppose this is something rather stupid, but I'm not sure what may be the source of the problem or how to start troubleshooting this.

Does anyone has any idea what may cause this?

Thanks in advance

Dolev Rahat

sessionInfo:

R version 3.1.1 (2014-07-10)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
[1] C

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets
[8] methods   base     

other attached packages:
[1] rtracklayer_1.26.2   GenomicRanges_1.18.4 GenomeInfoDb_1.2.4  
[4] IRanges_2.0.1        S4Vectors_0.4.0      BiocGenerics_0.12.1

loaded via a namespace (and not attached):
 [1] BBmisc_1.8              BatchJobs_1.5           BiocParallel_1.0.2     
 [4] Biostrings_2.34.1       DBI_0.3.1               GenomicAlignments_1.2.1
 [7] RCurl_1.95-4.5          RSQLite_1.0.0           Rsamtools_1.18.3       
[10] XML_3.98-1.1            XVector_0.6.0           base64enc_0.1-2        
[13] bitops_1.0-6            brew_1.0-6              checkmate_1.5.1        
[16] codetools_0.2-8         digest_0.6.8            fail_1.2               
[19] foreach_1.4.2           iterators_1.0.7         sendmailR_1.2-1        
[22] stringr_0.6.2           tools_3.1.1             zlibbioc_1.12.0 

import.bw rtracklayer • 2.5k views
ADD COMMENT
0
Entering edit mode

What's the size of the .bigwig file you are trying to read in? What does the first line look like?

ADD REPLY
0
Entering edit mode

@ Dan TenenbaumThe file size is about 29Mb. Iv'e intially tried to open only a subset of it using the which option with a GRanges object, but I get the error message regardless to whether I use which or not.

From what I can see In Galaxy the first line is

line 31798454 of stdin: chromosome chr5 has 152537259 bases, but item ends at 152537260 line 34647404 of stdin: chromosome chr13 has 120284312 bases, but item ends at 120284320 line 34647405 of stdin: chromosome chr13 has 120284312 bases

ADD REPLY
0
Entering edit mode
@michael-lawrence-3846
Last seen 2.6 years ago
United States

Don't have a direct answer, but you could try generating the bigwig file with the rtracklayer:::wigToBigWig() function.
 

ADD COMMENT
0
Entering edit mode

@ Michael Lawrence
Thanks. I tried converting the wig file into bigwig file using UCSC'c wigToBigWig script, which did allow me to open it in R, but when I opened It it turned out to only contation information from a single chromosome (chr11). Also, I was unable to convert some of the wig files at all. For eaxmple for one file running wigToBigWig raised the following error:

line 1821302 of Galaxy211-[MACS14_167_SF_K4me3_(treatment__wig)]-.wig: chromosome chr18 has 90772031 bases, but item ends at 90772040

I can see that this file has information from several chromosomes becuase

 grep chrom  'Galaxy211-[MACS14_167_SF_K4me3_(treatment__wig)]-.wig' yield:

variableStep chrom=chr18 span=10
variableStep chrom=chrM span=10
variableStep chrom=chr4 span=10


I know that this problem is beyond the scope of this mailing but If you or someone else have some idea of what might be the problem I will most apprecaite it.

ADD REPLY
0
Entering edit mode

Sounds to me like you're using a Seqinfo from the wrong genome build.

ADD REPLY
0
Entering edit mode

Thanks, I'll look into this
 

ADD REPLY

Login before adding your answer.

Traffic: 901 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