0.0.8 • Published 2 years ago

ove-auto-annotate v0.0.8

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

UI:

image

image

Usage:

import {
  autoAnnotateFeatures,
  autoAnnotateParts,
  autoAnnotatePrimers
} from "ove-auto-annotate";

<Editor
  {...{ 
    autoAnnotateFeatures, 
    autoAnnotateParts, 
    autoAnnotatePrimers, 
    getCustomAutoAnnotateList, //(optional) see below for more details 
    ...etc 
  }}
/>;

UMD usage:

include the following script after the main OVE script tag

<script
  type="text/javascript"
  src="https://unpkg.com/ove-auto-annotate/umd/ove-auto-annotate.js"
></script>

and pass:

window.createVectorEditor(yourDomNodeHere, {
  
  autoAnnotateFeatures: window._ove_addons.autoAnnotateFeatures,
  autoAnnotateParts: window._ove_addons.autoAnnotateParts,
  autoAnnotatePrimers: window._ove_addons.autoAnnotatePrimers,
  getCustomAutoAnnotateList //(optional) see below for more details
  ...etc
});

Passing a custom list of existing annotations to choose from:

image

async function getCustomAutoAnnotateList ({ annotationType, sequenceData }) { //annotationType = feature|part|oligo
    const dataToReturn = await fetch("/my/endpoint/here", { ...someParams }); //hit your endpoint here

    return {
      title: `My ${pluralize(startCase(annotationType))}`, //optionally choose a title for the tab
      list: [ //return a list of annotations. id, sequence, name are all required. type and isRegex are optional. IUPAC substitutions are allowed in non isRegex annotations
        {
          name: "I cover the full Seq",
          sequence: sequenceData.sequence,
          id: "1"
        },
        { name: "trypto", type: "cds", sequence: "agagagagagaga", id: "9" },
        { name: "prom2", type: "promoter", sequence: "gcttctctctc", id: "10" },
        {
          name: "prom2",
          type: "promoter",
          sequence: "gctt.*ctctctc",
          isRegex: true,
          id: "11"
        }
      ]
    };
  };

Publishing

  • make sure you're not importing anything you shouldn't be!
  • commit/publish your changes at the top level
  • cd addons/AutoAnnotate/
  • publish (pubpatch|pubmajor|pubminor)
0.0.8

2 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago