@opencloning/ui 1.0.0
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 +18 -0
- package/package.json +37 -0
- package/src/components/AppAlerts.jsx +19 -0
- package/src/components/CloningHistory.jsx +40 -0
- package/src/components/DataModelDisplayer.jsx +30 -0
- package/src/components/DescriptionEditor.jsx +68 -0
- package/src/components/DownloadCloningStrategyDialog.jsx +84 -0
- package/src/components/DownloadSequenceFileDialog.jsx +90 -0
- package/src/components/DragAndDropCloningHistoryWrapper.jsx +39 -0
- package/src/components/DraggableDialogPaper.jsx +16 -0
- package/src/components/EditSequenceNameDialog.jsx +90 -0
- package/src/components/ExternalServicesStatusCheck.jsx +92 -0
- package/src/components/HistoryLoadedDialog.jsx +49 -0
- package/src/components/LoadCloningHistoryWrapper.jsx +166 -0
- package/src/components/MainSequenceCheckBox.jsx +83 -0
- package/src/components/MainSequenceEditor.jsx +165 -0
- package/src/components/NetworkNode.jsx +159 -0
- package/src/components/NetworkTree.css +127 -0
- package/src/components/ObjectTable.jsx +24 -0
- package/src/components/OpenCloning.jsx +102 -0
- package/src/components/OverhangsDisplay.jsx +25 -0
- package/src/components/SequenceEditor.jsx +120 -0
- package/src/components/SequenceTab.jsx +14 -0
- package/src/components/TemplateSequence.jsx +38 -0
- package/src/components/annotation/PlannotateAnnotationReport.jsx +33 -0
- package/src/components/annotation/useUpdateAnnotationInMainSequence.js +39 -0
- package/src/components/assembler/AssemblePartWidget.jsx +252 -0
- package/src/components/assembler/Assembler.jsx +273 -0
- package/src/components/assembler/AssemblerPart.jsx +99 -0
- package/src/components/assembler/StopIcon.jsx +34 -0
- package/src/components/assembler/assembler_data2.json +50 -0
- package/src/components/assembler/assembly_component.module.css +81 -0
- package/src/components/assembler/moclo.json +110 -0
- package/src/components/assembler/sbol_visual_glyphs/LICENSE.html +21 -0
- package/src/components/assembler/sbol_visual_glyphs/assembly-scar.svg +63 -0
- package/src/components/assembler/sbol_visual_glyphs/cds-stop.svg +85 -0
- package/src/components/assembler/sbol_visual_glyphs/cds.svg +60 -0
- package/src/components/assembler/sbol_visual_glyphs/chromosomal-locus.svg +78 -0
- package/src/components/assembler/sbol_visual_glyphs/engineered-region.svg +56 -0
- package/src/components/assembler/sbol_visual_glyphs/five-prime-sticky-restriction-site.svg +56 -0
- package/src/components/assembler/sbol_visual_glyphs/origin-of-replication.svg +57 -0
- package/src/components/assembler/sbol_visual_glyphs/primer-binding-site.svg +59 -0
- package/src/components/assembler/sbol_visual_glyphs/promoter.svg +60 -0
- package/src/components/assembler/sbol_visual_glyphs/ribosome-entry-site.svg +56 -0
- package/src/components/assembler/sbol_visual_glyphs/specific-recombination-site.svg +59 -0
- package/src/components/assembler/sbol_visual_glyphs/terminator.svg +60 -0
- package/src/components/assembler/sbol_visual_glyphs/three-prime-sticky-restriction-site.svg +56 -0
- package/src/components/assembler/sbol_visual_glyphs.js +36 -0
- package/src/components/assembler/useAssembler.js +71 -0
- package/src/components/dummy/DummyInterface.js +41 -0
- package/src/components/dummy/GetSequenceFileAndDatabaseIdComponent.jsx +59 -0
- package/src/components/eLabFTW/ELabFTWCategorySelect.cy.jsx +86 -0
- package/src/components/eLabFTW/ELabFTWCategorySelect.jsx +43 -0
- package/src/components/eLabFTW/ELabFTWFileSelect.cy.jsx +43 -0
- package/src/components/eLabFTW/ELabFTWFileSelect.jsx +29 -0
- package/src/components/eLabFTW/ELabFTWResourceSelect.cy.jsx +107 -0
- package/src/components/eLabFTW/ELabFTWResourceSelect.jsx +23 -0
- package/src/components/eLabFTW/GetPrimerComponent.cy.jsx +261 -0
- package/src/components/eLabFTW/GetPrimerComponent.jsx +55 -0
- package/src/components/eLabFTW/GetSequenceFileAndDatabaseIdComponent.cy.jsx +184 -0
- package/src/components/eLabFTW/GetSequenceFileAndDatabaseIdComponent.jsx +62 -0
- package/src/components/eLabFTW/LoadHistoryComponent.cy.jsx +235 -0
- package/src/components/eLabFTW/LoadHistoryComponent.jsx +51 -0
- package/src/components/eLabFTW/PrimersNotInDatabaseComponent.cy.jsx +159 -0
- package/src/components/eLabFTW/PrimersNotInDatabaseComponent.jsx +54 -0
- package/src/components/eLabFTW/SubmitToDatabaseComponent.cy.jsx +185 -0
- package/src/components/eLabFTW/SubmitToDatabaseComponent.jsx +51 -0
- package/src/components/eLabFTW/common.js +26 -0
- package/src/components/eLabFTW/eLabFTWInterface.js +294 -0
- package/src/components/eLabFTW/eLabFTWInterface.test.js +839 -0
- package/src/components/eLabFTW/envValues.js +7 -0
- package/src/components/eLabFTW/utils.js +39 -0
- package/src/components/form/CustomFormHelperText.jsx +10 -0
- package/src/components/form/EnzymeMultiSelect.cy.jsx +61 -0
- package/src/components/form/EnzymeMultiSelect.jsx +34 -0
- package/src/components/form/GetRequestMultiSelect.jsx +107 -0
- package/src/components/form/LabelWithTooltip.jsx +16 -0
- package/src/components/form/PostRequestSelect.cy.jsx +70 -0
- package/src/components/form/PostRequestSelect.jsx +86 -0
- package/src/components/form/RequestStatusWrapper.jsx +17 -0
- package/src/components/form/RetryAlert.jsx +20 -0
- package/src/components/form/ServerErrorMessage.jsx +10 -0
- package/src/components/form/SubmitButtonBackendAPI.jsx +15 -0
- package/src/components/form/SubmitToDatabaseDialog.jsx +133 -0
- package/src/components/form/TextFieldValidate.jsx +67 -0
- package/src/components/form/ValidatedTextField.jsx +33 -0
- package/src/components/form/intermediates_disclaimer.svg +181 -0
- package/src/components/navigation/ButtonWithMenu.jsx +43 -0
- package/src/components/navigation/CustomTab.jsx +14 -0
- package/src/components/navigation/FeedbackDialog.jsx +34 -0
- package/src/components/navigation/GithubCornerRight.jsx +29 -0
- package/src/components/navigation/MainAppBar.css +26 -0
- package/src/components/navigation/MainAppBar.jsx +205 -0
- package/src/components/navigation/SelectExampleDialog.jsx +69 -0
- package/src/components/navigation/SelectTemplateDialog.jsx +107 -0
- package/src/components/navigation/TabPanel.jsx +28 -0
- package/src/components/navigation/VersionDialog.jsx +33 -0
- package/src/components/primers/CreatePrimerFromSequenceForm.jsx +42 -0
- package/src/components/primers/DownloadPrimersButton.jsx +104 -0
- package/src/components/primers/PrimerForm.css +14 -0
- package/src/components/primers/PrimerForm.jsx +107 -0
- package/src/components/primers/PrimerList.css +46 -0
- package/src/components/primers/PrimerList.cy.jsx +95 -0
- package/src/components/primers/PrimerList.jsx +126 -0
- package/src/components/primers/PrimerTableRow.cy.jsx +57 -0
- package/src/components/primers/PrimerTableRow.jsx +84 -0
- package/src/components/primers/SelectPrimerForm.jsx +66 -0
- package/src/components/primers/import_primers/ImportPrimersButton.jsx +101 -0
- package/src/components/primers/import_primers/ImportPrimersTable.jsx +51 -0
- package/src/components/primers/import_primers/PrimerDatabaseImportForm.jsx +107 -0
- package/src/components/primers/import_primers/styles.css +60 -0
- package/src/components/primers/primer_design/SequenceTabComponents/CollapsableLabel.jsx +31 -0
- package/src/components/primers/primer_design/SequenceTabComponents/GatewayRoiSelect.jsx +164 -0
- package/src/components/primers/primer_design/SequenceTabComponents/OrientationPicker.jsx +37 -0
- package/src/components/primers/primer_design/SequenceTabComponents/PrimerDesignContext.jsx +369 -0
- package/src/components/primers/primer_design/SequenceTabComponents/PrimerDesignEBIC.jsx +24 -0
- package/src/components/primers/primer_design/SequenceTabComponents/PrimerDesignForm.jsx +29 -0
- package/src/components/primers/primer_design/SequenceTabComponents/PrimerDesignGatewayBP.jsx +36 -0
- package/src/components/primers/primer_design/SequenceTabComponents/PrimerDesignGibsonAssembly.jsx +26 -0
- package/src/components/primers/primer_design/SequenceTabComponents/PrimerDesignHomologousRecombination.jsx +32 -0
- package/src/components/primers/primer_design/SequenceTabComponents/PrimerDesignRestriction.jsx +25 -0
- package/src/components/primers/primer_design/SequenceTabComponents/PrimerDesignSimplePair.jsx +25 -0
- package/src/components/primers/primer_design/SequenceTabComponents/PrimerDesignStepper.jsx +53 -0
- package/src/components/primers/primer_design/SequenceTabComponents/PrimerDesigner.jsx +80 -0
- package/src/components/primers/primer_design/SequenceTabComponents/PrimerResultForm.jsx +49 -0
- package/src/components/primers/primer_design/SequenceTabComponents/PrimerSettingsForm.jsx +68 -0
- package/src/components/primers/primer_design/SequenceTabComponents/PrimerSpacerForm.jsx +84 -0
- package/src/components/primers/primer_design/SequenceTabComponents/RestrictionSpacerForm.jsx +85 -0
- package/src/components/primers/primer_design/SequenceTabComponents/StepNavigation.jsx +48 -0
- package/src/components/primers/primer_design/SequenceTabComponents/TabPanelEBICSettings.jsx +216 -0
- package/src/components/primers/primer_design/SequenceTabComponents/TabPanelResults.jsx +42 -0
- package/src/components/primers/primer_design/SequenceTabComponents/TabPanelSelectRoi.jsx +61 -0
- package/src/components/primers/primer_design/SequenceTabComponents/TabPannelSettings.jsx +59 -0
- package/src/components/primers/primer_design/SequenceTabComponents/primerDesignMinimalValues.json +5 -0
- package/src/components/primers/primer_design/SequenceTabComponents/useEBICPrimerDesignSettings.js +31 -0
- package/src/components/primers/primer_design/SequenceTabComponents/useEnzymePrimerDesignSettings.js +57 -0
- package/src/components/primers/primer_design/SequenceTabComponents/useGatewayPrimerDesignSettings.js +18 -0
- package/src/components/primers/primer_design/SequenceTabComponents/usePrimerDesignSettings.js +31 -0
- package/src/components/primers/primer_design/SourceComponents/PrimerDesignGatewayBP.jsx +88 -0
- package/src/components/primers/primer_design/SourceComponents/PrimerDesignGibsonAssembly.jsx +65 -0
- package/src/components/primers/primer_design/SourceComponents/PrimerDesignHomologousRecombination.jsx +84 -0
- package/src/components/primers/primer_design/SourceComponents/PrimerDesignSourceForm.jsx +74 -0
- package/src/components/primers/primer_design/common/NoAttPSitesError.jsx +31 -0
- package/src/components/primers/primer_details/PCRTable.cy.jsx +51 -0
- package/src/components/primers/primer_details/PCRTable.jsx +35 -0
- package/src/components/primers/primer_details/Primer3Figure.jsx +25 -0
- package/src/components/primers/primer_details/PrimerDetailsTds.jsx +39 -0
- package/src/components/primers/primer_details/PrimerInfoIcon.cy.jsx +137 -0
- package/src/components/primers/primer_details/PrimerInfoIcon.jsx +132 -0
- package/src/components/primers/primer_details/TableSection.jsx +17 -0
- package/src/components/primers/primer_details/primerDetailsFormatting.js +3 -0
- package/src/components/primers/primer_details/useMultiplePrimerDetails.js +29 -0
- package/src/components/primers/primer_details/usePCRDetails.js +47 -0
- package/src/components/primers/primer_details/usePrimerDetailsEndpoints.js +49 -0
- package/src/components/primers/primer_details/useSinglePrimerSequenceDetails.js +25 -0
- package/src/components/primers/primersToTabularFile.js +49 -0
- package/src/components/primers/primersToTabularFile.test.js +108 -0
- package/src/components/settings/SettingsTab.cy.jsx +267 -0
- package/src/components/settings/SettingsTab.jsx +170 -0
- package/src/components/sources/AssemblyPlanDisplayer.cy.jsx +22 -0
- package/src/components/sources/AssemblyPlanDisplayer.jsx +27 -0
- package/src/components/sources/CollectionSource.jsx +97 -0
- package/src/components/sources/FinishedSource.jsx +397 -0
- package/src/components/sources/KnownSourceErrors.jsx +50 -0
- package/src/components/sources/MultipleInputsSelector.jsx +63 -0
- package/src/components/sources/MultipleOutputsSelector.jsx +63 -0
- package/src/components/sources/NewSourceBox.jsx +37 -0
- package/src/components/sources/PCRUnitForm.jsx +102 -0
- package/src/components/sources/SingleInputSelector.jsx +36 -0
- package/src/components/sources/Source.jsx +125 -0
- package/src/components/sources/SourceAnnotation.jsx +44 -0
- package/src/components/sources/SourceAssembly.jsx +201 -0
- package/src/components/sources/SourceBox.css +18 -0
- package/src/components/sources/SourceBox.jsx +60 -0
- package/src/components/sources/SourceCopySequence.jsx +38 -0
- package/src/components/sources/SourceDatabase.jsx +28 -0
- package/src/components/sources/SourceFile.jsx +188 -0
- package/src/components/sources/SourceGenomeRegion.cy.jsx +131 -0
- package/src/components/sources/SourceGenomeRegion.jsx +486 -0
- package/src/components/sources/SourceHomologousRecombination.jsx +125 -0
- package/src/components/sources/SourceKnownGenomeRegion.jsx +60 -0
- package/src/components/sources/SourceManuallyTyped.jsx +116 -0
- package/src/components/sources/SourcePCRorHybridization.jsx +165 -0
- package/src/components/sources/SourcePolymeraseExtension.jsx +44 -0
- package/src/components/sources/SourceRepositoryId.jsx +409 -0
- package/src/components/sources/SourceRestriction.jsx +41 -0
- package/src/components/sources/SourceReverseComplement.jsx +33 -0
- package/src/components/sources/SourceTypeSelector.jsx +94 -0
- package/src/components/sources/SubSequenceDisplayer.jsx +70 -0
- package/src/components/sources/VerifyDeleteDialog.jsx +23 -0
- package/src/components/sources/repositoryMetadata.js +14 -0
- package/src/components/verification/LoadFromDatabaseButton.jsx +90 -0
- package/src/components/verification/SequencingFileRow.jsx +34 -0
- package/src/components/verification/VerificationFileDialog.cy.jsx +176 -0
- package/src/components/verification/VerificationFileDialog.jsx +248 -0
- package/src/config/defaultMainEditorProps.js +44 -0
- package/src/hooks/useAlerts.js +16 -0
- package/src/hooks/useBackendAPI.js +51 -0
- package/src/hooks/useBackendRoute.js +22 -0
- package/src/hooks/useDatabase.js +18 -0
- package/src/hooks/useDragAndDropFile.js +31 -0
- package/src/hooks/useGatewaySites.js +40 -0
- package/src/hooks/useHttpClient.js +12 -0
- package/src/hooks/useLoadDatabaseFile.js +108 -0
- package/src/hooks/useStoreEditor.js +101 -0
- package/src/hooks/useValidateState.js +43 -0
- package/vitest.config.js +18 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
4
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
5
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
6
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
9
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
10
|
+
viewBox="0 0 44.999998 44.999998"
|
|
11
|
+
version="1.1"
|
|
12
|
+
xml:space="preserve"
|
|
13
|
+
x="0px"
|
|
14
|
+
y="0px"
|
|
15
|
+
width="0.5in"
|
|
16
|
+
height="0.5in"
|
|
17
|
+
id="svg2"
|
|
18
|
+
inkscape:version="0.91 r13725"
|
|
19
|
+
sodipodi:docname="origin-of-replication.svg"><metadata
|
|
20
|
+
id="metadata12"><rdf:RDF><cc:Work
|
|
21
|
+
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
|
22
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><sodipodi:namedview
|
|
23
|
+
pagecolor="#ffffff"
|
|
24
|
+
bordercolor="#666666"
|
|
25
|
+
borderopacity="1"
|
|
26
|
+
objecttolerance="10"
|
|
27
|
+
gridtolerance="10"
|
|
28
|
+
guidetolerance="10"
|
|
29
|
+
inkscape:pageopacity="0"
|
|
30
|
+
inkscape:pageshadow="2"
|
|
31
|
+
inkscape:window-width="640"
|
|
32
|
+
inkscape:window-height="480"
|
|
33
|
+
id="namedview10"
|
|
34
|
+
showgrid="false"
|
|
35
|
+
units="in"
|
|
36
|
+
inkscape:zoom="2.36"
|
|
37
|
+
inkscape:cx="25"
|
|
38
|
+
inkscape:cy="50"
|
|
39
|
+
inkscape:window-x="0"
|
|
40
|
+
inkscape:window-y="0"
|
|
41
|
+
inkscape:window-maximized="0"
|
|
42
|
+
inkscape:current-layer="svg2" /><defs
|
|
43
|
+
id="defs4"><style
|
|
44
|
+
type="text/css"
|
|
45
|
+
id="style6"><![CDATA[
|
|
46
|
+
path,circle {
|
|
47
|
+
stroke:#000000;
|
|
48
|
+
stroke-width: 3;
|
|
49
|
+
stroke-linecap: round;
|
|
50
|
+
stroke-linejoin: round;
|
|
51
|
+
fill: none
|
|
52
|
+
}]]></style></defs><circle
|
|
53
|
+
cx="22.499998"
|
|
54
|
+
cy="22.499998"
|
|
55
|
+
r="12"
|
|
56
|
+
id="circle8"
|
|
57
|
+
style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round" /></svg>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
4
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
5
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
6
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
9
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
10
|
+
viewBox="0 0 44.999998 44.999998"
|
|
11
|
+
version="1.1"
|
|
12
|
+
xml:space="preserve"
|
|
13
|
+
x="0px"
|
|
14
|
+
y="0px"
|
|
15
|
+
width="0.5in"
|
|
16
|
+
height="0.5in"
|
|
17
|
+
id="svg2"
|
|
18
|
+
inkscape:version="0.91 r13725"
|
|
19
|
+
sodipodi:docname="primer-binding-site.svg"
|
|
20
|
+
inkscape:export-filename="/Users/jakebeal/projects/SBOL/SBOLv-realizations/Glyphs/primer-binding-site/primer-binding-site-specification.png"
|
|
21
|
+
inkscape:export-xdpi="300"
|
|
22
|
+
inkscape:export-ydpi="300"><metadata
|
|
23
|
+
id="metadata12"><rdf:RDF><cc:Work
|
|
24
|
+
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
|
25
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><sodipodi:namedview
|
|
26
|
+
pagecolor="#ffffff"
|
|
27
|
+
bordercolor="#666666"
|
|
28
|
+
borderopacity="1"
|
|
29
|
+
objecttolerance="10"
|
|
30
|
+
gridtolerance="10"
|
|
31
|
+
guidetolerance="10"
|
|
32
|
+
inkscape:pageopacity="0"
|
|
33
|
+
inkscape:pageshadow="2"
|
|
34
|
+
inkscape:window-width="916"
|
|
35
|
+
inkscape:window-height="792"
|
|
36
|
+
id="namedview10"
|
|
37
|
+
showgrid="false"
|
|
38
|
+
units="in"
|
|
39
|
+
inkscape:zoom="18.88"
|
|
40
|
+
inkscape:cx="25"
|
|
41
|
+
inkscape:cy="14.045418"
|
|
42
|
+
inkscape:window-x="0"
|
|
43
|
+
inkscape:window-y="0"
|
|
44
|
+
inkscape:window-maximized="0"
|
|
45
|
+
inkscape:current-layer="svg2" /><defs
|
|
46
|
+
id="defs4"><style
|
|
47
|
+
type="text/css"
|
|
48
|
+
id="style6"><![CDATA[
|
|
49
|
+
path,circle {
|
|
50
|
+
stroke:#000000;
|
|
51
|
+
stroke-width: 3;
|
|
52
|
+
stroke-linecap: round;
|
|
53
|
+
stroke-linejoin: round;
|
|
54
|
+
fill: none
|
|
55
|
+
}]]></style></defs><path
|
|
56
|
+
d="m 9.510842,22.532046 26,0 -10,-7"
|
|
57
|
+
id="path8"
|
|
58
|
+
inkscape:connector-curvature="0"
|
|
59
|
+
style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round" /></svg>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
4
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
5
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
6
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
9
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
10
|
+
viewBox="0 0 44.999998 44.999998"
|
|
11
|
+
version="1.1"
|
|
12
|
+
xml:space="preserve"
|
|
13
|
+
x="0px"
|
|
14
|
+
y="0px"
|
|
15
|
+
width="0.5in"
|
|
16
|
+
height="0.5in"
|
|
17
|
+
id="svg2"
|
|
18
|
+
inkscape:version="0.91 r13725"
|
|
19
|
+
sodipodi:docname="promoter.svg"><metadata
|
|
20
|
+
id="metadata14"><rdf:RDF><cc:Work
|
|
21
|
+
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
|
22
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><sodipodi:namedview
|
|
23
|
+
pagecolor="#ffffff"
|
|
24
|
+
bordercolor="#666666"
|
|
25
|
+
borderopacity="1"
|
|
26
|
+
objecttolerance="10"
|
|
27
|
+
gridtolerance="10"
|
|
28
|
+
guidetolerance="10"
|
|
29
|
+
inkscape:pageopacity="0"
|
|
30
|
+
inkscape:pageshadow="2"
|
|
31
|
+
inkscape:window-width="945"
|
|
32
|
+
inkscape:window-height="775"
|
|
33
|
+
id="namedview12"
|
|
34
|
+
showgrid="false"
|
|
35
|
+
units="in"
|
|
36
|
+
inkscape:zoom="13.350176"
|
|
37
|
+
inkscape:cx="25"
|
|
38
|
+
inkscape:cy="26.030279"
|
|
39
|
+
inkscape:window-x="0"
|
|
40
|
+
inkscape:window-y="0"
|
|
41
|
+
inkscape:window-maximized="0"
|
|
42
|
+
inkscape:current-layer="svg2" /><defs
|
|
43
|
+
id="defs4"><style
|
|
44
|
+
type="text/css"
|
|
45
|
+
id="style6"><![CDATA[
|
|
46
|
+
path,circle {
|
|
47
|
+
stroke:#000000;
|
|
48
|
+
stroke-width: 3;
|
|
49
|
+
stroke-linecap: round;
|
|
50
|
+
stroke-linejoin: round;
|
|
51
|
+
fill: none
|
|
52
|
+
}]]></style></defs><path
|
|
53
|
+
d="m 29.000111,5.2464081 8.5,7.4999999 -8.5,7.3333"
|
|
54
|
+
id="path8"
|
|
55
|
+
inkscape:connector-curvature="0"
|
|
56
|
+
style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round" /><path
|
|
57
|
+
d="m 7.5001114,39.746408 0,-27 28.9999996,0"
|
|
58
|
+
id="path10"
|
|
59
|
+
inkscape:connector-curvature="0"
|
|
60
|
+
style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round" /></svg>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
4
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
5
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
6
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
9
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
10
|
+
viewBox="0 0 44.999998 44.999998"
|
|
11
|
+
version="1.1"
|
|
12
|
+
xml:space="preserve"
|
|
13
|
+
x="0px"
|
|
14
|
+
y="0px"
|
|
15
|
+
width="0.5in"
|
|
16
|
+
height="0.5in"
|
|
17
|
+
id="svg2"
|
|
18
|
+
inkscape:version="0.91 r13725"
|
|
19
|
+
sodipodi:docname="ribosome-entry-site.svg"><metadata
|
|
20
|
+
id="metadata12"><rdf:RDF><cc:Work
|
|
21
|
+
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
|
22
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><sodipodi:namedview
|
|
23
|
+
pagecolor="#ffffff"
|
|
24
|
+
bordercolor="#666666"
|
|
25
|
+
borderopacity="1"
|
|
26
|
+
objecttolerance="10"
|
|
27
|
+
gridtolerance="10"
|
|
28
|
+
guidetolerance="10"
|
|
29
|
+
inkscape:pageopacity="0"
|
|
30
|
+
inkscape:pageshadow="2"
|
|
31
|
+
inkscape:window-width="640"
|
|
32
|
+
inkscape:window-height="480"
|
|
33
|
+
id="namedview10"
|
|
34
|
+
showgrid="false"
|
|
35
|
+
units="in"
|
|
36
|
+
inkscape:zoom="2.36"
|
|
37
|
+
inkscape:cx="25"
|
|
38
|
+
inkscape:cy="50"
|
|
39
|
+
inkscape:window-x="0"
|
|
40
|
+
inkscape:window-y="0"
|
|
41
|
+
inkscape:window-maximized="0"
|
|
42
|
+
inkscape:current-layer="svg2" /><defs
|
|
43
|
+
id="defs4"><style
|
|
44
|
+
type="text/css"
|
|
45
|
+
id="style6"><![CDATA[
|
|
46
|
+
path,circle {
|
|
47
|
+
stroke:#000000;
|
|
48
|
+
stroke-width: 3;
|
|
49
|
+
stroke-linecap: round;
|
|
50
|
+
stroke-linejoin: round;
|
|
51
|
+
fill: none
|
|
52
|
+
}]]></style></defs><path
|
|
53
|
+
d="m 9.4999973,32.499997 25.9999997,0 0,-5 c 0,-10 -6,-15 -13,-15 -7,0 -12.9999997,5 -12.9999997,15 z"
|
|
54
|
+
id="path8"
|
|
55
|
+
inkscape:connector-curvature="0"
|
|
56
|
+
style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round" /></svg>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
4
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
5
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
6
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
9
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
10
|
+
viewBox="0 0 44.999998 44.999998"
|
|
11
|
+
version="1.1"
|
|
12
|
+
xml:space="preserve"
|
|
13
|
+
x="0px"
|
|
14
|
+
y="0px"
|
|
15
|
+
width="0.5in"
|
|
16
|
+
height="0.5in"
|
|
17
|
+
id="svg2"
|
|
18
|
+
inkscape:version="0.91 r13725"
|
|
19
|
+
sodipodi:docname="specific-recombination-site.svg"
|
|
20
|
+
inkscape:export-filename="/Users/jakebeal/projects/SBOL/SBOLv-realizations/Glyphs/inverter/inverter-specification.png"
|
|
21
|
+
inkscape:export-xdpi="300"
|
|
22
|
+
inkscape:export-ydpi="300"><metadata
|
|
23
|
+
id="metadata12"><rdf:RDF><cc:Work
|
|
24
|
+
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
|
25
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><sodipodi:namedview
|
|
26
|
+
pagecolor="#ffffff"
|
|
27
|
+
bordercolor="#666666"
|
|
28
|
+
borderopacity="1"
|
|
29
|
+
objecttolerance="10"
|
|
30
|
+
gridtolerance="10"
|
|
31
|
+
guidetolerance="10"
|
|
32
|
+
inkscape:pageopacity="0"
|
|
33
|
+
inkscape:pageshadow="2"
|
|
34
|
+
inkscape:window-width="922"
|
|
35
|
+
inkscape:window-height="720"
|
|
36
|
+
id="namedview10"
|
|
37
|
+
showgrid="false"
|
|
38
|
+
units="in"
|
|
39
|
+
inkscape:zoom="13.350176"
|
|
40
|
+
inkscape:cx="25"
|
|
41
|
+
inkscape:cy="26.030279"
|
|
42
|
+
inkscape:window-x="0"
|
|
43
|
+
inkscape:window-y="0"
|
|
44
|
+
inkscape:window-maximized="0"
|
|
45
|
+
inkscape:current-layer="svg2" /><defs
|
|
46
|
+
id="defs4"><style
|
|
47
|
+
type="text/css"
|
|
48
|
+
id="style6"><![CDATA[
|
|
49
|
+
path,circle {
|
|
50
|
+
stroke:#000000;
|
|
51
|
+
stroke-width: 3;
|
|
52
|
+
stroke-linecap: round;
|
|
53
|
+
stroke-linejoin: round;
|
|
54
|
+
fill: none
|
|
55
|
+
}]]></style></defs><path
|
|
56
|
+
d="m 12.50009,32.499997 20,-10 -20,-10 0,20 z"
|
|
57
|
+
id="path8"
|
|
58
|
+
inkscape:connector-curvature="0"
|
|
59
|
+
style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round" /></svg>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
4
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
5
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
6
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
9
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
10
|
+
viewBox="0 0 44.999998 44.999998"
|
|
11
|
+
version="1.1"
|
|
12
|
+
xml:space="preserve"
|
|
13
|
+
x="0px"
|
|
14
|
+
y="0px"
|
|
15
|
+
width="0.5in"
|
|
16
|
+
height="0.5in"
|
|
17
|
+
id="svg2"
|
|
18
|
+
inkscape:version="0.91 r13725"
|
|
19
|
+
sodipodi:docname="terminator.svg"><metadata
|
|
20
|
+
id="metadata14"><rdf:RDF><cc:Work
|
|
21
|
+
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
|
22
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><sodipodi:namedview
|
|
23
|
+
pagecolor="#ffffff"
|
|
24
|
+
bordercolor="#666666"
|
|
25
|
+
borderopacity="1"
|
|
26
|
+
objecttolerance="10"
|
|
27
|
+
gridtolerance="10"
|
|
28
|
+
guidetolerance="10"
|
|
29
|
+
inkscape:pageopacity="0"
|
|
30
|
+
inkscape:pageshadow="2"
|
|
31
|
+
inkscape:window-width="1008"
|
|
32
|
+
inkscape:window-height="746"
|
|
33
|
+
id="namedview12"
|
|
34
|
+
showgrid="false"
|
|
35
|
+
units="in"
|
|
36
|
+
inkscape:zoom="13.350176"
|
|
37
|
+
inkscape:cx="25"
|
|
38
|
+
inkscape:cy="23.034063"
|
|
39
|
+
inkscape:window-x="0"
|
|
40
|
+
inkscape:window-y="0"
|
|
41
|
+
inkscape:window-maximized="0"
|
|
42
|
+
inkscape:current-layer="svg2" /><defs
|
|
43
|
+
id="defs4"><style
|
|
44
|
+
type="text/css"
|
|
45
|
+
id="style6"><![CDATA[
|
|
46
|
+
path,circle {
|
|
47
|
+
stroke:#000000;
|
|
48
|
+
stroke-width: 3;
|
|
49
|
+
stroke-linecap: round;
|
|
50
|
+
stroke-linejoin: round;
|
|
51
|
+
fill: none
|
|
52
|
+
}]]></style></defs><path
|
|
53
|
+
d="m 22.499997,34.989391 0,-24.000001"
|
|
54
|
+
id="path8"
|
|
55
|
+
inkscape:connector-curvature="0"
|
|
56
|
+
style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round" /><path
|
|
57
|
+
d="m 7.4999973,9.9893904 29.9999997,0"
|
|
58
|
+
id="path10"
|
|
59
|
+
inkscape:connector-curvature="0"
|
|
60
|
+
style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round" /></svg>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
4
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
5
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
6
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
9
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
10
|
+
viewBox="0 0 44.999998 44.999998"
|
|
11
|
+
version="1.1"
|
|
12
|
+
xml:space="preserve"
|
|
13
|
+
x="0px"
|
|
14
|
+
y="0px"
|
|
15
|
+
width="0.5in"
|
|
16
|
+
height="0.5in"
|
|
17
|
+
id="svg2"
|
|
18
|
+
inkscape:version="0.91 r13725"
|
|
19
|
+
sodipodi:docname="three-prime-sticky-restriction-site.svg"><metadata
|
|
20
|
+
id="metadata12"><rdf:RDF><cc:Work
|
|
21
|
+
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
|
22
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><sodipodi:namedview
|
|
23
|
+
pagecolor="#ffffff"
|
|
24
|
+
bordercolor="#666666"
|
|
25
|
+
borderopacity="1"
|
|
26
|
+
objecttolerance="10"
|
|
27
|
+
gridtolerance="10"
|
|
28
|
+
guidetolerance="10"
|
|
29
|
+
inkscape:pageopacity="0"
|
|
30
|
+
inkscape:pageshadow="2"
|
|
31
|
+
inkscape:window-width="640"
|
|
32
|
+
inkscape:window-height="480"
|
|
33
|
+
id="namedview10"
|
|
34
|
+
showgrid="false"
|
|
35
|
+
units="in"
|
|
36
|
+
inkscape:zoom="2.36"
|
|
37
|
+
inkscape:cx="25"
|
|
38
|
+
inkscape:cy="50"
|
|
39
|
+
inkscape:window-x="0"
|
|
40
|
+
inkscape:window-y="0"
|
|
41
|
+
inkscape:window-maximized="0"
|
|
42
|
+
inkscape:current-layer="svg2" /><defs
|
|
43
|
+
id="defs4"><style
|
|
44
|
+
type="text/css"
|
|
45
|
+
id="style6"><![CDATA[
|
|
46
|
+
path,circle {
|
|
47
|
+
stroke:#000000;
|
|
48
|
+
stroke-width: 3;
|
|
49
|
+
stroke-linecap: round;
|
|
50
|
+
stroke-linejoin: round;
|
|
51
|
+
fill: none
|
|
52
|
+
}]]></style></defs><path
|
|
53
|
+
d="m 37.499997,9.4999972 0,12.9999998 -29.9999997,0 0,13"
|
|
54
|
+
id="path8"
|
|
55
|
+
inkscape:connector-curvature="0"
|
|
56
|
+
style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round" /></svg>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import assemblyScar from './sbol_visual_glyphs/assembly-scar.svg'
|
|
2
|
+
import cds from './sbol_visual_glyphs/cds.svg'
|
|
3
|
+
import chromosomalLocus from './sbol_visual_glyphs/chromosomal-locus.svg'
|
|
4
|
+
import engineeredRegion from './sbol_visual_glyphs/engineered-region.svg'
|
|
5
|
+
import fivePrimeStickyRestrictionSite from './sbol_visual_glyphs/five-prime-sticky-restriction-site.svg'
|
|
6
|
+
import originOfReplication from './sbol_visual_glyphs/origin-of-replication.svg'
|
|
7
|
+
import primerBindingSite from './sbol_visual_glyphs/primer-binding-site.svg'
|
|
8
|
+
import promoter from './sbol_visual_glyphs/promoter.svg'
|
|
9
|
+
import ribosomeEntrySite from './sbol_visual_glyphs/ribosome-entry-site.svg'
|
|
10
|
+
import specificRecombinationSite from './sbol_visual_glyphs/specific-recombination-site.svg'
|
|
11
|
+
import terminator from './sbol_visual_glyphs/terminator.svg'
|
|
12
|
+
import threePrimeStickyRestrictionSite from './sbol_visual_glyphs/three-prime-sticky-restriction-site.svg'
|
|
13
|
+
import cdsStop from './sbol_visual_glyphs/cds-stop.svg'
|
|
14
|
+
|
|
15
|
+
// Map glyph names (without extension) to their SVG imports
|
|
16
|
+
export const sbolVisualGlyphs = {
|
|
17
|
+
'assembly-scar': assemblyScar,
|
|
18
|
+
'cds': cds,
|
|
19
|
+
'cds-stop': cdsStop,
|
|
20
|
+
'chromosomal-locus': chromosomalLocus,
|
|
21
|
+
'engineered-region': engineeredRegion,
|
|
22
|
+
'five-prime-sticky-restriction-site': fivePrimeStickyRestrictionSite,
|
|
23
|
+
'origin-of-replication': originOfReplication,
|
|
24
|
+
'primer-binding-site': primerBindingSite,
|
|
25
|
+
'promoter': promoter,
|
|
26
|
+
'ribosome-entry-site': ribosomeEntrySite,
|
|
27
|
+
'specific-recombination-site': specificRecombinationSite,
|
|
28
|
+
'terminator': terminator,
|
|
29
|
+
'three-prime-sticky-restriction-site': threePrimeStickyRestrictionSite,
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Helper function to get SVG by glyph name (without extension)
|
|
33
|
+
export const getSvgByGlyph = (glyphName) => {
|
|
34
|
+
return sbolVisualGlyphs[glyphName] || sbolVisualGlyphs['engineered-region'] // fallback to engineered-region if not found
|
|
35
|
+
}
|
|
36
|
+
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { useCallback } from 'react'
|
|
2
|
+
import { classNameToEndPointMap } from '@opencloning/utils/sourceFunctions'
|
|
3
|
+
import useBackendRoute from '../../hooks/useBackendRoute'
|
|
4
|
+
import useHttpClient from '../../hooks/useHttpClient'
|
|
5
|
+
import { arrayCombinations } from '../eLabFTW/utils'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export const useAssembler = () => {
|
|
9
|
+
const httpClient = useHttpClient();
|
|
10
|
+
const backendRoute = useBackendRoute();
|
|
11
|
+
|
|
12
|
+
const requestSources = useCallback(async (assemblerOutput) => {
|
|
13
|
+
const processedOutput = []
|
|
14
|
+
for (let pos = 0; pos < assemblerOutput.length; pos++) {
|
|
15
|
+
processedOutput.push([])
|
|
16
|
+
for (let source of assemblerOutput[pos]) {
|
|
17
|
+
const url = backendRoute(classNameToEndPointMap[source.type])
|
|
18
|
+
const {data} = await httpClient.post(url, source)
|
|
19
|
+
if (data.sources.length !== 1) {
|
|
20
|
+
console.error('Expected 1 source, got ' + data.sources.length)
|
|
21
|
+
}
|
|
22
|
+
const thisData = {
|
|
23
|
+
source: {...data.sources[0], id: pos + 1},
|
|
24
|
+
sequence: {...data.sequences[0], id: pos + 1},
|
|
25
|
+
}
|
|
26
|
+
processedOutput[pos].push(thisData)
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return processedOutput
|
|
30
|
+
}, [])
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
const requestAssemblies = useCallback(async (requestedSources) => {
|
|
34
|
+
|
|
35
|
+
const assemblies = arrayCombinations(requestedSources);
|
|
36
|
+
const output = []
|
|
37
|
+
for (let assembly of assemblies) {
|
|
38
|
+
const url = backendRoute('restriction_and_ligation')
|
|
39
|
+
const config = {
|
|
40
|
+
params: {
|
|
41
|
+
circular_only: true,
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const requestData = {
|
|
45
|
+
source: {
|
|
46
|
+
type: 'RestrictionAndLigationSource',
|
|
47
|
+
restriction_enzymes: ['BsaI'],
|
|
48
|
+
id: assembly.length + 1,
|
|
49
|
+
},
|
|
50
|
+
sequences: assembly.map((p) => p.sequence),
|
|
51
|
+
}
|
|
52
|
+
const {data} = await httpClient.post(url, requestData, config)
|
|
53
|
+
const thisSource = data.sources[0]
|
|
54
|
+
const thisSequence = data.sequences[0]
|
|
55
|
+
thisSource.id = assembly.length + 1
|
|
56
|
+
thisSequence.id = assembly.length + 1
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
const cloningStrategy = {
|
|
60
|
+
sources: [thisSource, ...assembly.map((p) => p.source)],
|
|
61
|
+
sequences: [thisSequence, ...assembly.map((p) => p.sequence)],
|
|
62
|
+
primers: [],
|
|
63
|
+
}
|
|
64
|
+
output.push(cloningStrategy)
|
|
65
|
+
}
|
|
66
|
+
return output;
|
|
67
|
+
}, [])
|
|
68
|
+
|
|
69
|
+
return { requestSources, requestAssemblies }
|
|
70
|
+
}
|
|
71
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import SaveIcon from '@mui/icons-material/Save';
|
|
2
|
+
import LinkIcon from '@mui/icons-material/Link';
|
|
3
|
+
import GetSequenceFileAndDatabaseIdComponent from './GetSequenceFileAndDatabaseIdComponent';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
// Name of the database interface
|
|
7
|
+
name: 'Dummy',
|
|
8
|
+
// Returns a link to the sequence in the database
|
|
9
|
+
getSequenceLink: (databaseId) => `your/url/${databaseId}`,
|
|
10
|
+
// Returns a link to the primer in the database
|
|
11
|
+
getPrimerLink: (databaseId) => `your/url/${databaseId}`,
|
|
12
|
+
// Component for selecting and loading sequence files from the database
|
|
13
|
+
GetSequenceFileAndDatabaseIdComponent,
|
|
14
|
+
// Component for selecting and loading primers from the database
|
|
15
|
+
GetPrimerComponent: null,
|
|
16
|
+
// Component for submitting resources to the database
|
|
17
|
+
SubmitToDatabaseComponent: null,
|
|
18
|
+
// Component for handling primers not yet in database
|
|
19
|
+
PrimersNotInDatabaseComponent: null,
|
|
20
|
+
// Function to submit a primer to the database
|
|
21
|
+
submitPrimerToDatabase: null,
|
|
22
|
+
// Function to submit a sequence and its history to the database
|
|
23
|
+
submitSequenceToDatabase: null,
|
|
24
|
+
// Function to validate submission data
|
|
25
|
+
isSubmissionDataValid: null,
|
|
26
|
+
// Icon displayed on the node corner to submit
|
|
27
|
+
SubmitIcon: SaveIcon,
|
|
28
|
+
// Icon displayed on the node corner for entities in the database
|
|
29
|
+
DatabaseIcon: LinkIcon,
|
|
30
|
+
// OPTIONAL =======================================================================
|
|
31
|
+
// Component for loading history from the database (can be hook-like does not have to render anything)
|
|
32
|
+
LoadHistoryComponent: null,
|
|
33
|
+
// Function to load sequences from url parameters
|
|
34
|
+
loadSequenceFromUrlParams: null,
|
|
35
|
+
// Function to get the primer ({name, database_id, sequence}) from the database
|
|
36
|
+
getPrimer: null,
|
|
37
|
+
// Function to get the name of a sequence from the database
|
|
38
|
+
getSequenceName: null,
|
|
39
|
+
// Function to get the sequencing files from the database, see docs for what the return value should be
|
|
40
|
+
getSequencingFiles: null,
|
|
41
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { MenuItem, TextField } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
function GetSequenceFileAndDatabaseIdComponent({ setFile, setDatabaseId }) {
|
|
5
|
+
// This component is rendered inside of SourceDatabase.jsx, and must contain
|
|
6
|
+
// a form that lets the user select an entry from the database. Once setFile
|
|
7
|
+
// and setDatabaseId are set within this form, the submit button will be shown in
|
|
8
|
+
// SourceDatabase.jsx. The file can be a sequence file or a json file with the history.
|
|
9
|
+
const [selectedEntry, setSelectedEntry] = React.useState(null);
|
|
10
|
+
// Somehow get the entries from the database, could also be gb files, etc.
|
|
11
|
+
const entries = [
|
|
12
|
+
{
|
|
13
|
+
id: 1,
|
|
14
|
+
name: 'seq1.fasta', // File extension is important, will determine how it's parsed
|
|
15
|
+
fileContent: '>seq1\nATCG\n',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: 2,
|
|
19
|
+
name: 'seq2.fasta',
|
|
20
|
+
fileContent: '>seq2\nATCG\n',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 3,
|
|
24
|
+
name: 'seq3.fasta',
|
|
25
|
+
fileContent: '>seq3\nATCG\n',
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
const handleFileSelect = (e) => {
|
|
30
|
+
const selectedId = e.target.value;
|
|
31
|
+
const entry = entries.find((e) => e.id === selectedId);
|
|
32
|
+
setSelectedEntry(entry);
|
|
33
|
+
// When you set databaseId and file, the submit button will be shown (see SourceDatabase.jsx)
|
|
34
|
+
setFile(new File([entry.fileContent], entry.name, { type: 'text/plain' }));
|
|
35
|
+
setDatabaseId(entry.id);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<div>
|
|
40
|
+
{/* You probably need more than one form field */}
|
|
41
|
+
<TextField
|
|
42
|
+
select
|
|
43
|
+
label="Select Sequence"
|
|
44
|
+
value={selectedEntry?.id || ''}
|
|
45
|
+
onChange={(e) => handleFileSelect(e)}
|
|
46
|
+
fullWidth
|
|
47
|
+
variant="outlined"
|
|
48
|
+
>
|
|
49
|
+
{entries.map((entry) => (
|
|
50
|
+
<MenuItem key={entry.id} value={entry.id}>
|
|
51
|
+
{entry.name}
|
|
52
|
+
</MenuItem>
|
|
53
|
+
))}
|
|
54
|
+
</TextField>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export default GetSequenceFileAndDatabaseIdComponent;
|