@datagrok-libraries/bio
Advanced tools
Comparing version 2.8.6 to 2.8.7
@@ -8,3 +8,3 @@ { | ||
"friendlyName": "Datagrok bio library", | ||
"version": "2.8.6", | ||
"version": "2.8.7", | ||
"description": "", | ||
@@ -33,10 +33,10 @@ "dependencies": { | ||
"link-all": "npm link datagrok-api @datagrok-libraries/utils", | ||
"debug-bio": "grok publish --rebuild", | ||
"release-bio": "grok publish --rebuild --release", | ||
"debug-bio": "grok publish", | ||
"release-bio": "grok publish --release", | ||
"build-bio": "tsc", | ||
"build": "tsc", | ||
"debug-bio-public": "grok publish public --rebuild", | ||
"release-bio-public": "grok publish public --rebuild --release", | ||
"debug-bio-local": "grok publish local --rebuild", | ||
"release-bio-local": "grok publish local --rebuild --release", | ||
"debug-bio-public": "grok publish public", | ||
"release-bio-public": "grok publish public --release", | ||
"debug-bio-local": "grok publish local", | ||
"release-bio-local": "grok publish local --release", | ||
"lint": "eslint \"./src/**/*.ts\"", | ||
@@ -43,0 +43,0 @@ "lint-fix": "eslint \"./src/**/*.ts\" --fix" |
@@ -19,2 +19,6 @@ import * as DG from 'datagrok-api/dg'; | ||
}; | ||
static readonly PeptideFastaAlphabet: Set<string>; | ||
static readonly DnaFastaAlphabet: Set<string>; | ||
static readonly RnaFastaAlphabet: Set<string>; | ||
static setUnitsToFastaColumn(col: DG.Column): void; | ||
protected get units(): string; | ||
@@ -21,0 +25,0 @@ protected get column(): DG.Column; |
import * as DG from 'datagrok-api/dg'; | ||
import { WebLogo } from '../viewers/web-logo'; | ||
/** Class for handling notation units in Macromolecule columns */ | ||
@@ -21,2 +22,19 @@ export class UnitsHandler { | ||
} | ||
static setUnitsToFastaColumn(col) { | ||
if (col.semType !== DG.SEMTYPE.MACROMOLECULE) | ||
throw new Error('Fasta column must be MACROMOLECULE'); | ||
const stats = WebLogo.getStats(col, 5, WebLogo.splitterAsFasta); | ||
const seqType = stats.sameLength ? 'SEQ.MSA' : 'SEQ'; | ||
const alphabetCandidates = [ | ||
['PT', UnitsHandler.PeptideFastaAlphabet], | ||
['DNA', UnitsHandler.DnaFastaAlphabet], | ||
['RNA', UnitsHandler.RnaFastaAlphabet], | ||
]; | ||
// Calculate likelihoods for alphabet_candidates | ||
const alphabetCandidatesSim = alphabetCandidates.map((c) => WebLogo.getAlphabetSimilarity(stats.freq, c[1])); | ||
const maxCos = Math.max(...alphabetCandidatesSim); | ||
const alphabet = maxCos > 0.65 ? alphabetCandidates[alphabetCandidatesSim.indexOf(maxCos)][0] : 'UN'; | ||
const units = `fasta:${seqType}:${alphabet}`; | ||
col.setTag(DG.TAGS.UNITS, units); | ||
} | ||
get units() { return this._units; } | ||
@@ -118,2 +136,8 @@ get column() { return this._column; } | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW5pdHMtaGFuZGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInVuaXRzLWhhbmRsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQVd0QyxpRUFBaUU7QUFDakUsTUFBTSxPQUFPLFlBQVk7SUFzSXZCLFlBQW1CLEdBQWM7UUFqSXZCLDJCQUFzQixHQUFHO1lBQ2pDLElBQUksRUFBRSxHQUFHO1lBQ1QsU0FBUyxFQUFFLEVBQUU7WUFDYixLQUFLLEVBQUUsR0FBRztTQUNYLENBQUM7UUE4SEEsSUFBSSxDQUFDLE9BQU8sR0FBRyxHQUFHLENBQUM7UUFDbkIsTUFBTSxLQUFLLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsRUFBRSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUMvQyxJQUFJLEtBQUssS0FBSyxJQUFJO1lBQ2hCLElBQUksQ0FBQyxNQUFNLEdBQUcsS0FBSyxDQUFDOztZQUVwQixNQUFNLElBQUksS0FBSy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B0aHJvdyBuZXcgRXJyb3IoJ1VuaXRzIGFyZSBub3Qgc3BlY2lmaWVkIGluIGNvbHVtbicpO1xuICAgIHRoaXMuX25vdGF0aW9uID0gdGhpcy5nZXROb3RhdGlvbigpO1xuICAgIHRoaXMuX2RlZmF1bHRHYXBTeW1ib2wgPSAodGhpcy5pc0Zhc3RhKCkpID8gdGhpcy5fZGVmYXVsdEdhcFN5bWJvbHNEaWN0LkZBU1RBIDpcbiAgICAgICh0aGlzLmlzSGVsbSgpKSA/IHRoaXMuX2RlZmF1bHRHYXBTeW1ib2xzRGljdC5IRUxNIDpcbiAgICAgICAgdGhpcy5fZGVmYXVsdEdhcFN5bWJvbHNEaWN0LlNFUEFSQVRPUjtcbiAgfVxufVxuIl19 | ||
UnitsHandler.PeptideFastaAlphabet = new Set([ | ||
'G', 'L', 'Y', 'S', 'E', 'Q', 'D', 'N', 'F', 'A', | ||
'K', 'R', 'H', 'C', 'V', 'P', 'W', 'I', 'M', 'T', | ||
]); | ||
UnitsHandler.DnaFastaAlphabet = new Set(['A', 'C', 'G', 'T']); | ||
UnitsHandler.RnaFastaAlphabet = new Set(['A', 'C', 'G', 'U']); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW5pdHMtaGFuZGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInVuaXRzLWhhbmRsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUl0QyxPQUFPLEVBQUMsT0FBTyxFQUFjLE1BQU0scUJBQXFCLENBQUM7QUFTekQsaUVBQWlFO0FBQ2pFLE1BQU0sT0FBTyxZQUFZO0lBbUt2QixZQUFtQixHQUFjO1FBOUp2QiwyQkFBc0IsR0FBRztZQUNqQyxJQUFJLEVBQUUsR0FBRztZQUNULFNBQVMsRUFBRSxFQUFFO1lBQ2IsS0FB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