Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
ae0b22a
Fix NaN output in quality adjuster
jorgeMFS May 21, 2025
13291ec
Merge pull request #1 from jorgeMFS/codex/find-and-fix-bug
jorgeMFS May 21, 2025
d9097e7
Fix Emscripten build detection
jorgeMFS May 21, 2025
e81e22a
Merge pull request #2 from jorgeMFS/codex/fix-broken-webassembly-buil…
jorgeMFS May 21, 2025
68bac85
fix: support modern find in path script
jorgeMFS May 21, 2025
fb63a8c
Merge pull request #3 from jorgeMFS/codex/fix-invalid-mode-in-add_vcf…
jorgeMFS May 21, 2025
894e777
fix: ensure newline at EOF for .dockerignore
jorgeMFS May 21, 2025
03dbebf
Merge pull request #4 from jorgeMFS/codex/fix-.gitignore-missing-newline
jorgeMFS May 21, 2025
1c4a27a
Optimize alignment checker memory usage
jorgeMFS May 21, 2025
28f233f
Merge pull request #5 from jorgeMFS/codex/verify-reference-genome-nam…
jorgeMFS May 21, 2025
7ad0a7c
Make haplotype extractor debug output optional
jorgeMFS May 21, 2025
88cc514
Merge pull request #6 from jorgeMFS/codex/remove-unconditional-stderr…
jorgeMFS May 21, 2025
fdf6740
Add trailing newline to Dockerfile and CMakeLists
jorgeMFS May 21, 2025
d90c75c
Merge pull request #7 from jorgeMFS/codex/append-newline-to-cmakelist…
jorgeMFS May 21, 2025
42053ff
Add basic utilities to vcfx_core
jorgeMFS May 21, 2025
9cb099c
refactor merger to stream
jorgeMFS May 21, 2025
2773188
Merge pull request #8 from jorgeMFS/codex/provide-reusable-utilities-…
jorgeMFS May 21, 2025
3385fd3
Merge pull request #9 from jorgeMFS/codex/refactor-mergevcf-to-proces…
jorgeMFS May 21, 2025
5dbfd21
Fix merger sort for unsorted inputs
jorgeMFS May 21, 2025
f13678e
Merge pull request #10 from jorgeMFS/codex/fix-stray-prompts-and-vali…
jorgeMFS May 21, 2025
cffeab0
Add CI workflow to build and test
jorgeMFS May 21, 2025
51c7807
Merge pull request #11 from jorgeMFS/codex/add-ci-workflow-for-cmake-…
jorgeMFS May 21, 2025
0d8ff78
docs: reference public container
jorgeMFS May 22, 2025
270cff7
Add gzip support and tests
jorgeMFS May 22, 2025
7baeeb5
Merge pull request #13 from jorgeMFS/codex/add-helper-functions-for-c…
jorgeMFS May 22, 2025
5ea9d05
Merge pull request #12 from jorgeMFS/codex/fix-vcfx-docker-pull-issue
jorgeMFS May 22, 2025
dd90a09
test: skip Docker tests if Docker missing
jorgeMFS May 22, 2025
8cf4960
Update test_docker.sh
jorgeMFS May 22, 2025
2f321f4
Update test_docker.sh
jorgeMFS May 22, 2025
4813558
Merge pull request #14 from jorgeMFS/codex/introduce-vcfx_image-varia…
jorgeMFS May 22, 2025
c848b21
Add strict mode validation for VCFX_validator
jorgeMFS May 22, 2025
40f33bf
Merge pull request #15 from update-vcfx_validator-for-strictmode
jorgeMFS May 22, 2025
b8dbc87
Integrate shell scripts with CTest
jorgeMFS May 22, 2025
771ddbe
Merge pull request #16 from update-cmakelists-and-ci-for-tests
jorgeMFS May 22, 2025
0563fb2
Improve Docker test script with local build fallback
jorgeMFS May 22, 2025
81c1981
Merge pull request #17 from fix-docker-image-pull-error
jorgeMFS May 22, 2025
5b47e82
Fix Docker test input path
jorgeMFS May 22, 2025
bcdf128
Merge pull request #20 from jorgeMFS/8sa6ho-codex/fix-docker-image-bu…
jorgeMFS May 22, 2025
e051302
Add vcfx wrapper
jorgeMFS May 22, 2025
9de9437
Add Docker entrypoint and path setup
jorgeMFS May 22, 2025
3ea5c79
Merge pull request #22 from jorgeMFS/codex/fix-vcfx_validator-command…
jorgeMFS May 22, 2025
0369eca
Merge pull request #21 from jorgeMFS/codex/implement-vcfx-wrapper-wit…
jorgeMFS May 22, 2025
594f332
fix docker tests to use bash
jorgeMFS May 22, 2025
a3b5a97
Merge pull request #23 from jorgeMFS/codex/fix-test_docker-failure-in…
jorgeMFS May 22, 2025
22052bd
Fix validator passthrough
jorgeMFS May 23, 2025
e769129
Merge pull request #24 from fix-issue-in-docker-test-pipeline
jorgeMFS May 23, 2025
83ef866
Simplify tool discovery in CMake
jorgeMFS May 23, 2025
c9a1fba
Merge pull request #25 from refactor-add_subdirectory-and-vcfx_tools-…
jorgeMFS May 23, 2025
7144d0a
Fix macOS test failures
jorgeMFS May 23, 2025
a6de575
Merge pull request #28 from jorgeMFS/codex/update-build-test.yml-for-…
jorgeMFS May 23, 2025
5d7a1e8
fix: avoid duplicate add_subdirectory on case-insensitive FS
jorgeMFS May 23, 2025
e808ec1
Merge pull request #29 from jorgeMFS/codex/fix-cmake-build-errors-wit…
jorgeMFS May 23, 2025
0c7d315
Fix Windows getopt
jorgeMFS May 23, 2025
72ec3bc
Merge pull request #32 from fix-zlib-installation-failure-in-build
jorgeMFS May 23, 2025
9fb2be0
fix: use cmake parallel build
jorgeMFS May 23, 2025
5ff6a5e
Merge branch 'main' into codex/fix-zlib-installation-failure-in-build
jorgeMFS May 23, 2025
9c504e4
Merge pull request #33 from jorgeMFS/codex/fix-zlib-installation-fail…
jorgeMFS May 23, 2025
b8a6b8f
Fix Windows build by installing getopt
jorgeMFS May 23, 2025
10a7927
Merge pull request #34 from jorgeMFS/codex/fix-missing-getopt.h-and-g…
jorgeMFS May 23, 2025
0680378
Remove Windows references
jorgeMFS May 23, 2025
bb9f6b1
Merge pull request #35 from jorgeMFS/codex/resolve-missing-getopt.lib…
jorgeMFS May 23, 2025
456c0a4
feat: add --version support across tools
jorgeMFS May 23, 2025
95854e6
Merge pull request #36 from jorgeMFS/codex/find-features-to-improve-t…
jorgeMFS May 23, 2025
ca6485d
fix alt mismatch logic
jorgeMFS May 23, 2025
fef3906
Merge pull request #37 from update-alt-discrepancy-check-and-tests
jorgeMFS May 23, 2025
38c99fd
Ignore genotype query test artifacts
jorgeMFS May 23, 2025
c5f1097
Merge pull request #38 from jorgeMFS/8nw2ij-codex/update-test-paths-a…
jorgeMFS May 23, 2025
13d42cb
Ignore temporary test outputs
jorgeMFS May 23, 2025
2084caf
Merge pull request #39 from jorgeMFS/1957s6-codex/update-.gitignore-a…
jorgeMFS May 23, 2025
f63dce5
Fix ALT normalization with colon in duplicate remover
jorgeMFS May 23, 2025
dd83284
Support 64-bit positions in indexer
jorgeMFS May 23, 2025
74b36db
Merge pull request #40
jorgeMFS May 23, 2025
9673ee2
Merge pull request #41 from change-position-variable-to-int64_t
jorgeMFS May 23, 2025
7e96e42
Refactor variant counter to stream input
jorgeMFS May 23, 2025
aaf7baa
Merge pull request #42 from refactor-vcfx_variant_counter-and-read_ma…
jorgeMFS May 23, 2025
6c37b6f
fix CSV quote escaping
jorgeMFS May 23, 2025
d8afde2
Merge pull request #43
jorgeMFS May 23, 2025
dbda796
docs: update phred_filter usage
jorgeMFS May 23, 2025
ea64f02
Merge pull request #44 from jorgeMFS/codex/update-filter-options-in-docs
jorgeMFS May 23, 2025
bb9ca6d
fix test_variant_counter script path
jorgeMFS May 23, 2025
c26f0a1
Merge pull request #47 from fix-bug-in-important-codebase-section
jorgeMFS May 23, 2025
e592624
Merge main
jorgeMFS May 23, 2025
907f1a4
Merge branch 'main' into codex/update-command-examples-in-docs
jorgeMFS May 23, 2025
7b97511
Merge pull request #48 from update-command-examples-in-docs
jorgeMFS May 23, 2025
5022ec3
docs: document --version flag
jorgeMFS May 23, 2025
ccc5c4e
Merge pull request #49 from insert-version-flag-in-options-table
jorgeMFS May 23, 2025
6a0f0d0
Clarify version flag note
jorgeMFS May 23, 2025
4de9e57
Merge pull request #50 variant-flag-documentation-and-source
jorgeMFS May 23, 2025
a43f028
docs: adjust toolkit utility count
jorgeMFS May 23, 2025
de32788
docs: add annotation and processing sections
jorgeMFS May 23, 2025
5982324
Merge pull request #52 from jorgeMFS/codex/update-docs/index.md-with-…
jorgeMFS May 23, 2025
ca142f1
Merge pull request #51 from update-citation-wording-in-docs/citation.md
jorgeMFS May 23, 2025
0a54a83
docs: rename heading for sample comparison
jorgeMFS May 23, 2025
e02f897
Merge pull request #53 from jorgeMFS/codex/update-vcf-comparison-comm…
jorgeMFS May 23, 2025
c2d1e53
Improve dark mode
jorgeMFS May 23, 2025
418a1d1
Merge pull request #54 from jorgeMFS/codex/improve-dark-mode-readabil…
jorgeMFS May 23, 2025
d6aa261
Fix Python bindings
jorgeMFS May 23, 2025
16353ce
Merge pull request #55 from implement-python-bindings-with-cmake-and-…
jorgeMFS May 23, 2025
2d10367
Fix Docker build by installing Python dev deps
jorgeMFS May 24, 2025
08b33a4
Merge pull request #56 from fix-python3-installation-for-docker-build
jorgeMFS May 24, 2025
a8e1ca5
Add Python wrappers and wheel workflow
jorgeMFS May 24, 2025
3c43936
Merge pull request #57 -Add Python wrappers and wheel CI
jorgeMFS May 24, 2025
1e8653f
Extend Python bindings
jorgeMFS May 24, 2025
d412e26
Merge pull request #58 - extend-python-bindings
jorgeMFS May 24, 2025
e47145d
Add vcfx wrapper test
jorgeMFS May 24, 2025
8135b2f
Merge pull request #59 from jorgeMFS/enhance-vcfx-with-help-and-list-…
jorgeMFS May 24, 2025
86a7511
Fix YAML syntax in workflow
jorgeMFS May 24, 2025
d7e081e
Merge pull request #60 fix-yaml-syntax-error-on-line-86
jorgeMFS May 24, 2025
fa3bbf5
docs: Remove site/ directory from version control and fix documentati…
jorgeMFS May 24, 2025
50b7051
Allow user-level installs
jorgeMFS May 24, 2025
deb6e4b
Merge pull request #61 from fix-installation-directory-permission-issue
jorgeMFS May 24, 2025
fcab97c
feat(python): fallback for missing compiled module
jorgeMFS May 24, 2025
80943fd
fix setup.py build info
jorgeMFS May 24, 2025
b82de13
Merge pull request #63 from jorgeMFS/codex/update-setup.py-and-versio…
jorgeMFS May 24, 2025
ddfa230
Merge pull request #62 from jorgeMFSfix-modulenotfounderror-for-vcfx.…
jorgeMFS May 24, 2025
07e97d0
Fix workflow PATH handling
jorgeMFS May 24, 2025
056d099
Merge pull request #64 from jorgeMFS/codex/fix-filenotfounderror-for-…
jorgeMFS May 24, 2025
3c72b81
Update build-test workflow to use setup-python
jorgeMFS May 24, 2025
88ec3b6
Merge pull request #65 from jorgeMFS/codex/update-github-actions-work…
jorgeMFS May 24, 2025
1dfc28a
docs: recommend venv before pip install
jorgeMFS May 24, 2025
da901df
Merge pull request #66 from jorgeMFS/codex/update-installation-instru…
jorgeMFS May 24, 2025
b2a6027
Fix heredoc delimiter in workflow
jorgeMFS May 25, 2025
250d38f
Merge pull request #67 from troubleshoot-eof-nameerror-in-vcfx_af_sub…
jorgeMFS May 25, 2025
d384c7c
Fix YAML indentation for EOF
jorgeMFS May 25, 2025
63db39b
Merge pull request #68 from jorgeMFS/codex/fix-yaml-syntax-error-in-b…
jorgeMFS May 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BasedOnStyle: LLVM
IndentWidth: 4
ColumnLimit: 120
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ LICENSE
# Docker files (not needed in the build context)
Dockerfile
docker-compose.yml
.dockerignore
.dockerignore
99 changes: 99 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Build and Test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build-and-test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake libz-dev

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew update
brew install cmake zlib bash
echo "$(brew --prefix)/bin" >> $GITHUB_PATH

- name: Configure
run: cmake -S . -B build
shell: bash
- name: Build
run: cmake --build build --parallel
shell: bash

- name: Run tests
run: |
cd build
ctest --output-on-failure
shell: bash

python-wheels:
needs: build-and-test
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake libz-dev

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew update
brew install cmake zlib bash
echo "$(brew --prefix)/bin" >> $GITHUB_PATH

- name: Build project
run: |
cmake -S . -B build -DPYTHON_BINDINGS=ON
cmake --build build --parallel
cmake --install build --prefix $PWD/install
shell: bash

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Build wheel
run: |
python -m pip install --upgrade pip wheel
python -m pip wheel ./python -w dist
shell: bash

- name: Test Python wheel
run: |
python -m pip install dist/*.whl
export PATH="$PWD/install/bin:$PATH"
echo "$PWD/install/bin" >> $GITHUB_PATH
cat <<'EOF' | python -
import vcfx
print('version:', vcfx.get_version())
tools = vcfx.available_tools()
print('tools:', len(tools))
if tools:
vcfx.run_tool(tools[0], '--help', check=False)
EOF
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max
16 changes: 8 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,40 +29,40 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs-material pymdown-extensions

- name: Deploy to GitHub Pages
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
mkdocs gh-deploy --force

# Only for pull requests - just build to validate
build:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs-material pymdown-extensions

- name: Build documentation
run: mkdocs build
run: mkdocs build
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,22 @@ Thumbs.db
# Other
tools.md
prompt.md
names.md
names.md

# Temporary outputs from genotype_query tests
tests/tmp/genotype_query/
tests/data/genotype_query/missing_malformed.vcf
tests/data/genotype_query/multi_sample.vcf
tests/data/genotype_query/single_sample.vcf
tests/expected/genotype_query/missing_malformed_01.vcf
tests/expected/genotype_query/multi_11_flexible.vcf
tests/expected/genotype_query/multi_11_strict.vcf
tests/expected/genotype_query/multi_12_flexible.vcf
tests/expected/genotype_query/no_match.vcf
tests/expected/genotype_query/single_sample_flex_01.vcf
tests/expected/genotype_query/single_sample_strict_01.vcf

# General temporary test output directories
tests/tmp/
tests/out/
tmp/
37 changes: 31 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,40 @@ set(VCFX_VERSION_MINOR 0)
set(VCFX_VERSION_PATCH 2)
set(VCFX_VERSION "${VCFX_VERSION_MAJOR}.${VCFX_VERSION_MINOR}.${VCFX_VERSION_PATCH}")

project(VCFX
add_compile_definitions(VCFX_VERSION="${VCFX_VERSION}")

project(VCFX
VERSION ${VCFX_VERSION}
DESCRIPTION "A Comprehensive VCF Manipulation Toolkit"
LANGUAGES CXX
)

# Set a user-friendly default install prefix when none is provided.
# This prevents installation attempts into system directories when
# running without root privileges.
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/.local" CACHE PATH "Install prefix" FORCE)
endif()

include(GNUInstallDirs)

# Optionally allow building for WebAssembly via Emscripten
option(BUILD_WASM "Build with emscripten toolchain" OFF)
option(PYTHON_BINDINGS "Build Python bindings" ON)

if(BUILD_WASM)
set(CMAKE_TOOLCHAIN_FILE "/path/to/emscripten.cmake" CACHE FILEPATH "Emscripten toolchain" FORCE)
if(NOT CMAKE_TOOLCHAIN_FILE)
if(DEFINED ENV{EMSDK} AND EXISTS "$ENV{EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake")
set(CMAKE_TOOLCHAIN_FILE "$ENV{EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake" CACHE FILEPATH "Emscripten toolchain" FORCE)
elseif(DEFINED ENV{EMSCRIPTEN} AND EXISTS "$ENV{EMSCRIPTEN}/cmake/Modules/Platform/Emscripten.cmake")
set(CMAKE_TOOLCHAIN_FILE "$ENV{EMSCRIPTEN}/cmake/Modules/Platform/Emscripten.cmake" CACHE FILEPATH "Emscripten toolchain" FORCE)
endif()
endif()

if(NOT EXISTS "${CMAKE_TOOLCHAIN_FILE}")
message(FATAL_ERROR "Emscripten toolchain file not found. Please set CMAKE_TOOLCHAIN_FILE or EMSDK.")
endif()

message(STATUS "Building for WebAssembly (Emscripten).")
endif()

Expand All @@ -42,12 +65,14 @@ enable_testing()
# Add top-level 'src' subdirectory, which in turn references each tool subdirectory
add_subdirectory(src)

# Add a tests subdir if you have tests
# Comment out this line since we don't have a CMakeLists.txt file in the tests directory
# add_subdirectory(tests)
if(PYTHON_BINDINGS)
add_subdirectory(python)
endif()

# Add the test suite
add_subdirectory(tests)

# Installation configuration
include(GNUInstallDirs)

# Install header files
install(FILES
Expand Down
26 changes: 13 additions & 13 deletions DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ VCFX is available as a pre-built Docker image on GitHub Container Registry:

```bash
# Pull the image (only needed once)
docker pull ghcr.io/ieeta-pt/vcfx:latest
docker pull ghcr.io/jorgemfs/vcfx:latest

# Run a VCFX tool
docker run --rm ghcr.io/ieeta-pt/vcfx:latest VCFX_tool_name [options]
docker run --rm ghcr.io/jorgemfs/vcfx:latest VCFX_tool_name [options]

# Mount a directory with your data
docker run --rm -v /path/to/your/data:/data ghcr.io/ieeta-pt/vcfx:latest VCFX_tool_name [options]
docker run --rm -v /path/to/your/data:/data ghcr.io/jorgemfs/vcfx:latest VCFX_tool_name [options]

# Example: Process a VCF file (using tests/data/valid.vcf as an example)
docker run --rm -v $(pwd)/tests/data:/data ghcr.io/ieeta-pt/vcfx:latest 'cat /data/valid.vcf | VCFX_allele_freq_calc > /data/output.tsv'
docker run --rm -v $(pwd)/tests/data:/data ghcr.io/jorgemfs/vcfx:latest 'cat /data/valid.vcf | VCFX_allele_freq_calc > /data/output.tsv'
```

Using the pre-built image is recommended for most users as it:
Expand Down Expand Up @@ -65,19 +65,19 @@ There are several ways to run VCFX tools with Docker:

```bash
# With the pre-built image
docker run --rm ghcr.io/ieeta-pt/vcfx:latest VCFX_tool_name [options]
docker run --rm ghcr.io/jorgemfs/vcfx:latest VCFX_tool_name [options]

# With a locally built image
docker run --rm vcfx:local VCFX_tool_name [options]

# Mount the tests/data directory to access test files
docker run --rm -v $(pwd)/tests/data:/data ghcr.io/ieeta-pt/vcfx:latest VCFX_tool_name [options]
docker run --rm -v $(pwd)/tests/data:/data ghcr.io/jorgemfs/vcfx:latest VCFX_tool_name [options]

# Process files in the tests/data directory
docker run --rm -v $(pwd)/tests/data:/data ghcr.io/ieeta-pt/vcfx:latest 'cat /data/valid.vcf | VCFX_validator'
docker run --rm -v $(pwd)/tests/data:/data ghcr.io/jorgemfs/vcfx:latest 'cat /data/valid.vcf | VCFX_validator'

# Example: Calculate allele frequencies for a VCF file
docker run --rm -v $(pwd)/tests/data:/data ghcr.io/ieeta-pt/vcfx:latest 'cat /data/valid.vcf | VCFX_allele_freq_calc > /data/output.tsv'
docker run --rm -v $(pwd)/tests/data:/data ghcr.io/jorgemfs/vcfx:latest 'cat /data/valid.vcf | VCFX_allele_freq_calc > /data/output.tsv'
```

### Using Docker Compose
Expand All @@ -98,7 +98,7 @@ docker-compose run --rm vcfx 'cat /data/valid.vcf | VCFX_allele_freq_calc > /dat
When using Docker directly, you need to mount a directory to access your files:

```bash
docker run --rm -v $(pwd)/tests/data:/data ghcr.io/ieeta-pt/vcfx:latest VCFX_tool_name [options]
docker run --rm -v $(pwd)/tests/data:/data ghcr.io/jorgemfs/vcfx:latest VCFX_tool_name [options]
```

When using Docker Compose, the `tests/data` directory is mounted by default:
Expand All @@ -115,7 +115,7 @@ You can modify the docker-compose.yml file to mount a different directory if nee
You can create complex pipelines by chaining VCFX tools:

```bash
docker run --rm -v $(pwd)/tests/data:/data ghcr.io/ieeta-pt/vcfx:latest 'cat /data/classifier_mixed.vcf | VCFX_variant_classifier --append-info | grep "VCF_CLASS=SNP" | VCFX_allele_freq_calc > /data/snp_frequencies.tsv'
docker run --rm -v $(pwd)/tests/data:/data ghcr.io/jorgemfs/vcfx:latest 'cat /data/classifier_mixed.vcf | VCFX_variant_classifier --append-info | grep "VCF_CLASS=SNP" | VCFX_allele_freq_calc > /data/snp_frequencies.tsv'
```

### Creating Shell Scripts
Expand All @@ -126,7 +126,7 @@ For complex workflows, consider creating a shell script:
#!/bin/bash
# save as vcfx_workflow.sh

docker run --rm -v $(pwd)/tests/data:/data ghcr.io/ieeta-pt/vcfx:latest 'cat /data/valid.vcf | \
docker run --rm -v $(pwd)/tests/data:/data ghcr.io/jorgemfs/vcfx:latest 'cat /data/valid.vcf | \
VCFX_validator | \
VCFX_variant_classifier --append-info | \
VCFX_allele_freq_calc > /data/pipeline_output.tsv'
Expand All @@ -147,7 +147,7 @@ If you encounter permission issues with files created in the container:

```bash
# Run the container with your user ID
docker run --rm -v $(pwd)/tests/data:/data -u $(id -u):$(id -g) ghcr.io/ieeta-pt/vcfx:latest VCFX_tool_name [options]
docker run --rm -v $(pwd)/tests/data:/data -u $(id -u):$(id -g) ghcr.io/jorgemfs/vcfx:latest VCFX_tool_name [options]
```

### Container Not Finding Commands
Expand All @@ -156,5 +156,5 @@ If the container can't find VCFX commands, ensure they were properly built in th

```bash
# List available VCFX tools in the container
docker run --rm ghcr.io/ieeta-pt/vcfx:latest 'ls -1 /usr/local/bin/VCFX_*'
docker run --rm ghcr.io/jorgemfs/vcfx:latest 'ls -1 /usr/local/bin/VCFX_*'
```
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ RUN apt-get update && apt-get install -y \
cmake \
git \
libz-dev \
python3 \
python3-dev \
&& rm -rf /var/lib/apt/lists/*

# Create a working directory
Expand Down Expand Up @@ -46,14 +48,15 @@ COPY --from=builder /app/build/src /usr/local/bin/
# Create a directory for data
WORKDIR /data

# Add the script that adds tools to PATH
# Add the helper scripts
COPY add_vcfx_tools_to_path.sh /usr/local/bin/
COPY docker_entrypoint.sh /usr/local/bin/

# Make the script executable
RUN chmod +x /usr/local/bin/add_vcfx_tools_to_path.sh
# Make them executable
RUN chmod +x /usr/local/bin/add_vcfx_tools_to_path.sh /usr/local/bin/docker_entrypoint.sh

# Set the entry point
ENTRYPOINT ["/bin/bash", "-c"]
# Use a custom entrypoint that sets up PATH for the tools
ENTRYPOINT ["/usr/local/bin/docker_entrypoint.sh"]

# Default command shows available tools
CMD ["echo 'VCFX Toolkit is ready. Run any VCFX tool by name, for example:' && ls -1 /usr/local/bin/VCFX_* | xargs -n1 basename"]
CMD ["bash", "-c", "echo 'VCFX Toolkit is ready. Run any VCFX tool by name, for example:' && ls -1 /usr/local/bin/VCFX_* | xargs -n1 basename"]
5 changes: 4 additions & 1 deletion PUBLISHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ This setup only needs to be done once. After this, the GitHub Actions workflow w

Before pushing any changes, you should test the documentation site locally:

1. Install the required dependencies:
1. Install the required dependencies. It's best to use a Python virtual
environment because some systems mark the system Python as
"externally managed", which can interfere with installation:
```bash
python3 -m venv venv && source venv/bin/activate
pip install mkdocs-material pymdown-extensions
```

Expand Down
Loading
Loading