scverse / genomic-features

Genomic Features in Python from BioConductor's AnnotationHub
https://genomic-features.readthedocs.io
BSD 3-Clause "New" or "Revised" License
18 stars 5 forks source link

`transcripts`, `exons` functions + some filters #44

Closed ivirshup closed 1 year ago

ivirshup commented 1 year ago

Fixes #12

transcripts + exons methods

TODO:

> colnames(tx@elementMetadata)
 [1] "tx_id"            "tx_biotype"       "tx_cds_seq_start" "tx_cds_seq_end"  
 [5] "gene_id"          "tx_support_level" "tx_id_version"    "gc_content"      
 [9] "tx_external_name" "tx_is_canonical"  "tx_name"  

Note: you can use an sqlite file with the R package via ensembldb::EnsDb("path/to/db.sqlite")

codecov-commenter commented 1 year ago

Codecov Report

Merging #44 (b783298) into main (67631b5) will decrease coverage by 3.51%. The diff coverage is 93.25%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #44 +/- ## ========================================== - Coverage 93.12% 89.61% -3.51% ========================================== Files 6 6 Lines 320 366 +46 ========================================== + Hits 298 328 +30 - Misses 22 38 +16 ``` | [Impacted Files](https://app.codecov.io/gh/scverse/genomic-features/pull/44?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse) | Coverage Δ | | |---|---|---| | [src/genomic\_features/filters.py](https://app.codecov.io/gh/scverse/genomic-features/pull/44?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse#diff-c3JjL2dlbm9taWNfZmVhdHVyZXMvZmlsdGVycy5weQ==) | `100.00% <ø> (ø)` | | | [src/genomic\_features/\_core/filters.py](https://app.codecov.io/gh/scverse/genomic-features/pull/44?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse#diff-c3JjL2dlbm9taWNfZmVhdHVyZXMvX2NvcmUvZmlsdGVycy5weQ==) | `84.24% <81.81%> (-8.91%)` | :arrow_down: | | [src/genomic\_features/ensembl/ensembldb.py](https://app.codecov.io/gh/scverse/genomic-features/pull/44?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse#diff-c3JjL2dlbm9taWNfZmVhdHVyZXMvZW5zZW1ibC9lbnNlbWJsZGIucHk=) | `93.68% <97.01%> (+1.04%)` | :arrow_up: |
lauradmartens commented 1 year ago

Very nice rewrite of my join functions!! I don't have any objections except for the get_required_tables function.

ivirshup commented 1 year ago

Thanks! I mostly translated it from this code in ensembldb.

While I was adding the chromosome test: