-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
522 additions
and
3 deletions.
There are no files selected for viewing
Submodule ShareYourCloning_backend
updated
8 files
+26 −0 | dna_functions.py | |
+42 −2 | main.py | |
+22 −15 | poetry.lock | |
+10 −0 | pydantic_models.py | |
+2 −1 | pyproject.toml | |
+81 −11 | test_endpoints.py | |
+2 −0 | test_files/planottate/input.fasta | |
+38 −0 | test_files/planottate/mock_response_success.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Dialog, DialogContent, Table, TableBody, TableCell, TableHead, TableRow } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
function PlannotateAnnotationReport({ dialogOpen, setDialogOpen, report }) { | ||
return ( | ||
<Dialog fullWidth maxWidth="lg" open={dialogOpen} onClose={() => setDialogOpen(false)}> | ||
<DialogContent> | ||
<Table> | ||
<TableHead> | ||
<TableRow> | ||
<TableCell sx={{ fontWeight: 'bold', textAlign: 'center' }}>Feature</TableCell> | ||
<TableCell sx={{ fontWeight: 'bold', textAlign: 'center' }}>Percent identity</TableCell> | ||
<TableCell sx={{ fontWeight: 'bold', textAlign: 'center' }}>Percent match length</TableCell> | ||
<TableCell sx={{ fontWeight: 'bold', textAlign: 'center' }}>Description</TableCell> | ||
</TableRow> | ||
</TableHead> | ||
<TableBody> | ||
{report.map((row) => ( | ||
<TableRow key={`${row.Feature}-${row.Description}`}> | ||
<TableCell>{row.Feature}</TableCell> | ||
<TableCell>{row.percent_identity}</TableCell> | ||
<TableCell>{row.percent_match_length}</TableCell> | ||
<TableCell>{row.Description}</TableCell> | ||
</TableRow> | ||
))} | ||
</TableBody> | ||
</Table> | ||
</DialogContent> | ||
</Dialog> | ||
); | ||
} | ||
|
||
export default PlannotateAnnotationReport; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React from 'react'; | ||
import { FormControl, InputLabel, MenuItem, Select } from '@mui/material'; | ||
import { useSelector } from 'react-redux'; | ||
import { isEqual } from 'lodash-es'; | ||
import { getInputEntitiesFromSourceId } from '../../store/cloning_utils'; | ||
import SubmitButtonBackendAPI from '../form/SubmitButtonBackendAPI'; | ||
|
||
function SourceAnnotation({ source, requestStatus, sendPostRequest }) { | ||
const [annotationTool, setAnnotationTool] = React.useState('plannotate'); | ||
|
||
const inputSequences = useSelector((state) => getInputEntitiesFromSourceId(state, source.id), isEqual); | ||
const onSubmit = (event) => { | ||
event.preventDefault(); | ||
|
||
const requestData = { | ||
sequence: inputSequences[0], | ||
source: { id: source.id, input: inputSequences.map((e) => e.id), annotation_tool: annotationTool }, | ||
}; | ||
sendPostRequest({ endpoint: 'annotate/plannotate', requestData, source }); | ||
}; | ||
|
||
return ( | ||
<form onSubmit={onSubmit}> | ||
<FormControl fullWidth> | ||
<InputLabel id="annotation-tool-label">Annotation Tool</InputLabel> | ||
<Select | ||
labelId="annotation-tool-label" | ||
id="annotation-tool" | ||
value={annotationTool} | ||
label="Annotation Tool" | ||
onChange={(e) => setAnnotationTool(e.target.value)} | ||
> | ||
<MenuItem value="plannotate">pLannotate</MenuItem> | ||
</Select> | ||
</FormControl> | ||
<SubmitButtonBackendAPI requestStatus={requestStatus}>Annotate</SubmitButtonBackendAPI> | ||
</form> | ||
); | ||
} | ||
|
||
export default React.memo(SourceAnnotation); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters