|
| 1 | +<script lang="ts"> |
| 2 | + import * as Sheet from '$lib/components/ui/sheet' |
| 3 | + import CogButton from '$lib/components/ui/CogButton.svelte' |
| 4 | + import { Button } from '$lib/components/ui/button' |
| 5 | + import { Icon, InformationCircle } from 'svelte-hero-icons' |
| 6 | + import { Input } from '$lib/components/ui/input' |
| 7 | + import { Label } from '$lib/components/ui/label' |
| 8 | + import * as Tooltip from '$lib/components/ui/tooltip' |
| 9 | + import { Switch } from '$lib/components/ui/switch' |
| 10 | +
|
| 11 | +
|
| 12 | + let toleranceMultiplier = 2.0 |
| 13 | + let shouldRemoveNACalculations = true |
| 14 | +
|
| 15 | +</script> |
| 16 | + |
| 17 | +<Sheet.Root> |
| 18 | + <Sheet.Trigger> |
| 19 | + <CogButton /> |
| 20 | + </Sheet.Trigger> |
| 21 | + <Sheet.Content side="right"> |
| 22 | + <Sheet.Header> |
| 23 | + <Sheet.Title>Advanced Settings</Sheet.Title> |
| 24 | + <Sheet.Description> |
| 25 | + For power users 🤠 |
| 26 | + </Sheet.Description> |
| 27 | + </Sheet.Header> |
| 28 | + <div class="flex flex-col space-y-4 py-6"> |
| 29 | + <div class="flex flex-col space-y-1.5"> |
| 30 | + <div class="flex items-center space-x-2"> |
| 31 | + <Switch id="should-remove-na-calculations" bind:checked={shouldRemoveNACalculations} /> |
| 32 | + <Label for="should-remove-na-calculations">Avoid N/A Calculations</Label> |
| 33 | + <Tooltip.Root> |
| 34 | + <Tooltip.Trigger> |
| 35 | + <Icon src={InformationCircle} mini class='w-4 h-4' /> |
| 36 | + </Tooltip.Trigger> |
| 37 | + <Tooltip.Content class='max-w-md'> |
| 38 | + <p>Removes samples with no detected peaks from the input for a given peptide to avoid "-nan(ind)" |
| 39 | + calculations. This doesn't get rid of all "-nan(ind)" calculations but helps mitigate them.</p> |
| 40 | + </Tooltip.Content> |
| 41 | + </Tooltip.Root> |
| 42 | + </div> |
| 43 | + </div> |
| 44 | + <div class="flex flex-col space-y-1.5"> |
| 45 | + <Label class="flex items-center gap-2" for="tolerance-multiplier">Tolerance Multiplier |
| 46 | + <Tooltip.Root> |
| 47 | + <Tooltip.Trigger> |
| 48 | + <Icon src={InformationCircle} mini class='w-4 h-4' /> |
| 49 | + </Tooltip.Trigger> |
| 50 | + <Tooltip.Content class='max-w-md'> |
| 51 | + <p>SRM heuristically detects data pertaining to different charges for a given peptide. It uses |
| 52 | + standard deviation times this multipler to determine which mass-charge ratio don't belong in |
| 53 | + the |
| 54 | + same group. Adjust to what works, but 2.0 is recommended.</p> |
| 55 | + </Tooltip.Content> |
| 56 | + </Tooltip.Root> |
| 57 | + </Label> |
| 58 | + <Input id="tolerance-multiplier" type="number" step=".1" bind:value={toleranceMultiplier} /> |
| 59 | + </div> |
| 60 | + </div> |
| 61 | + <Sheet.Footer> |
| 62 | + <Sheet.Close asChild let:builder> |
| 63 | + <Button builders={[builder]} type="submit">Save changes</Button> |
| 64 | + </Sheet.Close> |
| 65 | + </Sheet.Footer> |
| 66 | + </Sheet.Content> |
| 67 | +</Sheet.Root> |
0 commit comments