-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.bat
More file actions
117 lines (97 loc) · 2.63 KB
/
install.bat
File metadata and controls
117 lines (97 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
@echo off
REM Installation script for WGS Extract v6 (Windows)
setlocal enabledelayedexpansion
echo ==================================================
echo WGS Extract v6 - Installation (Windows)
echo ==================================================
echo.
REM Check if Python is installed
where python >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo Error: Python is not installed or not in PATH
echo Please install Python 3.13 or later from https://www.python.org/
pause
exit /b 1
)
REM Get Python version
for /f "tokens=2" %%i in ('python --version 2^>^&1') do set PYTHON_VERSION=%%i
echo Python version: %PYTHON_VERSION%
echo.
REM Check for BWA
where bwa >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo Warning: BWA not found
echo BWA is required for alignment operations
echo Download from: https://github.com/lh3/bwa/releases
echo.
) else (
echo BWA found
echo.
)
REM Check if venv exists
if exist venv (
echo Virtual environment already exists
set /p RECREATE="Recreate it? (y/N): "
if /i "!RECREATE!"=="y" (
rmdir /s /q venv
python -m venv venv
)
) else (
echo Creating Python virtual environment...
python -m venv venv
)
echo.
REM Activate virtual environment
echo Activating virtual environment...
call venv\Scripts\activate.bat
REM Upgrade pip
echo Upgrading pip...
python -m pip install --upgrade pip wheel setuptools
echo.
REM Install dependencies
echo Installing dependencies...
pip install -r requirements.txt
echo.
REM Ask about dev dependencies
set /p INSTALL_DEV="Install development dependencies? (y/N): "
if /i "%INSTALL_DEV%"=="y" (
pip install -r requirements-dev.txt
)
echo.
REM Install package
echo Installing WGS Extract...
pip install -e .
echo.
REM Create directories
echo Creating directories...
if not exist reference\genomes mkdir reference\genomes
if not exist reference\liftover mkdir reference\liftover
if not exist reference\microarray_templates mkdir reference\microarray_templates
if not exist output mkdir output
if not exist temp mkdir temp
echo.
REM Create launcher batch file
echo Creating launcher...
(
echo @echo off
echo call "%~dp0venv\Scripts\activate.bat"
echo python -m wgsextract %%*
) > run_wgsextract.bat
echo.
echo ==================================================
echo Installation complete!
echo ==================================================
echo.
echo To run WGS Extract:
echo 1. Activate virtual environment:
echo venv\Scripts\activate.bat
echo 2. Run the application:
echo python -m wgsextract
echo.
echo Or use the launcher:
echo run_wgsextract.bat
echo.
echo For help:
echo python -m wgsextract --help
echo.
pause