Error in loadFUN(x, seqname, ranges) : trying to load regions beyond the boundaries of non-circular sequence "chr2"
0
0
Entering edit mode
Yue • 0
@c4d4e0fd
Last seen 23 months ago
Hong Kong

Hi, I am doing the differential loop analysis by HiCDCPlus packages. However I encountered an issue during the construct_features step. Here I paste the error. Could anyone give some adivce on what should I do during this situation? Many thanks!

construct_features(output_path=paste0(outdir,"/hg38_5kb_GATC"),
                   gen="Hsapiens",
                   gen_ver = 'hg38',
                   sig="GATC",bin_type="Bins-uniform",
                   binsize=5000,
                   chrs = c(paste0('chr', seq(1,22)), 'chrX', 'chrY'))
#the error went like this
> construct_features(output_path=paste0(outdir,"/hg38_5kb_GATC"),
+                    gen="Hsapiens",
+                    gen_ver = 'hg38',
+                    sig="GATC",bin_type="Bins-uniform",
+                    binsize=5000,
+                    chrs = c(paste0('chr', seq(1,22)), 'chrX', 'chrY'))
Using chr1and cut patterns GATC
Joining, by = "bins"
Joining, by = "bins"
Joining, by = "bins"
Using chr2and cut patterns GATC
Error in loadFUN(x, seqname, ranges) : 
  trying to load regions beyond the boundaries of non-circular sequence "chr2"
此外: Warning message:
In valid.GenomicRanges.seqinfo(x, suggest.trim = TRUE) :
  GRanges object contains 2195 out-of-bound ranges located on sequence chr2. Note that ranges
  located on a sequence whose length is unknown (NA) or on a circular sequence are not
  considered out-of-bound (use seqlengths() and isCircular() to get the lengths and circularity
  flags of the underlying sequences). You can use trim() to trim these ranges. See
  ?`trim,GenomicRanges-method` for more information.


sessionInfo( )
R version 4.2.2 (2022-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.2.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib

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

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

other attached packages:
 [1] BSgenome.Hsapiens.UCSC.hg38_1.4.4          BSgenome.Hsapiens.UCSC.hg19_1.4.3         
 [3] BSgenome.Hsapiens.NCBI.T2T.CHM13v2.0_1.5.0 HiCDCPlus_1.6.0                           
 [5] BSgenome_1.66.1                            rtracklayer_1.58.0                        
 [7] Biostrings_2.66.0                          XVector_0.38.0                            
 [9] DESeq2_1.38.1                              SummarizedExperiment_1.28.0               
[11] Biobase_2.58.0                             MatrixGenerics_1.10.0                     
[13] matrixStats_0.63.0                         GenomicRanges_1.50.1                      
[15] GenomeInfoDb_1.34.3                        IRanges_2.32.0                            
[17] S4Vectors_0.36.0                           BiocGenerics_0.44.0                       

loaded via a namespace (and not attached):
 [1] httr_1.4.4               tidyr_1.2.1              bit64_4.0.5              splines_4.2.2           
 [5] R.utils_2.12.2           assertthat_0.2.1         BiocManager_1.30.19      blob_1.2.3              
 [9] GenomeInfoDbData_1.2.9   Rsamtools_2.14.0         yaml_2.3.6               pillar_1.8.1            
[13] RSQLite_2.2.18           lattice_0.20-45          glue_1.6.2               RColorBrewer_1.1-3      
[17] colorspace_2.0-3         R.oo_1.25.0              Matrix_1.5-1             XML_3.99-0.12           
[21] pkgconfig_2.0.3          zlibbioc_1.44.0          purrr_0.3.5              xtable_1.8-4            
[25] scales_1.2.1             BiocParallel_1.32.3      tibble_3.1.8             annotate_1.76.0         
[29] KEGGREST_1.38.0          generics_0.1.3           ggplot2_3.4.0            ellipsis_0.3.2          
[33] withr_2.5.0              cachem_1.0.6             cli_3.4.1                magrittr_2.0.3          
[37] crayon_1.5.2             memoise_2.0.1            R.methodsS3_1.8.2        fansi_1.0.3             
[41] tools_4.2.2              data.table_1.14.6        BiocIO_1.8.0             lifecycle_1.0.3         
[45] munsell_0.5.0            locfit_1.5-9.6           DelayedArray_0.24.0      AnnotationDbi_1.60.0    
[49] compiler_4.2.2           rlang_1.0.6              grid_4.2.2               RCurl_1.98-1.9          
[53] rstudioapi_0.14          rjson_0.2.21             rappdirs_0.3.3           bitops_1.0-7            
[57] restfulr_0.0.15          gtable_0.3.1             codetools_0.2-18         DBI_1.1.3               
[61] R6_2.5.1                 GenomicAlignments_1.34.0 dplyr_1.0.10             fastmap_1.1.0           
[65] bit_4.0.5                utf8_1.2.2               parallel_4.2.2           Rcpp_1.0.9              
[69] vctrs_0.5.1              geneplotter_1.76.0       png_0.1-7                tidyselect_1.2.0
HiCDCPlus BSgenome.Hsapiens.UCSC.hg38 • 1.1k views
ADD COMMENT
0
Entering edit mode

I guess you are mixing the NCBI and UCSC annotations. If you are using a custom-edited code to load the annotations, I would recommend cloning a copy from this repo, change the ".UCSC" coding in the following files to ".NCBI"

  1. get_chrs.R
  2. construct_features.R
  3. get_enzyme_cutsites.R
  4. get_chr_sizes.R and install package from source:
    install.packages(path_to_the_cloned_and_edited_folder, repos = NULL, type="source")
    
ADD REPLY

Login before adding your answer.

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