Skip to content

Commit

Permalink
Merge pull request #5 from ny-shao/master
Browse files Browse the repository at this point in the history
Fix a bug in alignment of pair end data.
  • Loading branch information
ny-shao committed Sep 5, 2014
2 parents 074005b + cb50cee commit 9f20cc0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions bin/fastq2bam_by_bowtie.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/bash
#! /usr/bin/env bash
## To align fastq file to genome by bowtie
## $1: fastq file
## $2: bowtie index file with path
Expand Down Expand Up @@ -32,7 +32,7 @@ if [[ "${PE}" == "no" ]]; then
;;
esac
else
echo "${PE}"
FILE2=${FQDIR}/${FILENAME/R1/R2}
case "$EXT" in
fq | fastq | FQ | FASTQ ) bowtie -p ${CORES} -q -m 1 -v 3 --sam --best --strata ${BOWTIE_INDEX} \
-1 ${FILE} -2 ${FILE2} > ${SAM}
Expand All @@ -51,4 +51,3 @@ samtools sort -m 5G ${SAM/sam/nonSorted.bam} ${FQDIR}/${FILENAME_BASE}
samtools index ${SAM/sam/bam}
rm ${SAM} ${SAM/sam/nonSorted.bam}
mv ${SAM/sam/bam}* ${3}

3 changes: 2 additions & 1 deletion bin/fastq2bam_by_bowtie2.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/bash
#! /usr/bin/env bash
## To align fastq file to genome by bowtie
## $1: fastq file
## $2: bowtie2 index file with path
Expand Down Expand Up @@ -32,6 +32,7 @@ if [[ "$PE" == "no" ]]; then
;;
esac
else
FILE2=${FQDIR}/${FILENAME/R1/R2}
case "$EXT" in
fq | fastq | FQ | FASTQ ) bowtie2 -p ${CORES} -x ${BOWTIE_INDEX} \
-1 ${FILE} -2 ${FILE2} > ${SAM}
Expand Down

0 comments on commit 9f20cc0

Please sign in to comment.