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

add -z to disable markdup in align #121

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
15 changes: 10 additions & 5 deletions bin/speedseq
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ alignment options:

samblaster options:
-i include duplicates in splitters and discordants
-z do not mark duplicate
-c INT maximum number of split alignments for a read to be included in splitter file [2]
-m INT minimum non-overlapping base pairs between two alignments for a read to be included in splitter file [20]

Expand Down Expand Up @@ -239,6 +240,7 @@ global options:
RG_FMT=""
OUTPUT=""
INCLUDE_DUPS="--excludeDups"
MARK_DUPS=""
MAX_SPLIT_COUNT=2
MIN_NON_OVERLAP=20
THREADS=1
Expand All @@ -247,7 +249,7 @@ global options:
INS_DIST=""
SORT_MEM=20 # amount of memory for sorting, in gigabytes

while getopts ":hw:o:R:pic:m:M:t:T:I:vK:" OPTION
while getopts ":hw:o:R:pizc:m:M:t:T:I:vK:" OPTION
do
case "${OPTION}" in
h)
Expand All @@ -270,6 +272,9 @@ global options:
c)
MAX_SPLIT_COUNT="$OPTARG"
;;
z)
MARK_DUPS="--acceptDupMarks"
;;
m)
MIN_NON_OVERLAP="$OPTARG"
;;
Expand Down Expand Up @@ -422,7 +427,7 @@ global options:
then
echo -e "
$BWA mem -t $THREADS -p $INS_DIST $RG_FMT $REF $FQ | \\
$SAMBLASTER $INCLUDE_DUPS --addMateTags --maxSplitCount $MAX_SPLIT_COUNT --minNonOverlap $MIN_NON_OVERLAP --splitterFile $TEMP_DIR/spl_pipe --discordantFile $TEMP_DIR/disc_pipe | \\
$SAMBLASTER $INCLUDE_DUPS $MARK_DUPS --addMateTags --maxSplitCount $MAX_SPLIT_COUNT --minNonOverlap $MIN_NON_OVERLAP --splitterFile $TEMP_DIR/spl_pipe --discordantFile $TEMP_DIR/disc_pipe | \\
$SAMBAMBA view -S -f bam -l 0 /dev/stdin | \\
$SAMBAMBA sort -t $THREADS -m $((${SORT_MEM}-2))G --tmpdir=$TEMP_DIR/full -o $OUTPUT.bam /dev/stdin

Expand All @@ -436,7 +441,7 @@ global options:

echo "
$BWA mem -t $THREADS -p $INS_DIST $RG_FMT $REF $FQ | \
$SAMBLASTER $INCLUDE_DUPS --addMateTags --maxSplitCount $MAX_SPLIT_COUNT --minNonOverlap $MIN_NON_OVERLAP --splitterFile $TEMP_DIR/spl_pipe --discordantFile $TEMP_DIR/disc_pipe | \
$SAMBLASTER $INCLUDE_DUPS $MARK_DUPS --addMateTags --maxSplitCount $MAX_SPLIT_COUNT --minNonOverlap $MIN_NON_OVERLAP --splitterFile $TEMP_DIR/spl_pipe --discordantFile $TEMP_DIR/disc_pipe | \
$SAMBAMBA view -S -f bam -l 0 /dev/stdin | \
$SAMBAMBA sort -t $THREADS -m $((${SORT_MEM}-2))G --tmpdir=$TEMP_DIR/full -o $OUTPUT.bam /dev/stdin

Expand All @@ -452,7 +457,7 @@ global options:
then
echo -e "
$BWA mem -t $THREADS $INS_DIST $RG_FMT $REF $FQ1 $FQ2 | \\
$SAMBLASTER $INCLUDE_DUPS --addMateTags --maxSplitCount $MAX_SPLIT_COUNT --minNonOverlap $MIN_NON_OVERLAP --splitterFile $TEMP_DIR/spl_pipe --discordantFile $TEMP_DIR/disc_pipe | \\
$SAMBLASTER $INCLUDE_DUPS $MARK_DUPS --addMateTags --maxSplitCount $MAX_SPLIT_COUNT --minNonOverlap $MIN_NON_OVERLAP --splitterFile $TEMP_DIR/spl_pipe --discordantFile $TEMP_DIR/disc_pipe | \\
$SAMBAMBA view -S -f bam -l 0 /dev/stdin | \\
$SAMBAMBA sort -t $THREADS -m $((${SORT_MEM}-2))G --tmpdir=$TEMP_DIR/full -o $OUTPUT.bam /dev/stdin

Expand All @@ -466,7 +471,7 @@ global options:

echo "
$BWA mem -t $THREADS $INS_DIST $RG_FMT $REF $FQ1 $FQ2 | \
$SAMBLASTER $INCLUDE_DUPS --addMateTags --maxSplitCount $MAX_SPLIT_COUNT --minNonOverlap $MIN_NON_OVERLAP --splitterFile $TEMP_DIR/spl_pipe --discordantFile $TEMP_DIR/disc_pipe | \
$SAMBLASTER $INCLUDE_DUPS $MARK_DUPS --addMateTags --maxSplitCount $MAX_SPLIT_COUNT --minNonOverlap $MIN_NON_OVERLAP --splitterFile $TEMP_DIR/spl_pipe --discordantFile $TEMP_DIR/disc_pipe | \
$SAMBAMBA view -S -f bam -l 0 /dev/stdin | \
$SAMBAMBA sort -t $THREADS -m $((${SORT_MEM}-2))G --tmpdir=$TEMP_DIR/full -o $OUTPUT.bam /dev/stdin

Expand Down