Skip to content

Commit

Permalink
update r4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengzhenxian committed Jun 28, 2021
1 parent 2fbf193 commit 305bb88
Show file tree
Hide file tree
Showing 9 changed files with 105 additions and 51 deletions.
100 changes: 66 additions & 34 deletions README.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion docs/quick_demo/illumina_quick_demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ echo -e "${CONTIGS}\t${START_POS}\t${END_POS}" > ${INPUT_DIR}/quick_demo.bed
### Option 1. Docker pre-built image

```bash
BIN_VERSION='v0.1-r3'
BIN_VERSION='v0.1-r4'
THREADS=4
cd ${OUTPUT_DIR}

Expand Down Expand Up @@ -124,6 +124,8 @@ conda install -c conda-forge boost=1.67.0 -y
echo "Environment:" ${CONDA_PREFIX}
# Make sure in Clair3 directory
cd Clair3
# cd ${CONDA_PREFIX}/bin if installing Clair3 using bioconda

cd preprocess/realign
g++ -std=c++14 -O1 -shared -fPIC -o realigner ssw_cpp.cpp ssw.c realigner.cpp
g++ -std=c++11 -shared -fPIC -o debruijn_graph -O3 debruijn_graph.cpp -I ${CONDA_PREFIX}/include -L ${CONDA_PREFIX}/lib
Expand Down
2 changes: 1 addition & 1 deletion docs/quick_demo/ont_quick_demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ echo -e "${CONTIGS}\t${START_POS}\t${END_POS}" > ${INPUT_DIR}/quick_demo.bed

```bash
THREADS=4
BIN_VERSION="v0.1-r3"
BIN_VERSION="v0.1-r4"

cd ${OUTPUT_DIR}
# Run Clair3 using one command
Expand Down
2 changes: 1 addition & 1 deletion docs/quick_demo/pacbio_hifi_quick_demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ echo -e "${CONTIGS}\t${START_POS}\t${END_POS}" > ${INPUT_DIR}/quick_demo.bed

```bash
THREADS=4
BIN_VERSION="v0.1-r3"
BIN_VERSION="v0.1-r4"

cd ${OUTPUT_DIR}
# Run Clair3 using one command
Expand Down
14 changes: 8 additions & 6 deletions docs/training_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@

Download models from [here](http://www.bio8.cs.hku.hk/clair3/clair3_models/) or click on the links below.

| File | Platform | Training Samples | In the docker image by default | Link |
| :-------------: | :---------: | :--------------: | :----------------------------: | :----------------------------------------------------------: |
| ont.tar.gz | ONT | HG001,2,4,5 | Yes | [Download](http://www.bio8.cs.hku.hk/clair3/clair3_models/ont.tar.gz) |
| ont_1235.tar.gz | ONT | HG001,2,3,5 | | [Download](http://www.bio8.cs.hku.hk/clair3/clair3_models/ont_1235.tar.gz) |
| hifi.tar.gz | PacBio HiFi | HG001,2,4,5 | Yes | [Download](http://www.bio8.cs.hku.hk/clair3/clair3_models/hifi.tar.gz) |
| ilmn.tar.gz | Illumina | HG001,2,4,5 | Yes | [Download](http://www.bio8.cs.hku.hk/clair3/clair3_models/ilmn.tar.gz) |
| File | Platform | Training samples | Included in the bioconda package | Included in the docker image | Release | Date | Basecaller | Link |
| :---------------: | :---------: | :----------------------------------------------------------: | -------------------------------- | :--------------------------: | :-----: | :------: | :--------: | :----------------------------------------------------------: |
| ont.tar.gz | ONT | HG001,2,4,5 | Yes | Yes | 1 | 20210517 | Guppy3,4 | [Download](http://www.bio8.cs.hku.hk/clair3/clair3_models/ont.tar.gz) |
| ont_1235.tar.gz | ONT | HG001,2,3,5 | | | 1 | 20210517 | Guppy3,4 | [Download](http://www.bio8.cs.hku.hk/clair3/clair3_models/ont_1235.tar.gz) |
| ont_guppy5.tar.gz | ONT | Base model: HG001,2,4,5 (Guppy3,4) <br>Fine-tuning data: HG002 (Guppy5_sup) | Yes | Yes | 1 | 20210609 | Guppy5 | [Download](http://www.bio8.cs.hku.hk/clair3/clair3_models/ont_guppy5.tar.gz) |
| ont_guppy2.tar.gz | ONT | HG001,2,3,4 | | Yes | 1 | 20210627 | Guppy2 | [Download](http://www.bio8.cs.hku.hk/clair3/clair3_models/ont_guppy2.tar.gz) |
| hifi.tar.gz | PacBio HiFi | HG001,2,4,5 | Yes | Yes | 1 | 20210517 | NA | [Download](http://www.bio8.cs.hku.hk/clair3/clair3_models/hifi.tar.gz) |
| ilmn.tar.gz | Illumina | HG001,2,4,5 | Yes | Yes | 1 | 20210517 | NA | [Download](http://www.bio8.cs.hku.hk/clair3/clair3_models/ilmn.tar.gz) |
28 changes: 23 additions & 5 deletions scripts/clair3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ while true; do

-- ) shift; break; ;;
-h|--help ) print_help_messages; break ;;
* ) print_help_messages; exit 1 ;;
* ) print_help_messages; exit 0 ;;
esac
done

Expand Down Expand Up @@ -133,14 +133,20 @@ time ${PARALLEL} --retries ${RETRIES} -C ' ' --joblog ${LOG_PATH}/parallel_1_cal


echo "[INFO] Merge chunked contigs vcf files"
cat ${PILEUP_VCF_PATH}/pileup_*.vcf | ${PYPY} ${CLAIR3} SortVcf --output_fn ${OUTPUT_FOLDER}/pileup.vcf
${PYPY} ${CLAIR3} SortVcf \
--input_dir ${PILEUP_VCF_PATH} \
--vcf_fn_prefix "pileup" \
--output_fn ${OUTPUT_FOLDER}/pileup.vcf \
--sampleName ${SAMPLE} \
--ref_fn ${REFERENCE_FILE_PATH}

bgzip -f ${OUTPUT_FOLDER}/pileup.vcf
tabix -f -p vcf ${OUTPUT_FOLDER}/pileup.vcf.gz

if [ ${PILEUP_ONLY} == True ]; then
echo "[INFO] Only call pileup output with --pileup_only, output file: ${OUTPUT_FOLDER}/pileup.vcf.gz"
echo "[INFO] Finish calling!"
exit 1;
exit 0;
fi

# Whatshap phasing and haplotaging
Expand Down Expand Up @@ -221,7 +227,13 @@ time ${PARALLEL} --retries ${RETRIES} --joblog ${LOG_PATH}/parallel_6_call_var_b

##Merge pileup and full alignment vcf
##-----------------------------------------------------------------------------------------------------------------------
cat ${FULL_ALIGNMENT_OUTPUT_PATH}/full_alignment_*.vcf | ${PYPY} ${CLAIR3} SortVcf --output_fn ${OUTPUT_FOLDER}/full_alignment.vcf
${PYPY} ${CLAIR3} SortVcf \
--input_dir ${FULL_ALIGNMENT_OUTPUT_PATH} \
--vcf_fn_prefix "full_alignment" \
--output_fn ${OUTPUT_FOLDER}/full_alignment.vcf \
--sampleName ${SAMPLE} \
--ref_fn ${REFERENCE_FILE_PATH}

cat ${CANDIDATE_BED_PATH}/*.* > ${CANDIDATE_BED_PATH}/full_aln_regions
bgzip -f ${OUTPUT_FOLDER}/full_alignment.vcf
tabix -f -p vcf ${OUTPUT_FOLDER}/full_alignment.vcf.gz
Expand All @@ -245,7 +257,13 @@ time ${PARALLEL} --retries ${RETRIES} --joblog ${LOG_PATH}/parallel_7_merge_vcf.
--ref_fn ${REFERENCE_FILE_PATH} \
--ctgName {1}" ::: ${CHR[@]} |& tee ${LOG_PATH}/7_merge_vcf.log

cat ${TMP_FILE_PATH}/merge_output/merge_*.vcf | ${PYPY} ${CLAIR3} SortVcf --output_fn ${OUTPUT_FOLDER}/merge_output.vcf
${PYPY} ${CLAIR3} SortVcf \
--input_dir ${TMP_FILE_PATH}/merge_output \
--vcf_fn_prefix "merge" \
--output_fn ${OUTPUT_FOLDER}/merge_output.vcf \
--sampleName ${SAMPLE} \
--ref_fn ${REFERENCE_FILE_PATH}

if [ ${GVCF} == True ]; then cat ${TMP_FILE_PATH}/merge_output/merge_*.gvcf | ${PYPY} ${CLAIR3} SortVcf --output_fn ${OUTPUT_FOLDER}/merge_output.gvcf; fi
bgzip -f ${OUTPUT_FOLDER}/merge_output.vcf
tabix -f -p vcf ${OUTPUT_FOLDER}/merge_output.vcf.gz
Expand Down
2 changes: 1 addition & 1 deletion scripts/clair3_hifi_quick_demo.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PLATFORM='hifi'
INPUT_DIR="${HOME}/clair3_pacbio_hifi_quickDemo"
OUTPUT_DIR="${INPUT_DIR}/output"
THREADS=4
BIN_VERSION="v0.1-r3"
BIN_VERSION="v0.1-r4"

## Create local directory structure
mkdir -p ${INPUT_DIR}
Expand Down
2 changes: 1 addition & 1 deletion scripts/clair3_ilmn_quick_demo.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PLATFORM='ilmn'
INPUT_DIR="${HOME}/clair3_illumina_quickDemo"
OUTPUT_DIR="${INPUT_DIR}/output"
THREADS=4
BIN_VERSION="v0.1-r3"
BIN_VERSION="v0.1-r4"

## Create local directory structure
mkdir -p ${INPUT_DIR}
Expand Down
2 changes: 1 addition & 1 deletion scripts/clair3_ont_quick_demo.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PLATFORM='ont'
INPUT_DIR="${HOME}/clair3_ont_quickDemo"
OUTPUT_DIR="${INPUT_DIR}/output"
THREADS=4
BIN_VERSION="v0.1-r3"
BIN_VERSION="v0.1-r4"

## Create local directory structure
mkdir -p ${INPUT_DIR}
Expand Down

0 comments on commit 305bb88

Please sign in to comment.