Search
Question: Exporting a GenomicRanges object as GTF/GFF file
0
gravatar for rubi
5 months ago by
rubi70
rubi70 wrote:

Hi,

 

I'm trying to export a GenomicRanges object as a GTF file using rtrackleyr's export:

Here's an example GTF file downloaded from:

ftp://ftp.ensemblgenomes.org/pub/release-32/bacteria//gtf/bacteria_90_collection/_chrysanthemum_coronarium_phytoplasma/_chrysanthemum_coronarium_phytoplasma.ASM74406v1.32.gtf.gz

If I do:

library(rtracklayer)
library(GenomicRanges

export(import("_chrysanthemum_coronarium_phytoplasma.ASM74406v1.32.gtf.gz"),con="test.gtf")

I get this error:

Error in .subset2(instance, "x") : this S4 class is not subsettable

 

Any idea?

 

> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] Biostrings_2.42.1             XVector_0.14.0                Gviz_1.18.1                   setEnrichmentTests_0.0.0.9000 org.Ss.eg.db_3.4.0            org.Sc.sgd.db_3.4.0          
 [7] org.Rn.eg.db_3.4.0            org.Pt.eg.db_3.4.0            org.Mmu.eg.db_3.4.0           org.Mm.eg.db_3.4.0            org.Hs.eg.db_3.4.0            org.Cf.eg.db_3.4.0           
[13] org.Ce.eg.db_3.4.0            ggdendro_0.1-20               dendextend_1.5.2              fastcluster_1.1.22            cluster_2.0.5                 tidyr_0.6.3                  
[19] GOSemSim_2.0.1                matrixStats_0.51.0            doParallel_1.0.10             iterators_1.0.8               foreach_1.4.3                 snpEnrichment_1.7.0          
[25] piano_1.14.0                  topGO_2.26.0                  SparseM_1.72                  GO.db_3.4.0                   AnnotationDbi_1.36.0          Biobase_2.34.0               
[31] fgsea_1.0.2                   Rcpp_0.12.11.1                graph_1.50.0                  gageData_2.12.0               gage_2.24.0                   stringi_1.1.5                
[37] biomaRt_2.30.0                scales_0.4.1                  RColorBrewer_1.1-2            zoo_1.7-13                    gplots_3.0.1                  reshape2_1.4.2               
[43] plotrix_3.6-3                 Hmisc_3.17-4                  Formula_1.2-1                 survival_2.40-1               lattice_0.20-34               data.table_1.9.6             
[49] annotationData_0.1.0          dplyr_0.5.0                   plyr_1.8.4                    magrittr_1.5                  gtable_0.2.0                  gridExtra_2.2.1              
[55] plotly_4.7.0                  ggplot2_2.2.1.9000            rtracklayer_1.34.1            GenomicRanges_1.26.2          GenomeInfoDb_1.10.0           IRanges_2.8.1                
[61] S4Vectors_0.12.1              BiocGenerics_0.20.0           yaml_2.1.14                   doBy_4.5-15                  

loaded via a namespace (and not attached):
 [1] RSQLite_1.0.0                 htmlwidgets_0.8               trimcluster_0.1-2             BiocParallel_1.8.1            munsell_0.4.3                 codetools_0.2-15             
 [7] chron_2.3-47                  colorspace_1.3-2              BiocInstaller_1.24.0          robustbase_0.92-6             labeling_0.3                  slam_0.1-40                  
[13] biovizBase_1.22.0             sets_1.0-16                   diptest_0.75-7                R6_2.2.0                      flexmix_2.3-13                bitops_1.0-6                 
[19] assertthat_0.2.0              nnet_7.3-12                   ensembldb_1.6.2               rlang_0.1.1                   splines_3.3.2                 lazyeval_0.2.0               
[25] acepack_1.4.1                 dichromat_2.0-0               GenomicFeatures_1.26.0        snpStats_1.24.0               crosstalk_1.0.0               httpuv_1.3.3                 
[31] tools_3.3.2                   relations_0.6-6               zlibbioc_1.20.0               purrr_0.2.2.2                 RCurl_1.95-4.8                rpart_4.1-10                 
[37] viridis_0.4.0                 SummarizedExperiment_1.2.3    mvtnorm_1.0-5                 whisker_0.3-2                 mime_0.5                      xtable_1.8-2                 
[43] XML_3.98-1.4                  mclust_5.2                    tibble_1.3.3                  KernSmooth_2.23-15            htmltools_0.3.6               DBI_0.5-1                    
[49] MASS_7.3-45                   fpc_2.1-10                    Matrix_1.2-7.1                marray_1.52.0                 gdata_2.17.0                  igraph_1.0.1                 
[55] GenomicAlignments_1.8.4       foreign_0.8-67                annotate_1.52.0               VariantAnnotation_1.20.2      stringr_1.1.0                 digest_0.6.12                
[61] fastmatch_1.0-4               kernlab_0.9-25                shiny_1.0.2                   Rsamtools_1.26.1              gtools_3.5.0                  modeltools_0.2-21            
[67] jsonlite_1.4                  BSgenome_1.42.0               viridisLite_0.2.0             limma_3.30.2                  KEGGREST_1.14.0               httr_1.2.1                   
[73] DEoptimR_1.0-6                interactiveDisplayBase_1.12.0 png_0.1-7                     prabclus_2.2-6                class_7.3-14                  AnnotationHub_2.6.4          
[79] latticeExtra_0.6-28           caTools_1.17.1 

 

 

 

ADD COMMENTlink modified 5 months ago • written 5 months ago by rubi70

Please provide sessionInfo().

ADD REPLYlink written 5 months ago by Michael Lawrence9.8k

Please upgrade your R/Bioconductor and let us know if you still get this error. It seems to work on my side.

ADD REPLYlink written 4 months ago by Michael Lawrence9.8k
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: 105 users visited in the last hour