Skip to content

Commit

Permalink
don't type empty files
Browse files Browse the repository at this point in the history
This causes errors.
  • Loading branch information
lh3 committed Nov 19, 2014
1 parent 61ab329 commit 56f1056
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README-alt.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bwa.kit/run-bwamem -o out hs38d6.fa read1.fq read2.fq | sh # skip "|sh" to show

This will generate the following files:

* `out.aln.sam.gz`: unsorted alignments with ALT-aware mapping quality. In this
* `out.aln.bam`: unsorted alignments with ALT-aware mapping quality. In this
file, one read may be placed on multiple overlapping ALT contigs at the same
time even if the read is mapped better to some contigs than others. This makes
it possible to analyze each contig independent of others.
Expand Down
5 changes: 5 additions & 0 deletions extras/typeHLA.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ preres="resource-human-HLA"
root=`dirname $0`
pre=$1.$2

if [ ! -s $pre.fq ]; then
echo '** Empty input file. Abort!' >&2
exit 0
fi

if [ $is_ctg -eq 0 ]; then
echo "** De novo assembling..." >&2
len=`$root/seqtk comp $pre.fq | awk '{++x;y+=$2}END{printf("%.0f\n", y/x)}'`
Expand Down

0 comments on commit 56f1056

Please sign in to comment.