@datagrok/sequence-translator 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +1 -1
- package/src/view/apps/oligo-pattern.ts +2 -53
- package/src/view/apps/oligo-structure.ts +4 -3
- package/src/view/apps/oligo-translator.ts +8 -2
- package/src/view/style/translator-app.css +2 -2
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import * as DG from 'datagrok-api/dg';
|
|
|
5
5
|
|
|
6
6
|
import {axolabsStyleMap} from '../../model/data-loading-utils/json-loader';
|
|
7
7
|
import {
|
|
8
|
-
DEFAULT_PTO, DEFAULT_SEQUENCE_LENGTH, MAX_SEQUENCE_LENGTH, USER_STORAGE_KEY,
|
|
8
|
+
DEFAULT_PTO, DEFAULT_SEQUENCE_LENGTH, MAX_SEQUENCE_LENGTH, USER_STORAGE_KEY, SS, AS, STRAND_NAME, STRANDS, TERMINAL, TERMINAL_KEYS, THREE_PRIME, FIVE_PRIME, JSON_FIELD as FIELD
|
|
9
9
|
} from '../../model/pattern-app/const';
|
|
10
10
|
import {isOverhang} from '../../model/pattern-app/helpers';
|
|
11
11
|
import {generateExample, translateSequence, getShortName, isCurrentUserCreatedThisPattern, findDuplicates, addColumnWithIds, addColumnWithTranslatedSequences} from '../../model//pattern-app/oligo-pattern';
|
|
@@ -530,7 +530,6 @@ export class PatternLayoutHandler {
|
|
|
530
530
|
const inputIdColumnDiv = ui.div([]);
|
|
531
531
|
const svgDiv = ui.div([]);
|
|
532
532
|
const asExampleDiv = ui.div([], 'ui-form ui-form-wide');
|
|
533
|
-
const appAxolabsDescription = ui.div([]);
|
|
534
533
|
const loadPatternDiv = ui.div([]);
|
|
535
534
|
const asModificationDiv = ui.form([]);
|
|
536
535
|
const isEnumerateModificationsDiv = ui.divH([
|
|
@@ -678,7 +677,7 @@ export class PatternLayoutHandler {
|
|
|
678
677
|
{backgroundColor: 'white'}), 'Download pattern as PNG image', '');
|
|
679
678
|
|
|
680
679
|
const editPattern = ui.link('Edit pattern', ()=>{
|
|
681
|
-
ui.dialog('Edit
|
|
680
|
+
ui.dialog('Edit pattern')
|
|
682
681
|
.add(ui.divV([
|
|
683
682
|
ui.h1('PTO'),
|
|
684
683
|
ui.divH([
|
|
@@ -695,56 +694,6 @@ export class PatternLayoutHandler {
|
|
|
695
694
|
.show()
|
|
696
695
|
}, 'Edit pattern', '');
|
|
697
696
|
|
|
698
|
-
const mainSection = ui.panel([
|
|
699
|
-
ui.block([
|
|
700
|
-
svgDiv,
|
|
701
|
-
], {style: {overflowX: 'scroll'}}),
|
|
702
|
-
downloadButton,
|
|
703
|
-
isEnumerateModificationsDiv,
|
|
704
|
-
ui.div([
|
|
705
|
-
ui.div([
|
|
706
|
-
ui.divH([
|
|
707
|
-
ui.h1('Pattern options'),
|
|
708
|
-
]),
|
|
709
|
-
ui.divH([
|
|
710
|
-
ui.block([
|
|
711
|
-
strandLengthInput[SS].root,
|
|
712
|
-
asLengthDiv,
|
|
713
|
-
sequenceBase.root,
|
|
714
|
-
comment.root,
|
|
715
|
-
loadPatternDiv,
|
|
716
|
-
saveAs.root,
|
|
717
|
-
ui.buttonsInput([
|
|
718
|
-
//savePatternButton,
|
|
719
|
-
]),
|
|
720
|
-
], 'ui-form'),
|
|
721
|
-
ui.block([
|
|
722
|
-
createAsStrand.root,
|
|
723
|
-
fullyPto.root,
|
|
724
|
-
firstPto[SS].root,
|
|
725
|
-
firstPto[AS].root,
|
|
726
|
-
terminalModification[SS][FIVE_PRIME].root,
|
|
727
|
-
terminalModification[SS][THREE_PRIME].root,
|
|
728
|
-
asModificationDiv,
|
|
729
|
-
], 'ui-form'),
|
|
730
|
-
]),
|
|
731
|
-
], 'ui-form'),
|
|
732
|
-
inputsSection,
|
|
733
|
-
exampleSection,
|
|
734
|
-
], {style: {flexWrap: 'wrap'}}),
|
|
735
|
-
]);
|
|
736
|
-
|
|
737
|
-
const info = ui.info(
|
|
738
|
-
[
|
|
739
|
-
ui.divText('\n How to define new pattern:', {style: {'font-weight': 'bolder'}}),
|
|
740
|
-
ui.divText('1. Choose table and columns with sense and antisense strands'),
|
|
741
|
-
ui.divText('2. Choose lengths of both strands by editing checkboxes below'),
|
|
742
|
-
ui.divText('3. Choose basis and PTO status for each nucleotide'),
|
|
743
|
-
ui.divText('4. Set additional modifications for sequence edges'),
|
|
744
|
-
ui.divText('5. Press \'Convert Sequences\' button'),
|
|
745
|
-
ui.divText('This will add the result column(s) to the right of the table'),
|
|
746
|
-
], 'Create and apply Axolabs translation patterns.',
|
|
747
|
-
);
|
|
748
697
|
strandLengthInput[SS].addCaption('Length');
|
|
749
698
|
|
|
750
699
|
return ui.splitH([
|
|
@@ -126,9 +126,10 @@ export class StructureLayoutHandler {
|
|
|
126
126
|
const clearBlock = Object.fromEntries(
|
|
127
127
|
STRANDS.map(
|
|
128
128
|
(key) => {
|
|
129
|
-
const
|
|
130
|
-
ui.
|
|
131
|
-
|
|
129
|
+
const clearIcon = ui.icons.delete(() => { coloredInput[key].inputBase.value = '' });
|
|
130
|
+
const clearButton = ui.button(clearIcon, () => {});
|
|
131
|
+
ui.tooltip.bind(clearButton, `Clear ${key.toUpperCase()}`);
|
|
132
|
+
return [key, clearIcon];
|
|
132
133
|
}
|
|
133
134
|
));
|
|
134
135
|
|
|
@@ -5,7 +5,6 @@ import * as DG from 'datagrok-api/dg';
|
|
|
5
5
|
|
|
6
6
|
import * as rxjs from 'rxjs';
|
|
7
7
|
import '../style/translator-app.css';
|
|
8
|
-
import $ from 'cash-dom';
|
|
9
8
|
|
|
10
9
|
import {highlightInvalidSubsequence} from '../utils/colored-input/input-painters';
|
|
11
10
|
import {ColoredTextInput} from '../utils/colored-input/colored-text-input';
|
|
@@ -74,12 +73,19 @@ export class TranslatorLayoutHandler {
|
|
|
74
73
|
|
|
75
74
|
const formatChoiceInput = ui.div([this.formatChoiceInput]);
|
|
76
75
|
|
|
76
|
+
const clearButton = ui.button(
|
|
77
|
+
ui.icons.delete(() => { sequenceColoredInput.inputBase.value = '' }),
|
|
78
|
+
() => {}
|
|
79
|
+
);
|
|
80
|
+
ui.tooltip.bind(clearButton, 'Clear input');
|
|
81
|
+
|
|
77
82
|
const inputTableRow = {
|
|
78
83
|
format: formatChoiceInput,
|
|
79
84
|
textInput: sequenceColoredInput.root,
|
|
85
|
+
clearBtn: clearButton
|
|
80
86
|
};
|
|
81
87
|
const upperBlock = ui.table(
|
|
82
|
-
[inputTableRow], (item) => [item.format, item.textInput]
|
|
88
|
+
[inputTableRow], (item) => [item.format, item.textInput, item.clearBtn]
|
|
83
89
|
);
|
|
84
90
|
upperBlock.classList.add('st-translator-input-table');
|
|
85
91
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* Naming convention: class names should begin with st and app name to avoid naming collitions */
|
|
2
2
|
.st-translator-input-table {
|
|
3
|
-
width: 100%;
|
|
3
|
+
/* width: 100%; */
|
|
4
|
+
margin-right: 20px;
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
.st-translator-input-table td:has(textarea) {
|
|
7
8
|
width: 100%;
|
|
8
|
-
padding-right: 20px;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.st-translator-input-table td:has(select) {
|