diff --git a/README-alt.md b/README-alt.md index 6476c63..7d3a3c7 100644 --- a/README-alt.md +++ b/README-alt.md @@ -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. diff --git a/extras/typeHLA.sh b/extras/typeHLA.sh index 8b40d85..b5a2b4e 100755 --- a/extras/typeHLA.sh +++ b/extras/typeHLA.sh @@ -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)}'`