crisprVerse / crisprDesign

Comprehensive design of CRISPR gRNAs for nucleases and base editors
MIT License
16 stars 5 forks source link

error when constructing a tssObject using yeast gff file #24

Closed adrbmdns closed 11 months ago

adrbmdns commented 1 year ago

Hi there,

I'm trying to construct a tssObject from a gff file, the genome I use is this one

I followed the steps in the tutorial

library(crisprDesign)
txdb <- getTxDb(file="saccharomyces_cerevisiae_R64-3-1_20210421.gff", organism="Saccharomyces cerevisiae")
grList <- TxDb2GRangesList(txdb)
GenomeInfoDb::genome(grList) <- "s288c"

and then

tssObject <- getTssObjectFromTxObject(grList)

In this step, it returns me error

Error in `[[<-`(`*tmp*`, name, value = "_") :
  1 elements in value to replace 0 elements

I checked my grList$fiveUTRs, it showed:

GRanges object with 0 ranges and 14 metadata columns:
   seqnames    ranges strand |       tx_id     gene_id  protein_id     tx_type
      <Rle> <IRanges>  <Rle> | <character> <character> <character> <character>
   gene_symbol     exon_id exon_rank cds_start   cds_end  tx_start    tx_end
   <character> <character> <integer> <integer> <integer> <integer> <integer>
     cds_len exon_start  exon_end
   <integer>  <integer> <integer>
  -------
  seqinfo: 16 sequences from s288c genome; no seqlengths

I guess it means there is nothing in there, is this the problem why I can't construct a tssObject?

Session info:

R version 4.2.2 (2022-10-31)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu 20.04.4 LTS

Matrix products: default
BLAS/LAPACK: /home/u1133824/.conda/envs/crisprVerse/lib/libopenblasp-r0.3.21.so

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

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

other attached packages:
[1] crisprDesign_1.0.0 crisprBase_1.2.0

loaded via a namespace (and not attached):
  [1] bitops_1.0-7                  matrixStats_0.63.0
  [3] bit64_4.0.5                   filelock_1.0.2
  [5] progress_1.2.2                httr_1.4.5
  [7] GenomeInfoDb_1.34.9           tools_4.2.2
  [9] utf8_1.2.3                    R6_2.5.1
 [11] DBI_1.1.3                     BiocGenerics_0.44.0
 [13] withr_2.5.0                   tidyselect_1.2.0
 [15] prettyunits_1.1.1             bit_4.0.5
 [17] curl_4.3.3                    compiler_4.2.2
 [19] crisprBowtie_1.2.0            cli_3.6.0
 [21] Biobase_2.58.0                basilisk.utils_1.10.0
 [23] crisprScoreData_1.3.0         xml2_1.3.3
 [25] DelayedArray_0.24.0           rtracklayer_1.58.0
 [27] randomForest_4.7-1.1          readr_2.1.4
 [29] rappdirs_0.3.3                stringr_1.5.0
 [31] digest_0.6.31                 Rsamtools_2.14.0
 [33] crisprScore_1.3.1             basilisk_1.10.2
 [35] XVector_0.38.0                pkgconfig_2.0.3
 [37] htmltools_0.5.4               MatrixGenerics_1.10.0
 [39] dbplyr_2.3.1                  fastmap_1.1.1
 [41] BSgenome_1.66.3               rlang_1.0.6
 [43] RSQLite_2.3.0                 shiny_1.7.4
 [45] BiocIO_1.8.0                  generics_0.1.3
 [47] jsonlite_1.8.4                BiocParallel_1.32.5
 [49] dplyr_1.1.0                   VariantAnnotation_1.44.1
 [51] RCurl_1.98-1.10               magrittr_2.0.3
 [53] GenomeInfoDbData_1.2.9        Matrix_1.5-3
 [55] Rcpp_1.0.10                   S4Vectors_0.36.2
 [57] fansi_1.0.4                   reticulate_1.28
 [59] Rbowtie_1.38.0                lifecycle_1.0.3
 [61] stringi_1.7.12                yaml_2.3.7
 [63] SummarizedExperiment_1.28.0   zlibbioc_1.44.0
 [65] BiocFileCache_2.6.1           AnnotationHub_3.6.0
 [67] grid_4.2.2                    blob_1.2.3
 [69] parallel_4.2.2                promises_1.2.0.1
 [71] ExperimentHub_2.6.0           crayon_1.5.2
 [73] dir.expiry_1.6.0              lattice_0.20-45
 [75] Biostrings_2.66.0             GenomicFeatures_1.50.4
 [77] hms_1.1.2                     KEGGREST_1.38.0
 [79] pillar_1.8.1                  GenomicRanges_1.50.2
 [81] rjson_0.2.21                  codetools_0.2-19
 [83] biomaRt_2.54.0                stats4_4.2.2
 [85] XML_3.99-0.13                 glue_1.6.2
 [87] BiocVersion_3.16.0            BiocManager_1.30.20
 [89] png_0.1-8                     vctrs_0.5.2
 [91] tzdb_0.3.0                    httpuv_1.6.9
 [93] purrr_1.0.1                   cachem_1.0.7
 [95] mime_0.12                     xtable_1.8-4
 [97] restfulr_0.0.15               later_1.3.0
 [99] tibble_3.2.0                  GenomicAlignments_1.34.0
[101] AnnotationDbi_1.60.0          memoise_2.0.1
[103] IRanges_2.32.0                ellipsis_0.3.2
[105] interactiveDisplayBase_1.36.0
Jfortin1 commented 11 months ago

@adrbmdns Thanks for bringing this up -- working on a fix now.

ltHobbes commented 11 months ago

Hi @adrbmdns, the error should be fixed now. However, as you've noticed there are no 5'UTR annotations for the TxDb, so getTssObjectFromTxObject(grList) will return an empty GRanges.