Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ryan-stackwave/tg-oss
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-stackwave committed Feb 27, 2024
2 parents 8f1b721 + b16db18 commit 31250ca
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 24 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- genbank ss-DNA should not be overwirte to DNA [`#1`](https://github.com/TeselaGen/tg-oss/pull/1)
- Added fix for clipboard commands when there are multiple editors on a page to resolve https://github.com/TeselaGen/tg-oss/issues/24 [`#24`](https://github.com/TeselaGen/tg-oss/issues/24)
- closes #35 [`#35`](https://github.com/TeselaGen/tg-oss/issues/35)
- reverting seq data change [`073aba6`](https://github.com/TeselaGen/tg-oss/commit/073aba63090ca69eeaa134a1efa0563aa65a9af1)
- making upload accept handle async values [`5c8dfd8`](https://github.com/TeselaGen/tg-oss/commit/5c8dfd8a91defd00773329d9dbfc2e15beb01bbb)
- fixing issue with annotationsToSupport and adding test [`2f885dc`](https://github.com/TeselaGen/tg-oss/commit/2f885dc53fd4441a4473eb0b3194dc82d1922a30)
- adding download table as csv button to editable tables, more csv wizard fixing [`9f4989e`](https://github.com/TeselaGen/tg-oss/commit/9f4989e2fda4f7542b96cb2f1ec3d3c97c386245)
2 changes: 1 addition & 1 deletion packages/sequence-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@teselagen/sequence-utils",
"version": "0.3.18",
"version": "0.3.19",
"type": "commonjs",
"dependencies": {
"bson-objectid": "^2.0.4",
Expand Down
12 changes: 6 additions & 6 deletions packages/sequence-utils/src/calculateTm.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ const calcTmMethods = {

/**
* Calculates temperature for DNA sequence using a given algorithm.
* @param {String} sequence The DNA sequence to use.
* @param {String} type Either Teselagen.bio.tools.TemperatureCalculator.TABLE_BRESLAUER, TABLE_SUGIMOTO, or TABLE_UNIFIED
* @param {Double} A Helix initation for deltaS. Defaults to -10.8.
* @param {Double} R The gas constant, in cal/(K*mol). Defaults to 0.5e-6M.
* @param {Double} Na THe monovalent salt concentration. Defaults to 50e-3M.
* @return {Double} Temperature for the given sequence, in Celsius.
* sequence - The DNA sequence to use.
* type - Either Teselagen.bio.tools.TemperatureCalculator.TABLE_BRESLAUER, TABLE_SUGIMOTO, or TABLE_UNIFIED
* A - Helix initation for deltaS. Defaults to -10.8.
* R - The gas constant, in cal/(K*mol). Defaults to 0.5e-6M.
* Na - THe monovalent salt concentration. Defaults to 50e-3M.
* return - Temperature for the given sequence, in Celsius.
*/
calculateTemperature: function (sequence, type, A, R, C, Na) {
if (typeof type === "undefined") {
Expand Down
21 changes: 5 additions & 16 deletions packages/sequence-utils/src/getOrfsFromSequence.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,13 @@ import getReverseComplementSequenceString from "./getReverseComplementSequenceSt
/**
* @private
* Finds ORFs in a given DNA forward in a given frame.
* @param {Int} frame The frame to look in.
* @param {String}sequence The dna sequence.
* @param {Int} minimumOrfSize The minimum length of ORF to return.
* @param {boolean} forward Should we find forward facing orfs or reverse facing orfs
* @return {Teselagen.bio.orf.ORF[]} The list of ORFs found.
* frame - The frame to look in.
* sequence - The dna sequence.
* minimumOrfSize - The minimum length of ORF to return.
* forward - Should we find forward facing orfs or reverse facing orfs
* return - The list of ORFs found.
*/
export default function getOrfsFromSequence(options) {
// ac.throw([ac.shape({
// sequence: ac.string,
// minimumOrfSize: ac.posInt,
// forward: ac.bool,
// circular: ac.bool
// })], arguments);

// const frame = options.frame;
let sequence = options.sequence;
const minimumOrfSize = options.minimumOrfSize;
const forward = options.forward;
Expand All @@ -38,7 +30,6 @@ export default function getOrfsFromSequence(options) {
const re = useAdditionalOrfStartCodons
? /(?=((?:A[TU]G|G[TU]G|C[TU]G)(?:.{3})*?(?:[TU]AG|[TU]AA|[TU]GA)))/gi
: /(?=((?:A[TU]G)(?:.{3})*?(?:[TU]AG|[TU]AA|[TU]GA)))/gi;
// const str = 'tatgaatgaatgffffffatgfftaaftaafatgfatgfffffsdfatgffatgfffstaafftaafffffffffffffffatgtaaataa\n\natgffftaaf\n\natgffatgftaafftaa\n\natgatgftaafftaa\n\natgatgtaataa\n\ntttttttttttttaatgatgfffffffffftaa';
let m;
const orfRanges = [];
//loop through orf hits!
Expand Down Expand Up @@ -103,8 +94,6 @@ export default function getOrfsFromSequence(options) {
} else {
orfEnds[orf.end] = index;
if (!forward) {
// if (originalSequenceLength - orf.end - 1 == 3657) {
// }
//this check needs to come after the above assignment of orfEnds
//flip the start and ends
const endHolder = orf.end; //temp variable
Expand Down

0 comments on commit 31250ca

Please sign in to comment.