Skip to content

Commit

Permalink
fix bug where region and strand were incorrect in templated sequence,…
Browse files Browse the repository at this point in the history
… fix regulatory element missing field, pin pydantic version
  • Loading branch information
katiestahl committed Aug 3, 2024
1 parent 3414fbe commit c4ffe6a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const RegulatoryElementInput: React.FC<RegulatoryElementInputProps> = ({
}
const newRegElement: ClientRegulatoryElement = {
...reResponse.regulatory_element,
elementId: element.elementId,
displayClass: regulatoryClassItems[elementClass][1],
nomenclature: nomenclatureResponse.nomenclature || "",
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const TemplatedSequenceElementInput: React.FC<
const [strand, setStrand] = useState<string>(
element.strand === 1 ? "+" : "-"
);
console.log(element.inputStart);
const [startPosition, setStartPosition] = useState<string>(
element.inputStart !== null && element.inputStart !== undefined
? `${element.inputStart}`
Expand Down Expand Up @@ -86,8 +85,10 @@ const TemplatedSequenceElementInput: React.FC<
...templatedSequenceResponse.element,
elementId: element.elementId,
nomenclature: nomenclatureResponse.nomenclature,
region: element.region,
strand: element.strand,
region:
templatedSequenceResponse?.element?.region || element.region,
strand:
templatedSequenceResponse?.element?.strand || element.strand,
inputChromosome: chromosome,
inputStart: startPosition,
inputEnd: endPosition,
Expand Down
1 change: 1 addition & 0 deletions client/src/components/Pages/Summary/Main/Summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export const Summary: React.FC<Props> = ({ setVisibleTab }) => {
const fusorifyStructuralElement = (
element: ClientElementUnion
): ElementUnion => {
console.log(element);
switch (element.type) {
case "GeneElement":
const geneElement: GeneElement = {
Expand Down
2 changes: 1 addition & 1 deletion server/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies = [
"botocore",
"fusor ~= 0.2.0",
"cool-seq-tool ~= 0.5.1",
"pydantic >= 2.0",
"pydantic == 2.4.2",
"gene-normalizer ~= 0.4.0",
]
dynamic = ["version"]
Expand Down
1 change: 0 additions & 1 deletion server/src/curfu/routers/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def validate_fusion(request: Request, fusion: dict = Body()) -> ResponseDict:
"""
fusor = request.app.state.fusor
response = {}
verified_fusion = fusor.fusion(**fusion)
try:
verified_fusion = fusor.fusion(**fusion)
except FUSORParametersException as e:
Expand Down

0 comments on commit c4ffe6a

Please sign in to comment.