Skip to content

Commit

Permalink
fix: get coordinates not working for transcript (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
katiestahl authored Sep 20, 2024
1 parent 3869c1f commit d15a82c
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,18 @@ const GetCoordinates: React.FC = () => {
const [isLoading, setIsLoading] = useState<boolean>(false);
const [responseWarnings, setResponseWarnings] = useState<string[]>([]);

const genomicInputComplete =
genomicInputType === GenomicInputType.GENE
? gene !== "" && selectedTranscript !== ""
: txAc !== "";

// programming horror
const inputComplete =
(inputType === "genomic_coords" &&
gene !== "" &&
(inputType === TxElementInputType.gc &&
genomicInputComplete &&
chromosome !== "" &&
(start !== "" || end !== "")) ||
(inputType === "exon_coords" &&
(inputType === TxElementInputType.ec &&
txAc !== "" &&
(exonStart !== "" || exonEnd !== ""));

Expand Down

0 comments on commit d15a82c

Please sign in to comment.