-
Notifications
You must be signed in to change notification settings - Fork 6
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
Get table of promoter region #34
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #34 +/- ##
==========================================
+ Coverage 93.09% 93.23% +0.14%
==========================================
Files 6 6
Lines 333 340 +7
==========================================
+ Hits 310 317 +7
Misses 23 23
|
tx_ss = np.where( | ||
tx_table["seq_strand"] == 1, | ||
tx_table["gene_seq_start"], | ||
tx_table["gene_seq_end"], | ||
) | ||
tx_table["promoter_seq_start"] = np.where( | ||
tx_table["seq_strand"] == 1, tx_ss - upstream, tx_ss - downstream | ||
) | ||
tx_table["promoter_seq_end"] = np.where( | ||
tx_table["seq_strand"] == 1, tx_ss + downstream, tx_ss + upstream | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Would you be up for PR-ing this into bioframe as well? open2c/bioframe#144
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drafted in open2c/bioframe#152
Closes #4
Implemented strand-aware selection of region around TSS.
Example usage:
TO DO
seq_name
andseq_strand
for each gene (i.e. relies on merging Initial columns functions #22 )