-
Notifications
You must be signed in to change notification settings - Fork 2
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 several functions to work with refGene exon sequences #13
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13 +/- ##
==========================================
+ Coverage 34.89% 36.43% +1.53%
==========================================
Files 12 12
Lines 1192 1227 +35
Branches 21 25 +4
==========================================
+ Hits 416 447 +31
Misses 755 755
- Partials 21 25 +4
Continue to review full report at Codecov.
|
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.
Thanks. I added a few comments.
src/varity/util.clj
Outdated
(->> (reverse s) | ||
(map (partial get comp-base-map)) | ||
(apply str))) | ||
(util-seq/revcomp s)) |
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.
Why did you leave varity.util/revcomp-bases
? I feel you should replace all revcomp-bases
in varity codebase with cljam.util.sequence/revcomp
.
src/varity/ref_gene.clj
Outdated
:end e, | ||
:reverse? reverse?}))))) | ||
|
||
(defn cds-exon-seq |
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.
I think cds-seq
is correct name. cds-exon-
is wordy because CDS does not include introns.
@totakke Done, thanks for your review! 😸 |
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.
Thank you for fixing. It seems good.
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.
Sorry for the late reply. This features looks very useful.
I added a comment about function naming.
src/varity/ref_gene.clj
Outdated
(cond-> (cseq/read-sequence seq-rdr exon) | ||
reverse? util-seq/revcomp)) | ||
|
||
(defn ^String read-gene-sequence |
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.
The gene
word contains more widely meanings. Thus I think you should use transcript
here.
Additionally, could you add docstrings to clarify the function, such as the sequence contains 5'-UTR, CDS, and 3'-UTR
.
@federkasten I have replaced 'gene' with 'transcript' or 'ref-gene-record'. Also I've added a commit to fix :strand values (please refer to chrovis/cljam#143 (comment)) Thank you. |
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.
Thank you for the quick response. LGTM 👍
Thank you! The additional commits also seem good, so I've just merged. |
@totakke @federkasten Thank you for your helpful comments! 😹 |
Summary
This PR adds several utility functions to
varity.ref-gene
module.Tests
lein check
🆗lein test :all
🆗Notes
varity.util/revcomp-bases
with more efficient implementation in cljam 0.6.0