Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
69ebf2c
update: add dev container
Truongphi20 Jun 19, 2025
b2f6f8a
update: no need copy source code to container
Truongphi20 Jun 19, 2025
48002ed
update: install some package to debug and develop
Truongphi20 Jun 19, 2025
2726649
update: specify installed package version in dockerfile
Truongphi20 Jun 19, 2025
be477c8
update: config terminal using bashrc file
Truongphi20 Jun 20, 2025
0a3293f
update: setup cmake to run test concordance
Truongphi20 Jun 20, 2025
026b9e7
update: set odelaneau remote when build dev container
Truongphi20 Jun 20, 2025
66e68e5
update: process cmake built
Truongphi20 Jun 21, 2025
ded9138
update: success build concordance using cmake
Truongphi20 Jun 21, 2025
7738741
fix: fix squiggle on vscode
Truongphi20 Jun 21, 2025
d801e78
update: prepare to test concordance
Truongphi20 Jun 21, 2025
d5ecdc6
fix: fix squiggle in checker concordance
Truongphi20 Jun 22, 2025
3e5d025
update: success testing tmp file working normally, ready to do the test
Truongphi20 Jun 22, 2025
29caea2
update: no need seeding to get tmp file
Truongphi20 Jun 23, 2025
5d2208c
update: prepare inputs for first test
Truongphi20 Jun 23, 2025
efce8dd
fix: correct declare toolbox in cpp checker params
Truongphi20 Jun 23, 2025
247113c
update: success build to run test concordance itshelf vcf
Truongphi20 Jun 23, 2025
d0af9b5
fix: correctly get git infos
Truongphi20 Jun 23, 2025
5d401fc
update: testing on testcase 1
Truongphi20 Jun 23, 2025
312787a
update: success dry-run test vcf itself
Truongphi20 Jun 24, 2025
31a68ea
update: install packages for docs
Truongphi20 Jun 24, 2025
9a2af69
update: suppress warning
Truongphi20 Jun 24, 2025
10652bd
update: ignore tmp file used for testing
Truongphi20 Jul 7, 2025
22dc67b
update: remove symlink in concordance
Truongphi20 Jul 7, 2025
338aab9
update: success build split_ref
Truongphi20 Jul 7, 2025
33efc96
update: implement test case for split ref
Truongphi20 Jul 7, 2025
1834b91
update: delete make files
Truongphi20 Jul 8, 2025
bbbe9ba
update: refine build split_ref
Truongphi20 Jul 8, 2025
a37c1de
update: must build chunk first
Truongphi20 Jul 8, 2025
91e842a
update: success build chunker
Truongphi20 Jul 8, 2025
21e8d2d
update: correct test case for chunk
Truongphi20 Jul 8, 2025
aaffd27
update: ignore testing file
Truongphi20 Jul 9, 2025
c82fa40
update: success setup chunk test case
Truongphi20 Jul 19, 2025
9819f39
update: setup split reference test
Truongphi20 Jul 21, 2025
909ff3c
update: correct chr format
Truongphi20 Aug 5, 2025
7fbd194
update: succeed to run test case of split ref
Truongphi20 Aug 5, 2025
881f0ce
update: clean up symlinks in phase modules
Truongphi20 Aug 5, 2025
5f61c1e
update: setup cmakelist files to build testcase for phase
Truongphi20 Aug 5, 2025
d78ec70
update: fix path to build phase
Truongphi20 Aug 5, 2025
4979cd0
update: succeed to build phase module
Truongphi20 Aug 5, 2025
cfeb774
update: add find glob function to find input of phase from bin source…
Truongphi20 Aug 6, 2025
40312e5
update: setup input to run phase
Truongphi20 Aug 6, 2025
255d428
fix: remove duplicate function in phase
Truongphi20 Aug 6, 2025
f77fd53
update: succeed build executor for test phase
Truongphi20 Aug 7, 2025
93a9e90
update: succeed run test case of phase
Truongphi20 Aug 7, 2025
2bd0570
update: install samtools to debug
Truongphi20 Aug 7, 2025
60de71b
update: success build ligater
Truongphi20 Aug 7, 2025
0a6419e
update: mark generic property
Truongphi20 Aug 9, 2025
a41a777
update: try comment code and write docxygen docs
Truongphi20 Aug 10, 2025
7af30f7
update: replace by docxygen
Truongphi20 Aug 10, 2025
0773a44
update: devcontainer install dependencies to build doxygen
Truongphi20 Aug 10, 2025
b3c0bcb
update: setup doxygen
Truongphi20 Aug 10, 2025
ef58c91
update: use gpt to document chunk's stuffs
Truongphi20 Aug 10, 2025
3e710b9
update: add main page to reference
Truongphi20 Aug 10, 2025
8dcd710
update: use gpt write doc for phase (io - bam)
Truongphi20 Aug 11, 2025
57cc85d
update: doc io genotype_reader of phase
Truongphi20 Aug 11, 2025
ec59228
update: complete doc io of phase
Truongphi20 Aug 11, 2025
bb0e6a2
update: doc imputation hmm model
Truongphi20 Aug 11, 2025
79b65ae
update: doc phasing hmm model
Truongphi20 Aug 11, 2025
b42bc53
update: rename caller to spliter to distingish with phase
Truongphi20 Aug 12, 2025
6506bbd
update: create main build
Truongphi20 Aug 12, 2025
14d551f
update: doc concordance module
Truongphi20 Aug 12, 2025
7bf59ac
update: add doxygen for split ref
Truongphi20 Aug 14, 2025
7e77ad4
update: add Doxygen docs for ligater
Truongphi20 Aug 14, 2025
bbc9547
update: add action deploy Doxygen
Truongphi20 Aug 14, 2025
e7931f6
fix: workaround macro to build main of glimpse2
Truongphi20 Aug 14, 2025
15ca95e
Merge pull request #5 from Truongphi20/make-doc
Truongphi20 Aug 14, 2025
377df66
fix: correct doxygen workflow
Truongphi20 Aug 14, 2025
11dbc68
update: tidy main file
Truongphi20 Aug 15, 2025
2fb6762
chores: avoid duplicate code in cmake
Truongphi20 Aug 15, 2025
1bfb584
update: create doc with support files
Truongphi20 Aug 15, 2025
da72b5c
update: create build image and creating doxygen action
Truongphi20 Aug 15, 2025
6434901
update: make sure doxygen style is light mode
Truongphi20 Aug 15, 2025
0d01e80
Merge pull request #6 from Truongphi20/polishing
Truongphi20 Aug 15, 2025
db0d2df
fix: correct lowcase name of docker image
Truongphi20 Aug 15, 2025
e45d254
chores: rename to dev container
Truongphi20 Aug 15, 2025
075bac3
fix: correct doxygen action
Truongphi20 Aug 15, 2025
f9f2c89
Merge pull request #7 from Truongphi20/fix-action
Truongphi20 Aug 15, 2025
04a882a
update: supplement awsome-css
Truongphi20 Aug 15, 2025
b03c9c5
update: fix light mode for doc
Truongphi20 Aug 15, 2025
4f09cfd
Merge pull request #8 from Truongphi20/revise
Truongphi20 Aug 15, 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
  •  
  •  
  •  
157 changes: 157 additions & 0 deletions .devcontainer/.bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

# make less more friendly for non-text input files, see lesspipe(1)
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi

if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'

#alias grep='grep --color=auto'
#alias fgrep='fgrep --color=auto'
#alias egrep='egrep --color=auto'
fi

# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
# bash theme - partly inspired by https://github.com/ohmyzsh/ohmyzsh/blob/master/themes/robbyrussell.zsh-theme
__bash_prompt() {
local userpart='`export XIT=$? \
&& [ ! -z "${GITHUB_USER:-}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER:-} " || echo -n "\[\033[0;32m\]\u " \
&& [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`'
local gitbranch='`\
if [ "$(git config --get devcontainers-theme.hide-status 2>/dev/null)" != 1 ] && [ "$(git config --get codespaces-theme.hide-status 2>/dev/null)" != 1 ]; then \
export BRANCH="$(git --no-optional-locks symbolic-ref --short HEAD 2>/dev/null || git --no-optional-locks rev-parse --short HEAD 2>/dev/null)"; \
if [ "${BRANCH:-}" != "" ]; then \
echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH:-}" \
&& if [ "$(git config --get devcontainers-theme.show-dirty 2>/dev/null)" = 1 ] && \
git --no-optional-locks ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \
echo -n " \[\033[1;33m\]✗"; \
fi \
&& echo -n "\[\033[0;36m\]) "; \
fi; \
fi`'
local lightblue='\[\033[1;34m\]'
local removecolor='\[\033[0m\]'
PS1="${userpart} ${lightblue}\w ${gitbranch}${removecolor}\$ "
unset -f __bash_prompt
}
__bash_prompt
export PROMPT_DIRTRIM=4

# Check if the terminal is xterm
if [[ "$TERM" == "xterm" ]]; then
# Function to set the terminal title to the current command
preexec() {
local cmd="${BASH_COMMAND}"
echo -ne "\033]0;${USER}@${HOSTNAME}: ${cmd}\007"
}

# Function to reset the terminal title to the shell type after the command is executed
precmd() {
echo -ne "\033]0;${USER}@${HOSTNAME}: ${SHELL}\007"
}

# Trap DEBUG signal to call preexec before each command
trap 'preexec' DEBUG

# Append to PROMPT_COMMAND to call precmd before displaying the prompt
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND; }precmd"
fi
94 changes: 94 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
FROM ubuntu:20.04

LABEL org.opencontainers.image.created="2022-11-30"
LABEL org.opencontainers.image.url="https://github.com/odelaneau/GLIMPSE"
LABEL org.opencontainers.image.version="2.0.0"
LABEL org.opencontainers.image.licences="MIT"
LABEL org.opencontainers.image.title="glimpse"
LABEL org.opencontainers.image.authors="simone.rubinacci@unil.ch"

WORKDIR /docker_build/
# Set non-interactive mode for apt-get
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=America/New_York

# Install required packages for build
RUN apt-get update && apt-get install -y build-essential=12.8ubuntu1.1 \
libbz2-dev=1.0.8-2 \
libcurl4-openssl-dev=7.68.0-1ubuntu2.25 \
autoconf=2.69-11.1 \
libssl-dev=1.1.1f-1ubuntu2.24 \
wget=1.20.3-1ubuntu2.1 \
zlib1g-dev=1:1.2.11.dfsg-2ubuntu1.5 \
liblzma-dev=5.2.4-1ubuntu1.1 \
libdeflate-dev=1.5-3 \
python3=3.8.2-0ubuntu2 \
libboost-regex-dev=1.71.0.0ubuntu2\
libboost-iostreams-dev=1.71.0.0ubuntu2\
libboost-program-options-dev=1.71.0.0ubuntu2\
libhts-dev=1.10.2-3ubuntu0.1\
libboost-serialization-dev=1.71.0.0ubuntu2\
graphviz=2.42.2-3build2
# Install Doxygen 1.9.5
RUN wget https://www.doxygen.nl/files/doxygen-1.9.5.linux.bin.tar.gz && \
tar -xzf doxygen-1.9.5.linux.bin.tar.gz && \
mv doxygen-1.9.5 /opt/ && \
ln -sf /opt/doxygen-1.9.5/bin/doxygen /usr/local/bin/doxygen && \
rm doxygen-1.9.5.linux.bin.tar.gz

# Install required packages for docs
RUN apt-get update && apt-get install -y ruby-full=1:2.7+1
RUN gem install bundler -v 2.3.27

# Download and build boost program_options and iostreams
RUN wget https://archives.boost.io/release/1.78.0/source/boost_1_78_0.tar.gz && \
tar -xf boost_1_78_0.tar.gz && \
rm boost_1_78_0.tar.gz && \
cd boost_1_78_0/ && \
./bootstrap.sh --with-libraries=iostreams,program_options,serialization --prefix=../boost && \
./b2 install && \
cd .. && \
cp boost/lib/libboost_iostreams.a boost/lib/libboost_program_options.a boost/lib/libboost_serialization.a /usr/local/lib/ && \
cp -r boost/include/boost/ /usr/include/ && \
rm -r boost_1_78_0 boost

# Download and build htslib
RUN wget https://github.com/samtools/htslib/releases/download/1.16/htslib-1.16.tar.bz2 && \
tar -xf htslib-1.16.tar.bz2 && \
rm htslib-1.16.tar.bz2 && \
cd htslib-1.16 && \
autoheader && \
autoconf && \
./configure --enable-libcurl && \
make install && \
cd .. && \
rm -r htslib-1.16

# Install github
RUN apt-get install -y --no-install-recommends git=1:2.25.1-1ubuntu3.14

# Install cmake
RUN mkdir -p /usr/local
RUN cd /usr/local &&\
wget https://github.com/Kitware/CMake/releases/download/v4.0.2/cmake-4.0.2-linux-x86_64.sh &&\
chmod +x cmake-4.0.2-linux-x86_64.sh &&\
./cmake-4.0.2-linux-x86_64.sh --skip-license

# Install required packages to debug
ARG INSTALL_DEBUG_TOOLS=true
RUN if [ "$INSTALL_DEBUG_TOOLS" = "true" ]; then \
apt-get install -y --no-install-recommends openssh-client=1:8.2p1-4ubuntu0.13 &&\
apt-get install -y --no-install-recommends gdb=9.2-0ubuntu1~20.04.2 &&\
apt-get install -y --no-install-recommends bcftools=1.10.2-2 &&\
apt-get install -y --no-install-recommends less=551-1ubuntu0.3 &&\
apt-get install -y --no-install-recommends samtools=1.10-3 &&\
apt-get install -y --no-install-recommends bash-completion=1:2.10-1ubuntu1 ;\
fi

# Set up terminal
COPY .devcontainer/.bashrc /root/.bashrc


# Set workspace
RUN mkdir -p /workspace
WORKDIR /workspace
28 changes: 28 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "Dev Container",
"build": {
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "Dockerfile"
},
"postCreateCommand": "git config --global core.editor 'code --wait' && git remote add odelaneau git@github.com:odelaneau/GLIMPSE.git",
"customizations": {
"vscode": {
"extensions": [
"github.vscode-pull-request-github",
"ms-azuretools.vscode-docker",
"ms-vscode.cmake-tools",
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.cpptools-themes"
]
}
},
"remoteUser": "root",
"mounts": [
"source=${localEnv:HOME}/.ssh,target=/root/.ssh,type=bind,consistency=cached"
]
}
28 changes: 28 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build & Push Devcontainer Image

on:
workflow_dispatch:

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Docker image
run: |
# Convert GitHub username to lowercase
USERNAME=$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')
IMAGE_NAME=ghcr.io/$USERNAME/glimpse2-dev:latest
echo "Building Docker image $IMAGE_NAME"
docker build -t $IMAGE_NAME -f .devcontainer/Dockerfile .
echo "Pushing Docker image $IMAGE_NAME"
docker push $IMAGE_NAME
31 changes: 31 additions & 0 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build & Deploy Docs

on:
workflow_dispatch:

jobs:
docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Build and run container dynamically (lowercase)
run: |
# Lowercase the GitHub repository owner
USERNAME=$(echo "$GITHUB_REPOSITORY_OWNER" | tr '[:upper:]' '[:lower:]')

# Build full image name
IMAGE="ghcr.io/$USERNAME/glimpse2-dev:latest"
echo "Using image $IMAGE"

# Run container and build docs
docker run --rm -v "$PWD":/workspace -w /workspace $IMAGE \
/bin/bash -c "cmake -S . -B build -DTEST=OFF -DDOXY=ON && cmake --build build && touch docs/html/.nojekyll"

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: docs/html
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

# CMake
cmake-build-*/
build


##### Eclipse
Expand Down Expand Up @@ -105,3 +106,12 @@ tutorial/GLIMPSE_concordance/
tutorial/bin/

3rd_party/


# Testing files
*.txt.gz
*chr*.txt

# Ignore docs
docs/html
docs/latex
19 changes: 19 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/concordance/src/containers",
"${workspaceFolder}/build"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-x64",
"configurationProvider": "ms-vscode.makefile-tools"
}
],
"version": 4
}
Loading