@datagrok/bio
Advanced tools
Comparing version 1.7.23 to 1.7.24
{ | ||
"name": "@datagrok/bio", | ||
"beta": false, | ||
"friendlyName": "Bio", | ||
@@ -9,3 +8,3 @@ "author": { | ||
}, | ||
"version": "1.7.23", | ||
"version": "1.7.24", | ||
"description": "Bio is a [package](https://datagrok.ai/help/develop/develop#packages) for the [Datagrok](https://datagrok.ai) platform", | ||
@@ -19,5 +18,5 @@ "repository": { | ||
"@biowasm/aioli": ">=2.4.0", | ||
"@datagrok-libraries/bio": "^3.0.2", | ||
"@datagrok-libraries/ml": "^3.0.0", | ||
"@datagrok-libraries/utils": "^1.4.0", | ||
"@datagrok-libraries/bio": "^3.0.3", | ||
"@datagrok-libraries/ml": "^3.0.3", | ||
"@datagrok-libraries/utils": "^1.5.4", | ||
"cash-dom": "latest", | ||
@@ -24,0 +23,0 @@ "datagrok-api": "^1.5.0", |
@@ -54,6 +54,6 @@ /** | ||
if (cStatus.get(i)) { | ||
passReport += `Test result : ${targetPackage}.${cCat.get(i)}.${cName.get(i)} : ${cMessage.get(i)}\n`; | ||
passReport += `Test result : Success : ${targetPackage}.${cCat.get(i)}.${cName.get(i)} : ${cMessage.get(i)}\n`; | ||
} else { | ||
failed = true; | ||
failReport += `Test result : ${targetPackage}.${cCat.get(i)}.${cName.get(i)} : ${cMessage.get(i)}\n`; | ||
failReport += `Test result : Failed : ${targetPackage}.${cCat.get(i)}.${cName.get(i)} : ${cMessage.get(i)}\n`; | ||
} | ||
@@ -60,0 +60,0 @@ } |
@@ -27,2 +27,3 @@ /* Do not change these import lines to match external modules in webpack configuration */ | ||
import {FastaFileHandler} from '@datagrok-libraries/bio/src/utils/fasta-handler'; | ||
import {removeEmptyStringRows} from '@datagrok-libraries/utils/src/dataframe-utils' | ||
@@ -165,4 +166,7 @@ | ||
const embedColsNames = getEmbeddingColsNames(table); | ||
const withoutEmptyValues = DG.DataFrame.fromColumns([macroMolecule]).clone(); | ||
const emptyValsIdxs = removeEmptyStringRows(withoutEmptyValues, encodedCol); | ||
const chemSpaceParams = { | ||
seqCol: encodedCol, | ||
seqCol: withoutEmptyValues.col(macroMolecule.name)!, | ||
methodName: methodName, | ||
@@ -174,4 +178,7 @@ similarityMetric: similarityMetric, | ||
const embeddings = sequenceSpaceRes.coordinates; | ||
for (const col of embeddings) | ||
table.columns.add(col); | ||
for (const col of embeddings) { | ||
const listValues = col.toList(); | ||
emptyValsIdxs.forEach((ind: number) => listValues.splice(ind, 0, null)); | ||
table.columns.add(DG.Column.fromFloat32Array(col.name, listValues)); | ||
} | ||
if (plotEmbeddings) { | ||
@@ -178,0 +185,0 @@ for (const v of grok.shell.views) { |
@@ -69,3 +69,3 @@ import * as C from './constants'; | ||
pivot: number = 0, left = false, transparencyRate: number = 1.0, | ||
separator: string = '', last: boolean = false, drawStyle: string = 'classic', maxWord:any={}, maxWordIdx:number=0, gridCell:any = {}): number { | ||
separator: string = '', last: boolean = false, drawStyle: string = 'classic', maxWord: any = {}, maxWordIdx: number = 0, gridCell: any = {}): number { | ||
g.textAlign = 'start'; | ||
@@ -216,4 +216,6 @@ const colorPart = s.substring(0); | ||
// обработка новых елементов | ||
const columns = gridCell.cell.column.categories; | ||
let monomerToShortFunction: (amino: string, maxLengthOfMonomer: number) => string = WebLogo.monomerToShort; | ||
let maxLengthOfMonomer = 8; | ||
let maxLengthWords = {}; | ||
@@ -226,3 +228,3 @@ // check if gridCell.cell.column.temp is array | ||
//@ts-ignore | ||
let textSizeWidth = g.measureText(WebLogo.monomerToText(amino) + ' '); | ||
let textSizeWidth = g.measureText(monomerToShortFunction(amino, maxLengthOfMonomer)); | ||
//@ts-ignore | ||
@@ -246,13 +248,5 @@ if (textSizeWidth.width > (maxLengthWords[index] ?? 0)) { | ||
let tagUnits = gridCell.cell.column.getTag(DG.TAGS.UNITS); | ||
let maxLength = 0; | ||
let maxWord = ''; | ||
let drawStyle = 'classic'; | ||
if (tagUnits.includes('MSA')) { | ||
subParts.forEach(part => { | ||
if (part.length > maxLength) { | ||
maxLength = part.length; | ||
maxWord = part; | ||
drawStyle = 'msa'; | ||
} | ||
}); | ||
drawStyle = 'msa'; | ||
} | ||
@@ -263,3 +257,3 @@ subParts.forEach((amino, index) => { | ||
let last = index === subParts.length - 1; | ||
x1 = printLeftOrCentered(x1, y, w, h, g, WebLogo.monomerToText(amino), color, 0, true, 1.0, separator, last, drawStyle, maxLengthWords, index, gridCell); | ||
x1 = printLeftOrCentered(x1, y, w, h, g, monomerToShortFunction(amino, maxLengthOfMonomer), color, 0, true, 1.0, separator, last, drawStyle, maxLengthWords, index, gridCell); | ||
}); | ||
@@ -266,0 +260,0 @@ |
@@ -11,3 +11,3 @@ import {IDrawTooltipParams} from '@datagrok-libraries/ml/src/viewers/activity-cliffs'; | ||
for (let i = 0; i < stringArray.length; ++i) | ||
distances[i] = getSimilarityFromDistance(AvailableMetrics['String']['Levenshtein'](stringArray[i], seq)); | ||
distances[i] = stringArray[i] ? getSimilarityFromDistance(AvailableMetrics['String']['Levenshtein'](stringArray[i], seq)) : 0; | ||
return DG.Column.fromList(DG.COLUMN_TYPE.FLOAT, 'distances', distances); | ||
@@ -14,0 +14,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
14221163
99707
+ Addedelectron-to-chromium@1.5.83(transitive)
- Removedelectron-to-chromium@1.5.80(transitive)