Skip to content

Commit

Permalink
feat: change threshold, sorting and remove window size
Browse files Browse the repository at this point in the history
  • Loading branch information
patrikkaura committed Nov 13, 2023
1 parent 1d9181a commit d360802
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
2 changes: 1 addition & 1 deletion components/analysis/AnalysisContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const AnalysisContainer = () => {
const router = useRouter();
const [formData, setFormData] = useState<FormData>({
threshold: 1.2,
windowSize: 20,
windowSize: 25,
orderBy: ["score"],
dir: "desc",
start: 50000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,19 @@ const G4HunterFilterCard = ({ formData, setFormData }: Props) => {
id="outlined-required"
type="number"
value={formData.threshold}
onChange={(event) =>
setFormData({
...formData,
threshold: Number(event.target.value),
})
}
/>
<TextField
size="small"
label="Window size"
id="outlined-required"
type="number"
value={formData.windowSize}
onChange={(event) =>
setFormData({
...formData,
windowSize: Number(event.target.value),
})
}
inputProps={{
step: 0.1,
}}
onChange={(event) => {
const newThreshold = Number(event.target.value);

if (1.2 <= newThreshold && newThreshold <= 4.0) {
setFormData({
...formData,
threshold: Number(event.target.value),
});
}
}}
/>
</Stack>
</BaseCard>
Expand Down
4 changes: 2 additions & 2 deletions components/analysis/cards/sorting-card/SortingCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ const SortingCard = ({ formData, setFormData }: Props) => {
<Typography variant="h6">Sort by</Typography>
<Divider />
<Stack direction="row" alignItems="start">
<Stack direction="column">
<Stack direction="column" spacing={2}>
<SortingInput title="G4Hunter score" subtitle="(individual)" />
<SortingInput title="G4Hunter score" subtitle="(grouped)" />
<SortingInput title="Quadruplex lenght" />
</Stack>
<SortingInput title="Position" />
</Stack>
</Stack>
</BaseCard>
Expand Down

0 comments on commit d360802

Please sign in to comment.