Skip to content

Commit 0c135c1

Browse files
committed
Merge branch 'chrisgulvik-master' for stampy fixes
2 parents 5def05d + cc6a927 commit 0c135c1

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ scripts/raxmlHPC-PTHREADS: scripts/raxmlHPC
148148
# been installed and so it shouldn't depend on a file existing and
149149
# should run no matter what. CPAN will know if the module will be
150150
# there.
151-
# TODO I should probably have an individual install command per
152-
# module so that Make can do its job.
153151
install-perlModules: lib/lib/perl5/Config/Simple.pm lib/lib/perl5/File/Slurp.pm lib/lib/perl5/Math/Round.pm lib/lib/perl5/Number/Range.pm lib/lib/perl5/Statistics/Distributions.pm lib/lib/perl5/Statistics/Basic.pm lib/lib/perl5/Graph/Centrality/Pagerank.pm lib/lib/perl5/String/Escape.pm lib/lib/perl5/Statistics/LineFit.pm
154152
@echo "Done with Perl modules"
155153
lib/lib/perl5/Config/Simple.pm:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ See: [examples.md](docs/EXAMPLES.md) for more details.
8585

8686
The script `set_manage.pl` sets up the project directory and adds reads, and you should use the following syntax. Note that paired end reads should be in interleaved format. Scripts that interleave reads include `run_assembly_shuffleReads.pl` in the CG-Pipeline package (included with `make install`) and also `shuffleSequences_fastq.pl` in the Velvet package.
8787

88-
# Shuffle your reads if they are not already.
88+
# Shuffle your reads if they are not shuffled already.
8989
$ shuffleSplitReads.pl some/directory/*.fastq.gz -o interleaved # interleaved directory will be created for you
9090
# Create the project directory `setTest`
9191
$ set_manage.pl --create setTest

scripts/launch_stampy.sh

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/bin/bash
22

33

4-
SCRIPT=$(basename $0);
4+
set -e
5+
56
function usage() {
67
echo "
7-
Usage: $SCRIPT -f file.fastq[.gz] -b file.bam -t tmp/ -r reference.fasta [-s '']
8+
Usage: `basename $0` -f file.fastq[.gz] -b file.bam -t tmp/ -r reference.fasta [-s '']
89
910
-t [default: ./tmp] Path to temporary directory
1011
-n [default: 1] Number of threads to use
@@ -118,30 +119,22 @@ else
118119
exit 1
119120
fi
120121

122+
121123
# Add onto xopts so that files can be overwritten
122124
# and so that we don't worry whether XOPTS is an empty variable.
123-
XOPTS="$XOPTS --overwrite ";
125+
XOPTS="$XOPTS --overwrite "
124126
# Map with stampy
125127
COMMAND="stampy.py -g $REFERENCE -h $REFERENCE -t $CPUS --substitutionrate=0.01 --minposterior=20 --sensitive --inputformat=fastq -f sam -o $TMP/$OUT_PREFIX.sam --insertsize=500 --insertsd=250 -M $STAMPY_READS $XOPTS"
126128
eval $COMMAND
127-
if [ $? -gt 0 ]; then
128-
echo "ERROR running command: $COMMAND";
129-
exit 1;
130-
fi;
131-
132129

133130

134131
# Post-processing of mapped sequences
135132
if [ -s "$TMP"/"$OUT_PREFIX".sam ]; then
136133
# Convert output to binary, sort according to reference position/coordinate, and index
137134
samtools view -@ "$CPUS" -bSh "$TMP"/"$OUT_PREFIX".sam -o "$TMP"/"$OUT_PREFIX".unsorted.bam -T "$REFERENCE"
138-
if [ $? -gt 0 ]; then exit 1; fi;
139135
samtools sort -@ "$CPUS" "$TMP"/"$OUT_PREFIX".unsorted.bam -O bam -o "$TMP"/"$OUT_PREFIX".sorted.bam -T "$BAM"
140-
if [ $? -gt 0 ]; then exit 1; fi;
141136
mv -v "$TMP"/"$OUT_PREFIX".sorted.bam "$BAM"
142-
if [ $? -gt 0 ]; then exit 1; fi;
143137
samtools index -b "$BAM"
144-
if [ $? -gt 0 ]; then exit 1; fi;
145138

146139
# Cleanup
147140
rm -fv "$TMP"/"$OUT_PREFIX".sam "$TMP"/"$OUT_PREFIX".unsorted.bam "$TMP"/"$OUT_PREFIX".[12].fastq

0 commit comments

Comments
 (0)