Customized BED file cannot be read by Methylkit readTranscriptFeatures function

36 views Asked by At

Does anyone know where to get Arabidopsis thaliana's BED file for genome annotations?

I want to get one for Methylkit readTranscriptFeatures function to annotate my differential methylated region. I looked at the sample BED file in Methylkit tutorial refseq.hg18.bed.txt and I would like to make a similar file for Arabidopsis TAIR10. Here is my customized file for Arabidopsis.

Unfortunately, I encountered the following issues after running my code for Methylkit

gene.obj=readTranscriptFeatures("D:/Final_bed_file_for_Arabidopsis_genome_annotation.bed.txt", remove.unusual = FALSE)

Reading the table...
Calculating intron coordinates...                                                                                                        
Error in `$<-.data.frame`(`*tmp*`, "V3", value = c(30425977L, 30426268L,  : 
  replacement has 208215 rows, data has 205647
In addition: Warning messages:
1: In cbind(...) :
  number of rows of result is not a multiple of vector length (arg 2)
2: In rep.ref$V2 + b.start.size[, 1] :
  longer object length is not a multiple of shorter object length

I tried using BED file from UCSC from the table browser, but the file does not contain exon information, therefore not useful to me. I guess the issue lies in how the source code defines b.start.size. Any forms of help is appreciated!

Here is my session info:

> sessionInfo()
R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22621)

Matrix products: default


locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

time zone: Asia/Shanghai
tzcode source: internal

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

other attached packages:
 [1] genomation_1.32.0      methylKit_1.26.0       GenomicFeatures_1.52.2 AnnotationDbi_1.62.2  
 [5] Biobase_2.60.0         GenomicRanges_1.52.0   GenomeInfoDb_1.36.1    IRanges_2.34.1        
 [9] S4Vectors_0.38.1       BiocGenerics_0.46.0   

loaded via a namespace (and not attached):
  [1] splines_4.3.1               later_1.3.1                 BiocIO_1.10.0              
  [4] bitops_1.0-7                ggplotify_0.1.1             filelock_1.0.2             
  [7] R.oo_1.25.0                 tibble_3.2.1                polyclip_1.10-4            
 [10] XML_3.99-0.14               lifecycle_1.0.3             doParallel_1.0.17          
 [13] vroom_1.6.3                 processx_3.8.2              lattice_0.21-8             
 [16] MASS_7.3-60                 magrittr_2.0.3              limma_3.56.2               
 [19] plotrix_3.8-2               yaml_2.3.7                  remotes_2.4.2.1            
 [22] httpuv_1.6.11               sessioninfo_1.2.2           pkgbuild_1.4.2             
 [25] cowplot_1.1.1               DBI_1.1.3                   RColorBrewer_1.1-3         
 [28] abind_1.4-5                 pkgload_1.3.2.1             zlibbioc_1.46.0            
 [31] R.utils_2.12.2              purrr_1.0.1                 ggraph_2.1.0               
 [34] RCurl_1.98-1.12             yulab.utils_0.0.6           tweenr_2.0.2               
 [37] rappdirs_0.3.3              circlize_0.4.15             GenomeInfoDbData_1.2.10    
 [40] enrichplot_1.20.0           ggrepel_0.9.3               tidytree_0.4.4             
 [43] DelayedArray_0.26.7         colorRamp2_0.1.0            codetools_0.2-19           
 [46] DOSE_3.26.1                 xml2_1.3.5                  ggforce_0.4.1              
 [49] tidyselect_1.2.0            shape_1.4.6                 aplot_0.1.10               
 [52] farver_2.1.1                viridis_0.6.4               matrixStats_1.0.0          
 [55] BiocFileCache_2.8.0         GenomicAlignments_1.36.0    jsonlite_1.8.7             
 [58] GetoptLong_1.0.5            ellipsis_0.3.2              tidygraph_1.2.3            
 [61] iterators_1.0.14            bbmle_1.0.25                foreach_1.5.2              
 [64] tools_4.3.1                 progress_1.2.2              treeio_1.24.3              
 [67] Rcpp_1.0.11                 glue_1.6.2                  gridExtra_2.3              
 [70] qvalue_2.32.0               MatrixGenerics_1.12.3       usethis_2.2.2              
 [73] dplyr_1.1.2                 numDeriv_2016.8-1.1         withr_2.5.0                
 [76] BiocManager_1.30.21.1       fastmap_1.1.1               fansi_1.0.4                
 [79] callr_3.7.3                 digest_0.6.33               R6_2.5.1                   
 [82] mime_0.12                   gridGraphics_0.5-1          seqPattern_1.32.0          
 [85] colorspace_2.1-0            GO.db_3.17.0                gtools_3.9.4               
 [88] biomaRt_2.56.1              RSQLite_2.3.1               R.methodsS3_1.8.2          
 [91] utf8_1.2.3                  tidyr_1.3.0                 generics_0.1.3             
 [94] data.table_1.14.8           rtracklayer_1.60.0          S4Arrays_1.0.5             
 [97] prettyunits_1.1.1           graphlayouts_1.0.0          httr_1.4.6                 
[100] htmlwidgets_1.6.2           scatterpie_0.2.1            pkgconfig_2.0.3            
[103] gtable_0.3.3                blob_1.2.4                  impute_1.74.1              
[106] ComplexHeatmap_2.16.0       XVector_0.40.0              clusterProfiler_4.8.2      
[109] shadowtext_0.1.2            htmltools_0.5.5             profvis_0.3.8              
[112] fgsea_1.26.0                clue_0.3-64                 scales_1.2.1               
[115] png_0.1-8                   ggfun_0.1.1                 rstudioapi_0.15.0          
[118] tzdb_0.4.0                  reshape2_1.4.4              rjson_0.2.21               
[121] coda_0.19-4                 nlme_3.1-162                curl_5.0.1                 
[124] bdsmatrix_1.3-6             cachem_1.0.8                GlobalOptions_0.1.2        
[127] stringr_1.5.0               KernSmooth_2.23-22          parallel_4.3.1             
[130] miniUI_0.1.1.1              HDO.db_0.99.1               restfulr_0.0.15            
[133] pillar_1.9.0                vctrs_0.6.3                 urlchecker_1.0.1           
[136] promises_1.2.0.1            dbplyr_2.3.3                xtable_1.8-4               
[139] cluster_2.1.4               readr_2.1.4                 mvtnorm_1.2-2              
[142] cli_3.6.1                   compiler_4.3.1              Rsamtools_2.16.0           
[145] rlang_1.1.1                 crayon_1.5.2                mclust_6.0.0               
[148] emdbook_1.3.13              ps_1.7.5                    plyr_1.8.8                 
[151] fs_1.6.2                    stringi_1.7.12              gridBase_0.4-7             
[154] viridisLite_0.4.2           BiocParallel_1.34.2         munsell_0.5.0              
[157] Biostrings_2.68.1           lazyeval_0.2.2              devtools_2.4.5             
[160] GOSemSim_2.26.1             Matrix_1.6-0                BSgenome_1.68.0            
[163] hms_1.1.3                   patchwork_1.1.2             bit64_4.0.5                
[166] ggplot2_3.4.2               KEGGREST_1.40.0             shiny_1.7.4.1              
[169] fastseg_1.46.0              SummarizedExperiment_1.30.2 igraph_1.5.0.1             
[172] memoise_2.0.1               ggtree_3.8.2                fastmatch_1.1-3            
[175] bit_4.0.5                   downloader_0.4              ape_5.7-1                  
[178] gson_0.1.0 
0

There are 0 answers