@teselagen/ove 0.0.19 → 0.0.21
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/index.umd.js +32 -18
- package/package.json +7 -7
- package/src/RowItem/index.js +3 -1
- package/src/RowView/index.js +1 -0
- package/src/updateEditor.js +12 -10
    
        package/index.umd.js
    CHANGED
    
    | @@ -160605,7 +160605,17 @@ | |
| 160605 160605 | 
             
                      data.size = isProtein ? size * 3 : size;
         | 
| 160606 160606 | 
             
                      data.sequence = await read(size, "utf8");
         | 
| 160607 160607 | 
             
                    } else if (ord(next_byte) === 10) {
         | 
| 160608 | 
            -
                      const strand_dict = { | 
| 160608 | 
            +
                      const strand_dict = {
         | 
| 160609 | 
            +
                        // [strand, arrowheadType]
         | 
| 160610 | 
            +
                        0: [1, "NONE"],
         | 
| 160611 | 
            +
                        // non-directional feature (in that case, the attribute is generally absent altogether)
         | 
| 160612 | 
            +
                        1: [1, "TOP"],
         | 
| 160613 | 
            +
                        // forward strand
         | 
| 160614 | 
            +
                        2: [-1, "BOTTOM"],
         | 
| 160615 | 
            +
                        // reverse strand
         | 
| 160616 | 
            +
                        3: [1, "BOTH"]
         | 
| 160617 | 
            +
                        // bi-directional feature
         | 
| 160618 | 
            +
                      };
         | 
| 160609 160619 | 
             
                      const xml = await read(block_size, "utf8");
         | 
| 160610 160620 | 
             
                      const b = new fxp.XMLParser({
         | 
| 160611 160621 | 
             
                        ignoreAttributes: false,
         | 
| @@ -160636,7 +160646,8 @@ | |
| 160636 160646 | 
             
                          name,
         | 
| 160637 160647 | 
             
                          type,
         | 
| 160638 160648 | 
             
                          ...locations?.length > 1 && { locations },
         | 
| 160639 | 
            -
                          strand: strand_dict[directionality],
         | 
| 160649 | 
            +
                          strand: directionality ? strand_dict[directionality][0] : 1,
         | 
| 160650 | 
            +
                          arrowheadType: directionality ? strand_dict[directionality][1] : "NONE",
         | 
| 160640 160651 | 
             
                          start: maxStart,
         | 
| 160641 160652 | 
             
                          end: maxEnd
         | 
| 160642 160653 | 
             
                          // color,
         | 
| @@ -171108,7 +171119,7 @@ | |
| 171108 171119 | 
             
                const isAlreadyProteinEditor = currentEditor.sequenceData && currentEditor.sequenceData.isProtein;
         | 
| 171109 171120 | 
             
                const isAlreadyRnaEditor = currentEditor.sequenceData && currentEditor.sequenceData.isRna;
         | 
| 171110 171121 | 
             
                const isAlreadyOligoEditor = currentEditor.sequenceData && currentEditor.sequenceData.isOligo;
         | 
| 171111 | 
            -
                const reverseSequenceShouldBeUpdate = currentEditor.sequenceData?.isSingleStrandedDNA !== sequenceData?.isSingleStrandedDNA;
         | 
| 171122 | 
            +
                const reverseSequenceShouldBeUpdate = currentEditor.sequenceData?.isSingleStrandedDNA !== sequenceData?.isSingleStrandedDNA || currentEditor.sequenceData?.isDoubleStrandedRNA !== sequenceData?.isDoubleStrandedRNA;
         | 
| 171112 171123 | 
             
                const isAlreadySpecialEditor = isAlreadyProteinEditor || isAlreadyRnaEditor || isAlreadyOligoEditor || reverseSequenceShouldBeUpdate;
         | 
| 171113 171124 | 
             
                let toSpread = {};
         | 
| 171114 171125 | 
             
                let payload;
         | 
| @@ -171135,14 +171146,14 @@ | |
| 171135 171146 | 
             
                        },
         | 
| 171136 171147 | 
             
                        annotationVisibility: {
         | 
| 171137 171148 | 
             
                          caret: true,
         | 
| 171138 | 
            -
                          ...annotationVisibility,
         | 
| 171139 | 
            -
                          //we spread this here to allow the user to override this .. if they must!
         | 
| 171140 171149 | 
             
                          sequence: false,
         | 
| 171141 171150 | 
             
                          reverseSequence: false,
         | 
| 171142 171151 | 
             
                          cutsites: false,
         | 
| 171143 171152 | 
             
                          translations: false,
         | 
| 171144 171153 | 
             
                          aminoAcidNumbers: false,
         | 
| 171145 | 
            -
                          primaryProteinSequence: true
         | 
| 171154 | 
            +
                          primaryProteinSequence: true,
         | 
| 171155 | 
            +
                          ...annotationVisibility
         | 
| 171156 | 
            +
                          //we spread this here to allow the user to override this .. if they must!
         | 
| 171146 171157 | 
             
                        },
         | 
| 171147 171158 | 
             
                        annotationsToSupport: {
         | 
| 171148 171159 | 
             
                          features: true,
         | 
| @@ -171164,14 +171175,14 @@ | |
| 171164 171175 | 
             
                        },
         | 
| 171165 171176 | 
             
                        annotationVisibility: {
         | 
| 171166 171177 | 
             
                          caret: true,
         | 
| 171167 | 
            -
                          ...annotationVisibility,
         | 
| 171168 | 
            -
                          //we spread this here to allow the user to override this .. if they must!
         | 
| 171169 171178 | 
             
                          sequence: true,
         | 
| 171170 171179 | 
             
                          cutsites: false,
         | 
| 171171 171180 | 
             
                          reverseSequence: false,
         | 
| 171172 171181 | 
             
                          translations: false,
         | 
| 171173 171182 | 
             
                          aminoAcidNumbers: false,
         | 
| 171174 | 
            -
                          primaryProteinSequence: false
         | 
| 171183 | 
            +
                          primaryProteinSequence: false,
         | 
| 171184 | 
            +
                          ...annotationVisibility
         | 
| 171185 | 
            +
                          //we spread this here to allow the user to override this .. if they must!
         | 
| 171175 171186 | 
             
                        },
         | 
| 171176 171187 | 
             
                        annotationsToSupport: {
         | 
| 171177 171188 | 
             
                          features: true,
         | 
| @@ -171194,14 +171205,14 @@ | |
| 171194 171205 | 
             
                        },
         | 
| 171195 171206 | 
             
                        annotationVisibility: {
         | 
| 171196 171207 | 
             
                          caret: true,
         | 
| 171197 | 
            -
                          ...annotationVisibility,
         | 
| 171198 | 
            -
                          //we spread this here to allow the user to override this .. if they must!
         | 
| 171199 171208 | 
             
                          sequence: true,
         | 
| 171200 171209 | 
             
                          cutsites: false,
         | 
| 171201 | 
            -
                          reverseSequence:  | 
| 171210 | 
            +
                          reverseSequence: sequenceData?.isDoubleStrandedRNA,
         | 
| 171202 171211 | 
             
                          translations: false,
         | 
| 171203 171212 | 
             
                          aminoAcidNumbers: false,
         | 
| 171204 | 
            -
                          primaryProteinSequence: false
         | 
| 171213 | 
            +
                          primaryProteinSequence: false,
         | 
| 171214 | 
            +
                          ...annotationVisibility
         | 
| 171215 | 
            +
                          //we spread this here to allow the user to override this .. if they must!
         | 
| 171205 171216 | 
             
                        },
         | 
| 171206 171217 | 
             
                        annotationsToSupport: {
         | 
| 171207 171218 | 
             
                          features: true,
         | 
| @@ -171225,13 +171236,13 @@ | |
| 171225 171236 | 
             
                        },
         | 
| 171226 171237 | 
             
                        annotationVisibility: {
         | 
| 171227 171238 | 
             
                          caret: true,
         | 
| 171228 | 
            -
                          ...annotationVisibility,
         | 
| 171229 | 
            -
                          //we spread this here to allow the user to override this .. if they must!
         | 
| 171230 171239 | 
             
                          sequence: true,
         | 
| 171231 171240 | 
             
                          reverseSequence: !sequenceData?.isSingleStrandedDNA,
         | 
| 171232 171241 | 
             
                          translations: false,
         | 
| 171233 171242 | 
             
                          aminoAcidNumbers: false,
         | 
| 171234 | 
            -
                          primaryProteinSequence: false
         | 
| 171243 | 
            +
                          primaryProteinSequence: false,
         | 
| 171244 | 
            +
                          ...annotationVisibility
         | 
| 171245 | 
            +
                          //we spread this here to allow the user to override this .. if they must!
         | 
| 171235 171246 | 
             
                        },
         | 
| 171236 171247 | 
             
                        annotationsToSupport: {
         | 
| 171237 171248 | 
             
                          features: true,
         | 
| @@ -188154,6 +188165,7 @@ double click --> edit`}`; | |
| 188154 188165 | 
             
                  rowTopComp,
         | 
| 188155 188166 | 
             
                  rowBottomComp,
         | 
| 188156 188167 | 
             
                  isProtein,
         | 
| 188168 | 
            +
                  isRna,
         | 
| 188157 188169 | 
             
                  tickSpacing,
         | 
| 188158 188170 | 
             
                  truncateLabelsThatDoNotFit = true,
         | 
| 188159 188171 | 
             
                  aminoAcidNumbersHeight = rowHeights.aminoAcidNumbers.height,
         | 
| @@ -188218,7 +188230,8 @@ double click --> edit`}`; | |
| 188218 188230 | 
             
                } = annotationVisibility;
         | 
| 188219 188231 | 
             
                const { sequence = "", cutsites = [] } = row;
         | 
| 188220 188232 | 
             
                const reverseSequence = getComplementSequenceString(
         | 
| 188221 | 
            -
                  alignmentData && alignmentData.sequence || sequence
         | 
| 188233 | 
            +
                  alignmentData && alignmentData.sequence || sequence,
         | 
| 188234 | 
            +
                  isRna
         | 
| 188222 188235 | 
             
                );
         | 
| 188223 188236 | 
             
                const getGaps = reactExports.useMemo(() => {
         | 
| 188224 188237 | 
             
                  if (alignmentData) {
         | 
| @@ -189924,7 +189937,7 @@ double click --> edit`}`; | |
| 189924 189937 | 
             
              }
         | 
| 189925 189938 |  | 
| 189926 189939 | 
             
              const name = "@teselagen/ove";
         | 
| 189927 | 
            -
              const version = "0.0. | 
| 189940 | 
            +
              const version = "0.0.20";
         | 
| 189928 189941 | 
             
              const main = "./src/index.js";
         | 
| 189929 189942 | 
             
              const packageJson = {
         | 
| 189930 189943 | 
             
              	name: name,
         | 
| @@ -200355,6 +200368,7 @@ double click --> edit`}`; | |
| 200355 200368 | 
             
                          },
         | 
| 200356 200369 | 
             
                          isRowView: true,
         | 
| 200357 200370 | 
             
                          isProtein: sequenceData.isProtein,
         | 
| 200371 | 
            +
                          isRna: sequenceData.isRna,
         | 
| 200358 200372 | 
             
                          chromatogramData: sequenceData.chromatogramData,
         | 
| 200359 200373 | 
             
                          sequenceLength: sequenceData.sequence.length,
         | 
| 200360 200374 | 
             
                          bpsPerRow,
         | 
    
        package/package.json
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "name": "@teselagen/ove",
         | 
| 3 | 
            -
              "version": "0.0. | 
| 3 | 
            +
              "version": "0.0.21",
         | 
| 4 4 | 
             
              "main": "./src/index.js",
         | 
| 5 5 | 
             
              "dependencies": {
         | 
| 6 | 
            -
                "@teselagen/sequence-utils": "0.1. | 
| 7 | 
            -
                "@teselagen/range-utils": "0.1. | 
| 8 | 
            -
                "@teselagen/ui": "0.0. | 
| 9 | 
            -
                "@teselagen/file-utils": "0.2. | 
| 10 | 
            -
                "@teselagen/bounce-loader": "0.0. | 
| 11 | 
            -
                "@teselagen/bio-parsers": "0.1. | 
| 6 | 
            +
                "@teselagen/sequence-utils": "0.1.23",
         | 
| 7 | 
            +
                "@teselagen/range-utils": "0.1.22",
         | 
| 8 | 
            +
                "@teselagen/ui": "0.0.27",
         | 
| 9 | 
            +
                "@teselagen/file-utils": "0.2.29",
         | 
| 10 | 
            +
                "@teselagen/bounce-loader": "0.0.16",
         | 
| 11 | 
            +
                "@teselagen/bio-parsers": "0.1.28",
         | 
| 12 12 | 
             
                "@blueprintjs/core": "3.52.0",
         | 
| 13 13 | 
             
                "@blueprintjs/datetime": "3.23.19",
         | 
| 14 14 | 
             
                "@blueprintjs/icons": "3.33.0",
         | 
    
        package/src/RowItem/index.js
    CHANGED
    
    | @@ -74,6 +74,7 @@ export default function RowItem(props) { | |
| 74 74 | 
             
                rowTopComp,
         | 
| 75 75 | 
             
                rowBottomComp,
         | 
| 76 76 | 
             
                isProtein,
         | 
| 77 | 
            +
                isRna,
         | 
| 77 78 | 
             
                tickSpacing,
         | 
| 78 79 | 
             
                truncateLabelsThatDoNotFit = true,
         | 
| 79 80 | 
             
                aminoAcidNumbersHeight = rowHeights.aminoAcidNumbers.height,
         | 
| @@ -141,7 +142,8 @@ export default function RowItem(props) { | |
| 141 142 | 
             
              const { sequence = "", cutsites = [] } = row;
         | 
| 142 143 |  | 
| 143 144 | 
             
              const reverseSequence = getComplementSequenceString(
         | 
| 144 | 
            -
                (alignmentData && alignmentData.sequence) || sequence
         | 
| 145 | 
            +
                (alignmentData && alignmentData.sequence) || sequence,
         | 
| 146 | 
            +
                isRna
         | 
| 145 147 | 
             
              );
         | 
| 146 148 | 
             
              const getGaps = useMemo(() => {
         | 
| 147 149 | 
             
                if (alignmentData) {
         | 
    
        package/src/RowView/index.js
    CHANGED
    
    | @@ -367,6 +367,7 @@ class _RowView extends React.Component { | |
| 367 367 | 
             
                          },
         | 
| 368 368 | 
             
                          isRowView: true,
         | 
| 369 369 | 
             
                          isProtein: sequenceData.isProtein,
         | 
| 370 | 
            +
                          isRna: sequenceData.isRna,
         | 
| 370 371 | 
             
                          chromatogramData: sequenceData.chromatogramData,
         | 
| 371 372 | 
             
                          sequenceLength: sequenceData.sequence.length,
         | 
| 372 373 | 
             
                          bpsPerRow,
         | 
    
        package/src/updateEditor.js
    CHANGED
    
    | @@ -25,7 +25,9 @@ export default function updateEditor( | |
| 25 25 | 
             
                currentEditor.sequenceData && currentEditor.sequenceData.isOligo;
         | 
| 26 26 | 
             
              const reverseSequenceShouldBeUpdate =
         | 
| 27 27 | 
             
                currentEditor.sequenceData?.isSingleStrandedDNA !==
         | 
| 28 | 
            -
             | 
| 28 | 
            +
                  sequenceData?.isSingleStrandedDNA ||
         | 
| 29 | 
            +
                currentEditor.sequenceData?.isDoubleStrandedRNA !==
         | 
| 30 | 
            +
                  sequenceData?.isDoubleStrandedRNA;
         | 
| 29 31 |  | 
| 30 32 | 
             
              const isAlreadySpecialEditor =
         | 
| 31 33 | 
             
                isAlreadyProteinEditor ||
         | 
| @@ -60,13 +62,13 @@ export default function updateEditor( | |
| 60 62 |  | 
| 61 63 | 
             
                      annotationVisibility: {
         | 
| 62 64 | 
             
                        caret: true,
         | 
| 63 | 
            -
                        ...annotationVisibility, //we spread this here to allow the user to override this .. if they must!
         | 
| 64 65 | 
             
                        sequence: false,
         | 
| 65 66 | 
             
                        reverseSequence: false,
         | 
| 66 67 | 
             
                        cutsites: false,
         | 
| 67 68 | 
             
                        translations: false,
         | 
| 68 69 | 
             
                        aminoAcidNumbers: false,
         | 
| 69 | 
            -
                        primaryProteinSequence: true
         | 
| 70 | 
            +
                        primaryProteinSequence: true,
         | 
| 71 | 
            +
                        ...annotationVisibility //we spread this here to allow the user to override this .. if they must!
         | 
| 70 72 | 
             
                      },
         | 
| 71 73 | 
             
                      annotationsToSupport: {
         | 
| 72 74 | 
             
                        features: true,
         | 
| @@ -87,13 +89,13 @@ export default function updateEditor( | |
| 87 89 | 
             
                      },
         | 
| 88 90 | 
             
                      annotationVisibility: {
         | 
| 89 91 | 
             
                        caret: true,
         | 
| 90 | 
            -
                        ...annotationVisibility, //we spread this here to allow the user to override this .. if they must!
         | 
| 91 92 | 
             
                        sequence: true,
         | 
| 92 93 | 
             
                        cutsites: false,
         | 
| 93 94 | 
             
                        reverseSequence: false,
         | 
| 94 95 | 
             
                        translations: false,
         | 
| 95 96 | 
             
                        aminoAcidNumbers: false,
         | 
| 96 | 
            -
                        primaryProteinSequence: false
         | 
| 97 | 
            +
                        primaryProteinSequence: false,
         | 
| 98 | 
            +
                        ...annotationVisibility //we spread this here to allow the user to override this .. if they must!
         | 
| 97 99 | 
             
                      },
         | 
| 98 100 | 
             
                      annotationsToSupport: {
         | 
| 99 101 | 
             
                        features: true,
         | 
| @@ -114,13 +116,13 @@ export default function updateEditor( | |
| 114 116 | 
             
                      },
         | 
| 115 117 | 
             
                      annotationVisibility: {
         | 
| 116 118 | 
             
                        caret: true,
         | 
| 117 | 
            -
                        ...annotationVisibility, //we spread this here to allow the user to override this .. if they must!
         | 
| 118 119 | 
             
                        sequence: true,
         | 
| 119 120 | 
             
                        cutsites: false,
         | 
| 120 | 
            -
                        reverseSequence:  | 
| 121 | 
            +
                        reverseSequence: sequenceData?.isDoubleStrandedRNA,
         | 
| 121 122 | 
             
                        translations: false,
         | 
| 122 123 | 
             
                        aminoAcidNumbers: false,
         | 
| 123 | 
            -
                        primaryProteinSequence: false
         | 
| 124 | 
            +
                        primaryProteinSequence: false,
         | 
| 125 | 
            +
                        ...annotationVisibility //we spread this here to allow the user to override this .. if they must!
         | 
| 124 126 | 
             
                      },
         | 
| 125 127 | 
             
                      annotationsToSupport: {
         | 
| 126 128 | 
             
                        features: true,
         | 
| @@ -143,12 +145,12 @@ export default function updateEditor( | |
| 143 145 | 
             
                      },
         | 
| 144 146 | 
             
                      annotationVisibility: {
         | 
| 145 147 | 
             
                        caret: true,
         | 
| 146 | 
            -
                        ...annotationVisibility, //we spread this here to allow the user to override this .. if they must!
         | 
| 147 148 | 
             
                        sequence: true,
         | 
| 148 149 | 
             
                        reverseSequence: !sequenceData?.isSingleStrandedDNA,
         | 
| 149 150 | 
             
                        translations: false,
         | 
| 150 151 | 
             
                        aminoAcidNumbers: false,
         | 
| 151 | 
            -
                        primaryProteinSequence: false
         | 
| 152 | 
            +
                        primaryProteinSequence: false,
         | 
| 153 | 
            +
                        ...annotationVisibility //we spread this here to allow the user to override this .. if they must!
         | 
| 152 154 | 
             
                      },
         | 
| 153 155 | 
             
                      annotationsToSupport: {
         | 
| 154 156 | 
             
                        features: true,
         |