XspecT 0.4.0__py3-none-any.whl → 0.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of XspecT might be problematic. Click here for more details.
- xspect/classify.py +32 -0
- xspect/file_io.py +3 -9
- xspect/filter_sequences.py +56 -0
- xspect/main.py +52 -30
- xspect/mlst_feature/mlst_helper.py +102 -13
- xspect/mlst_feature/pub_mlst_handler.py +32 -6
- xspect/model_management.py +1 -15
- xspect/models/probabilistic_filter_mlst_model.py +160 -32
- xspect/models/probabilistic_filter_model.py +1 -0
- xspect/models/result.py +18 -6
- xspect/ncbi.py +8 -6
- xspect/train.py +13 -5
- xspect/web.py +173 -0
- xspect/xspect-web/.gitignore +24 -0
- xspect/xspect-web/README.md +54 -0
- xspect/xspect-web/components.json +21 -0
- xspect/xspect-web/dist/assets/index-CMG4V7fZ.js +290 -0
- xspect/xspect-web/dist/assets/index-jIKg1HIy.css +1 -0
- xspect/xspect-web/dist/index.html +14 -0
- xspect/xspect-web/dist/vite.svg +1 -0
- xspect/xspect-web/eslint.config.js +28 -0
- xspect/xspect-web/index.html +13 -0
- xspect/xspect-web/package-lock.json +6865 -0
- xspect/xspect-web/package.json +58 -0
- xspect/xspect-web/pnpm-lock.yaml +4317 -0
- xspect/xspect-web/public/vite.svg +1 -0
- xspect/xspect-web/src/App.tsx +29 -0
- xspect/xspect-web/src/api.tsx +62 -0
- xspect/xspect-web/src/assets/react.svg +1 -0
- xspect/xspect-web/src/components/classification-form.tsx +284 -0
- xspect/xspect-web/src/components/classify.tsx +18 -0
- xspect/xspect-web/src/components/data-table.tsx +78 -0
- xspect/xspect-web/src/components/dropdown-checkboxes.tsx +63 -0
- xspect/xspect-web/src/components/dropdown-slider.tsx +42 -0
- xspect/xspect-web/src/components/filter-form.tsx +423 -0
- xspect/xspect-web/src/components/filter.tsx +15 -0
- xspect/xspect-web/src/components/header.tsx +46 -0
- xspect/xspect-web/src/components/landing.tsx +7 -0
- xspect/xspect-web/src/components/models-details.tsx +138 -0
- xspect/xspect-web/src/components/models.tsx +53 -0
- xspect/xspect-web/src/components/result-chart.tsx +44 -0
- xspect/xspect-web/src/components/result.tsx +155 -0
- xspect/xspect-web/src/components/spinner.tsx +30 -0
- xspect/xspect-web/src/components/ui/accordion.tsx +64 -0
- xspect/xspect-web/src/components/ui/button.tsx +59 -0
- xspect/xspect-web/src/components/ui/card.tsx +92 -0
- xspect/xspect-web/src/components/ui/chart.tsx +351 -0
- xspect/xspect-web/src/components/ui/command.tsx +175 -0
- xspect/xspect-web/src/components/ui/dialog.tsx +135 -0
- xspect/xspect-web/src/components/ui/dropdown-menu.tsx +255 -0
- xspect/xspect-web/src/components/ui/file-upload.tsx +1459 -0
- xspect/xspect-web/src/components/ui/form.tsx +165 -0
- xspect/xspect-web/src/components/ui/input.tsx +21 -0
- xspect/xspect-web/src/components/ui/label.tsx +24 -0
- xspect/xspect-web/src/components/ui/navigation-menu.tsx +168 -0
- xspect/xspect-web/src/components/ui/popover.tsx +46 -0
- xspect/xspect-web/src/components/ui/select.tsx +183 -0
- xspect/xspect-web/src/components/ui/separator.tsx +26 -0
- xspect/xspect-web/src/components/ui/slider.tsx +61 -0
- xspect/xspect-web/src/components/ui/switch.tsx +29 -0
- xspect/xspect-web/src/components/ui/table.tsx +113 -0
- xspect/xspect-web/src/components/ui/tabs.tsx +64 -0
- xspect/xspect-web/src/index.css +120 -0
- xspect/xspect-web/src/lib/utils.ts +6 -0
- xspect/xspect-web/src/main.tsx +10 -0
- xspect/xspect-web/src/types.tsx +34 -0
- xspect/xspect-web/src/utils.tsx +6 -0
- xspect/xspect-web/src/vite-env.d.ts +1 -0
- xspect/xspect-web/tsconfig.app.json +32 -0
- xspect/xspect-web/tsconfig.json +13 -0
- xspect/xspect-web/tsconfig.node.json +24 -0
- xspect/xspect-web/vite.config.ts +24 -0
- {xspect-0.4.0.dist-info → xspect-0.5.0.dist-info}/METADATA +7 -8
- xspect-0.5.0.dist-info/RECORD +85 -0
- {xspect-0.4.0.dist-info → xspect-0.5.0.dist-info}/WHEEL +1 -1
- xspect/fastapi.py +0 -102
- xspect-0.4.0.dist-info/RECORD +0 -24
- {xspect-0.4.0.dist-info → xspect-0.5.0.dist-info}/entry_points.txt +0 -0
- {xspect-0.4.0.dist-info → xspect-0.5.0.dist-info}/licenses/LICENSE +0 -0
- {xspect-0.4.0.dist-info → xspect-0.5.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import * as SwitchPrimitive from "@radix-ui/react-switch"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
function Switch({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof SwitchPrimitive.Root>) {
|
|
10
|
+
return (
|
|
11
|
+
<SwitchPrimitive.Root
|
|
12
|
+
data-slot="switch"
|
|
13
|
+
className={cn(
|
|
14
|
+
"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
|
+
className
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
>
|
|
19
|
+
<SwitchPrimitive.Thumb
|
|
20
|
+
data-slot="switch-thumb"
|
|
21
|
+
className={cn(
|
|
22
|
+
"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
23
|
+
)}
|
|
24
|
+
/>
|
|
25
|
+
</SwitchPrimitive.Root>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { Switch }
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { cn } from "@/lib/utils"
|
|
3
|
+
|
|
4
|
+
function Table({ className, ...props }: React.ComponentProps<"table">) {
|
|
5
|
+
return (
|
|
6
|
+
<div
|
|
7
|
+
data-slot="table-container"
|
|
8
|
+
className="relative w-full overflow-x-auto"
|
|
9
|
+
>
|
|
10
|
+
<table
|
|
11
|
+
data-slot="table"
|
|
12
|
+
className={cn("w-full caption-bottom text-sm rounded-md border", className)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
</div>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
|
|
20
|
+
return (
|
|
21
|
+
<thead
|
|
22
|
+
data-slot="table-header"
|
|
23
|
+
className={cn("[&_tr]:border-b", className)}
|
|
24
|
+
{...props}
|
|
25
|
+
/>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
|
|
30
|
+
return (
|
|
31
|
+
<tbody
|
|
32
|
+
data-slot="table-body"
|
|
33
|
+
className={cn("[&_tr:last-child]:border-0", className)}
|
|
34
|
+
{...props}
|
|
35
|
+
/>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
|
|
40
|
+
return (
|
|
41
|
+
<tfoot
|
|
42
|
+
data-slot="table-footer"
|
|
43
|
+
className={cn(
|
|
44
|
+
"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
|
|
45
|
+
className
|
|
46
|
+
)}
|
|
47
|
+
{...props}
|
|
48
|
+
/>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
|
|
53
|
+
return (
|
|
54
|
+
<tr
|
|
55
|
+
data-slot="table-row"
|
|
56
|
+
className={cn(
|
|
57
|
+
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
|
58
|
+
className
|
|
59
|
+
)}
|
|
60
|
+
{...props}
|
|
61
|
+
/>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function TableHead({ className, ...props }: React.ComponentProps<"th">) {
|
|
66
|
+
return (
|
|
67
|
+
<th
|
|
68
|
+
data-slot="table-head"
|
|
69
|
+
className={cn(
|
|
70
|
+
"bg-gray-100 text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
71
|
+
className
|
|
72
|
+
)}
|
|
73
|
+
{...props}
|
|
74
|
+
/>
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function TableCell({ className, ...props }: React.ComponentProps<"td">) {
|
|
79
|
+
return (
|
|
80
|
+
<td
|
|
81
|
+
data-slot="table-cell"
|
|
82
|
+
className={cn(
|
|
83
|
+
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
84
|
+
className
|
|
85
|
+
)}
|
|
86
|
+
{...props}
|
|
87
|
+
/>
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function TableCaption({
|
|
92
|
+
className,
|
|
93
|
+
...props
|
|
94
|
+
}: React.ComponentProps<"caption">) {
|
|
95
|
+
return (
|
|
96
|
+
<caption
|
|
97
|
+
data-slot="table-caption"
|
|
98
|
+
className={cn("text-muted-foreground mt-4 text-sm", className)}
|
|
99
|
+
{...props}
|
|
100
|
+
/>
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export {
|
|
105
|
+
Table,
|
|
106
|
+
TableHeader,
|
|
107
|
+
TableBody,
|
|
108
|
+
TableFooter,
|
|
109
|
+
TableHead,
|
|
110
|
+
TableRow,
|
|
111
|
+
TableCell,
|
|
112
|
+
TableCaption,
|
|
113
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
function Tabs({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof TabsPrimitive.Root>) {
|
|
10
|
+
return (
|
|
11
|
+
<TabsPrimitive.Root
|
|
12
|
+
data-slot="tabs"
|
|
13
|
+
className={cn("flex flex-col gap-2", className)}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function TabsList({
|
|
20
|
+
className,
|
|
21
|
+
...props
|
|
22
|
+
}: React.ComponentProps<typeof TabsPrimitive.List>) {
|
|
23
|
+
return (
|
|
24
|
+
<TabsPrimitive.List
|
|
25
|
+
data-slot="tabs-list"
|
|
26
|
+
className={cn(
|
|
27
|
+
"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
|
|
28
|
+
className
|
|
29
|
+
)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function TabsTrigger({
|
|
36
|
+
className,
|
|
37
|
+
...props
|
|
38
|
+
}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
|
|
39
|
+
return (
|
|
40
|
+
<TabsPrimitive.Trigger
|
|
41
|
+
data-slot="tabs-trigger"
|
|
42
|
+
className={cn(
|
|
43
|
+
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
44
|
+
className
|
|
45
|
+
)}
|
|
46
|
+
{...props}
|
|
47
|
+
/>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function TabsContent({
|
|
52
|
+
className,
|
|
53
|
+
...props
|
|
54
|
+
}: React.ComponentProps<typeof TabsPrimitive.Content>) {
|
|
55
|
+
return (
|
|
56
|
+
<TabsPrimitive.Content
|
|
57
|
+
data-slot="tabs-content"
|
|
58
|
+
className={cn("flex-1 outline-none", className)}
|
|
59
|
+
{...props}
|
|
60
|
+
/>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent }
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "tw-animate-css";
|
|
3
|
+
|
|
4
|
+
@custom-variant dark (&:is(.dark *));
|
|
5
|
+
|
|
6
|
+
@theme inline {
|
|
7
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
8
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
9
|
+
--radius-lg: var(--radius);
|
|
10
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
11
|
+
--color-background: var(--background);
|
|
12
|
+
--color-foreground: var(--foreground);
|
|
13
|
+
--color-card: var(--card);
|
|
14
|
+
--color-card-foreground: var(--card-foreground);
|
|
15
|
+
--color-popover: var(--popover);
|
|
16
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
17
|
+
--color-primary: var(--primary);
|
|
18
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
19
|
+
--color-secondary: var(--secondary);
|
|
20
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
21
|
+
--color-muted: var(--muted);
|
|
22
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
23
|
+
--color-accent: var(--accent);
|
|
24
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
25
|
+
--color-destructive: var(--destructive);
|
|
26
|
+
--color-border: var(--border);
|
|
27
|
+
--color-input: var(--input);
|
|
28
|
+
--color-ring: var(--ring);
|
|
29
|
+
--color-chart-1: var(--chart-1);
|
|
30
|
+
--color-chart-2: var(--chart-2);
|
|
31
|
+
--color-chart-3: var(--chart-3);
|
|
32
|
+
--color-chart-4: var(--chart-4);
|
|
33
|
+
--color-chart-5: var(--chart-5);
|
|
34
|
+
--color-sidebar: var(--sidebar);
|
|
35
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
36
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
37
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
38
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
39
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
40
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
41
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:root {
|
|
45
|
+
--radius: 0.3rem;
|
|
46
|
+
--background: oklch(1 0 0);
|
|
47
|
+
--foreground: oklch(0.141 0.005 285.823);
|
|
48
|
+
--card: oklch(1 0 0);
|
|
49
|
+
--card-foreground: oklch(0.141 0.005 285.823);
|
|
50
|
+
--popover: oklch(1 0 0);
|
|
51
|
+
--popover-foreground: oklch(0.141 0.005 285.823);
|
|
52
|
+
--primary: oklch(0.623 0.214 259.815);
|
|
53
|
+
--primary-foreground: oklch(0.97 0.014 254.604);
|
|
54
|
+
--secondary: oklch(0.967 0.001 286.375);
|
|
55
|
+
--secondary-foreground: oklch(0.21 0.006 285.885);
|
|
56
|
+
--muted: oklch(0.967 0.001 286.375);
|
|
57
|
+
--muted-foreground: oklch(0.552 0.016 285.938);
|
|
58
|
+
--accent: oklch(0.967 0.001 286.375);
|
|
59
|
+
--accent-foreground: oklch(0.21 0.006 285.885);
|
|
60
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
61
|
+
--border: oklch(0.92 0.004 286.32);
|
|
62
|
+
--input: oklch(0.92 0.004 286.32);
|
|
63
|
+
--ring: oklch(0.623 0.214 259.815);
|
|
64
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
65
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
66
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
67
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
68
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
69
|
+
--sidebar: oklch(0.985 0 0);
|
|
70
|
+
--sidebar-foreground: oklch(0.141 0.005 285.823);
|
|
71
|
+
--sidebar-primary: oklch(0.623 0.214 259.815);
|
|
72
|
+
--sidebar-primary-foreground: oklch(0.97 0.014 254.604);
|
|
73
|
+
--sidebar-accent: oklch(0.967 0.001 286.375);
|
|
74
|
+
--sidebar-accent-foreground: oklch(0.21 0.006 285.885);
|
|
75
|
+
--sidebar-border: oklch(0.92 0.004 286.32);
|
|
76
|
+
--sidebar-ring: oklch(0.623 0.214 259.815);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.dark {
|
|
80
|
+
--background: oklch(0.141 0.005 285.823);
|
|
81
|
+
--foreground: oklch(0.985 0 0);
|
|
82
|
+
--card: oklch(0.21 0.006 285.885);
|
|
83
|
+
--card-foreground: oklch(0.985 0 0);
|
|
84
|
+
--popover: oklch(0.21 0.006 285.885);
|
|
85
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
86
|
+
--primary: oklch(0.546 0.245 262.881);
|
|
87
|
+
--primary-foreground: oklch(0.379 0.146 265.522);
|
|
88
|
+
--secondary: oklch(0.274 0.006 286.033);
|
|
89
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
90
|
+
--muted: oklch(0.274 0.006 286.033);
|
|
91
|
+
--muted-foreground: oklch(0.705 0.015 286.067);
|
|
92
|
+
--accent: oklch(0.274 0.006 286.033);
|
|
93
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
94
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
95
|
+
--border: oklch(1 0 0 / 10%);
|
|
96
|
+
--input: oklch(1 0 0 / 15%);
|
|
97
|
+
--ring: oklch(0.488 0.243 264.376);
|
|
98
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
99
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
100
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
101
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
102
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
103
|
+
--sidebar: oklch(0.21 0.006 285.885);
|
|
104
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
105
|
+
--sidebar-primary: oklch(0.546 0.245 262.881);
|
|
106
|
+
--sidebar-primary-foreground: oklch(0.379 0.146 265.522);
|
|
107
|
+
--sidebar-accent: oklch(0.274 0.006 286.033);
|
|
108
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
109
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
110
|
+
--sidebar-ring: oklch(0.488 0.243 264.376);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@layer base {
|
|
114
|
+
* {
|
|
115
|
+
@apply border-border outline-ring/50;
|
|
116
|
+
}
|
|
117
|
+
body {
|
|
118
|
+
@apply bg-background text-foreground;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface Models {
|
|
2
|
+
[key: string]: string[];
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export interface ModelTableEntry {
|
|
6
|
+
"model_type": "Species" | "Genus" | "Family" | "Order" | "Class" | "Phylum" | "Kingdom";
|
|
7
|
+
"name": string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ModelMetadata {
|
|
11
|
+
model_slug: string;
|
|
12
|
+
model_display_name: string;
|
|
13
|
+
model_type: string;
|
|
14
|
+
author: string;
|
|
15
|
+
author_email: string;
|
|
16
|
+
k: number;
|
|
17
|
+
display_names: { [key: string]: string };
|
|
18
|
+
fpr: number;
|
|
19
|
+
num_hashes?: number;
|
|
20
|
+
kernel?: Partial<string>;
|
|
21
|
+
C?: Partial<number>;
|
|
22
|
+
training_accessions: { [key: string]: string[] } | string[];
|
|
23
|
+
svm_accessions: { [key: string]: string[] };
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ClassificationResult {
|
|
27
|
+
input_source: string;
|
|
28
|
+
model_slug: string;
|
|
29
|
+
sparse_sampling_step: number;
|
|
30
|
+
hits: { [subsequence: string]: { [label: string]: number } };
|
|
31
|
+
scores: { [subsequence: string]: { [label: string]: number } };
|
|
32
|
+
num_kmers: { [subsequence: string]: number };
|
|
33
|
+
prediction: string;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
4
|
+
"target": "ES2020",
|
|
5
|
+
"useDefineForClassFields": true,
|
|
6
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
7
|
+
"module": "ESNext",
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
|
|
10
|
+
/* Bundler mode */
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"allowImportingTsExtensions": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"moduleDetection": "force",
|
|
15
|
+
"noEmit": true,
|
|
16
|
+
"jsx": "react-jsx",
|
|
17
|
+
|
|
18
|
+
/* Linting */
|
|
19
|
+
"strict": true,
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
22
|
+
"noFallthroughCasesInSwitch": true,
|
|
23
|
+
"noUncheckedSideEffectImports": true
|
|
24
|
+
},
|
|
25
|
+
"include": ["src"],
|
|
26
|
+
"baseUrl": ".",
|
|
27
|
+
"paths": {
|
|
28
|
+
"@/*": [
|
|
29
|
+
"./src/*"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"lib": ["ES2023"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
|
|
9
|
+
/* Bundler mode */
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
12
|
+
"isolatedModules": true,
|
|
13
|
+
"moduleDetection": "force",
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
|
|
16
|
+
/* Linting */
|
|
17
|
+
"strict": true,
|
|
18
|
+
"noUnusedLocals": true,
|
|
19
|
+
"noUnusedParameters": true,
|
|
20
|
+
"noFallthroughCasesInSwitch": true,
|
|
21
|
+
"noUncheckedSideEffectImports": true
|
|
22
|
+
},
|
|
23
|
+
"include": ["vite.config.ts"]
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import path from "path"
|
|
3
|
+
import tailwindcss from "@tailwindcss/vite"
|
|
4
|
+
import react from '@vitejs/plugin-react'
|
|
5
|
+
|
|
6
|
+
// https://vite.dev/config/
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: [react(), tailwindcss()],
|
|
9
|
+
resolve: {
|
|
10
|
+
alias: {
|
|
11
|
+
"@": path.resolve(__dirname, "./src"),
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
base: "/xspect-web",
|
|
15
|
+
server: {
|
|
16
|
+
proxy: {
|
|
17
|
+
'/api': {
|
|
18
|
+
target: 'http://localhost:8000/api',
|
|
19
|
+
changeOrigin: true,
|
|
20
|
+
rewrite: (path) => path.replace(/^\/api/, ''),
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: XspecT
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Tool to monitor and characterize pathogens using Bloom filters.
|
|
5
5
|
License: MIT License
|
|
6
6
|
|
|
@@ -46,14 +46,13 @@ Requires-Dist: fastapi
|
|
|
46
46
|
Requires-Dist: uvicorn
|
|
47
47
|
Requires-Dist: python-multipart
|
|
48
48
|
Provides-Extra: docs
|
|
49
|
-
Requires-Dist:
|
|
50
|
-
Requires-Dist:
|
|
51
|
-
Requires-Dist: myst-parser; extra == "docs"
|
|
52
|
-
Requires-Dist: sphinx-copybutton; extra == "docs"
|
|
53
|
-
Requires-Dist: sphinx-autobuild; extra == "docs"
|
|
49
|
+
Requires-Dist: mkdocs-material; extra == "docs"
|
|
50
|
+
Requires-Dist: mkdocs-include-markdown-plugin; extra == "docs"
|
|
54
51
|
Provides-Extra: test
|
|
55
52
|
Requires-Dist: pytest; extra == "test"
|
|
56
53
|
Requires-Dist: pytest-cov; extra == "test"
|
|
54
|
+
Requires-Dist: pytest-retry; extra == "test"
|
|
55
|
+
Requires-Dist: httpx; extra == "test"
|
|
57
56
|
Dynamic: license-file
|
|
58
57
|
|
|
59
58
|
# XspecT - Acinetobacter Species Assignment Tool
|
|
@@ -78,7 +77,7 @@ To install XspecT, please download the lastest 64 bit Python version and install
|
|
|
78
77
|
```
|
|
79
78
|
pip install xspect
|
|
80
79
|
```
|
|
81
|
-
Please note that Windows and Alpine Linux
|
|
80
|
+
Please note that Windows and Alpine Linux are currently not supported.
|
|
82
81
|
|
|
83
82
|
## Usage
|
|
84
83
|
### Get the models
|
|
@@ -106,5 +105,5 @@ For further instructions on how to use the command line interface, please refer
|
|
|
106
105
|
```
|
|
107
106
|
xspect --help
|
|
108
107
|
```
|
|
109
|
-
[documentation]: https://bionf.github.io/XspecT2/cli.html
|
|
108
|
+
[documentation]: https://bionf.github.io/XspecT2/cli/index.html
|
|
110
109
|
<!-- end quickstart -->
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
xspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
xspect/classify.py,sha256=e0soOihf9KuVFuZ7VXs0EZKYzOFsM4-4IpOsYJtOORg,1148
|
|
3
|
+
xspect/definitions.py,sha256=fVn_li_s2hriOSGJ69o_H8H-vkw1znvkryhBj7WMnF4,1219
|
|
4
|
+
xspect/download_models.py,sha256=y1wFJZa1xOJfvUP78zKkRs46O-WqKBL90vmo5AYUio0,853
|
|
5
|
+
xspect/file_io.py,sha256=-3xm7IfOlmWJHxfrKPX5Qqit10zqsBUVt5Z7z1No2AI,5669
|
|
6
|
+
xspect/filter_sequences.py,sha256=UeIPmn5MquT-vVGFYna-IZRmDzaStI-d2wExYA7M7u0,1839
|
|
7
|
+
xspect/main.py,sha256=_-H6xFB3Z_rATblunTF1YhjxP6V_k8nPrnLcwAR3dcw,11913
|
|
8
|
+
xspect/model_management.py,sha256=UbmAr3YOZ4oy_9iVvApCLstYHGkcmneHEC_yftRIqCI,3010
|
|
9
|
+
xspect/ncbi.py,sha256=PDoVraZ8ntZIqBESLS27ZcxzgW5nqFc8ipvrHpIKb38,10100
|
|
10
|
+
xspect/train.py,sha256=dnmLIhDrHTKbXzLjcF1VZAdsDDmnpv_6qqk-st4E9V8,11053
|
|
11
|
+
xspect/web.py,sha256=M4fQUbmCnkpmdJeL-j-FD8r115EctWtWQZttuZWEsL8,5115
|
|
12
|
+
xspect/mlst_feature/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
+
xspect/mlst_feature/mlst_helper.py,sha256=Ff0kUdu-80969ZyYL6qUJNwEqf9eq72CC8zUyuoDElk,8114
|
|
14
|
+
xspect/mlst_feature/pub_mlst_handler.py,sha256=Ez5YHKfhsLsKdHf1aNMfz7JJVVV_DpA27mah9fgNeJc,5919
|
|
15
|
+
xspect/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
+
xspect/models/probabilistic_filter_mlst_model.py,sha256=v9yriJX_i8-SRzU8W8RvDPrBvlR_ONSMVypZWGAJpv8,16164
|
|
17
|
+
xspect/models/probabilistic_filter_model.py,sha256=K2gWpte2BCb03msgY-x18NVRMv1xHpDVWQWhbf4vWU4,10068
|
|
18
|
+
xspect/models/probabilistic_filter_svm_model.py,sha256=xXimcv3iWnG1JiFyrk6UqkP9hFIxWGDdb__fRdQYwro,6245
|
|
19
|
+
xspect/models/probabilistic_single_filter_model.py,sha256=yxWnCt4IP-3ZRLP4pRA3f2VTHc0_4g17PDCyOFayDDg,4090
|
|
20
|
+
xspect/models/result.py,sha256=ELWiDlQPlxNG7ceLpth60Z_Hb1ZdopDJ3vgHBPgSRm8,3989
|
|
21
|
+
xspect/xspect-web/.gitignore,sha256=_nGOe6uxTzy60tl_CIibnOUhXtP-DkOyuM-_s7m4ROg,253
|
|
22
|
+
xspect/xspect-web/README.md,sha256=Fa5cCk66ohbqD_AAVgnXUZLhuzshnLxhlUFhxyscScc,1942
|
|
23
|
+
xspect/xspect-web/components.json,sha256=5emhfq5JRW9J8Zga-1N5jAcj4B-r8VREXnH7Z6tZGNk,425
|
|
24
|
+
xspect/xspect-web/eslint.config.js,sha256=3ADH23ANA4NNBKFy6nCVk65e8bx1DrVd_FIaYNnhuqA,734
|
|
25
|
+
xspect/xspect-web/index.html,sha256=kmPYzKkC0H1YrG6VhTH_Secgw5G0QBBg0Qr3QXKkLdI,359
|
|
26
|
+
xspect/xspect-web/package-lock.json,sha256=rWHUWRk850I7DT_VKz9bagG9gv8eBPash_jFA0Q92Pg,245769
|
|
27
|
+
xspect/xspect-web/package.json,sha256=Pfvrv3o59_7iERkE94GCUE7D27LnYFPfCd5smLGuFpk,1706
|
|
28
|
+
xspect/xspect-web/pnpm-lock.yaml,sha256=FUUFVvCggGlcuSRF3a3d1cnKIhSV0p0P5Y3v4ukzREY,159895
|
|
29
|
+
xspect/xspect-web/tsconfig.app.json,sha256=2Z6ve9WHRew2JsFieyeYvTo8F06g-1Zip8vmmJbCT9U,746
|
|
30
|
+
xspect/xspect-web/tsconfig.json,sha256=PyTEDi-CLGMtBEgmGYbxQiolXcAHM2QKH3pWWvtC10A,213
|
|
31
|
+
xspect/xspect-web/tsconfig.node.json,sha256=1BewvjsiZMJqSGXTqe94jo5yKdpi7yqI7UGoHgTv9mg,593
|
|
32
|
+
xspect/xspect-web/vite.config.ts,sha256=REOHrBcT1f8Uzda92y-ZuVKHkTsqIFXProqvgh6ypPw,540
|
|
33
|
+
xspect/xspect-web/dist/index.html,sha256=WpKWnSLYZF80cJUceFI1wpAOv09g1EUWtMKYrhCWKTQ,490
|
|
34
|
+
xspect/xspect-web/dist/vite.svg,sha256=SnSK_UQ5GLsWWRyDTEAdrjPoeGGrXbrQgRw6O0qSFPs,1497
|
|
35
|
+
xspect/xspect-web/dist/assets/index-CMG4V7fZ.js,sha256=DErtK_OcdK5K2woBZMctxI88w2DQHCaedWB_zXeJrVM,1042453
|
|
36
|
+
xspect/xspect-web/dist/assets/index-jIKg1HIy.css,sha256=NgdLP7YapYVMMcsP7Hs3YmFElAXlU8wrk_R-kAMjQis,58662
|
|
37
|
+
xspect/xspect-web/public/vite.svg,sha256=SnSK_UQ5GLsWWRyDTEAdrjPoeGGrXbrQgRw6O0qSFPs,1497
|
|
38
|
+
xspect/xspect-web/src/App.tsx,sha256=AJJKxJ9adOAz1_H-W1cp13jpJDIjM9hqwClpR8lSUoc,979
|
|
39
|
+
xspect/xspect-web/src/api.tsx,sha256=58Wl9Pabl_wgFR-hM4Ow_hZ1NCHyCzIDjWlWqAomIRI,2284
|
|
40
|
+
xspect/xspect-web/src/index.css,sha256=JoXrL1Vcj4V18TtH-dChfBvsD_BOff-raPwRsiFz1Zk,4428
|
|
41
|
+
xspect/xspect-web/src/main.tsx,sha256=bp5YB_y9SLdalttcvvNsmWJiGWvkLm1HYNyGurvmGtI,230
|
|
42
|
+
xspect/xspect-web/src/types.tsx,sha256=5QPuEgJ3rSukShG6qzg17B6OOGTimFWh8_O0alro3iw,930
|
|
43
|
+
xspect/xspect-web/src/utils.tsx,sha256=g_eADLwa9RSpZ9Qybca5PF6r9s7riHvj21Kx9K34Vjg,163
|
|
44
|
+
xspect/xspect-web/src/vite-env.d.ts,sha256=ZZlpNvuwQpFfe3SiAPzd5-QQ8ypmmxq5WXz6pLD63bU,38
|
|
45
|
+
xspect/xspect-web/src/assets/react.svg,sha256=Ne9h7VOzI66UoWqOxlmz0K84gGmHkRM_I7CECFqxwuU,4126
|
|
46
|
+
xspect/xspect-web/src/components/classification-form.tsx,sha256=cT4UQnxnzn6JjNs-wZOQmNviNwKjLbUc_FYxvd5VLwA,12367
|
|
47
|
+
xspect/xspect-web/src/components/classify.tsx,sha256=4V5V5miJPvDPX_hykPlYz-lXAqjHNqDs4oHtxQHz_kQ,558
|
|
48
|
+
xspect/xspect-web/src/components/data-table.tsx,sha256=vu_OSs8AJ8KeGl1gPDMFMiM3b85U364v9gFHC5e4rK8,1984
|
|
49
|
+
xspect/xspect-web/src/components/dropdown-checkboxes.tsx,sha256=FJbuzWBilAbqKt0efWkSL7dDjedF5YJwm7kpfCHhHyE,1626
|
|
50
|
+
xspect/xspect-web/src/components/dropdown-slider.tsx,sha256=9l4kRXFpjuaTOoZ1QtYqVZOV5KlggsKtP27JouhW8yE,1050
|
|
51
|
+
xspect/xspect-web/src/components/filter-form.tsx,sha256=PptRGBOzh7WQMQicsi_62FcH3ZVB534bGvbxqOvCAz8,20688
|
|
52
|
+
xspect/xspect-web/src/components/filter.tsx,sha256=bkLsO7mWQxfbAYc6Xei-2yXtsH0Ry99JdzDlmjBJC8c,517
|
|
53
|
+
xspect/xspect-web/src/components/header.tsx,sha256=Dhq0E68iA3jlTKDeApT5gNciHOzcJ6KINfEnEeIU2GY,1910
|
|
54
|
+
xspect/xspect-web/src/components/landing.tsx,sha256=jsETCHzTlv1ogDtAnILknVBWjeY6wWRNf2YMdtNlB-c,233
|
|
55
|
+
xspect/xspect-web/src/components/models-details.tsx,sha256=IFrjxsagI9V3oEhJYqNwjI4_G7XfY_sABAOI62EpApo,7193
|
|
56
|
+
xspect/xspect-web/src/components/models.tsx,sha256=K8rK4lSL4_m8RMcPsLFykZgVNJF9Odl2eBTczwgrl9c,2004
|
|
57
|
+
xspect/xspect-web/src/components/result-chart.tsx,sha256=emhKpcSy_FK-3tASuzooWplmxpSQLXfUwuROkytG_7k,982
|
|
58
|
+
xspect/xspect-web/src/components/result.tsx,sha256=mDfdusf8WS3BNemUg8bIKZTXJunb6-xfKI_bY9GKddo,7325
|
|
59
|
+
xspect/xspect-web/src/components/spinner.tsx,sha256=N9vezR__M9A6vklYzgsGhOoqY-9IrfwouADc_v1OYKY,673
|
|
60
|
+
xspect/xspect-web/src/components/ui/accordion.tsx,sha256=HgAojH7ucjgAAhZOo_91id9dkvLxuMeqUHdZbvaArNs,2039
|
|
61
|
+
xspect/xspect-web/src/components/ui/button.tsx,sha256=gkAyMeM_09RbER5egZ3xlM36fO-acmdwGFckpgvSCTI,2123
|
|
62
|
+
xspect/xspect-web/src/components/ui/card.tsx,sha256=eM22Pf8-x-8HStpjD_IKXYAEdotsviTtE0qL-6Err7s,1989
|
|
63
|
+
xspect/xspect-web/src/components/ui/chart.tsx,sha256=azgOA3V2ibkXJ30brENPC4tlkIR3hGFF21JoYK0qfms,9767
|
|
64
|
+
xspect/xspect-web/src/components/ui/command.tsx,sha256=PtCxXMo8V2rCsV3I5oRyftnYxVAm4H1aLx5MXH3WhZc,4642
|
|
65
|
+
xspect/xspect-web/src/components/ui/dialog.tsx,sha256=Rjpl39DvN_FYqWPOZA6mxC9G7xDX5l1yH7yRuJoWUew,3813
|
|
66
|
+
xspect/xspect-web/src/components/ui/dropdown-menu.tsx,sha256=ZYJmQqTmNo9xwHAXSLH70pOXI-E4A9rVDL6bkqKAONU,8270
|
|
67
|
+
xspect/xspect-web/src/components/ui/file-upload.tsx,sha256=qzOF45XuMDXyIXpmFoldlDa-J2wKOx6t8yDS3pdWiRo,40446
|
|
68
|
+
xspect/xspect-web/src/components/ui/form.tsx,sha256=Eywco89zzwp7KVfJ_PBJs1BDJmkpSbL8pEecCMnr-Zw,3745
|
|
69
|
+
xspect/xspect-web/src/components/ui/input.tsx,sha256=Zijo_eIHhXuboIkQ04bu6oIT19dFtOCui5UzK1JzDbk,967
|
|
70
|
+
xspect/xspect-web/src/components/ui/label.tsx,sha256=nsQsilfoIxERi3lDGECe4Css6_pJumzOhFfP9kSM1HE,611
|
|
71
|
+
xspect/xspect-web/src/components/ui/navigation-menu.tsx,sha256=1x9X_g82VUH79dABlrC3ikYdjE8401KT5XVGgNk7kkU,6664
|
|
72
|
+
xspect/xspect-web/src/components/ui/popover.tsx,sha256=AHAskhA9K_B1L6wDDJ_G9nHFWlcyU0pvwwbfYY8w5lI,1621
|
|
73
|
+
xspect/xspect-web/src/components/ui/select.tsx,sha256=VQ59Cd2m19n2dA9g2VwXjpUg_mMpFTOqVcgY55t5Zg8,6239
|
|
74
|
+
xspect/xspect-web/src/components/ui/separator.tsx,sha256=KMXIj2HMn3OdQABsv-JXTAs5Uj1RW2BY_W9kwv4tzug,690
|
|
75
|
+
xspect/xspect-web/src/components/ui/slider.tsx,sha256=Vtm_XTc_CT77U4X6Np9c8s9C2IySNLJcMqdBLbt9JQc,1987
|
|
76
|
+
xspect/xspect-web/src/components/ui/switch.tsx,sha256=uIqRXtd41ba0eusIEUWVyYZv820r2YSPBt6Phh85oiQ,1163
|
|
77
|
+
xspect/xspect-web/src/components/ui/table.tsx,sha256=M2-TIHKwPFWuXrwysSufdQRSMJT-K9jPzGOokfU6PXo,2463
|
|
78
|
+
xspect/xspect-web/src/components/ui/tabs.tsx,sha256=BImHKcdDCtrS3CCV1AGgn8qg0b65RB5P-QdH49IAhx0,1955
|
|
79
|
+
xspect/xspect-web/src/lib/utils.ts,sha256=66ibdQiEHKftZBq1OMLmOKqWma1BkO-O60rc1IQYwLE,165
|
|
80
|
+
xspect-0.5.0.dist-info/licenses/LICENSE,sha256=bhBGDKIRUVwYIHGOGO5hshzuVHyqFJajvSOA3XXOLKI,1094
|
|
81
|
+
xspect-0.5.0.dist-info/METADATA,sha256=Fjk4LvE94MuvwKcssLdFaDeVZ-rE4o4fduMr4HQcHds,4421
|
|
82
|
+
xspect-0.5.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
|
83
|
+
xspect-0.5.0.dist-info/entry_points.txt,sha256=L7qliX3pIuwupQxpuOSsrBJCSHYPOPNEzH8KZKQGGUw,43
|
|
84
|
+
xspect-0.5.0.dist-info/top_level.txt,sha256=hdoa4cnBv6OVzpyhMmyxpJxEydH5n2lDciy8urc1paE,7
|
|
85
|
+
xspect-0.5.0.dist-info/RECORD,,
|