rtracklayer::Problem with export.bw of GRanges object created by unlisted after liftover from mm9 to mm10 of wig file
1
0
Entering edit mode
ang ▴ 20
@ang-14621
Last seen 6.0 years ago

Hello!

After importing a wig file and liftover from mm9 to mm10 and unlisting to get a GRanges object, I encounter an error where the seqinfo data is not included in the Granges file such that I can't export a bigWig file using export.bw.

wig <- import.wig("GSM1463433_ProB_H3K27ac.wig")
chain <- import.chain("mm9ToMm10.over.chain")
library(TxDb.Mmusculus.UCSC.mm10.knownGene)
wig_mm10 <- liftOver(wig, chain)
wig_mm10.unlist <- unlist(wig_mm10)
export.bw(wig_mm10.unlist, con="GSM1463433_ProB_H3K27ac.wig_mm10.bigWig")

A previous developer solution was to specify the genome in export.bw eg. export.bw(obj, con="", genome=""), however, genome isn't recognised as a function in export.bw

> seqinfo(wig_mm10.unlist)
Seqinfo object with 22 sequences from an unspecified genome; no seqlengths:
  seqnames seqlengths isCircular genome
  chr1           <NA>       <NA>   <NA>
  chr12          <NA>       <NA>   <NA>
  chr2           <NA>       <NA>   <NA>
  chr15          <NA>       <NA>   <NA>
  chr3           <NA>       <NA>   <NA>
  ...             ...        ...    ...
  chr19          <NA>       <NA>   <NA>
  chr13          <NA>       <NA>   <NA>
  chrY           <NA>       <NA>   <NA>
  chr18          <NA>       <NA>   <NA>
  chrM           <NA>       <NA>   <NA>

When I have manually entered in seqinfo, I still can get an error where there are overlapping ranges within the GRanges object such that I can't export to a bigWig file even with the seqInfo.

Would someone be able to shed some light on this?

Cheers

A

R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8

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

other attached packages:
 [1] diffloop_1.8.0                           BiocInstaller_1.30.0                    
 [3] knitr_1.20                               AnnotationHub_2.12.1                    
 [5] TxDb.Mmusculus.UCSC.mm10.knownGene_3.4.0 TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2 
 [7] GenomicFeatures_1.32.3                   rtracklayer_1.40.6                      
 [9] GenomicAlignments_1.16.0                 SummarizedExperiment_1.10.1             
[11] DelayedArray_0.6.6                       BiocParallel_1.14.2                     
[13] matrixStats_0.54.0                       Rsamtools_1.32.3                        
[15] Biostrings_2.48.0                        XVector_0.20.0                          
[17] GenomicRanges_1.32.7                     GenomeInfoDb_1.16.0                     
[19] ggplot2_3.1.0                            EGSEA_1.8.0                             
[21] pathview_1.20.0                          org.Hs.eg.db_3.6.0                      
[23] topGO_2.32.0                             SparseM_1.77                            
[25] GO.db_3.6.0                              graph_1.58.2                            
[27] AnnotationDbi_1.42.1                     IRanges_2.14.12                         
[29] S4Vectors_0.18.3                         gage_2.30.0                             
[31] Biobase_2.40.0                           BiocGenerics_0.26.0                     
[33] limma_3.36.5          

 

rtracklayer export.bw liftover • 1.4k views
ADD COMMENT
0
Entering edit mode
@michael-lawrence-3846
Last seen 2.9 years ago
United States

If the lift over process produces overlapping ranges, then you'll need to resolve those somehow before exporting. How you do that depends on your overall goals/question.

ADD COMMENT

Login before adding your answer.

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