Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace bwa with bwa-mem2 #50

Open
wants to merge 3 commits into
base: beta_test
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "tools/FastQC"]
path = tools/FastQC
url = https://github.com/s-andrews/FastQC
[submodule "tools/bwa"]
path = tools/bwa
url = https://github.com/lh3/bwa.git
[submodule "tools/bam-readcount"]
path = tools/bam-readcount
url = https://github.com/genome/bam-readcount
Expand Down
2 changes: 1 addition & 1 deletion RScripts/Report.Rnw
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ if(dim(germ_all$muts_tab)[1] == 0){
\begin{itemize}
\item FastQC: 0.11.10.devel
\item Trimmomatic: 0.39
\item BWA: 0.7.17-r1198-dirty
\item bwa-mem2: 2.2.1
\item bam-readcount: 0.8.0-unstable-7-625eea2
\item samtools 1.10
\item GATK: 3.8-1-0-gf15c1c3ef
Expand Down
2 changes: 1 addition & 1 deletion RScripts/Report_Panel.Rnw
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ if(dim(som_all$muts_tab)[1] == 0) {
\begin{itemize}
\item FastQC: 0.11.10.devel
\item Trimmomatic: 0.39
\item BWA: 0.7.17-r1198-dirty
\item bwa-mem2: 2.2.1
\item bam-readcount: 0.8.0-unstable-7-625eea2
\item samtools 1.10
\item GATK: 3.8-1-0-gf15c1c3ef
Expand Down
2 changes: 1 addition & 1 deletion RScripts/Report_tumorOnly.Rnw
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ if(dim(som_all$muts_tab)[1] == 0) {
\begin{itemize}
\item FastQC: 0.11.10.devel
\item Trimmomatic: 0.39
\item BWA: 0.7.17-r1198-dirty
\item bwa-mem2: 2.2.1
\item bam-readcount: 0.8.0-unstable-7-625eea2
\item samtools 1.10
\item GATK: 3.8-1-0-gf15c1c3ef
Expand Down
4 changes: 4 additions & 0 deletions make_alignment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ ${BIN_FASTQC} "${fastq_o1_p_t}" -o "${DIR_WES}"
${BIN_FASTQC} "${fastq_o2_p_t}" -o "${DIR_WES}"

# make bam
if [ ! -f "${FILE_GENOME}.bwt.2bit.64" ]; then
echo "bwa-mem2 index not existing. Generating ..."
${BIN_BWAMEMINDEX} ${FILE_GENOME}
fi
${BIN_BWAMEM} -R "@RG\tID:${NameD}\tSM:${NameD}\tPL:illumina\tLB:lib1\tPU:unit1" -t "${CFG_COMMON_CPUCORES}" "${FILE_GENOME}" \
"${fastq_o1_p_t}" "${fastq_o2_p_t}" | ${BIN_SAMVIEW} -bS - >"${bam}"

Expand Down
4 changes: 4 additions & 0 deletions make_panel_alignment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ do
${BIN_FASTQC} ${fastq_o2_p_t} -o ${DIR_WES}

# make bam
if [ ! -f "${FILE_GENOME}.bwt.2bit.64" ]; then
echo "bwa-mem2 index not existing. Generating ..."
${BIN_BWAMEMINDEX} ${FILE_GENOME}
fi
${BIN_BWAMEM} -R "@RG\tID:${NameD}\tSM:${NameD}\tPL:illumina\tLB:lib1\tPU:unit1" -t "${CFG_COMMON_CPUCORES}" "${FILE_GENOME}" \
${fastq_o1_p_t} ${fastq_o2_p_t} | ${BIN_SAMVIEW} -bS - > ${tmpbam}

Expand Down
4 changes: 4 additions & 0 deletions make_tumorOnly_alignment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ ${BIN_FASTQC} "${fastq_o1_p_t}" -o "${DIR_WES}"
${BIN_FASTQC} "${fastq_o2_p_t}" -o "${DIR_WES}"

# make bam
if [ ! -f "${FILE_GENOME}.bwt.2bit.64" ]; then
echo "bwa-mem2 index not existing. Generating ..."
${BIN_BWAMEMINDEX} ${FILE_GENOME}
fi
${BIN_BWAMEM} -R "@RG\tID:${NameD}\tSM:${NameD}\tPL:illumina\tLB:lib1\tPU:unit1" -t "${CFG_COMMON_CPUCORES}" "${FILE_GENOME}" \
"${fastq_o1_p_t}" "${fastq_o2_p_t}" | ${BIN_SAMVIEW} -bS - >"${bam}"

Expand Down
4 changes: 3 additions & 1 deletion programs.cfg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ readonly DIR_TRIMMOMATIC_ADAPTER="${DIR_TOOLS}/Trimmomatic/adapters"
readonly BIN_CUT="cut -f1,2,3"

# Alignment
readonly BIN_BWAMEM="${DIR_TOOLS}/bwa/bwa mem -M "
readonly BIN_BWAMEM="${DIR_TOOLS}/bwa-mem2/bwa-mem2 mem -M "
readonly BIN_BWAMEMINDEX="${DIR_TOOLS}/bwa-mem2/bwa-mem2 index"

# BAM-Readcount
readonly BIN_BAM_READCOUNT="${DIR_TOOLS}/bam-readcount/bin/bam-readcount -q ${CFG_SAMTOOLS_MPILEUP_MINMQ} -b ${CFG_GENERAL_MINBASEQUAL} -w 1 -f ${FILE_GENOME} "
Expand Down Expand Up @@ -573,6 +574,7 @@ export DIR_TRIMMOMATIC_ADAPTER
export BIN_CUT

export BIN_BWAMEM
export BIN_BWAMEMINDEX

export BIN_BAM_READCOUNT

Expand Down
1 change: 0 additions & 1 deletion tools/bwa
Submodule bwa deleted from 3072c8
10 changes: 6 additions & 4 deletions tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,13 @@ mv ${DIR_SCRIPT}/bam-readcount/build/bin ${DIR_SCRIPT}/bam-readcount/bin
rm -rf ${DIR_SCRIPT}/bam-readcount/build

#######
# bwa #
# bwa-mem2 #
#######
cd ${DIR_SCRIPT}/bwa && make && chmod +x bwa
rm -f *.o

cd ${DIR_SCRIPT}
wget https://github.com/bwa-mem2/bwa-mem2/releases/download/v2.2.1/bwa-mem2-2.2.1_x64-linux.tar.bz2 -O bwa-mem2.tar.bz2
tar -xf bwa-mem2.tar.bz2
rm bwa-mem2*.tar.bz2
mv bwa-mem2* bwa-mem2

##########
# htslib #
Expand Down