Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to get promoter sequence and intron sequence for genes from the feature details panel #1814

Merged
merged 9 commits into from
Mar 23, 2021

Conversation

cmdcolin
Copy link
Collaborator

This adds some more options to the sequence calculations in feature details

It can get 500bp up/downstream of the gene, and the intron sequence, or a "collapsed intron" with 10bp of the intron sequence around the splice site

localhost_3000__config=test_data%2Fconfig_demo json session=local-kxBDb9pU0

Things you'll note while observing this include that upstream and downstream are fetched in a separate request to the main, because I thought it was a little tricky to get the math right for fetching the sequence in one request with the possibility of hitting the start or end of chromosome boundaries, so I figured I would ensure the integrity of the fetch for the main gene body and then do the upstream/downstream separately

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Mar 19, 2021
@cmdcolin cmdcolin added enhancement New feature or request and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Mar 19, 2021
@codecov
Copy link

codecov bot commented Mar 19, 2021

Codecov Report

Merging #1814 (62c444d) into master (e2594e3) will increase coverage by 0.26%.
The diff coverage is 60.12%.

❗ Current head 62c444d differs from pull request most recent head 6e447c3. Consider uploading reports for the commit 6e447c3 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1814      +/-   ##
==========================================
+ Coverage   58.85%   59.12%   +0.26%     
==========================================
  Files         459      460       +1     
  Lines       21389    21437      +48     
  Branches     5051     5082      +31     
==========================================
+ Hits        12589    12674      +85     
+ Misses       8489     8449      -40     
- Partials      311      314       +3     
Impacted Files Coverage Δ
.../core/BaseFeatureWidget/SequenceFeatureDetails.tsx 57.14% <57.14%> (ø)
...kages/core/BaseFeatureWidget/BaseFeatureDetail.tsx 76.61% <100.00%> (+34.46%) ⬆️
packages/core/util/index.ts 81.52% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2594e3...6e447c3. Read the comment docs.

@cmdcolin cmdcolin force-pushed the more_getseq_options branch from 67f98f7 to e17e140 Compare March 19, 2021 21:35
@cmdcolin cmdcolin changed the title Add some more options for getting sequence Add ability to get promoter sequence and intron sequence for genes from the feature details panel Mar 19, 2021
@cmdcolin cmdcolin force-pushed the more_getseq_options branch from 60ceeb6 to 2b89cf8 Compare March 19, 2021 22:14
@cmdcolin cmdcolin force-pushed the more_getseq_options branch from 2b89cf8 to 62c444d Compare March 19, 2021 22:27
@cmdcolin
Copy link
Collaborator Author

has a couple more tests for the behavior of the sequence translation into protein, etc.

also added react-intersection-observer to only fetch the sequence on demand, so that if a gene with 100 transcripts loaded into the feature details, it avoids overwhelming the feature details panel (only loads data on-demand)

this package has a fairly small bundle (1.6kb gzip) and intersectionobserver has good browser support

@cmdcolin cmdcolin force-pushed the more_getseq_options branch from b8c6338 to 6e447c3 Compare March 22, 2021 17:05
@rbuels rbuels merged commit 7893c82 into master Mar 23, 2021
@rbuels rbuels deleted the more_getseq_options branch March 23, 2021 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants