[med-svn] [picard-tools] 01/09: Imported Upstream version 1.106

Charles Plessy plessy at moszumanska.debian.org
Sat Mar 22 01:56:47 UTC 2014


This is an automated email from the git hooks/post-receive script.

plessy pushed a commit to branch master
in repository picard-tools.

commit efaffda61888752ca162ed1f04f3d5b7f6636d1c
Author: Charles Plessy <plessy at debian.org>
Date:   Sat Mar 22 10:37:13 2014 +0900

    Imported Upstream version 1.106
---
 Picard-public.ipr                                  |   4 +
 build.xml                                          |   6 +-
 src/c/inteldeflater/IntelDeflater.c                | 247 +++++++++
 .../net/sf/picard/cmdline/CommandLineProgram.java  |   6 +-
 src/java/net/sf/picard/fastq/BasicFastqWriter.java |  19 +-
 .../sf/picard/fastq/Casava18ReadNameEncoder.java   |  46 ++
 src/java/net/sf/picard/fastq/FastqReader.java      |  33 +-
 .../net/sf/picard/fastq/FastqWriterFactory.java    |   6 +-
 .../sf/picard/fastq/IlluminaReadNameEncoder.java   |  28 +
 src/java/net/sf/picard/fastq/ReadNameEncoder.java  |  17 +
 .../picard/illumina/ClusterDataToSamConverter.java |  10 +-
 .../picard/illumina/ExtractIlluminaBarcodes.java   | 246 +++++----
 .../picard/illumina/IlluminaBasecallsToFastq.java  |  86 +++-
 .../parser/readers/TileMetricsOutReader.java       |   9 +-
 src/java/net/sf/picard/io/IoUtil.java              |  12 +-
 .../net/sf/picard/metrics/MultiLevelCollector.java |  36 +-
 src/java/net/sf/picard/pedigree/PedFile.java       |  76 ++-
 src/java/net/sf/picard/pedigree/PedTrio.java       |  45 --
 .../reference/ReferenceSequenceFileFactory.java    |   2 +
 .../net/sf/picard/sam/AbstractAlignmentMerger.java |  71 ++-
 src/java/net/sf/picard/sam/CleanSam.java           |   6 +-
 src/java/net/sf/picard/sam/FastqToSam.java         |  14 +-
 src/java/net/sf/picard/sam/HitsForInsert.java      |   5 +
 src/java/net/sf/picard/sam/MarkDuplicates.java     |   4 +-
 .../sf/picard/sam/MultiHitAlignedReadIterator.java |  54 +-
 src/java/net/sf/picard/sam/SamAlignmentMerger.java |   5 +-
 src/java/net/sf/picard/sam/SamPairUtil.java        |  15 +
 src/java/net/sf/picard/sam/SamToFastq.java         |   9 +-
 src/java/net/sf/picard/sam/ValidateSamFile.java    |   5 +-
 src/java/net/sf/picard/util/IlluminaUtil.java      |   9 -
 src/java/net/sf/picard/util/IntervalUtil.java      |  21 +-
 src/java/net/sf/picard/util/MathUtil.java          | 110 +++-
 src/java/net/sf/picard/util/ProgressLogger.java    |  17 +-
 src/java/net/sf/picard/util/SamLocusIterator.java  |   5 +-
 .../sf/picard/util/SamRecordIntervalIterator.java  | 188 -------
 .../util/SamRecordIntervalIteratorFactory.java     |  13 +-
 src/java/net/sf/picard/vcf/MakeSitesOnlyVcf.java   |   2 +-
 src/java/net/sf/samtools/AbstractBAMFileIndex.java | 114 ++---
 src/java/net/sf/samtools/BAMFileReader.java        | 419 ++++++++++-----
 src/java/net/sf/samtools/CachingBAMFileIndex.java  |  34 +-
 src/java/net/sf/samtools/Chunk.java                |  50 +-
 src/java/net/sf/samtools/Defaults.java             |   9 +
 .../net/sf/samtools/DiskBasedBAMFileIndex.java     |  14 +-
 src/java/net/sf/samtools/SAMFileHeader.java        |   5 +-
 src/java/net/sf/samtools/SAMFileReader.java        | 224 +++++++-
 src/java/net/sf/samtools/SAMFileSpan.java          |  48 +-
 .../net/sf/samtools/SAMSequenceDictionary.java     |  28 +
 src/java/net/sf/samtools/SAMSequenceRecord.java    |  10 +
 src/java/net/sf/samtools/SAMTextReader.java        |   5 +
 src/java/net/sf/samtools/SAMUtils.java             |   2 +-
 .../seekablestream/ISeekableStreamFactory.java     |  33 ++
 .../samtools/seekablestream/SeekableFTPStream.java |   2 +-
 .../seekablestream/SeekableStreamFactory.java      |  56 +-
 .../samtools/util/BlockCompressedOutputStream.java |   8 +-
 src/java/net/sf/samtools/util/CollectionUtil.java  |   8 +
 src/java/net/sf/samtools/util/IOUtil.java          |   2 +-
 src/java/net/sf/samtools/util/Lazy.java            |  35 ++
 src/java/net/sf/samtools/util/StringUtil.java      |   5 +
 src/java/net/sf/samtools/util/ftp/FTPUtils.java    |  20 +-
 .../net/sf/samtools/util/zip/DeflaterFactory.java  |  78 +++
 .../net/sf/samtools/util/zip/IntelDeflater.java    | 567 +++++++++++++++++++++
 src/java/net/sf/samtools/util/zip/ZStreamRef.java  |  48 ++
 .../org/broad/tribble/AbstractFeatureReader.java   |  47 +-
 src/java/org/broad/tribble/TabixFeatureReader.java |   5 +
 src/java/org/broad/tribble/Tribble.java            |   5 +-
 .../broad/tribble/TribbleIndexedFeatureReader.java |  10 +-
 .../org/broad/tribble/readers/TabixReader.java     |  23 +-
 src/java/org/broad/tribble/util/ParsingUtils.java  |  29 ++
 .../variant/variantcontext/Allele.java             |  17 +-
 .../variant/variantcontext/VariantContext.java     |  72 ++-
 .../variantcontext/VariantContextBuilder.java      |  17 +-
 .../variantcontext/VariantContextComparator.java   |  23 +-
 .../variantcontext/VariantContextUtils.java        |  61 ++-
 .../variantcontext/writer/BCF2FieldEncoder.java    |  16 +-
 .../variant/variantcontext/writer/BCF2Writer.java  |  27 +-
 .../writer/IndexingVariantContextWriter.java       |  82 ++-
 .../writer/IntGenotypeFieldAccessors.java          |   2 +-
 .../variant/variantcontext/writer/VCFWriter.java   | 499 +++---------------
 .../writer/VariantContextWriterFactory.java        |  21 +-
 .../variant/vcf/AbstractVCFCodec.java              |  52 +-
 .../variant/vcf/VCFContigHeaderLine.java           |   2 +-
 .../org/broadinstitute/variant/vcf/VCFEncoder.java | 381 ++++++++++++++
 .../org/broadinstitute/variant/vcf/VCFHeader.java  |   4 +-
 .../broadinstitute/variant/vcf/VCFRecordCodec.java |  63 +++
 src/scripts/build_intel_deflater.sh                |  64 +++
 .../net/sf/picard/analysis/rnaSeqCoverage.R        |  43 +-
 src/scripts/release_picard.sh                      |   3 +-
 .../illumina/IlluminaBasecallsToFastqTest.java     |  16 +-
 src/tests/java/net/sf/picard/io/IoUtilTest.java    |  12 +
 src/tests/java/net/sf/picard/sam/CleanSamTest.java |  78 +++
 .../java/net/sf/picard/sam/FastqToSamTest.java     |  77 +--
 .../net/sf/picard/sam/MergeBamAlignmentTest.java   |  21 +-
 .../java/net/sf/picard/sam/SamToFastqTest.java     |   3 +-
 .../java/net/sf/picard/util/MathUtilTest.java      |  45 ++
 .../java/net/sf/picard/vcf/MergeVcfsTest.java      |  12 +-
 .../java/net/sf/picard/vcf/SplitVcfsTest.java      |  16 +-
 .../java/net/sf/samtools/BAMFileIndexTest.java     |  96 +++-
 .../variantcontext/VariantJEXLContextUnitTest.java |   2 +-
 .../variantcontext/writer/VCFWriterUnitTest.java   |  67 +--
 .../broadinstitute/variant/vcf/VCFEncoderTest.java |  45 ++
 .../IlluminaBasecallsToFastqTest/AACTTGAC.1.fastq  |  26 +-
 .../AACTTGAC.barcode_1.fastq                       |  26 +-
 .../AACTTGACTTGAGCCT.1.fastq                       |  26 +-
 .../AACTTGACTTGAGCCT.barcode_1.fastq               |  26 +-
 .../AACTTGACTTGAGCCT.barcode_2.fastq               |  26 +-
 .../IlluminaBasecallsToFastqTest/AAGGATGT.1.fastq  |  26 +-
 .../AAGGATGT.barcode_1.fastq                       |  26 +-
 .../AAGGATGTTTCGCTGA.1.fastq                       |  26 +-
 .../AAGGATGTTTCGCTGA.barcode_1.fastq               |  26 +-
 .../AAGGATGTTTCGCTGA.barcode_2.fastq               |  26 +-
 .../IlluminaBasecallsToFastqTest/ACCAACTG.1.fastq  |  18 +-
 .../ACCAACTG.barcode_1.fastq                       |  18 +-
 .../ACCAACTGTGTCGGAT.1.fastq                       |  18 +-
 .../ACCAACTGTGTCGGAT.barcode_1.fastq               |  18 +-
 .../ACCAACTGTGTCGGAT.barcode_2.fastq               |  18 +-
 .../IlluminaBasecallsToFastqTest/AGCAATTC.1.fastq  |  16 +-
 .../AGCAATTC.barcode_1.fastq                       |  16 +-
 .../AGCAATTCTGCTCGAC.1.fastq                       |  16 +-
 .../AGCAATTCTGCTCGAC.barcode_1.fastq               |  16 +-
 .../AGCAATTCTGCTCGAC.barcode_2.fastq               |  16 +-
 .../IlluminaBasecallsToFastqTest/AGTTGCTT.1.fastq  |  16 +-
 .../AGTTGCTT.barcode_1.fastq                       |  16 +-
 .../AGTTGCTTTCTGGCGA.1.fastq                       |  16 +-
 .../AGTTGCTTTCTGGCGA.barcode_1.fastq               |  16 +-
 .../AGTTGCTTTCTGGCGA.barcode_2.fastq               |  16 +-
 .../IlluminaBasecallsToFastqTest/ATTATGTT.1.fastq  |   6 +-
 .../ATTATGTT.barcode_1.fastq                       |   6 +-
 .../ATTATGTTTCGGAATG.1.fastq                       |   6 +-
 .../ATTATGTTTCGGAATG.barcode_1.fastq               |   6 +-
 .../ATTATGTTTCGGAATG.barcode_2.fastq               |   6 +-
 .../IlluminaBasecallsToFastqTest/CACATCCT.1.fastq  |  18 +-
 .../CACATCCT.barcode_1.fastq                       |  18 +-
 .../CACATCCTTACTTAGC.1.fastq                       |  18 +-
 .../CACATCCTTACTTAGC.barcode_1.fastq               |  18 +-
 .../CACATCCTTACTTAGC.barcode_2.fastq               |  18 +-
 .../IlluminaBasecallsToFastqTest/CAGGAGCC.1.fastq  |  18 +-
 .../CAGGAGCC.barcode_1.fastq                       |  18 +-
 .../CAGGAGCCGTATAACA.1.fastq                       |  18 +-
 .../CAGGAGCCGTATAACA.barcode_1.fastq               |  18 +-
 .../CAGGAGCCGTATAACA.barcode_2.fastq               |  18 +-
 .../IlluminaBasecallsToFastqTest/CATAGCGA.1.fastq  |  24 +-
 .../CATAGCGA.barcode_1.fastq                       |  24 +-
 .../CATAGCGAGGTCCAGA.1.fastq                       |  24 +-
 .../CATAGCGAGGTCCAGA.barcode_1.fastq               |  24 +-
 .../CATAGCGAGGTCCAGA.barcode_2.fastq               |  24 +-
 .../IlluminaBasecallsToFastqTest/CATGCTTA.1.fastq  |  10 +-
 .../CATGCTTA.barcode_1.fastq                       |  10 +-
 .../CATGCTTAGCACATCT.1.fastq                       |  10 +-
 .../CATGCTTAGCACATCT.barcode_1.fastq               |  10 +-
 .../CATGCTTAGCACATCT.barcode_2.fastq               |  10 +-
 .../IlluminaBasecallsToFastqTest/CCAGTTAG.1.fastq  |  22 +-
 .../CCAGTTAG.barcode_1.fastq                       |  22 +-
 .../CCAGTTAGGCACACGA.1.fastq                       |  22 +-
 .../CCAGTTAGGCACACGA.barcode_1.fastq               |  22 +-
 .../CCAGTTAGGCACACGA.barcode_2.fastq               |  22 +-
 .../IlluminaBasecallsToFastqTest/CCTACCAT.1.fastq  |   4 +-
 .../CCTACCAT.barcode_1.fastq                       |   4 +-
 .../CCTACCATCTACCAGG.1.fastq                       |   4 +-
 .../CCTACCATCTACCAGG.barcode_1.fastq               |   4 +-
 .../CCTACCATCTACCAGG.barcode_2.fastq               |   4 +-
 .../IlluminaBasecallsToFastqTest/CTACCAGG.1.fastq  |  12 +-
 .../CTACCAGG.barcode_1.fastq                       |  12 +-
 .../CTACCAGGCCTACCAT.1.fastq                       |  12 +-
 .../CTACCAGGCCTACCAT.barcode_1.fastq               |  12 +-
 .../CTACCAGGCCTACCAT.barcode_2.fastq               |  12 +-
 .../IlluminaBasecallsToFastqTest/GCACACGA.1.fastq  |  18 +-
 .../GCACACGA.barcode_1.fastq                       |  18 +-
 .../GCACACGACCAGTTAG.1.fastq                       |  18 +-
 .../GCACACGACCAGTTAG.barcode_1.fastq               |  18 +-
 .../GCACACGACCAGTTAG.barcode_2.fastq               |  18 +-
 .../IlluminaBasecallsToFastqTest/GCACATCT.1.fastq  |   6 +-
 .../GCACATCT.barcode_1.fastq                       |   6 +-
 .../GCACATCTCATGCTTA.1.fastq                       |   6 +-
 .../GCACATCTCATGCTTA.barcode_1.fastq               |   6 +-
 .../GCACATCTCATGCTTA.barcode_2.fastq               |   6 +-
 .../IlluminaBasecallsToFastqTest/GGTCCAGA.1.fastq  |  14 +-
 .../GGTCCAGA.barcode_1.fastq                       |  14 +-
 .../GGTCCAGACATAGCGA.1.fastq                       |  14 +-
 .../GGTCCAGACATAGCGA.barcode_1.fastq               |  14 +-
 .../GGTCCAGACATAGCGA.barcode_2.fastq               |  14 +-
 .../IlluminaBasecallsToFastqTest/GTATAACA.1.fastq  |  20 +-
 .../GTATAACA.barcode_1.fastq                       |  20 +-
 .../GTATAACACAGGAGCC.1.fastq                       |  20 +-
 .../GTATAACACAGGAGCC.barcode_1.fastq               |  20 +-
 .../GTATAACACAGGAGCC.barcode_2.fastq               |  20 +-
 .../IlluminaBasecallsToFastqTest/N.1.fastq         | 446 ++++++++--------
 .../IlluminaBasecallsToFastqTest/N.barcode_1.fastq | 446 ++++++++--------
 .../IlluminaBasecallsToFastqTest/NN.1.fastq        | 446 ++++++++--------
 .../NN.barcode_1.fastq                             | 446 ++++++++--------
 .../NN.barcode_2.fastq                             | 446 ++++++++--------
 .../IlluminaBasecallsToFastqTest/TACTTAGC.1.fastq  |  16 +-
 .../TACTTAGC.barcode_1.fastq                       |  16 +-
 .../TACTTAGCCACATCCT.1.fastq                       |  16 +-
 .../TACTTAGCCACATCCT.barcode_1.fastq               |  16 +-
 .../TACTTAGCCACATCCT.barcode_2.fastq               |  16 +-
 .../IlluminaBasecallsToFastqTest/TCGGAATG.1.fastq  |  14 +-
 .../TCGGAATG.barcode_1.fastq                       |  14 +-
 .../TCGGAATGATTATGTT.1.fastq                       |  14 +-
 .../TCGGAATGATTATGTT.barcode_1.fastq               |  14 +-
 .../TCGGAATGATTATGTT.barcode_2.fastq               |  14 +-
 .../IlluminaBasecallsToFastqTest/TCTGGCGA.1.fastq  |  10 +-
 .../TCTGGCGA.barcode_1.fastq                       |  10 +-
 .../TCTGGCGAAGTTGCTT.1.fastq                       |  10 +-
 .../TCTGGCGAAGTTGCTT.barcode_1.fastq               |  10 +-
 .../TCTGGCGAAGTTGCTT.barcode_2.fastq               |  10 +-
 .../IlluminaBasecallsToFastqTest/TGCTCGAC.1.fastq  |  10 +-
 .../TGCTCGAC.barcode_1.fastq                       |  10 +-
 .../TGCTCGACAGCAATTC.1.fastq                       |  10 +-
 .../TGCTCGACAGCAATTC.barcode_1.fastq               |  10 +-
 .../TGCTCGACAGCAATTC.barcode_2.fastq               |  10 +-
 .../IlluminaBasecallsToFastqTest/TGTCGGAT.1.fastq  |   8 +-
 .../TGTCGGAT.barcode_1.fastq                       |   8 +-
 .../TGTCGGATACCAACTG.1.fastq                       |   8 +-
 .../TGTCGGATACCAACTG.barcode_1.fastq               |   8 +-
 .../TGTCGGATACCAACTG.barcode_2.fastq               |   8 +-
 .../IlluminaBasecallsToFastqTest/TTCGCTGA.1.fastq  |  10 +-
 .../TTCGCTGA.barcode_1.fastq                       |  10 +-
 .../TTCGCTGAAAGGATGT.1.fastq                       |  10 +-
 .../TTCGCTGAAAGGATGT.barcode_1.fastq               |  10 +-
 .../TTCGCTGAAAGGATGT.barcode_2.fastq               |  10 +-
 .../IlluminaBasecallsToFastqTest/TTGAGCCT.1.fastq  |  12 +-
 .../TTGAGCCT.barcode_1.fastq                       |  12 +-
 .../TTGAGCCTAACTTGAC.1.fastq                       |  12 +-
 .../TTGAGCCTAACTTGAC.barcode_1.fastq               |  12 +-
 .../TTGAGCCTAACTTGAC.barcode_2.fastq               |  12 +-
 .../nonBarcoded.1.fastq                            | 120 ++---
 .../nonBarcoded.2.fastq                            | 120 ++---
 testdata/net/sf/picard/io/5newline5.txt            |   2 +
 testdata/net/sf/picard/io/empty.txt                |   0
 .../sf/picard/sam/CleanSam/fits_with_deletion.sam  |   3 +
 .../sam/CleanSam/long_trailing_insertion.sam       |   3 +
 .../picard/sam/CleanSam/overhang_with_deletion.sam |   3 +
 .../net/sf/picard/sam/CleanSam/simple_fits.sam     |   3 +
 .../net/sf/picard/sam/CleanSam/simple_overhang.sam |   3 +
 .../sf/picard/sam/CleanSam/trailing_insertion.sam  |   3 +
 .../illumina-sanger_full_range_as_sanger-62.fastq  |   4 +
 .../sf/picard/sam/fastq2bam/ok-paired/pair1.txt    |   2 +-
 .../sam/fastq2bam/ok-paired/s_1_1_sequence.txt     |  40 ++
 .../sam/fastq2bam/ok-paired/s_1_2_sequence.txt     |  41 ++
 .../sam/fastq2bam/ok-paired/s_1_sequence.txt       |  40 ++
 .../{ok-paired => permissive-format}/pair1.txt     |   5 +
 .../sam/fastq2bam/permissive-format/pair2.txt      |  28 +
 .../fastq2bam/permissive-format/s_1_1_sequence.txt |  51 ++
 .../fastq2bam/permissive-format/s_1_2_sequence.txt |  41 ++
 .../fastq2bam/permissive-format/s_1_sequence.txt   |  62 +++
 245 files changed, 6331 insertions(+), 3612 deletions(-)

diff --git a/Picard-public.ipr b/Picard-public.ipr
index ab72fb3..1cc83ca 100644
--- a/Picard-public.ipr
+++ b/Picard-public.ipr
@@ -273,8 +273,12 @@
       <words>
         <w>bgzipped</w>
         <w>codecs</w>
+        <w>demultiplex</w>
+        <w>demultiplexed</w>
+        <w>eamss</w>
         <w>endian</w>
         <w>gzipped</w>
+        <w>illumina's</w>
         <w>indexable</w>
         <w>inferer</w>
         <w>inferrer</w>
diff --git a/build.xml b/build.xml
index e5c07bc..82e6061 100755
--- a/build.xml
+++ b/build.xml
@@ -43,7 +43,7 @@
     <!-- Get SVN revision, if available, otherwise leave it blank.  -->
     <exec executable="svnversion" outputproperty="repository.revision" failifexecutionfails="false"/>
     <property name="repository.revision" value=""/>
-    <property name="sam-version" value="1.101"/>
+    <property name="sam-version" value="1.106"/>
     <property name="picard-version" value="${sam-version}"/>
     <property name="tribble-version" value="${sam-version}"/>
     <property name="variant-version" value="${sam-version}"/>
@@ -348,6 +348,8 @@
         <zip zipfile="${dist}/picard-tools-${picard-version}.zip">
             <zipfileset dir="${dist}" includes="*.jar" prefix="picard-tools-${picard-version}"/>
             <zipfileset dir="${lib}" includes="snappy*.jar"/>
+            <!-- distribute libJniDeflater.so in same directory as jarfiles-->
+            <zipfileset dir="${lib}/jni" includes="*" prefix="picard-tools-${picard-version}"/>
         </zip>
     </target>
 
@@ -372,6 +374,8 @@
                 <fileset dir="${command_tmp}" includes="org/xerial/snappy/native/Linux/**/*"/>
                 <fileset dir="${command_tmp}" includes="org/xerial/snappy/VERSION"/>
                 <fileset dir="${command_tmp}" includes="META-INF/maven/org.xerial.snappy/snappy-java/pom.properties"/>
+                <!-- Force inclusion of IntelDeflater, which is dynamically linked. -->
+                <fileset dir="${command_tmp}" includes="net/sf/samtools/util/zip/*"/>
                 <filesets/>
                 <manifest>
                     <attribute name="Implementation-Title" value="@{title}"/>
diff --git a/src/c/inteldeflater/IntelDeflater.c b/src/c/inteldeflater/IntelDeflater.c
new file mode 100644
index 0000000..39a3a57
--- /dev/null
+++ b/src/c/inteldeflater/IntelDeflater.c
@@ -0,0 +1,247 @@
+/*
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Native method support for net.sf.samtools.util.zip.IntelDeflater.
+ * This is copied from OpenJDK native support for java.util.zip.Deflater, with only package and class name changed.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "jlong.h"
+#include "jni.h"
+#include "jni_util.h"
+#include "zlib.h"
+
+#include "net_sf_samtools_util_zip_IntelDeflater.h"
+
+#define DEF_MEM_LEVEL 8
+
+static jfieldID levelID;
+static jfieldID strategyID;
+static jfieldID setParamsID;
+static jfieldID finishID;
+static jfieldID finishedID;
+static jfieldID bufID, offID, lenID;
+
+JNIEXPORT void JNICALL
+Java_net_sf_samtools_util_zip_IntelDeflater_initIDs(JNIEnv *env, jclass cls)
+{
+    levelID = (*env)->GetFieldID(env, cls, "level", "I");
+    strategyID = (*env)->GetFieldID(env, cls, "strategy", "I");
+    setParamsID = (*env)->GetFieldID(env, cls, "setParams", "Z");
+    finishID = (*env)->GetFieldID(env, cls, "finish", "Z");
+    finishedID = (*env)->GetFieldID(env, cls, "finished", "Z");
+    bufID = (*env)->GetFieldID(env, cls, "buf", "[B");
+    offID = (*env)->GetFieldID(env, cls, "off", "I");
+    lenID = (*env)->GetFieldID(env, cls, "len", "I");
+}
+
+JNIEXPORT jlong JNICALL
+Java_net_sf_samtools_util_zip_IntelDeflater_init(JNIEnv *env, jclass cls, jint level,
+                                 jint strategy, jboolean nowrap)
+{
+    z_stream *strm = calloc(1, sizeof(z_stream));
+
+    if (strm == 0) {
+        JNU_ThrowOutOfMemoryError(env, 0);
+        return jlong_zero;
+    } else {
+        char *msg;
+        switch (deflateInit2(strm, level, Z_DEFLATED,
+                             nowrap ? -MAX_WBITS : MAX_WBITS,
+                             DEF_MEM_LEVEL, strategy)) {
+          case Z_OK:
+            return ptr_to_jlong(strm);
+          case Z_MEM_ERROR:
+            free(strm);
+            JNU_ThrowOutOfMemoryError(env, 0);
+            return jlong_zero;
+          case Z_STREAM_ERROR:
+            free(strm);
+            JNU_ThrowIllegalArgumentException(env, 0);
+            return jlong_zero;
+          default:
+            msg = strm->msg;
+            free(strm);
+            JNU_ThrowInternalError(env, msg);
+            return jlong_zero;
+        }
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_net_sf_samtools_util_zip_IntelDeflater_setDictionary(JNIEnv *env, jclass cls, jlong addr,
+                                          jarray b, jint off, jint len)
+{
+    Bytef *buf = (*env)->GetPrimitiveArrayCritical(env, b, 0);
+    int res;
+    if (buf == 0) {/* out of memory */
+        return;
+    }
+    res = deflateSetDictionary((z_stream *)jlong_to_ptr(addr), buf + off, len);
+    (*env)->ReleasePrimitiveArrayCritical(env, b, buf, 0);
+    switch (res) {
+    case Z_OK:
+        break;
+    case Z_STREAM_ERROR:
+        JNU_ThrowIllegalArgumentException(env, 0);
+        break;
+    default:
+        JNU_ThrowInternalError(env, ((z_stream *)jlong_to_ptr(addr))->msg);
+        break;
+    }
+}
+
+JNIEXPORT jint JNICALL
+Java_net_sf_samtools_util_zip_IntelDeflater_deflateBytes(JNIEnv *env, jobject this, jlong addr,
+                                         jarray b, jint off, jint len, jint flush)
+{
+    z_stream *strm = jlong_to_ptr(addr);
+
+    jarray this_buf = (*env)->GetObjectField(env, this, bufID);
+    jint this_off = (*env)->GetIntField(env, this, offID);
+    jint this_len = (*env)->GetIntField(env, this, lenID);
+    jbyte *in_buf;
+    jbyte *out_buf;
+    int res;
+    if ((*env)->GetBooleanField(env, this, setParamsID)) {
+        int level = (*env)->GetIntField(env, this, levelID);
+        int strategy = (*env)->GetIntField(env, this, strategyID);
+        in_buf = (*env)->GetPrimitiveArrayCritical(env, this_buf, 0);
+        if (in_buf == NULL) {
+            // Throw OOME only when length is not zero
+            if (this_len != 0)
+                JNU_ThrowOutOfMemoryError(env, 0);
+            return 0;
+        }
+        out_buf = (*env)->GetPrimitiveArrayCritical(env, b, 0);
+        if (out_buf == NULL) {
+            (*env)->ReleasePrimitiveArrayCritical(env, this_buf, in_buf, 0);
+            if (len != 0)
+                JNU_ThrowOutOfMemoryError(env, 0);
+            return 0;
+        }
+
+        strm->next_in = (Bytef *) (in_buf + this_off);
+        strm->next_out = (Bytef *) (out_buf + off);
+        strm->avail_in = this_len;
+        strm->avail_out = len;
+        res = deflateParams(strm, level, strategy);
+        (*env)->ReleasePrimitiveArrayCritical(env, b, out_buf, 0);
+        (*env)->ReleasePrimitiveArrayCritical(env, this_buf, in_buf, 0);
+
+        switch (res) {
+        case Z_OK:
+            (*env)->SetBooleanField(env, this, setParamsID, JNI_FALSE);
+            this_off += this_len - strm->avail_in;
+            (*env)->SetIntField(env, this, offID, this_off);
+            (*env)->SetIntField(env, this, lenID, strm->avail_in);
+            return len - strm->avail_out;
+        case Z_BUF_ERROR:
+            (*env)->SetBooleanField(env, this, setParamsID, JNI_FALSE);
+            return 0;
+        default:
+            JNU_ThrowInternalError(env, strm->msg);
+            return 0;
+        }
+    } else {
+        jboolean finish = (*env)->GetBooleanField(env, this, finishID);
+        in_buf = (*env)->GetPrimitiveArrayCritical(env, this_buf, 0);
+        if (in_buf == NULL) {
+            if (this_len != 0)
+                JNU_ThrowOutOfMemoryError(env, 0);
+            return 0;
+        }
+        out_buf = (*env)->GetPrimitiveArrayCritical(env, b, 0);
+        if (out_buf == NULL) {
+            (*env)->ReleasePrimitiveArrayCritical(env, this_buf, in_buf, 0);
+            if (len != 0)
+                JNU_ThrowOutOfMemoryError(env, 0);
+
+            return 0;
+        }
+
+        strm->next_in = (Bytef *) (in_buf + this_off);
+        strm->next_out = (Bytef *) (out_buf + off);
+        strm->avail_in = this_len;
+        strm->avail_out = len;
+        res = deflate(strm, finish ? Z_FINISH : flush);
+        (*env)->ReleasePrimitiveArrayCritical(env, b, out_buf, 0);
+        (*env)->ReleasePrimitiveArrayCritical(env, this_buf, in_buf, 0);
+
+        switch (res) {
+        case Z_STREAM_END:
+            (*env)->SetBooleanField(env, this, finishedID, JNI_TRUE);
+            /* fall through */
+        case Z_OK:
+            this_off += this_len - strm->avail_in;
+            (*env)->SetIntField(env, this, offID, this_off);
+            (*env)->SetIntField(env, this, lenID, strm->avail_in);
+            return len - strm->avail_out;
+        case Z_BUF_ERROR:
+            return 0;
+            default:
+            JNU_ThrowInternalError(env, strm->msg);
+            return 0;
+        }
+    }
+}
+
+JNIEXPORT jint JNICALL
+Java_net_sf_samtools_util_zip_IntelDeflater_getAdler(JNIEnv *env, jclass cls, jlong addr)
+{
+    return ((z_stream *)jlong_to_ptr(addr))->adler;
+}
+
+JNIEXPORT jlong JNICALL
+Java_net_sf_samtools_util_zip_IntelDeflater_getBytesRead(JNIEnv *env, jclass cls, jlong addr)
+{
+    return ((z_stream *)jlong_to_ptr(addr))->total_in;
+}
+
+JNIEXPORT jlong JNICALL
+Java_net_sf_samtools_util_zip_IntelDeflater_getBytesWritten(JNIEnv *env, jclass cls, jlong addr)
+{
+    return ((z_stream *)jlong_to_ptr(addr))->total_out;
+}
+
+JNIEXPORT void JNICALL
+Java_net_sf_samtools_util_zip_IntelDeflater_reset(JNIEnv *env, jclass cls, jlong addr)
+{
+    if (deflateReset((z_stream *)jlong_to_ptr(addr)) != Z_OK) {
+        JNU_ThrowInternalError(env, 0);
+    }
+}
+
+JNIEXPORT void JNICALL
+Java_net_sf_samtools_util_zip_IntelDeflater_end(JNIEnv *env, jclass cls, jlong addr)
+{
+    if (deflateEnd((z_stream *)jlong_to_ptr(addr)) == Z_STREAM_ERROR) {
+        JNU_ThrowInternalError(env, 0);
+    } else {
+        free((z_stream *)jlong_to_ptr(addr));
+    }
+}
diff --git a/src/java/net/sf/picard/cmdline/CommandLineProgram.java b/src/java/net/sf/picard/cmdline/CommandLineProgram.java
index bad3046..ac65a59 100644
--- a/src/java/net/sf/picard/cmdline/CommandLineProgram.java
+++ b/src/java/net/sf/picard/cmdline/CommandLineProgram.java
@@ -40,6 +40,7 @@ import net.sf.samtools.SAMFileWriterImpl;
 import net.sf.samtools.util.BlockCompressedOutputStream;
 import net.sf.samtools.util.BlockCompressedStreamConstants;
 import net.sf.samtools.util.IOUtil;
+import net.sf.samtools.util.zip.DeflaterFactory;
 
 /**
  * Abstract class to facilitate writing command-line programs.
@@ -89,7 +90,7 @@ public abstract class CommandLineProgram {
     @Option(doc = "Whether to create a BAM index when writing a coordinate-sorted BAM file.", common=true)
     public Boolean CREATE_INDEX = Defaults.CREATE_INDEX;
 
-    @Option(doc="Whether to create an MD5 digest for any BAM files created.  ", common=true)
+    @Option(doc="Whether to create an MD5 digest for any BAM or FASTQ files created.  ", common=true)
     public boolean CREATE_MD5_FILE = Defaults.CREATE_MD5;
 
     private final String standardUsagePreamble = CommandLineParser.getStandardUsagePreamble(getClass());
@@ -167,7 +168,8 @@ public abstract class CommandLineProgram {
                                        " on " + System.getProperty("os.name") + " " + System.getProperty("os.version") +
                                        " " + System.getProperty("os.arch") + "; " + System.getProperty("java.vm.name") +
                                        " " + System.getProperty("java.runtime.version") +
-                    "; Picard version: " + commandLineParser.getVersion());
+                                       "; Picard version: " + commandLineParser.getVersion() +
+            " " + (DeflaterFactory.usingIntelDeflater()? "IntelDeflater": "JdkDeflater"));
             }
             catch (Exception e) { /* Unpossible! */ }
         }
diff --git a/src/java/net/sf/picard/fastq/BasicFastqWriter.java b/src/java/net/sf/picard/fastq/BasicFastqWriter.java
index 3633af0..07ee661 100644
--- a/src/java/net/sf/picard/fastq/BasicFastqWriter.java
+++ b/src/java/net/sf/picard/fastq/BasicFastqWriter.java
@@ -27,6 +27,7 @@ import net.sf.picard.PicardException;
 import net.sf.picard.io.IoUtil;
 
 import java.io.File;
+import java.io.OutputStream;
 import java.io.PrintStream;
 
 /**
@@ -38,15 +39,19 @@ public class BasicFastqWriter implements FastqWriter {
     private final PrintStream writer;
 
     public BasicFastqWriter(final File file) {
-        this(file, new PrintStream(IoUtil.openFileForWriting(file)));
+        this(file, false);
     }
 
-    private BasicFastqWriter(File file, PrintStream writer) {
+    public BasicFastqWriter(final File file, final boolean createMd5) {
+        this(file, new PrintStream(maybeMd5Wrap(file, createMd5)));
+    }
+
+    private BasicFastqWriter(final File file, final PrintStream writer) {
         this.path = (file != null? file.getAbsolutePath(): "");
         this.writer = writer;
     }
 
-    public BasicFastqWriter(PrintStream writer) {
+    public BasicFastqWriter(final PrintStream writer) {
         this(null, writer);
     }
 
@@ -69,4 +74,12 @@ public class BasicFastqWriter implements FastqWriter {
     public void close() {
         writer.close();
     }
+
+    private static OutputStream maybeMd5Wrap(final File file, final boolean createMd5) {
+        if (createMd5) {
+            return IoUtil.openFileForMd5CalculatingWriting(file);
+        } else {
+            return IoUtil.openFileForWriting(file);
+        }
+    }
 }
diff --git a/src/java/net/sf/picard/fastq/Casava18ReadNameEncoder.java b/src/java/net/sf/picard/fastq/Casava18ReadNameEncoder.java
new file mode 100644
index 0000000..90c1ade
--- /dev/null
+++ b/src/java/net/sf/picard/fastq/Casava18ReadNameEncoder.java
@@ -0,0 +1,46 @@
+package net.sf.picard.fastq;
+
+import net.sf.picard.illumina.parser.ClusterData;
+import net.sf.samtools.util.StringUtil;
+
+/**
+ * A read name encoder conforming to the standard described by Illumina Casava 1.8.
+ * 
+ * @see <a href="http://biowulf.nih.gov/apps/CASAVA1_8_Changes.pdf">Casava 1.8 update</a>
+ * @author mccowan
+ */
+public class Casava18ReadNameEncoder implements ReadNameEncoder {
+    final static int CONTROL_FIELD_VALUE = 0;
+    final String runId, instrumentName, flowcellId;
+    
+    static enum PassesFilterLabel {
+        Y, N;
+        static PassesFilterLabel get(final boolean passesFilter) {
+            return passesFilter ? Y : N;
+        }
+    }
+    
+    public Casava18ReadNameEncoder(final String instrumentName, final String runId, final String flowcellId) {
+        this.runId = runId;
+        this.instrumentName = instrumentName;
+        this.flowcellId = flowcellId;
+    }
+
+    @Override
+    public String generateReadName(final ClusterData cluster, final Integer pairNumber) {
+        return String.format(
+                "%s:%s:%s:%d:%d:%d:%d %s:%s:%d:%s",
+                instrumentName,
+                runId,
+                flowcellId,
+                cluster.getLane(),
+                cluster.getTile(),
+                cluster.getX(),
+                cluster.getY(),
+                StringUtil.asEmptyIfNull(pairNumber),
+                PassesFilterLabel.get(cluster.isPf()),
+                CONTROL_FIELD_VALUE,
+                StringUtil.asEmptyIfNull(cluster.getMatchedBarcode())
+        );
+    }
+}
diff --git a/src/java/net/sf/picard/fastq/FastqReader.java b/src/java/net/sf/picard/fastq/FastqReader.java
index 654d02b..76a27ba 100755
--- a/src/java/net/sf/picard/fastq/FastqReader.java
+++ b/src/java/net/sf/picard/fastq/FastqReader.java
@@ -41,9 +41,16 @@ public class FastqReader implements Iterator<FastqRecord>, Iterable<FastqRecord>
     final private File fastqFile;
     final private BufferedReader reader;
     private FastqRecord nextRecord;
-    private int line=1; 
+    private int line=1;
+
+    final private boolean skipBlankLines;
 
     public FastqReader(final File file) {
+        this(file,false);
+    }
+
+    public FastqReader(final File file, final boolean skipBlankLines) {
+        this.skipBlankLines=skipBlankLines;
         try {
             fastqFile = file;
             reader = IoUtil.openFileForBufferedReading(fastqFile);
@@ -54,21 +61,22 @@ public class FastqReader implements Iterator<FastqRecord>, Iterable<FastqRecord>
         }
     }
 
-    public FastqReader(BufferedReader reader) {
+    public FastqReader(final BufferedReader reader) {
         this(null, reader);
     }
 
-    public FastqReader(final File file, BufferedReader reader) {
+    public FastqReader(final File file, final BufferedReader reader) {
         fastqFile = file;
         this.reader = reader;
         nextRecord = readNextRecord();
+        skipBlankLines = false;
     }
 
     private FastqRecord readNextRecord() {
         try {
 
             // Read sequence header
-            final String seqHeader = reader.readLine();
+            final String seqHeader = readLineConditionallySkippingBlanks();
             if (seqHeader == null) return null ;
             if (StringUtil.isBlank(seqHeader)) {
                 throw new PicardException(error("Missing sequence header"));
@@ -78,18 +86,18 @@ public class FastqReader implements Iterator<FastqRecord>, Iterable<FastqRecord>
             }
 
             // Read sequence line
-            final String seqLine = reader.readLine();
+            final String seqLine = readLineConditionallySkippingBlanks();
             checkLine(seqLine,"sequence line");
 
             // Read quality header
-            final String qualHeader = reader.readLine();
+            final String qualHeader = readLineConditionallySkippingBlanks();
             checkLine(qualHeader,"quality header");
             if (!qualHeader.startsWith(FastqConstants.QUALITY_HEADER)) {
                 throw new PicardException(error("Quality header must start with "+ FastqConstants.QUALITY_HEADER+": "+qualHeader));
             }
 
             // Read quality line
-            final String qualLine = reader.readLine();
+            final String qualLine = readLineConditionallySkippingBlanks();
             checkLine(qualLine,"quality line");
 
             // Check sequence and quality lines are same length
@@ -160,4 +168,15 @@ public class FastqReader implements Iterator<FastqRecord>, Iterable<FastqRecord>
         if (fastqFile == null) return "";
         else return fastqFile.getAbsolutePath();
     }
+
+    private String readLineConditionallySkippingBlanks() throws IOException {
+        String line;
+        do {
+            line = reader.readLine();
+            if (line == null) return line;
+        } while(skipBlankLines && StringUtil.isBlank(line));
+        return line;
+    }
+
+
 }
diff --git a/src/java/net/sf/picard/fastq/FastqWriterFactory.java b/src/java/net/sf/picard/fastq/FastqWriterFactory.java
index 92372ce..5045a6f 100644
--- a/src/java/net/sf/picard/fastq/FastqWriterFactory.java
+++ b/src/java/net/sf/picard/fastq/FastqWriterFactory.java
@@ -11,12 +11,16 @@ import java.io.File;
  */
 public class FastqWriterFactory {
     boolean useAsyncIo = Defaults.USE_ASYNC_IO;
+    boolean createMd5  = Defaults.CREATE_MD5;
 
     /** Sets whether or not to use async io (i.e. a dedicated thread per writer. */
     public void setUseAsyncIo(final boolean useAsyncIo) { this.useAsyncIo = useAsyncIo; }
 
+    /** If true, compute MD5 and write appropriately-named file when file is closed. */
+    public void setCreateMd5(final boolean createMd5) { this.createMd5 = createMd5; }
+
     public FastqWriter newWriter(final File out) {
-        final FastqWriter writer = new BasicFastqWriter(out);
+        final FastqWriter writer = new BasicFastqWriter(out, createMd5);
         if (useAsyncIo) {
             return new AsyncFastqWriter(writer, AsyncFastqWriter.DEFAULT_QUEUE_SIZE);
         }
diff --git a/src/java/net/sf/picard/fastq/IlluminaReadNameEncoder.java b/src/java/net/sf/picard/fastq/IlluminaReadNameEncoder.java
new file mode 100644
index 0000000..a00dc55
--- /dev/null
+++ b/src/java/net/sf/picard/fastq/IlluminaReadNameEncoder.java
@@ -0,0 +1,28 @@
+package net.sf.picard.fastq;
+
+import net.sf.picard.illumina.parser.ClusterData;
+
+/**
+ * A read name encoder following the encoding initially produced by picard fastq writers.
+ * 
+ * @see <a href="http://en.wikipedia.org/wiki/FASTQ_format#Illumina_sequence_identifiers">Illumina sequence identifiers</a> almost describes the format used here, except instead of an instrumnet name, we write the run barcode 
+ * @author mccowan
+ */
+public class IlluminaReadNameEncoder implements ReadNameEncoder {
+    final String runBarcode;
+    public IlluminaReadNameEncoder(final String runBarcode) {
+        this.runBarcode = runBarcode;
+    }
+    
+    @Override
+    public String generateReadName(final ClusterData cluster, final Integer pairNumber) {
+        return runBarcode + ":" + cluster.getLane() + ":" + cluster.getTile() + ":" + cluster.getX() + ":" + cluster.getY() + generatePairNumberSuffix(pairNumber);
+    }
+    
+    private static String generatePairNumberSuffix(final Integer pairNumber) {
+        if (pairNumber == null)
+            return ""; 
+        else
+            return "/" + pairNumber;
+    }
+}
diff --git a/src/java/net/sf/picard/fastq/ReadNameEncoder.java b/src/java/net/sf/picard/fastq/ReadNameEncoder.java
new file mode 100644
index 0000000..2ede364
--- /dev/null
+++ b/src/java/net/sf/picard/fastq/ReadNameEncoder.java
@@ -0,0 +1,17 @@
+package net.sf.picard.fastq;
+
+import net.sf.picard.illumina.parser.ClusterData;
+
+/**
+ * @author mccowan
+ */
+public interface ReadNameEncoder {
+    /**
+     * Generates a read name string for the provided cluster. 
+     *
+     * @param cluster The cluster whose reads are having its name generated
+     * @param pairNumber 1 if this is the first of the pair, 2 if it is the second, or null if this not a paired read.
+     * @return The read name
+     */
+    String generateReadName(ClusterData cluster, Integer pairNumber);
+}
diff --git a/src/java/net/sf/picard/illumina/ClusterDataToSamConverter.java b/src/java/net/sf/picard/illumina/ClusterDataToSamConverter.java
index 3588863..8b2a9a6 100644
--- a/src/java/net/sf/picard/illumina/ClusterDataToSamConverter.java
+++ b/src/java/net/sf/picard/illumina/ClusterDataToSamConverter.java
@@ -23,6 +23,8 @@
  */
 package net.sf.picard.illumina;
 
+import net.sf.picard.fastq.IlluminaReadNameEncoder;
+import net.sf.picard.fastq.ReadNameEncoder;
 import net.sf.picard.filter.SamRecordFilter;
 import net.sf.picard.filter.SolexaNoiseFilter;
 import net.sf.picard.illumina.parser.ClusterData;
@@ -56,7 +58,8 @@ public class ClusterDataToSamConverter implements
     private final int [] barcodeIndices;
     private final AdapterPair[] adaptersToCheck;
     private final int outputRecordsPerCluster;
-
+    private final ReadNameEncoder readNameEncoder;  
+    
     /**
      * Constructor
      *
@@ -72,6 +75,8 @@ public class ClusterDataToSamConverter implements
                                      final List<IlluminaUtil.IlluminaAdapterPair> adapters) {
         this.runBarcode  = runBarcode;
         this.readGroupId = readGroupId;
+        
+        this.readNameEncoder = new IlluminaReadNameEncoder(runBarcode);
 
         this.isPairedEnd = readStructure.templates.length() == 2;
         this.isBarcoded  = !readStructure.barcodes.isEmpty();
@@ -127,8 +132,7 @@ public class ClusterDataToSamConverter implements
     public IlluminaBasecallsToSam.SAMRecordsForCluster convertClusterToOutputRecord(final ClusterData cluster) {
 
         final IlluminaBasecallsToSam.SAMRecordsForCluster ret = new IlluminaBasecallsToSam.SAMRecordsForCluster(outputRecordsPerCluster);
-
-        final String readName = IlluminaUtil.makeReadName(runBarcode, cluster.getLane(), cluster.getTile(), cluster.getX(), cluster.getY());
+        final String readName = readNameEncoder.generateReadName(cluster, null); // Use null here to prevent /1 or /2 suffixes on read name.
 
         // Get and transform the unmatched barcode, if any, to store with the reads
         String unmatchedBarcode = null;
diff --git a/src/java/net/sf/picard/illumina/ExtractIlluminaBarcodes.java b/src/java/net/sf/picard/illumina/ExtractIlluminaBarcodes.java
index 60b7dfc..23d7042 100644
--- a/src/java/net/sf/picard/illumina/ExtractIlluminaBarcodes.java
+++ b/src/java/net/sf/picard/illumina/ExtractIlluminaBarcodes.java
@@ -23,25 +23,25 @@
  */
 package net.sf.picard.illumina;
 
-import net.sf.picard.illumina.parser.*;
-import net.sf.picard.illumina.parser.readers.BclQualityEvaluationStrategy;
-import net.sf.picard.util.IlluminaUtil;
-import net.sf.picard.util.Log;
-import net.sf.picard.util.TabbedTextFileWithHeaderParser;
 import net.sf.picard.cmdline.CommandLineProgram;
 import net.sf.picard.cmdline.Option;
 import net.sf.picard.cmdline.StandardOptionDefinitions;
 import net.sf.picard.cmdline.Usage;
+import net.sf.picard.illumina.parser.*;
+import net.sf.picard.illumina.parser.readers.BclQualityEvaluationStrategy;
 import net.sf.picard.io.IoUtil;
 import net.sf.picard.metrics.MetricBase;
 import net.sf.picard.metrics.MetricsFile;
+import net.sf.picard.util.IlluminaUtil;
+import net.sf.picard.util.Log;
+import net.sf.picard.util.TabbedTextFileWithHeaderParser;
 import net.sf.samtools.util.SequenceUtil;
 import net.sf.samtools.util.StringUtil;
 
 import java.io.BufferedWriter;
 import java.io.File;
-import java.util.*;
 import java.text.NumberFormat;
+import java.util.*;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
@@ -54,8 +54,8 @@ import java.util.concurrent.TimeUnit;
  * - read subsequence at barcode position
  * - Y or N indicating if there was a barcode match
  * - matched barcode sequence (empty if read did not match one of the barcodes).  If there is no match
- *   but we're close to the threshold of calling it a match we output the barcode that would have been
- *   matched but in lower case
+ * but we're close to the threshold of calling it a match we output the barcode that would have been
+ * matched but in lower case
  *
  * @author jburke at broadinstitute.org
  */
@@ -64,56 +64,56 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
     // The following attributes define the command-line arguments
     @Usage
     public String USAGE =
-        getStandardUsagePreamble() +  "Determine the barcode for each read in an Illumina lane.\n" +
-                "For each tile, a file is written to the basecalls directory of the form s_<lane>_<tile>_barcode.txt. " +
-                "An output file contains a line for each read in the tile, aligned with the regular basecall output. \n" +
-                "The output file contains the following tab-separated columns: \n" +
-                "    * read subsequence at barcode position\n" +
-                "    * Y or N indicating if there was a barcode match\n" +
-                "    * matched barcode sequence\n" +
-                "Note that the order of specification of barcodes can cause arbitrary differences in output for poorly matching barcodes.\n\n";
-
-    @Option(doc="The Illumina basecalls directory. ", shortName="B")
+            getStandardUsagePreamble() + "Determine the barcode for each read in an Illumina lane.\n" +
+                    "For each tile, a file is written to the basecalls directory of the form s_<lane>_<tile>_barcode.txt. " +
+                    "An output file contains a line for each read in the tile, aligned with the regular basecall output. \n" +
+                    "The output file contains the following tab-separated columns: \n" +
+                    "    * read subsequence at barcode position\n" +
+                    "    * Y or N indicating if there was a barcode match\n" +
+                    "    * matched barcode sequence\n" +
+                    "Note that the order of specification of barcodes can cause arbitrary differences in output for poorly matching barcodes.\n\n";
+
+    @Option(doc = "The Illumina basecalls directory. ", shortName = "B")
     public File BASECALLS_DIR;
 
-    @Option(doc="Where to write _barcode.txt files.  By default, these are written to BASECALLS_DIR.", optional = true)
+    @Option(doc = "Where to write _barcode.txt files.  By default, these are written to BASECALLS_DIR.", optional = true)
     public File OUTPUT_DIR;
 
-    @Option(doc="Lane number. ", shortName= StandardOptionDefinitions.LANE_SHORT_NAME)
+    @Option(doc = "Lane number. ", shortName = StandardOptionDefinitions.LANE_SHORT_NAME)
     public Integer LANE;
 
-    @Option(doc= ReadStructure.PARAMETER_DOC, shortName="RS")
+    @Option(doc = ReadStructure.PARAMETER_DOC, shortName = "RS")
     public String READ_STRUCTURE;
 
-    @Option(doc="Barcode sequence.  These must be unique, and all the same length.  This cannot be used with reads that " +
+    @Option(doc = "Barcode sequence.  These must be unique, and all the same length.  This cannot be used with reads that " +
             "have more than one barcode; use BARCODE_FILE in that case. ", mutex = {"BARCODE_FILE"})
     public List<String> BARCODE = new ArrayList<String>();
 
-    @Option(doc="Tab-delimited file of barcode sequences, barcode name and, optionally, library name.  " +
+    @Option(doc = "Tab-delimited file of barcode sequences, barcode name and, optionally, library name.  " +
             "Barcodes must be unique and all the same length.  Column headers must be 'barcode_sequence_1', " +
             "'barcode_sequence_2' (optional), 'barcode_name', and 'library_name'.", mutex = {"BARCODE"})
     public File BARCODE_FILE;
 
-    @Option(doc="Per-barcode and per-lane metrics written to this file.", shortName = StandardOptionDefinitions.METRICS_FILE_SHORT_NAME)
+    @Option(doc = "Per-barcode and per-lane metrics written to this file.", shortName = StandardOptionDefinitions.METRICS_FILE_SHORT_NAME)
     public File METRICS_FILE;
 
-    @Option(doc="Maximum mismatches for a barcode to be considered a match.")
+    @Option(doc = "Maximum mismatches for a barcode to be considered a match.")
     public int MAX_MISMATCHES = 1;
 
-    @Option(doc="Minimum difference between number of mismatches in the best and second best barcodes for a barcode to be considered a match.")
+    @Option(doc = "Minimum difference between number of mismatches in the best and second best barcodes for a barcode to be considered a match.")
     public int MIN_MISMATCH_DELTA = 1;
 
-    @Option(doc="Maximum allowable number of no-calls in a barcode read before it is considered unmatchable.")
+    @Option(doc = "Maximum allowable number of no-calls in a barcode read before it is considered unmatchable.")
     public int MAX_NO_CALLS = 2;
-    
-    @Option(shortName="Q", doc="Minimum base quality. Any barcode bases falling below this quality will be considered a mismatch even in the bases match.")
+
+    @Option(shortName = "Q", doc = "Minimum base quality. Any barcode bases falling below this quality will be considered a mismatch even in the bases match.")
     public int MINIMUM_BASE_QUALITY = 0;
 
-    @Option(doc="The minimum quality (after transforming 0s to 1s) expected from reads.  If qualities are lower than this value, an error is thrown." +
+    @Option(doc = "The minimum quality (after transforming 0s to 1s) expected from reads.  If qualities are lower than this value, an error is thrown." +
             "The default of 2 is what the Illumina's spec describes as the minimum, but in practice the value has been observed lower.")
     public int MINIMUM_QUALITY = BclQualityEvaluationStrategy.ILLUMINA_ALLEGED_MINIMUM_QUALITY;
-    
-    @Option(shortName="GZIP", doc="Compress output s_l_t_barcode.txt files using gzip and append a .gz extension to the filenames.")
+
+    @Option(shortName = "GZIP", doc = "Compress output s_l_t_barcode.txt files using gzip and append a .gz extension to the file names.")
     public boolean COMPRESS_OUTPUTS = false;
 
     @Option(doc = "Run this many PerTileBarcodeExtractors in parallel.  If NUM_PROCESSORS = 0, number of cores is automatically set to " +
@@ -121,18 +121,14 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
             "the number available on the machine less NUM_PROCESSORS.")
     public int NUM_PROCESSORS = 1;
 
-    private final Log log = Log.getInstance(ExtractIlluminaBarcodes.class);
+    private static final Log LOG = Log.getInstance(ExtractIlluminaBarcodes.class);
 
     /** The read structure of the actual Illumina Run, i.e. the readStructure of the input data */
     private ReadStructure readStructure;
 
-    /** The read structure of the output cluster data, this may be different from the input readStructure if there are SKIPs in the input readStructure */
-    private ReadStructure outputReadStructure;
-
     private IlluminaDataProviderFactory factory;
 
-    private final Map<String,BarcodeMetric> barcodeToMetrics = new LinkedHashMap<String,BarcodeMetric>();
-    private BarcodeMetric noMatchMetric = null;
+    private final Map<String, BarcodeMetric> barcodeToMetrics = new LinkedHashMap<String, BarcodeMetric>();
 
     private final NumberFormat tileNumberFormatter = NumberFormat.getNumberInstance();
     private BclQualityEvaluationStrategy bclQualityEvaluationStrategy;
@@ -143,7 +139,7 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
     }
 
     @Override
-	protected int doWork() {
+    protected int doWork() {
 
         IoUtil.assertFileIsWritable(METRICS_FILE);
         if (OUTPUT_DIR == null) {
@@ -159,26 +155,35 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
                 noMatchBarcode[index++] = StringUtil.repeatCharNTimes('N', d.length);
             }
         }
-        noMatchMetric = new BarcodeMetric(null, null, IlluminaUtil.barcodeSeqsToString(noMatchBarcode), noMatchBarcode);
+
+        final BarcodeMetric noMatchMetric = new BarcodeMetric(null, null, IlluminaUtil.barcodeSeqsToString(noMatchBarcode), noMatchBarcode);
 
         final int numProcessors;
         if (NUM_PROCESSORS == 0) {
             numProcessors = Runtime.getRuntime().availableProcessors();
-        }
-        else if (NUM_PROCESSORS < 0) {
+        } else if (NUM_PROCESSORS < 0) {
             numProcessors = Runtime.getRuntime().availableProcessors() + NUM_PROCESSORS;
-        }
-        else {
+        } else {
             numProcessors = NUM_PROCESSORS;
         }
 
-        log.info("Processing with " + numProcessors + " PerTileBarcodeExtractor(s).");
+        LOG.info("Processing with " + numProcessors + " PerTileBarcodeExtractor(s).");
         final ExecutorService pool = Executors.newFixedThreadPool(numProcessors);
 
         final List<PerTileBarcodeExtractor> extractors = new ArrayList<PerTileBarcodeExtractor>(factory.getAvailableTiles().size());
         for (final int tile : factory.getAvailableTiles()) {
 
-            final PerTileBarcodeExtractor extractor = new PerTileBarcodeExtractor(tile, getBarcodeFile(tile));
+            final PerTileBarcodeExtractor extractor = new PerTileBarcodeExtractor(
+                    tile,
+                    getBarcodeFile(tile),
+                    barcodeToMetrics,
+                    noMatchMetric,
+                    factory,
+                    MINIMUM_BASE_QUALITY,
+                    MAX_NO_CALLS,
+                    MAX_MISMATCHES,
+                    MIN_MISMATCH_DELTA
+            );
             pool.submit(extractor);
             extractors.add(extractor);
         }
@@ -189,24 +194,23 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
                 pool.shutdownNow(); // Cancel any still-executing tasks
                 // Wait a while for tasks to respond to being cancelled
                 if (!pool.awaitTermination(60, TimeUnit.SECONDS))
-                    log.error("Pool did not terminate");
+                    LOG.error("Pool did not terminate");
                 return 1;
             }
-        }
-        catch (InterruptedException ie) {
+        } catch (InterruptedException ie) {
             // (Re-)Cancel if current thread also interrupted
             pool.shutdownNow();
             return 2;
         }
 
-        log.info("Processed " + extractors.size() + " tiles.");
+        LOG.info("Processed " + extractors.size() + " tiles.");
         for (final PerTileBarcodeExtractor extractor : extractors) {
             for (final String key : barcodeToMetrics.keySet()) {
                 barcodeToMetrics.get(key).merge(extractor.getMetrics().get(key));
             }
             noMatchMetric.merge(extractor.getNoMatchMetric());
             if (extractor.getException() != null) {
-                log.error("Abandoning metrics calculation because one or more PerTileBarcodeExtractors failed.");
+                LOG.error("Abandoning metrics calculation because one or more PerTileBarcodeExtractors failed.");
                 return 4;
             }
         }
@@ -223,54 +227,54 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
         }
 
         if (totalReads > 0) {
-            noMatchMetric.PCT_MATCHES = noMatchMetric.READS/(double)totalReads;
+            noMatchMetric.PCT_MATCHES = noMatchMetric.READS / (double) totalReads;
             double bestPctOfAllBarcodeMatches = 0;
             for (final BarcodeMetric barcodeMetric : barcodeToMetrics.values()) {
-                barcodeMetric.PCT_MATCHES = barcodeMetric.READS/(double)totalReads;
+                barcodeMetric.PCT_MATCHES = barcodeMetric.READS / (double) totalReads;
                 if (barcodeMetric.PCT_MATCHES > bestPctOfAllBarcodeMatches) {
                     bestPctOfAllBarcodeMatches = barcodeMetric.PCT_MATCHES;
                 }
             }
             if (bestPctOfAllBarcodeMatches > 0) {
                 noMatchMetric.RATIO_THIS_BARCODE_TO_BEST_BARCODE_PCT =
-                        noMatchMetric.PCT_MATCHES/bestPctOfAllBarcodeMatches;
+                        noMatchMetric.PCT_MATCHES / bestPctOfAllBarcodeMatches;
                 for (final BarcodeMetric barcodeMetric : barcodeToMetrics.values()) {
                     barcodeMetric.RATIO_THIS_BARCODE_TO_BEST_BARCODE_PCT =
-                            barcodeMetric.PCT_MATCHES/bestPctOfAllBarcodeMatches;
+                            barcodeMetric.PCT_MATCHES / bestPctOfAllBarcodeMatches;
                 }
             }
         }
 
         if (totalPfReads > 0) {
-            noMatchMetric.PF_PCT_MATCHES = noMatchMetric.PF_READS/(double)totalPfReads;
+            noMatchMetric.PF_PCT_MATCHES = noMatchMetric.PF_READS / (double) totalPfReads;
             double bestPctOfAllBarcodeMatches = 0;
             for (final BarcodeMetric barcodeMetric : barcodeToMetrics.values()) {
-                barcodeMetric.PF_PCT_MATCHES = barcodeMetric.PF_READS/(double)totalPfReads;
+                barcodeMetric.PF_PCT_MATCHES = barcodeMetric.PF_READS / (double) totalPfReads;
                 if (barcodeMetric.PF_PCT_MATCHES > bestPctOfAllBarcodeMatches) {
                     bestPctOfAllBarcodeMatches = barcodeMetric.PF_PCT_MATCHES;
                 }
             }
             if (bestPctOfAllBarcodeMatches > 0) {
                 noMatchMetric.PF_RATIO_THIS_BARCODE_TO_BEST_BARCODE_PCT =
-                        noMatchMetric.PF_PCT_MATCHES/bestPctOfAllBarcodeMatches;
+                        noMatchMetric.PF_PCT_MATCHES / bestPctOfAllBarcodeMatches;
                 for (final BarcodeMetric barcodeMetric : barcodeToMetrics.values()) {
                     barcodeMetric.PF_RATIO_THIS_BARCODE_TO_BEST_BARCODE_PCT =
-                            barcodeMetric.PF_PCT_MATCHES/bestPctOfAllBarcodeMatches;
+                            barcodeMetric.PF_PCT_MATCHES / bestPctOfAllBarcodeMatches;
                 }
             }
         }
 
         // Warn about minimum qualities and assert that we've achieved the minimum.
         for (Map.Entry<Byte, Integer> entry : bclQualityEvaluationStrategy.getPoorQualityFrequencies().entrySet()) {
-            log.warn(String.format("Observed low quality of %s %s times.", entry.getKey(), entry.getValue()));
+            LOG.warn(String.format("Observed low quality of %s %s times.", entry.getKey(), entry.getValue()));
         }
         bclQualityEvaluationStrategy.assertMinimumQualities();
-        
+
         // Calculate the normalized matches
         if (totalPfReadsAssigned > 0) {
             final double mean = (double) totalPfReadsAssigned / (double) barcodeToMetrics.values().size();
             for (final BarcodeMetric m : barcodeToMetrics.values()) {
-                m.PF_NORMALIZED_MATCHES = m.PF_READS  / mean;
+                m.PF_NORMALIZED_MATCHES = m.PF_READS / mean;
             }
         }
 
@@ -283,12 +287,10 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
         return 0;
     }
 
-    /**
-     * Create a barcode filename corresponding to the given tile qseq file.
-     */
+    /** Create a barcode filename corresponding to the given tile qseq file. */
     private File getBarcodeFile(final int tile) {
         return new File(OUTPUT_DIR,
-                        "s_" + LANE + "_" + tileNumberFormatter.format(tile) + "_barcode.txt" + (COMPRESS_OUTPUTS ? ".gz" : ""));
+                "s_" + LANE + "_" + tileNumberFormatter.format(tile) + "_barcode.txt" + (COMPRESS_OUTPUTS ? ".gz" : ""));
     }
 
     /**
@@ -302,18 +304,17 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
         final ArrayList<String> messages = new ArrayList<String>();
 
         this.bclQualityEvaluationStrategy = new BclQualityEvaluationStrategy(MINIMUM_QUALITY);
-        
+
         /**
          * In extract illumina barcodes we NEVER want to look at the template reads, therefore replace them with skips because
          * IlluminaDataProvider and its factory will not open these nor produce ClusterData with the template reads in them, thus reducing
          * the file IO and value copying done by the data provider
          */
         readStructure = new ReadStructure(READ_STRUCTURE.replaceAll("T", "S"));
-        final IlluminaDataType[] datatypes = (MINIMUM_BASE_QUALITY > 0) ? 
-                                             new IlluminaDataType[] {IlluminaDataType.BaseCalls, IlluminaDataType.PF, IlluminaDataType.QualityScores}:
-                                             new IlluminaDataType[] {IlluminaDataType.BaseCalls, IlluminaDataType.PF};
+        final IlluminaDataType[] datatypes = (MINIMUM_BASE_QUALITY > 0) ?
+                new IlluminaDataType[]{IlluminaDataType.BaseCalls, IlluminaDataType.PF, IlluminaDataType.QualityScores} :
+                new IlluminaDataType[]{IlluminaDataType.BaseCalls, IlluminaDataType.PF};
         factory = new IlluminaDataProviderFactory(BASECALLS_DIR, LANE, readStructure, bclQualityEvaluationStrategy, datatypes);
-        outputReadStructure = factory.getOutputReadStructure();
 
         if (BARCODE_FILE != null) {
             parseBarcodeFile(messages);
@@ -366,7 +367,7 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
             for (final ReadDescriptor rd : readStructure.descriptors) {
                 if (rd.type != ReadType.Barcode) continue;
                 final String header = barcodeNum == 1 ? sequenceColumn : "barcode_sequence_" + String.valueOf(barcodeNum);
-                bcStrings[barcodeNum-1] = row.getField(header);
+                bcStrings[barcodeNum - 1] = row.getField(header);
                 barcodeNum++;
             }
             final String bcStr = IlluminaUtil.barcodeSeqsToString(bcStrings);
@@ -374,8 +375,8 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
                 messages.add("Barcode " + bcStr + " specified more than once in " + BARCODE_FILE);
             }
             barcodes.add(bcStr);
-            final String barcodeName = (hasBarcodeName? row.getField(BARCODE_NAME_COLUMN): "");
-            final String libraryName = (hasLibraryName? row.getField(LIBRARY_NAME_COLUMN): "");
+            final String barcodeName = (hasBarcodeName ? row.getField(BARCODE_NAME_COLUMN) : "");
+            final String libraryName = (hasLibraryName ? row.getField(LIBRARY_NAME_COLUMN) : "");
             final BarcodeMetric metric = new BarcodeMetric(barcodeName, libraryName, bcStr, bcStrings);
             barcodeToMetrics.put(StringUtil.join("", bcStrings), metric);
         }
@@ -425,9 +426,8 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
          * The rate of PF reads matching this barcode to PF reads matching the most prevelant barcode. For the
          * most prevelant barcode this will be 1, for all others it will be less than 1 (except for the possible
          * exception of when there are more orphan reads than for any other barcode, in which case the value
-         * may be arbitrarily large).  One over the lowest number in this column gives you the fold-difference 
+         * may be arbitrarily large).  One over the lowest number in this column gives you the fold-difference
          * in representation of PF reads between barcodes.
-         * 
          */
         public double PF_RATIO_THIS_BARCODE_TO_BEST_BARCODE_PCT = 0d;
 
@@ -452,16 +452,12 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
             }
         }
 
-        /**
-         * This ctor is necessary for when reading metrics from file
-         */
+        /** This ctor is necessary for when reading metrics from file */
         public BarcodeMetric() {
             barcodeBytes = null;
         }
 
-        /**
-         * Creates a copy of metric initialized with only non-accumulated and non-calculated values set
-         */
+        /** Creates a copy of metric initialized with only non-accumulated and non-calculated values set */
         public static BarcodeMetric copy(final BarcodeMetric metric) {
             final BarcodeMetric result = new BarcodeMetric();
             result.BARCODE = metric.BARCODE;
@@ -473,7 +469,8 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
 
 
         /**
-         * Adds the non-calculated 
+         * Adds the non-calculated
+         *
          * @param metric
          */
         public void merge(final BarcodeMetric metric) {
@@ -487,16 +484,17 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
 
     }
 
-    /**
-     * Extracts barcodes and accumulates metrics for an entire tile.
-     */
-    private class PerTileBarcodeExtractor implements Runnable {
+    /** Extracts barcodes and accumulates metrics for an entire tile. */
+    private static class PerTileBarcodeExtractor implements Runnable {
         private final int tile;
         private final File barcodeFile;
-        private final Map<String,BarcodeMetric> metrics;
+        private final Map<String, BarcodeMetric> metrics;
         private final BarcodeMetric noMatch;
         private Exception exception = null;
-        private final boolean usingQualityScores= MINIMUM_BASE_QUALITY > 0;
+        private final boolean usingQualityScores;
+        private final IlluminaDataProvider provider;
+        private final ReadStructure outputReadStructure;
+        private final int maxNoCalls, maxMismatches, minMismatchDelta, minimumBaseQuality;
 
         /** Utility class to hang onto data about the best match for a given barcode */
         class BarcodeMatch {
@@ -508,40 +506,63 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
 
         /**
          * Constructor
-         * @param tile              The number of the tile being processed; used for logging only.
-         * @param barcodeFile       The file to write the barcodes to
+         *
+         * @param tile             The number of the tile being processed; used for logging only.
+         * @param barcodeFile      The file to write the barcodes to
+         * @param noMatchMetric    A "template" metric that is cloned and the clone is stored internally for accumulating data
+         * @param barcodeToMetrics A "template" metric map whose metrics are cloned, and the clones are stored internally for accumulating data
          */
-        public PerTileBarcodeExtractor(final int tile, final File barcodeFile) {
+        public PerTileBarcodeExtractor(
+                final int tile,
+                final File barcodeFile,
+                final Map<String, BarcodeMetric> barcodeToMetrics,
+                final BarcodeMetric noMatchMetric,
+                final IlluminaDataProviderFactory factory,
+                final int minimumBaseQuality,
+                final int maxNoCalls,
+                final int maxMismatches,
+                final int minMismatchDelta
+        ) {
             this.tile = tile;
             this.barcodeFile = barcodeFile;
-            this.metrics = new LinkedHashMap<String,BarcodeMetric>(barcodeToMetrics.size());
+            this.usingQualityScores = minimumBaseQuality > 0;
+            this.maxNoCalls = maxNoCalls;
+            this.maxMismatches = maxMismatches;
+            this.minMismatchDelta = minMismatchDelta;
+            this.minimumBaseQuality = minimumBaseQuality;
+            this.metrics = new LinkedHashMap<String, BarcodeMetric>(barcodeToMetrics.size());
             for (final String key : barcodeToMetrics.keySet()) {
                 this.metrics.put(key, BarcodeMetric.copy(barcodeToMetrics.get(key)));
             }
             this.noMatch = BarcodeMetric.copy(noMatchMetric);
+            this.provider = factory.makeDataProvider(Arrays.asList(tile));
+            this.outputReadStructure = factory.getOutputReadStructure();
+
         }
 
 
         // These methods return the results of the extraction
-        public synchronized Map<String,BarcodeMetric> getMetrics() { return this.metrics; }
+        public synchronized Map<String, BarcodeMetric> getMetrics() {
+            return this.metrics;
+        }
+
         public synchronized BarcodeMetric getNoMatchMetric() { return this.noMatch; }
+
         public synchronized Exception getException() { return this.exception; }
 
-        /**
-         * run method which extracts barcodes and accumulates metrics for an entire tile
-         */
+        /** run method which extracts barcodes and accumulates metrics for an entire tile */
         synchronized public void run() {
             try {
-                log.info("Extracting barcodes for tile " + tile);
+                LOG.info("Extracting barcodes for tile " + tile);
 
                 //Sometimes makeDataProvider takes a while waiting for slow file IO, for each tile the needed set of files
                 //is non-overlapping sets of files so make the  data providers in the individual threads for PerTileBarcodeExtractors
                 //so they are not all waiting for each others file operations
-                final IlluminaDataProvider provider = factory.makeDataProvider(Arrays.asList(tile));
+
 
                 //Most likely we have SKIPS in our read structure since we replace all template reads with skips in the input data structure
                 //(see customCommnandLineValidation), therefore we must use the outputReadStructure to index into the output cluster data
-                final int [] barcodeIndices = outputReadStructure.barcodes.getIndices();
+                final int[] barcodeIndices = outputReadStructure.barcodes.getIndices();
                 final BufferedWriter writer = IoUtil.openFileForBufferedWriting(barcodeFile);
                 final byte barcodeSubsequences[][] = new byte[barcodeIndices.length][];
                 final byte qualityScores[][] = usingQualityScores ? new byte[barcodeIndices.length][] : null;
@@ -553,7 +574,7 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
                         if (usingQualityScores) qualityScores[i] = cluster.getRead(barcodeIndices[i]).getQualities();
                     }
                     final boolean passingFilter = cluster.isPf();
-                    final BarcodeMatch match = findBestBarcodeAndUpdateMetrics(barcodeSubsequences, qualityScores, passingFilter, metrics, noMatchMetric);
+                    final BarcodeMatch match = findBestBarcodeAndUpdateMetrics(barcodeSubsequences, qualityScores, passingFilter, metrics, noMatch);
 
                     final String yOrN = (match.matched ? "Y" : "N");
 
@@ -565,17 +586,17 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
                     writer.newLine();
                 }
                 writer.close();
-            }
-            catch (Exception e) {
-                log.error(e, "Error processing tile ", this.tile);
+            } catch (Exception e) {
+                LOG.error(e, "Error processing tile ", this.tile);
                 this.exception = e;
             }
         }
 
         /**
          * Find the best barcode match for the given read sequence, and accumulate metrics
+         *
          * @param readSubsequences portion of read containing barcode
-         * @param passingFilter PF flag for the current read
+         * @param passingFilter    PF flag for the current read
          * @return perfect barcode string, if there was a match within tolerance, or null if not.
          */
         private BarcodeMatch findBestBarcodeAndUpdateMetrics(final byte[][] readSubsequences,
@@ -612,9 +633,9 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
             }
 
             final boolean matched = bestBarcodeMetric != null &&
-                    numNoCalls <= MAX_NO_CALLS &&
-                    numMismatchesInBestBarcode <= MAX_MISMATCHES &&
-                    numMismatchesInSecondBestBarcode - numMismatchesInBestBarcode >= MIN_MISMATCH_DELTA;
+                    numNoCalls <= maxNoCalls &&
+                    numMismatchesInBestBarcode <= maxMismatches &&
+                    numMismatchesInSecondBestBarcode - numMismatchesInBestBarcode >= minMismatchDelta;
 
             final BarcodeMatch match = new BarcodeMatch();
 
@@ -624,8 +645,7 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
                 match.mismatches = numMismatchesInBestBarcode;
                 match.mismatchesToSecondBest = numMismatchesInSecondBestBarcode;
                 match.barcode = bestBarcodeMetric.BARCODE.toLowerCase().replaceAll(IlluminaUtil.BARCODE_DELIMITER, "");
-            }
-            else {
+            } else {
                 match.mismatches = totalBarcodeReadBases;
                 match.barcode = "";
             }
@@ -649,8 +669,7 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
 
                 match.matched = true;
                 match.barcode = bestBarcodeMetric.BARCODE.replaceAll(IlluminaUtil.BARCODE_DELIMITER, "");
-            }
-            else {
+            } else {
                 ++noMatchBarcodeMetric.READS;
                 if (passingFilter) {
                     ++noMatchBarcodeMetric.PF_READS;
@@ -662,6 +681,7 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
 
         /**
          * Compare barcode sequence to bases from read
+         *
          * @return how many bases did not match
          */
         private int countMismatches(final byte[][] barcodeBytes, final byte[][] readSubsequence, final byte[][] qualities) {
@@ -672,7 +692,7 @@ public class ExtractIlluminaBarcodes extends CommandLineProgram {
                 for (int i = 0; i < basesToCheck; ++i) {
                     if (!SequenceUtil.isNoCall(readSubsequence[j][i])) {
                         if (!SequenceUtil.basesEqual(barcodeBytes[j][i], readSubsequence[j][i])) ++numMismatches;
-                        else if (qualities != null && qualities[j][i] < MINIMUM_BASE_QUALITY)    ++numMismatches;
+                        else if (qualities != null && qualities[j][i] < minimumBaseQuality) ++numMismatches;
                     }
                 }
             }
diff --git a/src/java/net/sf/picard/illumina/IlluminaBasecallsToFastq.java b/src/java/net/sf/picard/illumina/IlluminaBasecallsToFastq.java
index 3a5bdfa..9b316e6 100644
--- a/src/java/net/sf/picard/illumina/IlluminaBasecallsToFastq.java
+++ b/src/java/net/sf/picard/illumina/IlluminaBasecallsToFastq.java
@@ -68,9 +68,15 @@ public class IlluminaBasecallsToFastq extends CommandLineProgram {
             mutex = {"MULTIPLEX_PARAMS"})
     public File OUTPUT_PREFIX;
 
-    @Option(doc = "The barcode of the run.  Prefixed to read names.")
+    @Option(doc = "The barcode of the run.  Prefixed to read names.", optional = false)
     public String RUN_BARCODE;
 
+    @Option(doc = "The name of the machine on which the run was sequenced; required if emitting Casava1.8-style read name headers", optional = true)
+    public String MACHINE_NAME;
+    
+    @Option(doc = "The barcode of the flowcell that was sequenced; required if emitting Casava1.8-style read name headers", optional = true)
+    public String FLOWCELL_BARCODE;
+    
     @Option(doc = ReadStructure.PARAMETER_DOC, shortName = "RS")
     public String READ_STRUCTURE;
 
@@ -117,13 +123,21 @@ public class IlluminaBasecallsToFastq extends CommandLineProgram {
             "The default of 2 is what the Illumina's spec describes as the minimum, but in practice the value has been observed lower.")
     public int MINIMUM_QUALITY = BclQualityEvaluationStrategy.ILLUMINA_ALLEGED_MINIMUM_QUALITY;
 
+    @Option(doc="The read name header formatting to emit.  Casava1.8 formatting has additional information beyond Illumina, including: " +
+            "the passing-filter flag value for the read, the flowcell name, and the sequencer name.", optional = false)
+    public ReadNameFormat READ_NAME_FORMAT = ReadNameFormat.CASAVA_1_8;
 
+    /** Simple switch to control the read name format to emit. */
+    public enum ReadNameFormat {
+        CASAVA_1_8, ILLUMINA
+    }
+    
     private final Map<String, FastqRecordsWriter> barcodeFastqWriterMap = new HashMap<String, FastqRecordsWriter>();
     private ReadStructure readStructure;
     IlluminaBasecallsConverter<FastqRecordsForCluster> basecallsConverter;
     private static final Log log = Log.getInstance(IlluminaBasecallsToFastq.class);
     private final FastqWriterFactory fastqWriterFactory = new FastqWriterFactory();
-
+    private ReadNameEncoder readNameEncoder;
     private static final Comparator<FastqRecordsForCluster> queryNameComparator = new Comparator<FastqRecordsForCluster>() {
         @Override
         public int compare(final FastqRecordsForCluster r1, final FastqRecordsForCluster r2) {
@@ -131,7 +145,6 @@ public class IlluminaBasecallsToFastq extends CommandLineProgram {
                     r2.templateRecords[0].getReadHeader());
         }
     };
-    private BclQualityEvaluationStrategy bclQualityEvaluationStrategy;
 
 
     @Override
@@ -143,11 +156,39 @@ public class IlluminaBasecallsToFastq extends CommandLineProgram {
         return 0;
     }
 
+    @Override
+    protected String[] customCommandLineValidation() {
+        final LinkedList<String> errors = new LinkedList<String>();
+        if (READ_NAME_FORMAT == ReadNameFormat.CASAVA_1_8 && MACHINE_NAME == null) {
+            errors.add("MACHINE_NAME is required when using Casava1.8-style read name headers.");
+        }
+
+        if (READ_NAME_FORMAT == ReadNameFormat.CASAVA_1_8 && FLOWCELL_BARCODE == null) {
+            errors.add("FLOWCELL_BARCODE is required when using Casava1.8-style read name headers.");
+        }
+        
+        if (errors.isEmpty()) {
+            return null;
+        } else {
+            return errors.toArray(new String[errors.size()]);
+        }
+    }
+
     /**
      * Prepares loggers, initiates garbage collection thread, parses arguments and initialized variables appropriately/
      */
     private void initialize() {
-        bclQualityEvaluationStrategy = new BclQualityEvaluationStrategy(MINIMUM_QUALITY);
+        fastqWriterFactory.setCreateMd5(CREATE_MD5_FILE);
+        switch (READ_NAME_FORMAT) {
+            case CASAVA_1_8:
+                readNameEncoder = new Casava18ReadNameEncoder(MACHINE_NAME, RUN_BARCODE, FLOWCELL_BARCODE);        
+                break;
+            case ILLUMINA:
+                readNameEncoder = new IlluminaReadNameEncoder(RUN_BARCODE);
+                break;
+        }
+        
+        final BclQualityEvaluationStrategy bclQualityEvaluationStrategy = new BclQualityEvaluationStrategy(MINIMUM_QUALITY);
         readStructure = new ReadStructure(READ_STRUCTURE);
         if (MULTIPLEX_PARAMS != null) {
             IoUtil.assertFileIsReadable(MULTIPLEX_PARAMS);
@@ -160,7 +201,7 @@ public class IlluminaBasecallsToFastq extends CommandLineProgram {
             populateWritersFromMultiplexParams();
             demultiplex = true;
         }
-        int readsPerCluster = readStructure.templates.length() + readStructure.barcodes.length();
+        final int readsPerCluster = readStructure.templates.length() + readStructure.barcodes.length();
         basecallsConverter = new IlluminaBasecallsConverter<FastqRecordsForCluster>(BASECALLS_DIR, LANE, readStructure,
                 barcodeFastqWriterMap, demultiplex, MAX_READS_IN_RAM_PER_TILE/readsPerCluster, TMP_DIR, NUM_PROCESSORS,
                 FORCE_GC, FIRST_TILE, TILE_LIMIT, queryNameComparator,
@@ -170,7 +211,9 @@ public class IlluminaBasecallsToFastq extends CommandLineProgram {
 
         log.info("READ STRUCTURE IS " + readStructure.toString());
 
-        basecallsConverter.setConverter(new ClusterToFastqRecordsForClusterConverter());
+        basecallsConverter.setConverter(
+		        new ClusterToFastqRecordsForClusterConverter(
+				        basecallsConverter.getFactory().getOutputReadStructure()));
 
     }
 
@@ -320,33 +363,32 @@ public class IlluminaBasecallsToFastq extends CommandLineProgram {
         private final int [] templateIndices;
         private final int [] barcodeIndices;
 
-        ClusterToFastqRecordsForClusterConverter() {
-            this.templateIndices = readStructure.templates.getIndices();
-            this.barcodeIndices = readStructure.barcodes.getIndices();
+        ClusterToFastqRecordsForClusterConverter(final ReadStructure outputReadStructure) {
+            this.templateIndices = outputReadStructure.templates.getIndices();
+            this.barcodeIndices = outputReadStructure.barcodes.getIndices();
         }
 
         @Override
         public FastqRecordsForCluster convertClusterToOutputRecord(final ClusterData cluster) {
-            final FastqRecordsForCluster ret =
-                    new FastqRecordsForCluster(readStructure.templates.length(), readStructure.barcodes.length());
-            final String readName = IlluminaUtil.makeReadName(RUN_BARCODE, cluster.getLane(), cluster.getTile(),
-                    cluster.getX(), cluster.getY());
+            final FastqRecordsForCluster ret = new FastqRecordsForCluster(readStructure.templates.length(), readStructure.barcodes.length());
             final boolean appendReadNumberSuffix = ret.templateRecords.length > 1;
-            makeFastqRecords(ret.templateRecords, templateIndices, readName, cluster, appendReadNumberSuffix);
-            makeFastqRecords(ret.barcodeRecords, barcodeIndices, readName, cluster, false);
+            makeFastqRecords(ret.templateRecords, templateIndices, cluster, appendReadNumberSuffix);
+            makeFastqRecords(ret.barcodeRecords, barcodeIndices, cluster, false);
             return ret;
         }
 
-        private void makeFastqRecords(final FastqRecord[] recs, final int[] indices, final String readName,
+        private void makeFastqRecords(final FastqRecord[] recs, final int[] indices,
                                       final ClusterData cluster, final boolean appendReadNumberSuffix) {
-            for (int i = 0; i < indices.length; ++i) {
+            for (short i = 0; i < indices.length; ++i) {
                 final ReadData readData = cluster.getRead(indices[i]);
                 final String readBases = StringUtil.bytesToString(readData.getBases()).replace('.', 'N');
-                final String readNameForEnd;
-                if (appendReadNumberSuffix) readNameForEnd = readName + "/" + (i+1);
-                else readNameForEnd = readName;
-                recs[i] = new FastqRecord(readNameForEnd, readBases, null,
-                        SAMUtils.phredToFastq(readData.getQualities()));
+                final String readName = readNameEncoder.generateReadName(cluster, appendReadNumberSuffix ? i + 1 : null);
+                recs[i] = new FastqRecord(
+                        readName, 
+                        readBases, 
+                        null,
+                        SAMUtils.phredToFastq(readData.getQualities())
+                );
             }
         }
     }
diff --git a/src/java/net/sf/picard/illumina/parser/readers/TileMetricsOutReader.java b/src/java/net/sf/picard/illumina/parser/readers/TileMetricsOutReader.java
index df75391..4f3f329 100644
--- a/src/java/net/sf/picard/illumina/parser/readers/TileMetricsOutReader.java
+++ b/src/java/net/sf/picard/illumina/parser/readers/TileMetricsOutReader.java
@@ -72,7 +72,7 @@ public class TileMetricsOutReader implements Iterator<TileMetricsOutReader.Illum
     /**
      * IlluminaTileMetrics corresponds to a single record in a TileMetricsOut file
      */
-    public class IlluminaTileMetrics {
+    public static class IlluminaTileMetrics {
         private final int laneNumber;
         private final int tileNumber;
         private final int metricCode;
@@ -85,6 +85,13 @@ public class TileMetricsOutReader implements Iterator<TileMetricsOutReader.Illum
             metricValue = bb.getFloat();
         }
 
+        public IlluminaTileMetrics(int laneNumber, int tileNumber, int metricCode, float metricValue) {
+            this.laneNumber = laneNumber;
+            this.tileNumber = tileNumber;
+            this.metricCode = metricCode;
+            this.metricValue = metricValue;
+        }
+
         public int getLaneNumber() {
             return laneNumber;
         }
diff --git a/src/java/net/sf/picard/io/IoUtil.java b/src/java/net/sf/picard/io/IoUtil.java
index 647d826..89fd1c7 100644
--- a/src/java/net/sf/picard/io/IoUtil.java
+++ b/src/java/net/sf/picard/io/IoUtil.java
@@ -26,9 +26,7 @@ package net.sf.picard.io;
 import net.sf.picard.PicardException;
 import net.sf.picard.util.IterableOnceIterator;
 import net.sf.samtools.Defaults;
-import net.sf.samtools.util.CloserUtil;
-import net.sf.samtools.util.CollectionUtil;
-import net.sf.samtools.util.RuntimeIOException;
+import net.sf.samtools.util.*;
 
 import java.io.*;
 import java.nio.charset.Charset;
@@ -36,6 +34,7 @@ import java.util.*;
 import java.util.regex.Pattern;
 import java.util.zip.GZIPInputStream;
 import java.util.zip.GZIPOutputStream;
+
 import org.apache.tools.bzip2.CBZip2InputStream;
 import org.apache.tools.bzip2.CBZip2OutputStream;
 
@@ -354,6 +353,10 @@ public class IoUtil extends net.sf.samtools.util.IOUtil {
         }
     }
 
+    public static OutputStream openFileForMd5CalculatingWriting(final File file) {
+        return new Md5CalculatingOutputStream(IoUtil.openFileForWriting(file), new File(file.getAbsolutePath() + ".md5"));
+    }
+
     /**
      * Utility method to copy the contents of input to output. The caller is responsible for
      * opening and closing both streams.
@@ -610,7 +613,8 @@ public class IoUtil extends net.sf.samtools.util.IOUtil {
 
     /** Reads all of the stream into a String, decoding with the provided {@link Charset} then closes the stream quietly. */
     public static String slurp(final InputStream is, final Charset charSet) {
-        return CollectionUtil.getSoleElement(tokenSlurp(is, charSet, "\\A"));
+        final List<String> tokenOrEmpty = tokenSlurp(is, charSet, "\\A");
+        return tokenOrEmpty.isEmpty() ? StringUtil.EMPTY_STRING : CollectionUtil.getSoleElement(tokenOrEmpty);
     }
 
     /** Tokenizes the provided input stream into memory using the given delimiter. */
diff --git a/src/java/net/sf/picard/metrics/MultiLevelCollector.java b/src/java/net/sf/picard/metrics/MultiLevelCollector.java
index b2aebf3..73c986f 100644
--- a/src/java/net/sf/picard/metrics/MultiLevelCollector.java
+++ b/src/java/net/sf/picard/metrics/MultiLevelCollector.java
@@ -24,6 +24,7 @@
 
 package net.sf.picard.metrics;
 
+import net.sf.picard.PicardException;
 import net.sf.picard.analysis.MetricAccumulationLevel;
 import net.sf.picard.reference.ReferenceSequence;
 import net.sf.samtools.SAMReadGroupRecord;
@@ -59,6 +60,7 @@ import java.util.*;
  */
 public abstract class MultiLevelCollector<METRIC_TYPE extends MetricBase, HISTOGRAM_KEY extends Comparable, ARGTYPE>  {
 
+    public static final String UNKNOWN = "unknown";
     //The collector that will accept all records (allReads is NULL if !calculateAll)
     private PerUnitMetricCollector<METRIC_TYPE, HISTOGRAM_KEY, ARGTYPE> allReadCollector;
 
@@ -116,6 +118,8 @@ public abstract class MultiLevelCollector<METRIC_TYPE extends MetricBase, HISTOG
         //Make a PerUnitMetricCollector for this given Distributor
         protected abstract PerUnitMetricCollector<METRIC_TYPE, HISTOGRAM_KEY, ARGTYPE> makeCollector(final SAMReadGroupRecord rg);
 
+        protected abstract PerUnitMetricCollector<METRIC_TYPE, HISTOGRAM_KEY, ARGTYPE> makeUnknownCollector();
+
         public Distributor(final List<SAMReadGroupRecord> rgRecs) {
             collectors = new LinkedHashMap<String, PerUnitMetricCollector<METRIC_TYPE, HISTOGRAM_KEY, ARGTYPE>>();
             for(final SAMReadGroupRecord rg : rgRecs) {
@@ -136,14 +140,22 @@ public abstract class MultiLevelCollector<METRIC_TYPE extends MetricBase, HISTOG
         /** Call acceptRecord(args) on the record collector identified by getKey */
         public void acceptRecord(final ARGTYPE args, final SAMReadGroupRecord rg) {
 
-            String key = "unknown";
+            String key = UNKNOWN;
             if(rg != null) {
                 final String computedKey = getKey(rg);
                 if(computedKey != null) {
                     key = computedKey;
                 }
             }
-            collectors.get(key).acceptRecord(args);
+            PerUnitMetricCollector<METRIC_TYPE, HISTOGRAM_KEY, ARGTYPE> collector = collectors.get(key);
+            if (collector == null) {
+                if (!UNKNOWN.equals(key)) {
+                    throw new PicardException("Could not find collector for " + key);
+                }
+                collector = makeUnknownCollector();
+                collectors.put(key, collector);
+            }
+            collector.acceptRecord(args);
         }
 
         /** Add all records to the MetricsFile passed in, this will happen in the order they were
@@ -181,6 +193,11 @@ public abstract class MultiLevelCollector<METRIC_TYPE extends MetricBase, HISTOG
         }
 
         @Override
+        protected PerUnitMetricCollector<METRIC_TYPE, HISTOGRAM_KEY, ARGTYPE> makeUnknownCollector() {
+            throw new UnsupportedOperationException("Should not happen");
+        }
+
+        @Override
         public void finish() {
             allReadCollector.finish();
         }
@@ -206,6 +223,11 @@ public abstract class MultiLevelCollector<METRIC_TYPE extends MetricBase, HISTOG
         protected PerUnitMetricCollector<METRIC_TYPE, HISTOGRAM_KEY, ARGTYPE> makeCollector(SAMReadGroupRecord rg) {
             return makeSampleCollector(rg);
         }
+
+        @Override
+        protected PerUnitMetricCollector<METRIC_TYPE, HISTOGRAM_KEY, ARGTYPE> makeUnknownCollector() {
+            return makeChildCollector(UNKNOWN, null, null);
+        }
     }
 
     //Discriminates between records based on library name, and calls acceptRecord on the appropriate PerUnitMetricCollectors
@@ -223,6 +245,11 @@ public abstract class MultiLevelCollector<METRIC_TYPE extends MetricBase, HISTOG
         protected PerUnitMetricCollector<METRIC_TYPE, HISTOGRAM_KEY, ARGTYPE> makeCollector(SAMReadGroupRecord rg) {
             return makeLibraryCollector(rg);
         }
+
+        @Override
+        protected PerUnitMetricCollector<METRIC_TYPE, HISTOGRAM_KEY, ARGTYPE> makeUnknownCollector() {
+            return makeChildCollector(UNKNOWN, UNKNOWN, null);
+        }
     }
 
     //Discriminates between records based on read group name, and calls acceptRecord on the appropriate PerUnitMetricCollectors
@@ -240,6 +267,11 @@ public abstract class MultiLevelCollector<METRIC_TYPE extends MetricBase, HISTOG
         protected PerUnitMetricCollector<METRIC_TYPE, HISTOGRAM_KEY, ARGTYPE> makeCollector(SAMReadGroupRecord rg) {
             return makeReadGroupCollector(rg);
         }
+
+        @Override
+        protected PerUnitMetricCollector<METRIC_TYPE, HISTOGRAM_KEY, ARGTYPE> makeUnknownCollector() {
+            return makeChildCollector(UNKNOWN, UNKNOWN, UNKNOWN);
+        }
     }
 
     /**
diff --git a/src/java/net/sf/picard/pedigree/PedFile.java b/src/java/net/sf/picard/pedigree/PedFile.java
index 1a429d6..648ca20 100644
--- a/src/java/net/sf/picard/pedigree/PedFile.java
+++ b/src/java/net/sf/picard/pedigree/PedFile.java
@@ -18,9 +18,21 @@ import java.util.regex.Pattern;
  *
  * Stores the information in memory as a map of individualId -> Pedigree information for that individual
  */
-public class PedFile extends TreeMap<String,PedTrio> {
+public class PedFile extends TreeMap<String, PedFile.PedTrio> {
     private static final Log log = Log.getInstance(PedFile.class);
     static final Pattern WHITESPACE = Pattern.compile("\\s+");
+    static final Pattern TAB = Pattern.compile("\\t");
+    private final Pattern delimiterPattern;
+    private final String delimiterString; // A textual representation of the delimiter, for output purposes
+
+    // These two are really for PedTrio, but they can't be static in there and need to be accessed outside of PedFile
+    public static final Number NO_PHENO = new Integer(-9);
+    public static final Sex UNKNOWN_SEX = Sex.Unknown;
+
+    public PedFile(final boolean isTabMode) {
+        delimiterPattern = isTabMode ? TAB : WHITESPACE;
+        delimiterString = isTabMode ? "tabs" : "whitespace";
+    }
 
     /** Adds a trio to the PedFile keyed by the individual id. */
     public void add(final PedTrio trio) {
@@ -52,7 +64,7 @@ public class PedFile extends TreeMap<String,PedTrio> {
 
             out.close();
         }
-        catch (IOException ioe) {
+        catch (final IOException ioe) {
             throw new RuntimeIOException("IOException while writing to file " + file.getAbsolutePath(), ioe);
         }
     }
@@ -60,28 +72,28 @@ public class PedFile extends TreeMap<String,PedTrio> {
     /**
      * Attempts to read a pedigree file into memory.
      */
-    public static PedFile fromFile(final File file) {
-        final PedFile pedfile = new PedFile();
+    public static PedFile fromFile(final File file, final boolean isTabMode) {
+        final PedFile pedFile = new PedFile(isTabMode);
 
         IoUtil.assertFileIsReadable(file);
         for (final String line : IoUtil.readLines(file)) {
-            final String[] fields = WHITESPACE.split(line);
+            final String[] fields = pedFile.delimiterPattern.split(line);
             if (fields.length != 6) {
                 log.error("Ped file line contained invalid number of fields, skipping: " + line);
                 continue;
             }
 
-            final PedTrio trio = new PedTrio(fields[0],
-                                             fields[1],
-                                             fields[2],
-                                             fields[3],
-                                             Sex.fromCode(Integer.parseInt(fields[4])),
-                                             fields[5].contains(".") ? Double.parseDouble(fields[5]) : Integer.parseInt(fields[5])
-                                            );
-            pedfile.add(trio);
+            final PedTrio trio = pedFile.new PedTrio(fields[0],
+                    fields[1],
+                    fields[2],
+                    fields[3],
+                    Sex.fromCode(Integer.parseInt(fields[4])),
+                    fields[5].contains(".") ? Double.parseDouble(fields[5]) : Integer.parseInt(fields[5])
+            );
+            pedFile.add(trio);
         }
 
-        return pedfile;
+        return pedFile;
     }
 
     /**
@@ -96,4 +108,40 @@ public class PedFile extends TreeMap<String,PedTrio> {
 
         return this;
     }
+
+    public class PedTrio {
+        private final String familyId;
+        private final String individualId;
+        private final String paternalId;
+        private final String maternalId;
+        private final Sex sex;
+        private final Number phenotype;
+
+        /** Constructs a TRIO that cannot be modified after the fact. */
+        public PedTrio(final String familyId, final String individualId, final String paternalId, final String maternalId, final Sex sex, final Number phenotype) {
+            if (delimiterPattern.split(familyId).length != 1)     throw new IllegalArgumentException("FamilyID     cannot contain " + delimiterString + ": [" + familyId     + "]");
+            if (delimiterPattern.split(individualId).length != 1) throw new IllegalArgumentException("IndividualID cannot contain " + delimiterString + ": [" + individualId + "]");
+            if (delimiterPattern.split(paternalId).length != 1)   throw new IllegalArgumentException("PaternalID   cannot contain " + delimiterString + ": [" + paternalId   + "]");
+            if (delimiterPattern.split(maternalId).length != 1)   throw new IllegalArgumentException("MaternalID   cannot contain " + delimiterString + ": [" + maternalId   + "]");
+
+            this.familyId = familyId;
+            this.individualId = individualId;
+            this.paternalId = paternalId;
+            this.maternalId = maternalId;
+            this.sex = sex;
+            this.phenotype = phenotype;
+        }
+
+        /** True if this record has paternal and maternal ids, otherwise false. */
+        public boolean hasBothParents() {
+            return this.paternalId != null && this.maternalId != null;
+        }
+
+        public String getFamilyId() { return familyId; }
+        public String getIndividualId() { return individualId; }
+        public String getPaternalId() { return paternalId; }
+        public String getMaternalId() { return maternalId; }
+        public Sex getSex() { return sex; }
+        public Number getPhenotype() { return phenotype; }
+    }
 }
diff --git a/src/java/net/sf/picard/pedigree/PedTrio.java b/src/java/net/sf/picard/pedigree/PedTrio.java
deleted file mode 100644
index 8288625..0000000
--- a/src/java/net/sf/picard/pedigree/PedTrio.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package net.sf.picard.pedigree;
-
-/**
- * Represents a single trio within a ped file.
- *
- * @author Tim Fennell
- */
-public class PedTrio {
-    public static final Number NO_PHENO = new Integer(-9);
-    public static final Sex UNKNOWN_SEX = Sex.Unknown;
-
-    private final String familyId;
-    private final String individualId;
-    private final String paternalId;
-    private final String maternalId;
-    private final Sex sex;
-    private final Number phenotype;
-
-    /** Constructs a TRIO that cannot be modified after the fact. */
-    public PedTrio(final String familyId, final String individualId, final String paternalId, final String maternalId, final Sex sex, final Number phenotype) {
-        if (PedFile.WHITESPACE.split(familyId).length != 1)     throw new IllegalArgumentException("FamilyID     cannot contain whitespace: [" + familyId     + "]");
-        if (PedFile.WHITESPACE.split(individualId).length != 1) throw new IllegalArgumentException("IndividualID cannot contain whitespace: [" + individualId + "]");
-        if (PedFile.WHITESPACE.split(paternalId).length != 1)   throw new IllegalArgumentException("PaternalID   cannot contain whitespace: [" + paternalId   + "]");
-        if (PedFile.WHITESPACE.split(maternalId).length != 1)   throw new IllegalArgumentException("MaternalID   cannot contain whitespace: [" + maternalId   + "]");
-
-        this.familyId = familyId;
-        this.individualId = individualId;
-        this.paternalId = paternalId;
-        this.maternalId = maternalId;
-        this.sex = sex;
-        this.phenotype = phenotype;
-    }
-
-    /** True if this record has paternal and maternal ids, otherwise false. */
-    public boolean hasBothParents() {
-        return this.paternalId != null && this.maternalId != null;
-    }
-
-    public String getFamilyId() { return familyId; }
-    public String getIndividualId() { return individualId; }
-    public String getPaternalId() { return paternalId; }
-    public String getMaternalId() { return maternalId; }
-    public Sex getSex() { return sex; }
-    public Number getPhenotype() { return phenotype; }
-}
diff --git a/src/java/net/sf/picard/reference/ReferenceSequenceFileFactory.java b/src/java/net/sf/picard/reference/ReferenceSequenceFileFactory.java
index ec99dcf..812ac69 100644
--- a/src/java/net/sf/picard/reference/ReferenceSequenceFileFactory.java
+++ b/src/java/net/sf/picard/reference/ReferenceSequenceFileFactory.java
@@ -43,6 +43,8 @@ public class ReferenceSequenceFileFactory {
         add(".fasta.gz");
         add(".fa");
         add(".fa.gz");
+        add(".fna");
+        add(".fna.gz");
         add(".txt");
         add(".txt.gz");
     }};
diff --git a/src/java/net/sf/picard/sam/AbstractAlignmentMerger.java b/src/java/net/sf/picard/sam/AbstractAlignmentMerger.java
index 37a1e8e..817568d 100644
--- a/src/java/net/sf/picard/sam/AbstractAlignmentMerger.java
+++ b/src/java/net/sf/picard/sam/AbstractAlignmentMerger.java
@@ -29,6 +29,7 @@ import net.sf.picard.io.IoUtil;
 import net.sf.picard.reference.ReferenceSequenceFileWalker;
 import net.sf.picard.util.CigarUtil;
 import net.sf.picard.util.Log;
+import net.sf.picard.util.ProgressLogger;
 import net.sf.samtools.*;
 import net.sf.samtools.SAMFileHeader.SortOrder;
 import net.sf.samtools.util.CloseableIterator;
@@ -72,6 +73,8 @@ public abstract class AbstractAlignmentMerger {
     private final NumberFormat FMT = new DecimalFormat("#,###");
 
     private final Log log = Log.getInstance(AbstractAlignmentMerger.class);
+    private final ProgressLogger progress = new ProgressLogger(this.log, 1000000, "Written to sorting collection in queryname order", "records");
+
     private final File unmappedBamFile;
     private final File targetBamFile;
     private final SAMSequenceDictionary sequenceDictionary;
@@ -249,7 +252,8 @@ public abstract class AbstractAlignmentMerger {
             if (nextAligned != null && rec.getReadName().equals(nextAligned.getReadName())) {
                 // If there are multiple alignments for a read (pair), then the unaligned SAMRecord must be cloned
                 // before copying info from the aligned record to the unaligned.
-                final boolean clone = nextAligned.numHits() > 1;
+                final boolean clone = nextAligned.numHits() > 1 || nextAligned.hasSupplementalHits();
+                SAMRecord r1Primary = null, r2Primary = null;
 
                 if (rec.getReadPairedFlag()) {
                     for (int i = 0; i < nextAligned.numHits(); ++i) {
@@ -271,6 +275,12 @@ public abstract class AbstractAlignmentMerger {
                             secondToWrite = secondOfPair;
                         }
 
+                        // If these are the primary alignments then stash them for use on any supplemental alignments
+                        if (isPrimaryAlignment) {
+                            r1Primary = firstToWrite;
+                            r2Primary = secondToWrite;
+                        }
+
                         transferAlignmentInfoToPairedRead(firstToWrite, secondToWrite, firstAligned, secondAligned);
 
                         // Only write unmapped read when it has the mate info from the primary alignment.
@@ -286,27 +296,22 @@ public abstract class AbstractAlignmentMerger {
                         }
                     }
 
-                    // This is already being checked at construction, but just to be sure ....
-                    if (nextAligned.getSupplementalFirstOfPairOrFragment().size() != nextAligned.getSupplementalSecondOfPair().size()) {
-                        throw new IllegalStateException("Supplemental first of pairs not the same size as second of pairs!");
-                    }
                     // Take all of the supplemental reads which had been stashed and add them (as appropriate) to sorted
-                    for (int i = 0; i < nextAligned.getSupplementalFirstOfPairOrFragment().size(); i++) {
-                        final SAMRecord firstToWrite = clone(rec);
-                        final SAMRecord secondToWrite = clone(secondOfPair);
-                        transferAlignmentInfoToPairedRead(firstToWrite, secondToWrite,
-                                nextAligned.getSupplementalFirstOfPairOrFragment().get(i),
-                                nextAligned.getSupplementalSecondOfPair().get(i));
-                        addIfNotFiltered(sorted, firstToWrite);
-                        addIfNotFiltered(sorted, secondToWrite);
-
-                        if (!firstToWrite.getReadUnmappedFlag()) ++unmapped;
-                        else ++aligned;
-
-                        if (!secondToWrite.getReadUnmappedFlag()) ++unmapped;
-                        else ++aligned;
+                    for (final boolean isRead1 : new boolean[]{true,false}) {
+                        final List<SAMRecord> supplementals = isRead1 ? nextAligned.getSupplementalFirstOfPairOrFragment() : nextAligned.getSupplementalSecondOfPair();
+                        final SAMRecord sourceRec           = isRead1 ? rec                                                : secondOfPair;
+                        final SAMRecord matePrimary         = isRead1 ? r2Primary                                          : r1Primary;
+
+                        for (final SAMRecord supp : supplementals) {
+                            final SAMRecord out = clone(sourceRec);
+                            transferAlignmentInfoToFragment(out, supp);
+                            if (matePrimary != null) SamPairUtil.setMateInformationOnSupplementalAlignment(out, matePrimary);
+                            ++aligned;
+                            addIfNotFiltered(sorted, out);
+                        }
                     }
-                } else {
+                }
+                else {
                     for (int i = 0; i < nextAligned.numHits(); ++i) {
                         final SAMRecord recToWrite = clone ? clone(rec) : rec;
                         transferAlignmentInfoToFragment(recToWrite, nextAligned.getFragment(i));
@@ -316,12 +321,10 @@ public abstract class AbstractAlignmentMerger {
                     }
                     // Take all of the supplemental reads which had been stashed and add them (as appropriate) to sorted
                     for (final SAMRecord supplementalRec : nextAligned.getSupplementalFirstOfPairOrFragment()) {
-                        // always clone supplementals
                         final SAMRecord recToWrite = clone(rec);
                         transferAlignmentInfoToFragment(recToWrite, supplementalRec);
                         addIfNotFiltered(sorted, recToWrite);
-                        if (recToWrite.getReadUnmappedFlag()) ++unmapped;
-                        else ++aligned;
+                        ++aligned;
                     }
                 }
                 nextAligned = nextAligned();
@@ -342,15 +345,10 @@ public abstract class AbstractAlignmentMerger {
                     }
                 }
             }
-
-            if ((aligned + unmapped) % 1000000 == 0) {
-                log.info("Processed " + FMT.format(aligned + unmapped) + " records in query name order.");
-            }
         }
         unmappedIterator.close();
         if (alignedIterator.hasNext()) {
-            throw new IllegalStateException("Reads remaining on alignment iterator: " +
-                    alignedIterator.next().getReadName() + "!");
+            throw new IllegalStateException("Reads remaining on alignment iterator: " + alignedIterator.next().getReadName() + "!");
         }
         alignedIterator.close();
 
@@ -358,23 +356,21 @@ public abstract class AbstractAlignmentMerger {
         header.setSortOrder(this.sortOrder);
         final boolean presorted = this.sortOrder == SortOrder.coordinate;
         final SAMFileWriter writer = new SAMFileWriterFactory().makeSAMOrBAMWriter(header, presorted, this.targetBamFile);
-        int count = 0;
+        final ProgressLogger finalProgress = new ProgressLogger(log, 10000000, "Written in coordinate order to output", "records");
+
         for (final SAMRecord rec : sorted) {
             if (!rec.getReadUnmappedFlag()) {
                 if (refSeq != null) {
                     final byte[] referenceBases = refSeq.get(sequenceDictionary.getSequenceIndex(rec.getReferenceName())).getBases();
-                    rec.setAttribute(SAMTag.NM.name(),
-                        SequenceUtil.calculateSamNmTag(rec, referenceBases, 0, bisulfiteSequence));
+                    rec.setAttribute(SAMTag.NM.name(), SequenceUtil.calculateSamNmTag(rec, referenceBases, 0, bisulfiteSequence));
+
                     if (rec.getBaseQualities() != SAMRecord.NULL_QUALS) {
-                        rec.setAttribute(SAMTag.UQ.name(),
-                            SequenceUtil.sumQualitiesOfMismatches(rec, referenceBases, 0, bisulfiteSequence));
+                        rec.setAttribute(SAMTag.UQ.name(), SequenceUtil.sumQualitiesOfMismatches(rec, referenceBases, 0, bisulfiteSequence));
                     }
                 }
             }
             writer.addAlignment(rec);
-            if (++count % 1000000 == 0) {
-                log.info(FMT.format(count) + " SAMRecords written to " + targetBamFile.getName());
-            }
+            finalProgress.record(rec);
         }
         writer.close();
         sorted.cleanup();
@@ -388,6 +384,7 @@ public abstract class AbstractAlignmentMerger {
     private void addIfNotFiltered(final SortingCollection<SAMRecord> sorted, final SAMRecord rec) {
         if (includeSecondaryAlignments || !rec.getNotPrimaryAlignmentFlag()) {
             sorted.add(rec);
+            this.progress.record(rec);
         }
     }
 
diff --git a/src/java/net/sf/picard/sam/CleanSam.java b/src/java/net/sf/picard/sam/CleanSam.java
index adfa6ad..338c71a 100644
--- a/src/java/net/sf/picard/sam/CleanSam.java
+++ b/src/java/net/sf/picard/sam/CleanSam.java
@@ -33,7 +33,6 @@ import net.sf.picard.util.Log;
 import net.sf.picard.util.ProgressLogger;
 import net.sf.samtools.*;
 import net.sf.samtools.util.CloseableIterator;
-import net.sf.samtools.util.CloserUtil;
 
 import java.io.File;
 import java.util.List;
@@ -82,9 +81,10 @@ public class CleanSam extends CommandLineProgram {
                 final SAMRecord rec = it.next();
                 if (!rec.getReadUnmappedFlag()) {
                     final SAMSequenceRecord refseq = rec.getHeader().getSequence(rec.getReferenceIndex());
-                    if (rec.getAlignmentEnd() > refseq.getSequenceLength()) {
+                    final int overhang = rec.getAlignmentEnd() - refseq.getSequenceLength();
+                    if (overhang > 0) {
                         // 1-based index of first base in read to clip.
-                        final int clipFrom = refseq.getSequenceLength() - rec.getAlignmentStart() + 1;
+                        final int clipFrom = rec.getReadLength() - overhang + 1;
                         final List<CigarElement> newCigarElements  = CigarUtil.softClipEndOfRead(clipFrom, rec.getCigar().getCigarElements());
                         rec.setCigar(new Cigar(newCigarElements));
                     }
diff --git a/src/java/net/sf/picard/sam/FastqToSam.java b/src/java/net/sf/picard/sam/FastqToSam.java
index 21eabfd..af9d0f3 100644
--- a/src/java/net/sf/picard/sam/FastqToSam.java
+++ b/src/java/net/sf/picard/sam/FastqToSam.java
@@ -111,6 +111,10 @@ public class FastqToSam extends CommandLineProgram {
     @Option(doc="If true and this is an unpaired fastq any occurance of '/1' will be removed from the end of a read name.")
     public Boolean STRIP_UNPAIRED_MATE_NUMBER = false;
 
+
+    @Option(doc="Allow (and ignore) empty lines")
+    public Boolean ALLOW_AND_IGNORE_EMPTY_LINES = false;
+
     private static final SolexaQualityConverter solexaQualityConverter = SolexaQualityConverter.getSingleton();
 
     /** Stock main method. */
@@ -122,11 +126,11 @@ public class FastqToSam extends CommandLineProgram {
     protected int doWork() {
         if (QUALITY_FORMAT == null) {
             final QualityEncodingDetector detector = new QualityEncodingDetector();
-            final FastqReader reader = new FastqReader(FASTQ);
+            final FastqReader reader = new FastqReader(FASTQ,ALLOW_AND_IGNORE_EMPTY_LINES);
             if (FASTQ2 == null) {
                 detector.add(QualityEncodingDetector.DEFAULT_MAX_RECORDS_TO_ITERATE, reader);
             } else {
-                final FastqReader reader2 = new FastqReader(FASTQ2);       
+                final FastqReader reader2 = new FastqReader(FASTQ2,ALLOW_AND_IGNORE_EMPTY_LINES);
                 detector.add(QualityEncodingDetector.DEFAULT_MAX_RECORDS_TO_ITERATE, reader, reader2);
                 reader2.close();
             }
@@ -147,7 +151,7 @@ public class FastqToSam extends CommandLineProgram {
         IoUtil.assertFileIsReadable(FASTQ);
         IoUtil.assertFileIsWritable(OUTPUT);
         
-        final FastqReader freader = new FastqReader(FASTQ);
+        final FastqReader freader = new FastqReader(FASTQ,ALLOW_AND_IGNORE_EMPTY_LINES);
         final SAMFileHeader header = createFileHeader();
         final SAMFileWriter writer = new SAMFileWriterFactory().makeSAMOrBAMWriter(header, false, OUTPUT);
 
@@ -171,8 +175,8 @@ public class FastqToSam extends CommandLineProgram {
         IoUtil.assertFileIsReadable(FASTQ2);
         IoUtil.assertFileIsWritable(OUTPUT);
         
-        final FastqReader freader1 = new FastqReader(FASTQ);
-        final FastqReader freader2 = new FastqReader(FASTQ2);
+        final FastqReader freader1 = new FastqReader(FASTQ,ALLOW_AND_IGNORE_EMPTY_LINES);
+        final FastqReader freader2 = new FastqReader(FASTQ2,ALLOW_AND_IGNORE_EMPTY_LINES);
         final SAMFileHeader header = createFileHeader() ;
         final SAMFileWriter writer = (new SAMFileWriterFactory()).makeSAMOrBAMWriter(header, false, OUTPUT);
 
diff --git a/src/java/net/sf/picard/sam/HitsForInsert.java b/src/java/net/sf/picard/sam/HitsForInsert.java
index cac30f2..7491191 100644
--- a/src/java/net/sf/picard/sam/HitsForInsert.java
+++ b/src/java/net/sf/picard/sam/HitsForInsert.java
@@ -93,6 +93,11 @@ class HitsForInsert {
         return Math.max(firstOfPairOrFragment.size(), secondOfPair.size());
     }
 
+    /** True if either the first or second of pair has supplementary alignments, otherwise false. */
+    public boolean hasSupplementalHits() {
+        return !(this.supplementalFirstOfPairOrFragment.isEmpty() && this.supplementalSecondOfPair.isEmpty());
+    }
+
     /**
      * @return Returns the ith hit for the first end, or null if the first end is not aligned.
      */
diff --git a/src/java/net/sf/picard/sam/MarkDuplicates.java b/src/java/net/sf/picard/sam/MarkDuplicates.java
index 5d716a4..b10abcf 100644
--- a/src/java/net/sf/picard/sam/MarkDuplicates.java
+++ b/src/java/net/sf/picard/sam/MarkDuplicates.java
@@ -566,7 +566,9 @@ public class MarkDuplicates extends AbstractDuplicateFindingAlgorithm {
      * @return an array with an ordered list of indexes into the source file
      */
     private void generateDuplicateIndexes() {
-        final int maxInMemory = (int) ((Runtime.getRuntime().maxMemory() * 0.25) / SortingLongCollection.SIZEOF);
+        // Keep this number from getting too large even if there is a huge heap.
+        final int maxInMemory = (int) Math.min((Runtime.getRuntime().maxMemory() * 0.25) / SortingLongCollection.SIZEOF,
+                (double)(Integer.MAX_VALUE - 5));
         log.info("Will retain up to " + maxInMemory + " duplicate indices before spilling to disk.");
         this.duplicateIndexes = new SortingLongCollection(maxInMemory, TMP_DIR.toArray(new File[TMP_DIR.size()]));
 
diff --git a/src/java/net/sf/picard/sam/MultiHitAlignedReadIterator.java b/src/java/net/sf/picard/sam/MultiHitAlignedReadIterator.java
index 1c8e1e6..f7fa051 100644
--- a/src/java/net/sf/picard/sam/MultiHitAlignedReadIterator.java
+++ b/src/java/net/sf/picard/sam/MultiHitAlignedReadIterator.java
@@ -28,14 +28,10 @@ import net.sf.picard.filter.FilteringIterator;
 import net.sf.picard.filter.SamRecordFilter;
 import net.sf.picard.util.Log;
 import net.sf.picard.util.PeekableIterator;
-import net.sf.samtools.SAMRecord;
-import net.sf.samtools.SAMRecordQueryNameComparator;
-import net.sf.samtools.SAMTag;
-import net.sf.samtools.SAMUtils;
+import net.sf.samtools.*;
 import net.sf.samtools.util.CloseableIterator;
 
-import java.util.Comparator;
-import java.util.NoSuchElementException;
+import java.util.*;
 
 import static net.sf.picard.sam.HitsForInsert.NumPrimaryAlignmentState;
 
@@ -120,6 +116,7 @@ class MultiHitAlignedReadIterator implements CloseableIterator<HitsForInsert> {
         // Accumulate the alignments matching readName.
         do {
             final SAMRecord rec = peekIterator.next();
+            replaceHardWithSoftClips(rec);
             // It is critical to do this here, because SamAlignmentMerger uses this exception to determine
             // if the aligned input needs to be sorted.
             if (peekIterator.hasNext() && queryNameComparator.fileOrderCompare(rec, peekIterator.peek()) > 0) {
@@ -150,12 +147,6 @@ class MultiHitAlignedReadIterator implements CloseableIterator<HitsForInsert> {
             } else throw new PicardException("Read is marked as pair but neither first or second: " + readName);
         } while (peekIterator.hasNext() && peekIterator.peek().getReadName().equals(readName));
 
-        // If we've added to the second of pair supplementals, make sure it is the same size as the first of pairs
-        if (hits.getSupplementalSecondOfPair().size() > 0 &&
-                hits.getSupplementalSecondOfPair().size() != hits.getSupplementalFirstOfPairOrFragment().size()) {
-            throw new PicardException("Number of supplemental second of pairs do not equal the number of supplemental first of pairs");
-        }
-
         // If there is no more than one alignment for each end, no need to do any coordination.
         if (hits.numHits() <= 1) {
             // No HI tags needed if only a single hit
@@ -175,9 +166,44 @@ class MultiHitAlignedReadIterator implements CloseableIterator<HitsForInsert> {
         return hits;
     }
 
+    /** Replaces hard clips with soft clips and fills in bases and qualities with dummy values as needed. */
+    private void replaceHardWithSoftClips(final SAMRecord rec) {
+        if (rec.getReadUnmappedFlag()) return;
+        if (rec.getCigar().isEmpty()) return;
+
+        List<CigarElement> elements = rec.getCigar().getCigarElements();
+        final CigarElement first = elements.get(0);
+        final CigarElement last  = elements.size() == 1 ? null : elements.get(elements.size()-1);
+        final int startHardClip = first.getOperator() == CigarOperator.H ? first.getLength() : 0;
+        final int endHardClip   = (last != null && last.getOperator() == CigarOperator.H) ? last.getLength() : 0;
+
+        if (startHardClip + endHardClip > 0) {
+            final int len = rec.getReadBases().length + startHardClip + endHardClip;
+
+            // Fix the basecalls
+            final byte[] bases = new byte[len];
+            Arrays.fill(bases, (byte) 'N');
+            System.arraycopy(rec.getReadBases(), 0, bases, startHardClip, rec.getReadBases().length);
+
+            // Fix the quality scores
+            final byte[] quals = new byte[len];
+            Arrays.fill(quals, (byte) 2  );
+            System.arraycopy(rec.getBaseQualities(), 0, quals, startHardClip, rec.getBaseQualities().length);
+
+            // Fix the cigar!
+            elements = new ArrayList<CigarElement>(elements); // make it modifiable
+            if (startHardClip > 0) elements.set(0, new CigarElement(first.getLength(), CigarOperator.S));
+            if (endHardClip   > 0) elements.set(elements.size()-1, new CigarElement(last.getLength(), CigarOperator.S));
+
+            // Set the update structures on the new record
+            rec.setReadBases(bases);
+            rec.setBaseQualities(quals);
+            rec.setCigar(new Cigar(elements));
+        }
+   }
+
+    /** Unsupported operation. */
     public void remove() {
         throw new UnsupportedOperationException();
     }
-
-
 }
diff --git a/src/java/net/sf/picard/sam/SamAlignmentMerger.java b/src/java/net/sf/picard/sam/SamAlignmentMerger.java
index d80053a..ded5782 100644
--- a/src/java/net/sf/picard/sam/SamAlignmentMerger.java
+++ b/src/java/net/sf/picard/sam/SamAlignmentMerger.java
@@ -150,7 +150,8 @@ public class SamAlignmentMerger extends AbstractAlignmentMerger {
         try {
             super.mergeAlignment();
         }
-        catch(IllegalStateException e) {
+        catch(final IllegalStateException ise) {
+            log.warn("Exception merging bam alignment - attempting to sort aligned reads and try again: ", ise.getMessage());
             forceSort = true;
             resetRefSeqFileWalker();
             super.mergeAlignment();
@@ -175,7 +176,7 @@ public class SamAlignmentMerger extends AbstractAlignmentMerger {
                 readers.add(r);
             }
 
-            final SamFileHeaderMerger headerMerger = new SamFileHeaderMerger(SAMFileHeader.SortOrder.coordinate, headers, false);
+            final SamFileHeaderMerger headerMerger = new SamFileHeaderMerger(SortOrder.queryname, headers, false);
 
             mergingIterator = new MergingSamRecordIterator(headerMerger, readers, true);
             header = headerMerger.getMergedHeader();
diff --git a/src/java/net/sf/picard/sam/SamPairUtil.java b/src/java/net/sf/picard/sam/SamPairUtil.java
index e323ec2..9b1fa3a 100644
--- a/src/java/net/sf/picard/sam/SamPairUtil.java
+++ b/src/java/net/sf/picard/sam/SamPairUtil.java
@@ -247,6 +247,21 @@ public class SamPairUtil {
         rec2.setInferredInsertSize(-insertSize);
     }
 
+    /**
+     * Sets mate pair information appropriately on a supplemental SAMRecord (e.g. from a split alignment)
+     * using the primary alignment of the read's mate.
+     * @param supplemental a supplemental alignment for the mate pair of the primary supplied
+     * @param matePrimary the primary alignment of the the mate pair of the supplemental
+     */
+    public static void setMateInformationOnSupplementalAlignment( final SAMRecord supplemental,
+                                                                  final SAMRecord matePrimary) {
+        supplemental.setMateReferenceIndex(matePrimary.getReferenceIndex());
+        supplemental.setMateAlignmentStart(matePrimary.getAlignmentStart());
+        supplemental.setMateNegativeStrandFlag(matePrimary.getReadNegativeStrandFlag());
+        supplemental.setMateUnmappedFlag(matePrimary.getReadUnmappedFlag());
+        supplemental.setInferredInsertSize(-matePrimary.getInferredInsertSize());
+    }
+
     public static void setProperPairAndMateInfo(final SAMRecord rec1, final SAMRecord rec2,
                                                 final SAMFileHeader header,
                                                 final List<PairOrientation> exepectedOrientations) {
diff --git a/src/java/net/sf/picard/sam/SamToFastq.java b/src/java/net/sf/picard/sam/SamToFastq.java
index 7e62978..e56d98d 100755
--- a/src/java/net/sf/picard/sam/SamToFastq.java
+++ b/src/java/net/sf/picard/sam/SamToFastq.java
@@ -34,10 +34,7 @@ import net.sf.picard.fastq.FastqWriterFactory;
 import net.sf.picard.io.IoUtil;
 import net.sf.picard.util.Log;
 import net.sf.picard.util.ProgressLogger;
-import net.sf.samtools.SAMFileReader;
-import net.sf.samtools.SAMReadGroupRecord;
-import net.sf.samtools.SAMRecord;
-import net.sf.samtools.SAMUtils;
+import net.sf.samtools.*;
 import net.sf.samtools.util.SequenceUtil;
 import net.sf.samtools.util.StringUtil;
 
@@ -126,6 +123,7 @@ public class SamToFastq extends CommandLineProgram {
         final SAMFileReader reader = new SAMFileReader(IoUtil.openFileForReading(INPUT));
         final Map<String,SAMRecord> firstSeenMates = new HashMap<String,SAMRecord>();
         final FastqWriterFactory factory = new FastqWriterFactory();
+        factory.setCreateMd5(CREATE_MD5_FILE);
         final Map<SAMReadGroupRecord, List<FastqWriter>> writers = getWriters(reader.getFileHeader().getReadGroups(), factory);
 
         final ProgressLogger progress = new ProgressLogger(log);
@@ -187,7 +185,8 @@ public class SamToFastq extends CommandLineProgram {
         }
 
         if (firstSeenMates.size() > 0) {
-            throw new PicardException("Found " + firstSeenMates.size() + " unpaired mates");
+            SAMUtils.processValidationError(new SAMValidationError(SAMValidationError.Type.MATE_NOT_FOUND,
+                    "Found " + firstSeenMates.size() + " unpaired mates", null), VALIDATION_STRINGENCY);
         }
 
         return 0;
diff --git a/src/java/net/sf/picard/sam/ValidateSamFile.java b/src/java/net/sf/picard/sam/ValidateSamFile.java
index dd4242d..1f11fb5 100644
--- a/src/java/net/sf/picard/sam/ValidateSamFile.java
+++ b/src/java/net/sf/picard/sam/ValidateSamFile.java
@@ -152,7 +152,10 @@ public class ValidateSamFile extends CommandLineProgram {
             if (VALIDATE_INDEX){
                 validator.setValidateIndex(VALIDATE_INDEX);
             }
-            validator.validateBamFileTermination(INPUT);
+            if (IoUtil.isRegularPath(INPUT)) {
+                // Do not check termination if reading from a stream
+                validator.validateBamFileTermination(INPUT);
+            }
 
             result = false;
 
diff --git a/src/java/net/sf/picard/util/IlluminaUtil.java b/src/java/net/sf/picard/util/IlluminaUtil.java
index 6736457..4a901ab 100644
--- a/src/java/net/sf/picard/util/IlluminaUtil.java
+++ b/src/java/net/sf/picard/util/IlluminaUtil.java
@@ -40,15 +40,6 @@ public class IlluminaUtil {
     public static final String BARCODE_DELIMITER = "-";
 
     /**
-     * Standard Broad algorithm for creating a read name
-     * @return read name in standard Broad format, without end suffix.
-     */
-    public static String makeReadName(final String runBarcode, final int lane, final int tile, final int xCoordinate,
-                                      final int yCoordinate) {
-        return runBarcode + ":" + lane + ":" + tile + ":" + xCoordinate + ":" + yCoordinate;
-    }
-
-    /**
      * Parse the tile # from the read name.
      * If we find that there are other elements needed from the read name, it might be a good idea to put
      * makeReadName() and various get..() methods into a new class.
diff --git a/src/java/net/sf/picard/util/IntervalUtil.java b/src/java/net/sf/picard/util/IntervalUtil.java
index 6608368..dd2b63c 100644
--- a/src/java/net/sf/picard/util/IntervalUtil.java
+++ b/src/java/net/sf/picard/util/IntervalUtil.java
@@ -25,6 +25,7 @@ package net.sf.picard.util;
 
 import net.sf.picard.PicardException;
 import net.sf.samtools.SAMSequenceDictionary;
+import net.sf.samtools.SAMSequenceRecord;
 
 import java.util.Iterator;
 
@@ -33,23 +34,37 @@ import java.util.Iterator;
  */
 public class IntervalUtil {
 
+    /** Return true if the sequence/position lie in the provided interval. */
+    public static boolean contains(final Interval interval, final String sequenceName, final long position) {
+        return interval.getSequence().equals(sequenceName) && (position >= interval.getStart() && position <= interval.getEnd());
+    }
+
+    /** Return true if the sequence/position lie in the provided interval list. */
+    public static boolean contains(final IntervalList intervalList, final String sequenceName, final long position) {
+        for (final Interval interval : intervalList.getUniqueIntervals()) {
+           if (contains(interval, sequenceName, position))
+               return true;
+        }
+        return false;
+    }
+    
     /**
      * Throws RuntimeException if the given intervals are not locus ordered and non-overlapping
      * @param intervals
      * @param sequenceDictionary used to determine order of sequences
      */
-    public static void assertOrderedNonOverlapping(Iterator<Interval> intervals, SAMSequenceDictionary sequenceDictionary) {
+    public static void assertOrderedNonOverlapping(final Iterator<Interval> intervals, final SAMSequenceDictionary sequenceDictionary) {
         if (!intervals.hasNext()) {
             return;
         }
         Interval prevInterval = intervals.next();
         int prevSequenceIndex = sequenceDictionary.getSequenceIndex(prevInterval.getSequence());
         while (intervals.hasNext()) {
-            Interval interval = intervals.next();
+            final Interval interval = intervals.next();
             if (prevInterval.intersects(interval)) {
                 throw new PicardException("Intervals should not overlap: " + prevInterval + "; " + interval);
             }
-            int thisSequenceIndex = sequenceDictionary.getSequenceIndex(interval.getSequence());
+            final int thisSequenceIndex = sequenceDictionary.getSequenceIndex(interval.getSequence());
             if (prevSequenceIndex > thisSequenceIndex ||
                 (prevSequenceIndex == thisSequenceIndex && prevInterval.compareTo(interval) >= 0)) {
                 throw new PicardException("Intervals not in order: " + prevInterval + "; " + interval);
diff --git a/src/java/net/sf/picard/util/MathUtil.java b/src/java/net/sf/picard/util/MathUtil.java
index 192e350..039e18c 100644
--- a/src/java/net/sf/picard/util/MathUtil.java
+++ b/src/java/net/sf/picard/util/MathUtil.java
@@ -40,11 +40,11 @@ public class MathUtil {
     /** Calculated the mean of an array of doubles. */
     public static double mean(final double[] in, final int start, final int stop) {
         double total = 0;
-        for (int i=start; i<stop; ++i) {
+        for (int i = start; i < stop; ++i) {
             total += in[i];
         }
 
-        return total / (stop-start);
+        return total / (stop - start);
     }
 
     /** Calculated the standard deviation of an array of doubles. */
@@ -55,26 +55,26 @@ public class MathUtil {
     /** Calculated the standard deviation of an array of doubles. */
     public static double stddev(final double[] in, final int start, final int stop, final double mean) {
         double total = 0;
-        for (int i=start; i<stop; ++i) {
+        for (int i = start; i < stop; ++i) {
             total += (in[i] * in[i]);
         }
 
-        return Math.sqrt((total / (stop-start)) - (mean*mean));
+        return Math.sqrt((total / (stop - start)) - (mean * mean));
     }
 
     public static int compare(final int v1, final int v2) {
-        return (v1 < v2? -1: (v1 == v2? 0: 1));
+        return (v1 < v2 ? -1 : (v1 == v2 ? 0 : 1));
     }
 
     /**
      * Obtains percentage of two Longs
-     * @param numerator dividend
+     * @param numerator   dividend
      * @param denominator divisor
      * @return numerator/(double)denominator if both are non-null and denominator != 0, else returns null.
      */
     public static Double percentageOrNull(final Long numerator, final Long denominator) {
         if (numerator != null && denominator != null && denominator != 0) {
-            return numerator.doubleValue()/denominator.doubleValue();
+            return numerator.doubleValue() / denominator.doubleValue();
         } else {
             return null;
         }
@@ -86,13 +86,13 @@ public class MathUtil {
     public static double round(final double num, final int precision) {
         BigDecimal bd = new BigDecimal(num);
         bd = bd.setScale(precision, BigDecimal.ROUND_HALF_UP);
-        return  bd.doubleValue();
+        return bd.doubleValue();
     }
 
     /** Returns the largest value stored in the array. */
     public static double max(final double[] nums) {
         double max = nums[0];
-        for (int i=1; i<nums.length; ++i) {
+        for (int i = 1; i < nums.length; ++i) {
             if (nums[i] > max) max = nums[i];
         }
 
@@ -102,17 +102,35 @@ public class MathUtil {
     /** Returns the smallest value stored in the array. */
     public static double min(final double[] nums) {
         double min = nums[0];
-        for (int i=1; i<nums.length; ++i) {
+        for (int i = 1; i < nums.length; ++i) {
             if (nums[i] < min) min = nums[i];
         }
 
         return min;
     }
 
+    /** Mimic's R's seq() function to produce a sequence of equally spaced numbers. */
+    public static double[] seq(final double from, final double to, final double by) {
+        if (from < to && by <= 0) return new double[0];
+        if (from > to && by >= 0) return new double[0];
+        final int values = 1 + (int) Math.floor((to - from) / by);
+        final double[] results = new double[values];
+
+        BigDecimal value = new BigDecimal(from);
+        BigDecimal increment = new BigDecimal(by);
+
+        for (int i=0; i<values; ++i) {
+            results[i] = value.doubleValue();
+            value = value.add(increment);
+        }
+
+        return results;
+    }
+
     /** "Promotes" an int[] into a double array with the same values (or as close as precision allows). */
     public static double[] promote(final int[] is) {
         final double[] ds = new double[is.length];
-        for (int i=0; i<is.length; ++i) ds[i] = is[i];
+        for (int i = 0; i < is.length; ++i) ds[i] = is[i];
         return ds;
     }
 
@@ -131,17 +149,17 @@ public class MathUtil {
 
         final double[] tmp = new double[likelihoods.length];
         double total = 0;
-        for (int i=0; i<likelihoods.length; ++i) {
-            tmp[i] = pow(10,likelihoods[i]+bump);
+        for (int i = 0; i < likelihoods.length; ++i) {
+            tmp[i] = pow(10, likelihoods[i] + bump);
             total += tmp[i];
         }
 
         final double maxP = MAX_PROB_BELOW_ONE;
-        final double minP = (1-MAX_PROB_BELOW_ONE) / (tmp.length-1);
+        final double minP = (1 - MAX_PROB_BELOW_ONE) / (tmp.length - 1);
 
-        for (int i=0; i<likelihoods.length; ++i) {
+        for (int i = 0; i < likelihoods.length; ++i) {
             tmp[i] /= total;
-            if      (tmp[i] > maxP) tmp[i] = maxP;
+            if (tmp[i] > maxP) tmp[i] = maxP;
             else if (tmp[i] < minP) tmp[i] = minP;
         }
 
@@ -154,7 +172,7 @@ public class MathUtil {
 
         final int len = lhs.length;
         final double[] result = new double[len];
-        for (int i=0; i<len; ++i) result[i] = lhs[i] * rhs[i];
+        for (int i = 0; i < len; ++i) result[i] = lhs[i] * rhs[i];
         return result;
     }
 
@@ -164,4 +182,62 @@ public class MathUtil {
         for (final double next : arr) result += next;
         return result;
     }
+    
+    public static final LogMath LOG_2_MATH = new LogMath(2);
+    public static final LogMath NATURAL_LOG_MATH = new LogMath(Math.exp(1)) {
+        @Override
+        public double getLogValue(final double nonLogValue) {
+            return Math.log(nonLogValue);
+        }
+    };
+
+    public static final LogMath LOG_10_MATH = new LogMath(10) {
+        @Override
+        public double getLogValue(final double nonLogValue) {
+            return Math.log10(nonLogValue);
+        }
+    };
+    
+    /** 
+     * A collection of common math operations that work with log values. To use it, pass values from log space, the operation will be
+     * computed in non-log space, and a value in log space will be returned.
+     */
+    public static class LogMath {
+        private final double base;
+
+        private LogMath(final double base) {
+            this.base = base;
+        }
+
+        /** Returns the decimal representation of the provided log values. */
+        public double getNonLogValue(final double logValue) {
+            return Math.pow(base, logValue);
+        }
+
+        /** Returns the log-representation of the provided decimal value. */
+        public double getLogValue(final double nonLogValue) {
+            return Math.log(nonLogValue) / Math.log(base);
+        }
+
+        /** Computes the mean of the provided log values. */
+        public double mean(final double... logValues) {
+            return sum(logValues) - getLogValue(logValues.length);
+        }
+        
+        /** Computes the sum of the provided log values. */
+        public double sum(final double... logValues) {
+            // Avoid overflow via scaling.
+            final double scalingFactor = max(logValues);
+            double simpleAdditionResult = 0;
+            for (final double v : logValues) {
+                simpleAdditionResult += getNonLogValue(v - scalingFactor);
+            }
+            return getLogValue(simpleAdditionResult) + scalingFactor;
+        }
+ 
+        /** Computes the sum of the provided log values. */
+        public double product(final double... logValues) {
+            return MathUtil.sum(logValues);
+        }
+    }
 }
diff --git a/src/java/net/sf/picard/util/ProgressLogger.java b/src/java/net/sf/picard/util/ProgressLogger.java
index 034188a..93ddaa3 100644
--- a/src/java/net/sf/picard/util/ProgressLogger.java
+++ b/src/java/net/sf/picard/util/ProgressLogger.java
@@ -15,6 +15,7 @@ public class ProgressLogger {
     private final Log log;
     private final int n;
     private final String verb;
+    private final String noun;
     private final long startTime = System.currentTimeMillis();
     
     private final NumberFormat fmt = new DecimalFormat("#,###");
@@ -28,11 +29,23 @@ public class ProgressLogger {
      * @param log the Log object to write outputs to
      * @param n the frequency with which to output (i.e. every N records)
      * @param verb the verb to log, e.g. "Processed, Read, Written".
+     * @param noun the noun to use when logging, e.g. "Records, Variants, Loci"
      */
-    public ProgressLogger(final Log log, final int n, final String verb) {
+    public ProgressLogger(final Log log, final int n, final String verb, final String noun) {
         this.log = log;
         this.n = n;
         this.verb = verb;
+        this.noun = noun;
+    }
+
+    /**
+     * Construct a progress logger.
+     * @param log the Log object to write outputs to
+     * @param n the frequency with which to output (i.e. every N records)
+     * @param verb the verb to log, e.g. "Processed, Read, Written".
+     */
+    public ProgressLogger(final Log log, final int n, final String verb) {
+        this(log, n, verb, "records");
     }
 
     /**
@@ -63,7 +76,7 @@ public class ProgressLogger {
             if (chrom == null) readInfo = "*/*";
             else readInfo = chrom + ":" + fmt.format(pos);
 
-            log.info(this.verb, " ", processed, " records.  Elapsed time: ", elapsed, "s.  Time for last ", fmt.format(this.n),
+            log.info(this.verb, " ", processed, " " + noun + ".  Elapsed time: ", elapsed, "s.  Time for last ", fmt.format(this.n),
                      ": ", period, "s.  Last read position: ", readInfo);
             return true;
         }
diff --git a/src/java/net/sf/picard/util/SamLocusIterator.java b/src/java/net/sf/picard/util/SamLocusIterator.java
index 9dd8a54..f5df237 100644
--- a/src/java/net/sf/picard/util/SamLocusIterator.java
+++ b/src/java/net/sf/picard/util/SamLocusIterator.java
@@ -168,7 +168,7 @@ public class SamLocusIterator implements Iterable<SamLocusIterator.LocusInfo>, C
      * passed in that is not coordinate sorted, it will eventually be coordinated sorted by this class.
      */
     public SamLocusIterator(final SAMFileReader samReader, final IntervalList intervalList) {
-        this(samReader, intervalList, false);
+        this(samReader, intervalList, samReader.hasIndex());
     }
 
     /**
@@ -178,7 +178,8 @@ public class SamLocusIterator implements Iterable<SamLocusIterator.LocusInfo>, C
      * @param intervalList Either the list of desired intervals, or null.  Note that if an intervalList is
      * passed in that is not coordinate sorted, it will eventually be coordinated sorted by this class.
      * @param useIndex If true, do indexed lookup to improve performance.  Not relevant if intervalList == null.
-     * This can actually slow performance if the intervals are densely packed.
+     * It is no longer the case the useIndex==true can make performance worse.  It should always perform at least
+     * as well as useIndex==false, and generally will be much faster.
      */
     public SamLocusIterator(final SAMFileReader samReader, final IntervalList intervalList, final boolean useIndex) {
         if (samReader.getFileHeader().getSortOrder() == null || samReader.getFileHeader().getSortOrder() == SAMFileHeader.SortOrder.unsorted) {
diff --git a/src/java/net/sf/picard/util/SamRecordIntervalIterator.java b/src/java/net/sf/picard/util/SamRecordIntervalIterator.java
deleted file mode 100644
index a0eef92..0000000
--- a/src/java/net/sf/picard/util/SamRecordIntervalIterator.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * The MIT License
- *
- * Copyright (c) 2010 The Broad Institute
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package net.sf.picard.util;
-
-import net.sf.samtools.SAMFileReader;
-import net.sf.samtools.SAMRecord;
-import net.sf.samtools.util.CloseableIterator;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-
-/**
- * Iterate over SAMRecords in an indexed BAM file that overlap the given list of intervals.
- * Note that it is not guaranteed that only reads that overlap one of the given intervals will be
- * returned.  Rather, the interval list is a hint that is used to optimize access to the BAM file.
- * An IntervalFilter can be used to ensure that only SAMRecords overlapping a set of intervals are iterated over.
- * c.f. SamRecordIntervalIteratorFactory.
- *
- * Note that if there are too many intervals or they are too close together, using this class may be slower
- * than iterating through the entire BAM file.
- *
- * @author alecw at broadinstitute.org
- */
-class SamRecordIntervalIterator implements CloseableIterator<SAMRecord> {
-    private static final int DEFAULT_MAX_READ_LENGTH_GUESS = 16384;
-
-    private final SAMFileReader samReader;
-    private final Iterator<Interval> mergedIntervalsIterator;
-    /**
-     * null implies that there are no more records to return.  Otherwise samIterator.next()
-     * will return a record that is appropriate to return to the caller.
-     */
-    private PeekableIterator<SAMRecord> samIterator = null;
-
-    /**
-     * The start of the most recent read returned is remembered.  When advancing to the next interval,
-     * it is possible that queryOverlapping() could return a read that was previous returned.  Therefore, when
-     * getting a new iterator from queryOverlapping(), it must be advanced so that the next SAMRecord starts
-     * after this locus.
-     */
-    private int lastSequenceIndex = -1;
-    private int lastPosition = -1;
-
-
-    /**
-     * Create an iterator that returns reads overlapping one (or more) of the intervals in uniqueIntervals.
-     * Note that some of the reads may not be overlap any of the intervals.  The only guarantee is that all
-     * reads that overlap will be returned.
-     *
-     * @param samReader supportsQuery() must return true
-     * @param uniqueIntervals must be locus-ordered and non-overlapping.
-     */
-    public SamRecordIntervalIterator(final SAMFileReader samReader, final List<Interval> uniqueIntervals) {
-        this(samReader, uniqueIntervals, DEFAULT_MAX_READ_LENGTH_GUESS);
-    }
-
-    /**
-     * Create an iterator that returns reads overlapping one (or more) of the intervals in uniqueIntervals.
-     * Note that some of the reads may not be overlap any of the intervals.  The only guarantee is that all
-     * reads that overlap will be returned.
-     *
-     * @param samReader supportsQuery() must return true
-     * @param uniqueIntervals must be locus-ordered and non-overlapping.
-     * @param maxReadLengthGuess Guess for the max read length in the SAM file.  intervals closer together
-     * than this are merged when querying in order to avoid reading the same SAMRecord more than once.
-     */
-    public SamRecordIntervalIterator(final SAMFileReader samReader, final List<Interval> uniqueIntervals, final int maxReadLengthGuess) {
-        IntervalUtil.assertOrderedNonOverlapping(uniqueIntervals.iterator(), samReader.getFileHeader().getSequenceDictionary());
-        if (!samReader.hasIndex()) {
-            throw new IllegalArgumentException("SAMFileReader does not support query");
-        }
-        this.samReader = samReader;
-        this.mergedIntervalsIterator = mergeCloseIntervals(uniqueIntervals, maxReadLengthGuess).iterator();
-        advanceInterval();
-    }
-
-    private List<Interval> mergeCloseIntervals(final List<Interval> uniqueIntervals, final int maxReadLengthGuess) {
-        final List<Interval> ret = new ArrayList<Interval>();
-        if (uniqueIntervals.isEmpty()) {
-            return ret;
-        }
-        Interval accumulatingInterval = uniqueIntervals.get(0);
-        for (int i = 1; i < uniqueIntervals.size(); ++i) {
-            final Interval thisInterval = uniqueIntervals.get(i);
-            if (!accumulatingInterval.getSequence().equals(thisInterval.getSequence()) ||
-                    thisInterval.getStart() - accumulatingInterval.getEnd() > maxReadLengthGuess) {
-                ret.add(accumulatingInterval);
-                accumulatingInterval = thisInterval;
-            } else {
-               accumulatingInterval = new Interval(accumulatingInterval.getSequence(),
-                                                   accumulatingInterval.getStart(), thisInterval.getEnd());
-            }
-        }
-        ret.add(accumulatingInterval);
-        return ret;
-    }
-
-
-    /**
-     * Called when iterator for the current interval has been exhausted.  Get an iterator for the next interval
-     * for which there are SAMRecords, and advance it past any already seen.
-     */
-    private void advanceInterval() {
-        if (samIterator != null) {
-            samIterator.close();
-        }
-        samIterator = null;
-        while (mergedIntervalsIterator.hasNext()) {
-            final Interval nextInterval = mergedIntervalsIterator.next();
-            samIterator = new PeekableIterator<SAMRecord>(samReader.queryOverlapping(nextInterval.getSequence(),
-                    nextInterval.getStart(), nextInterval.getEnd()));
-            // Skip over any SAMRecords already seen.
-            advanceSamIterator();
-            if (samIterator.hasNext()) {
-                // This iterator has some SAMRecords to return.
-                break;
-            } else {
-                // Nothing valid for this interval.  Try the next interval.
-                samIterator.close();
-                samIterator = null;
-            }
-        }
-    }
-
-    /**
-     * Advance the current samIterator past any SAMRecords previously returned.
-     */
-    private void advanceSamIterator() {
-        for (; samIterator.hasNext(); samIterator.next()) {
-            final SAMRecord rec = samIterator.peek();
-            if (rec.getReferenceIndex() > lastSequenceIndex ||
-                    rec.getAlignmentStart() > lastPosition) {
-                break;
-            }
-        }
-    }
-
-    public void close() {
-        if (samIterator != null) {
-            samIterator.close();
-            samIterator = null;
-        }
-    }
-
-    public boolean hasNext() {
-        return samIterator != null && samIterator.hasNext();
-    }
-
-    public SAMRecord next() {
-        if (!hasNext()) {
-            throw new NoSuchElementException();
-        }
-        final SAMRecord rec = samIterator.next();
-        lastSequenceIndex = rec.getReferenceIndex();
-        lastPosition = rec.getAlignmentStart();
-        if (!samIterator.hasNext()) {
-            advanceInterval();
-        }
-        return rec;
-    }
-
-    public void remove() {
-        throw new UnsupportedOperationException("Not supported: remove");
-    }
-}
diff --git a/src/java/net/sf/picard/util/SamRecordIntervalIteratorFactory.java b/src/java/net/sf/picard/util/SamRecordIntervalIteratorFactory.java
index 4dab4f3..0f8af5d 100644
--- a/src/java/net/sf/picard/util/SamRecordIntervalIteratorFactory.java
+++ b/src/java/net/sf/picard/util/SamRecordIntervalIteratorFactory.java
@@ -55,7 +55,6 @@ public class SamRecordIntervalIteratorFactory {
     public CloseableIterator<SAMRecord> makeSamRecordIntervalIterator(final SAMFileReader samReader,
                                                                final List<Interval> uniqueIntervals,
                                                                final boolean useIndex) {
-        final IntervalFilter intervalFilter = new IntervalFilter(uniqueIntervals, samReader.getFileHeader());
         if (!samReader.hasIndex() || !useIndex) {
             final int stopAfterSequence;
             final int stopAfterPosition;
@@ -67,12 +66,16 @@ public class SamRecordIntervalIteratorFactory {
                 stopAfterSequence = samReader.getFileHeader().getSequenceIndex(lastInterval.getSequence());
                 stopAfterPosition = lastInterval.getEnd();
             }
+            final IntervalFilter intervalFilter = new IntervalFilter(uniqueIntervals, samReader.getFileHeader());
             return new StopAfterFilteringIterator(samReader.iterator(), intervalFilter, stopAfterSequence, stopAfterPosition);
         } else {
-            // Note that SamRecordIntervalIterator may return some records that do not overlap the intervals,
-            // because it merges intervals that are close to one another in order to reduce I/O.  Thus
-            // the IntervalFilter is necessary.
-            return new FilteringIterator(new SamRecordIntervalIterator(samReader, uniqueIntervals), intervalFilter);
+            final SAMFileReader.QueryInterval[] queryIntervals = new SAMFileReader.QueryInterval[uniqueIntervals.size()];
+            for (int i = 0; i < queryIntervals.length; ++i) {
+                final Interval inputInterval = uniqueIntervals.get(i);
+                queryIntervals[i] = samReader.makeQueryInterval(inputInterval.getSequence(),
+                        inputInterval.getStart(), inputInterval.getEnd());
+            }
+            return samReader.queryOverlapping(queryIntervals);
         }
     }
 
diff --git a/src/java/net/sf/picard/vcf/MakeSitesOnlyVcf.java b/src/java/net/sf/picard/vcf/MakeSitesOnlyVcf.java
index cc708ee..289f506 100644
--- a/src/java/net/sf/picard/vcf/MakeSitesOnlyVcf.java
+++ b/src/java/net/sf/picard/vcf/MakeSitesOnlyVcf.java
@@ -56,7 +56,7 @@ public class MakeSitesOnlyVcf extends CommandLineProgram {
         IoUtil.assertFileIsWritable(OUTPUT);
 
 	    final VCFFileReader reader = new VCFFileReader(INPUT);
-	    final VCFHeader header = new VCFHeader(reader.getFileHeader());
+	    final VCFHeader header = new VCFHeader(reader.getFileHeader().getMetaDataInInputOrder());
 	    final SAMSequenceDictionary sequenceDictionary =
 			    SEQUENCE_DICTIONARY != null
 			            ? SAMFileReader.getSequenceDictionary(SEQUENCE_DICTIONARY)
diff --git a/src/java/net/sf/samtools/AbstractBAMFileIndex.java b/src/java/net/sf/samtools/AbstractBAMFileIndex.java
index fc929b8..1f68704 100644
--- a/src/java/net/sf/samtools/AbstractBAMFileIndex.java
+++ b/src/java/net/sf/samtools/AbstractBAMFileIndex.java
@@ -68,7 +68,7 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
     private SAMSequenceDictionary mBamDictionary = null;
 
     protected AbstractBAMFileIndex(
-        SeekableStream stream, SAMSequenceDictionary dictionary)
+        final SeekableStream stream, final SAMSequenceDictionary dictionary)
     {
         mBamDictionary = dictionary;
         mIndexBuffer = new IndexStreamBuffer(stream);
@@ -78,7 +78,7 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
         this(file, dictionary, true);
     }
 
-    protected AbstractBAMFileIndex(final File file, final SAMSequenceDictionary dictionary, boolean useMemoryMapping) {
+    protected AbstractBAMFileIndex(final File file, final SAMSequenceDictionary dictionary, final boolean useMemoryMapping) {
         mBamDictionary = dictionary;
         mIndexBuffer = (useMemoryMapping ? new MemoryMappedFileBuffer(file) : new RandomAccessFileBuffer(file));
 
@@ -213,10 +213,10 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
      * @param reference the reference of interest
      * @return meta data for the reference
      */
-    public BAMIndexMetaData getMetaData(int reference) {
+    public BAMIndexMetaData getMetaData(final int reference) {
         seek(4);
 
-        List<Chunk> metaDataChunks = new ArrayList<Chunk>();
+        final List<Chunk> metaDataChunks = new ArrayList<Chunk>();
 
         final int sequenceCount = readInteger();
 
@@ -226,20 +226,16 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
 
         skipToSequence(reference);
 
-        int binCount = readInteger();
+        final int binCount = readInteger();
         for (int binNumber = 0; binNumber < binCount; binNumber++) {
             final int indexBin = readInteger();
             final int nChunks = readInteger();
-            // System.out.println("# bin[" + i + "] = " + indexBin + ", nChunks = " + nChunks);
-            Chunk lastChunk = null;
             if (indexBin == MAX_BINS) {
                 for (int ci = 0; ci < nChunks; ci++) {
                     final long chunkBegin = readLong();
                     final long chunkEnd = readLong();
-                    lastChunk = new Chunk(chunkBegin, chunkEnd);
-                    metaDataChunks.add(lastChunk);
+                    metaDataChunks.add(new Chunk(chunkBegin, chunkEnd));
                 }
-                continue;
             } else {
                 skipBytes(16 * nChunks);
             }
@@ -261,7 +257,7 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
         skipToSequence(sequenceCount);
         try { // in case of old index file without meta data
             return readLong();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             return null;
         }
     }
@@ -269,7 +265,7 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
     protected BAMIndexContent query(final int referenceSequence, final int startPos, final int endPos) {
         seek(4);
 
-        List<Chunk> metaDataChunks = new ArrayList<Chunk>();
+        final List<Chunk> metaDataChunks = new ArrayList<Chunk>();
 
         final int sequenceCount = readInteger();
 
@@ -284,13 +280,13 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
 
         skipToSequence(referenceSequence);
 
-        int binCount = readInteger();
+        final int binCount = readInteger();
         boolean metaDataSeen = false;
-        Bin[] bins = new Bin[getMaxBinNumberForReference(referenceSequence) +1];
+        final Bin[] bins = new Bin[getMaxBinNumberForReference(referenceSequence) +1];
         for (int binNumber = 0; binNumber < binCount; binNumber++) {
             final int indexBin = readInteger();
             final int nChunks = readInteger();
-            List<Chunk> chunks = new ArrayList<Chunk>(nChunks);
+            final List<Chunk> chunks = new ArrayList<Chunk>(nChunks);
             // System.out.println("# bin[" + i + "] = " + indexBin + ", nChunks = " + nChunks);
             Chunk lastChunk = null;
             if (regionBins.get(indexBin)) {
@@ -314,7 +310,7 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
             } else {
                 skipBytes(16 * nChunks);
             }
-            Bin bin = new Bin(referenceSequence, indexBin);
+            final Bin bin = new Bin(referenceSequence, indexBin);
             bin.setChunkList(chunks);
             bin.setLastChunk(lastChunk);
             bins[indexBin] = bin;
@@ -348,7 +344,7 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
         try {
             final int sequenceLength = mBamDictionary.getSequence(reference).getSequenceLength();
             return getMaxBinNumberForSequenceLength(sequenceLength);
-        } catch (Exception e) {
+        } catch (final Exception e) {
             return MAX_BINS;
         }
     }
@@ -356,7 +352,7 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
     /**
      * The maxiumum bin number for a reference sequence of a given length
      */
-    static int getMaxBinNumberForSequenceLength(int sequenceLength) {
+    static int getMaxBinNumberForSequenceLength(final int sequenceLength) {
         return getFirstBinInLevel(getNumIndexLevels() - 1) + (sequenceLength >> 14);
         // return 4680 + (sequenceLength >> 14); // note 4680 = getFirstBinInLevel(getNumIndexLevels() - 1)
     }
@@ -395,31 +391,11 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
         return bitSet;
     }
 
+    /**
+     * @deprecated Invoke net.sf.samtools.Chunk#optimizeChunkList(java.util.List<net.sf.samtools.Chunk>, long) directly.
+     */
     protected List<Chunk> optimizeChunkList(final List<Chunk> chunks, final long minimumOffset) {
-        Chunk lastChunk = null;
-        Collections.sort(chunks);
-        final List<Chunk> result = new ArrayList<Chunk>();
-        for (final Chunk chunk : chunks) {
-            if (chunk.getChunkEnd() <= minimumOffset) {
-                continue;               // linear index optimization
-            }
-            if (result.isEmpty()) {
-                result.add(chunk);
-                lastChunk = chunk;
-                continue;
-            }
-            // Coalesce chunks that are in adjacent file blocks.
-            // This is a performance optimization.
-            if (!lastChunk.overlaps(chunk) && !lastChunk.isAdjacentTo(chunk)) {
-                result.add(chunk);
-                lastChunk = chunk;
-            } else {
-                if (chunk.getChunkEnd() > lastChunk.getChunkEnd()) {
-                    lastChunk.setChunkEnd(chunk.getChunkEnd());
-                }
-            }
-        }
-        return result;
+        return Chunk.optimizeChunkList(chunks, minimumOffset);
     }
 
     private void skipToSequence(final int sequenceIndex) {
@@ -428,7 +404,7 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
             final int nBins = readInteger();
             // System.out.println("# nBins: " + nBins);
             for (int j = 0; j < nBins; j++) {
-                final int bin = readInteger();
+                readInteger(); // bin
                 final int nChunks = readInteger();
                 // System.out.println("# bin[" + j + "] = " + bin + ", nChunks = " + nChunks);
                 skipBytes(16 * nChunks);
@@ -474,16 +450,16 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
     private static class MemoryMappedFileBuffer extends IndexFileBuffer {
         private MappedByteBuffer mFileBuffer;
 
-        MemoryMappedFileBuffer(File file) {
+        MemoryMappedFileBuffer(final File file) {
             try {
                 // Open the file stream.
-                FileInputStream fileStream = new FileInputStream(file);
-                FileChannel fileChannel = fileStream.getChannel();
+                final FileInputStream fileStream = new FileInputStream(file);
+                final FileChannel fileChannel = fileStream.getChannel();
                 mFileBuffer = fileChannel.map(FileChannel.MapMode.READ_ONLY, 0L, fileChannel.size());
                 mFileBuffer.order(ByteOrder.LITTLE_ENDIAN);
                 fileChannel.close();
                 fileStream.close();
-            } catch (IOException exc) {
+            } catch (final IOException exc) {
                 throw new RuntimeIOException(exc.getMessage(), exc);
             }
         }
@@ -530,23 +506,23 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
         private static final int PAGE_OFFSET_MASK = PAGE_SIZE-1;
         private static final int PAGE_MASK = ~PAGE_OFFSET_MASK;
         private static final int INVALID_PAGE = 1;
-        private File mFile;
+        private final File mFile;
         private RandomAccessFile mRandomAccessFile;
-        private int mFileLength;
+        private final int mFileLength;
         private int mFilePointer = 0;
         private int mCurrentPage = INVALID_PAGE;
         private final byte[] mBuffer = new byte[PAGE_SIZE];
 
-        RandomAccessFileBuffer(File file) {
+        RandomAccessFileBuffer(final File file) {
             mFile = file;
             try {
                 mRandomAccessFile = new RandomAccessFile(file, "r");
-                long fileLength = mRandomAccessFile.length();
+                final long fileLength = mRandomAccessFile.length();
                 if (fileLength > Integer.MAX_VALUE) {
                     throw new RuntimeException("BAM index file " + mFile + " is too large: " + fileLength);
                 }
                 mFileLength = (int) fileLength;
-            } catch (IOException exc) {
+            } catch (final IOException exc) {
                 throw new RuntimeIOException(exc.getMessage(), exc);
             }
         }
@@ -582,8 +558,8 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
         long readLong() {
             // BAM index files are always 4-byte aligned, but not necessrily 8-byte aligned.
             // So, rather than fooling with complex page logic we simply read the long in two 4-byte chunks.
-            long lower = readInteger();
-            long upper = readInteger();
+            final long lower = readInteger();
+            final long upper = readInteger();
             return ((upper << 32) | (lower & 0xFFFFFFFFL));
         }
 
@@ -601,14 +577,14 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
             if (mRandomAccessFile != null) {
                 try {
                     mRandomAccessFile.close();
-                } catch (IOException exc) {
+                } catch (final IOException exc) {
                     throw new RuntimeIOException(exc.getMessage(), exc);
                 }
                 mRandomAccessFile = null;
             }
         }
 
-        private void loadPage(int filePosition) {
+        private void loadPage(final int filePosition) {
             final int page = filePosition & PAGE_MASK;
             if (page == mCurrentPage) {
                 return;
@@ -618,7 +594,7 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
                 final int readLength = Math.min(mFileLength - page, PAGE_SIZE);
                 mRandomAccessFile.readFully(mBuffer, 0, readLength);
                 mCurrentPage = page;
-            } catch (IOException exc) {
+            } catch (final IOException exc) {
                 throw new RuntimeIOException("Exception reading BAM index file " + mFile + ": " + exc.getMessage(), exc);
             }
         }
@@ -628,7 +604,7 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
         private final SeekableStream in;
         private final ByteBuffer tmpBuf;
 
-        public IndexStreamBuffer(SeekableStream s) {
+        public IndexStreamBuffer(final SeekableStream s) {
             in = s;
             tmpBuf = ByteBuffer.allocate(8); // Enough to fit a long.
             tmpBuf.order(ByteOrder.LITTLE_ENDIAN);
@@ -636,42 +612,42 @@ public abstract class AbstractBAMFileIndex implements BAMIndex {
 
         @Override public void close() {
             try { in.close(); }
-            catch (IOException e) { throw new RuntimeIOException(e); }
+            catch (final IOException e) { throw new RuntimeIOException(e); }
         }
-        @Override public void readBytes(byte[] bytes) {
+        @Override public void readBytes(final byte[] bytes) {
             try { in.read(bytes); }
-            catch (IOException e) { throw new RuntimeIOException(e); }
+            catch (final IOException e) { throw new RuntimeIOException(e); }
         }
-        @Override public void seek(int position) {
+        @Override public void seek(final int position) {
             try { in.seek(position); }
-            catch (IOException e) { throw new RuntimeIOException(e); }
+            catch (final IOException e) { throw new RuntimeIOException(e); }
         }
 
         @Override public int readInteger() {
            try {
-               int r = in.read(tmpBuf.array(), 0, 4);
+               final int r = in.read(tmpBuf.array(), 0, 4);
                if (r != 4)
                    throw new RuntimeIOException("Expected 4 bytes, got " + r);
-           } catch (IOException e) { throw new RuntimeIOException(e); }
+           } catch (final IOException e) { throw new RuntimeIOException(e); }
            return tmpBuf.getInt(0);
         }
         @Override public long readLong() {
             try {
-                int r = in.read(tmpBuf.array(), 0, 8);
+                final int r = in.read(tmpBuf.array(), 0, 8);
                 if (r != 8)
                     throw new RuntimeIOException("Expected 8 bytes, got " + r);
-            } catch (IOException e) { throw new RuntimeIOException(e); }
+            } catch (final IOException e) { throw new RuntimeIOException(e); }
             return tmpBuf.getLong(0);
         }
         @Override public void skipBytes(final int count) {
             try {
                 for (int s = count; s > 0;) {
-                    int skipped = (int)in.skip(s);
+                    final int skipped = (int)in.skip(s);
                     if (skipped <= 0)
                         throw new RuntimeIOException("Failed to skip " + s);
                     s -= skipped;
                 }
-            } catch (IOException e) { throw new RuntimeIOException(e); }
+            } catch (final IOException e) { throw new RuntimeIOException(e); }
         }
     }
 }
diff --git a/src/java/net/sf/samtools/BAMFileReader.java b/src/java/net/sf/samtools/BAMFileReader.java
index 7bdc637..a3f6c18 100644
--- a/src/java/net/sf/samtools/BAMFileReader.java
+++ b/src/java/net/sf/samtools/BAMFileReader.java
@@ -24,11 +24,14 @@
 package net.sf.samtools;
 
 
-import net.sf.samtools.util.*;
 import net.sf.samtools.SAMFileReader.ValidationStringency;
 import net.sf.samtools.seekablestream.SeekableStream;
+import net.sf.samtools.util.*;
 
-import java.io.*;
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -54,6 +57,7 @@ class BAMFileReader extends SAMFileReader.ReaderImplementation {
 
     private BAMIndex mIndex = null;
     private long mFirstRecordPointer = 0;
+    // If non-null, there is an unclosed iterator extant.
     private CloseableIterator<SAMRecord> mCurrentIterator = null;
 
     // If true, all SAMRecords are fully decoded as they are read.
@@ -283,7 +287,7 @@ class BAMFileReader extends SAMFileReader.ReaderImplementation {
         if (mIsSeekable) {
             try {
                 mCompressedInputStream.seek(mFirstRecordPointer);
-            } catch (IOException exc) {
+            } catch (final IOException exc) {
                 throw new RuntimeException(exc.getMessage(), exc);
             }
         }
@@ -349,7 +353,45 @@ class BAMFileReader extends SAMFileReader.ReaderImplementation {
         if (!mIsSeekable) {
             throw new UnsupportedOperationException("Cannot query stream-based BAM file");
         }
-        mCurrentIterator = createIndexIterator(sequence, start, end, contained? QueryType.CONTAINED: QueryType.OVERLAPPING);
+        final int referenceIndex = mFileHeader.getSequenceIndex(sequence);
+        if (referenceIndex == -1) {
+            mCurrentIterator = new EmptyBamIterator();
+        } else {
+            final SAMFileReader.QueryInterval[] queryIntervals = {new SAMFileReader.QueryInterval(referenceIndex, start, end)};
+            mCurrentIterator = createIndexIterator(queryIntervals, contained);
+        }
+        return mCurrentIterator;
+    }
+
+    /**
+     * Prepare to iterate through the SAMRecords that match any of the given intervals.
+     * Only a single iterator on a BAMFile can be extant at a time.  The previous one must be closed
+     * before calling any of the methods that return an iterator.
+     *
+     * Note that an unmapped SAMRecord may still have a reference name and an alignment start for sorting
+     * purposes (typically this is the coordinate of its mate), and will be found by this method if the coordinate
+     * matches the specified interval.
+     *
+     * Note that this method is not necessarily efficient in terms of disk I/O.  The index does not have perfect
+     * resolution, so some SAMRecords may be read and then discarded because they do not match the specified interval.
+     *
+     * @param intervals list of intervals to be queried.  Must be optimized.
+     * @param contained If true, the alignments for the SAMRecords must be completely contained in the interval
+     * specified by start and end.  If false, the SAMRecords need only overlap the interval.
+     * @return Iterator for the matching SAMRecords
+     * @see net.sf.samtools.SAMFileReader.QueryInterval#optimizeIntervals(net.sf.samtools.SAMFileReader.QueryInterval[])
+     */
+    CloseableIterator<SAMRecord> query(final SAMFileReader.QueryInterval[] intervals, final boolean contained) {
+        if (mStream == null) {
+            throw new IllegalStateException("File reader is closed");
+        }
+        if (mCurrentIterator != null) {
+            throw new IllegalStateException("Iteration in progress");
+        }
+        if (!mIsSeekable) {
+            throw new UnsupportedOperationException("Cannot query stream-based BAM file");
+        }
+        mCurrentIterator = createIndexIterator(intervals, contained);
         return mCurrentIterator;
     }
 
@@ -379,10 +421,22 @@ class BAMFileReader extends SAMFileReader.ReaderImplementation {
         if (!mIsSeekable) {
             throw new UnsupportedOperationException("Cannot query stream-based BAM file");
         }
-        mCurrentIterator = createIndexIterator(sequence, start, -1, QueryType.STARTING_AT);
+        final int referenceIndex = mFileHeader.getSequenceIndex(sequence);
+        if (referenceIndex == -1) {
+            mCurrentIterator = new EmptyBamIterator();
+        } else {
+            mCurrentIterator = createStartingAtIndexIterator(referenceIndex, start);
+        }
         return mCurrentIterator;
     }
 
+    /**
+     * Prepare to iterate through the SAMRecords that are unmapped and do not have a reference name or alignment start.
+     * Only a single iterator on a BAMFile can be extant at a time.  The previous one must be closed
+     * before calling any of the methods that return an iterator.
+     *
+     * @return Iterator for the matching SAMRecords.
+     */
     public CloseableIterator<SAMRecord> queryUnmapped() {
         if (mStream == null) {
             throw new IllegalStateException("File reader is closed");
@@ -403,7 +457,7 @@ class BAMFileReader extends SAMFileReader.ReaderImplementation {
             }
             mCurrentIterator = new BAMFileIndexUnmappedIterator();
             return mCurrentIterator;
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new RuntimeException("IOException seeking to unmapped reads", e);
         }
     }
@@ -475,14 +529,54 @@ class BAMFileReader extends SAMFileReader.ReaderImplementation {
     }
 
     /**
+     * Encapsulates the restriction that only one iterator may be open at a time.
+     */
+    private abstract class AbstractBamIterator implements CloseableIterator<SAMRecord> {
+
+        private boolean isClosed = false;
+
+        public void close() {
+            if (!isClosed) {
+                if (mCurrentIterator != null && this != mCurrentIterator) {
+                    throw new IllegalStateException("Attempt to close non-current iterator");
+                }
+                mCurrentIterator = null;
+                isClosed = true;
+            }
+        }
+
+        protected void assertOpen() {
+            if (isClosed) throw new AssertionError("Iterator has been closed");
+        }
+
+        public void remove() {
+            throw new UnsupportedOperationException("Not supported: remove");
+        }
+
+    }
+
+    private class EmptyBamIterator extends AbstractBamIterator {
+        @Override
+        public boolean hasNext() {
+            return false;
+        }
+
+        @Override
+        public SAMRecord next() {
+            throw new NoSuchElementException("next called on empty iterator");
+        }
+    }
+
+    /**
+
+    /**
      * Iterator for non-indexed sequential iteration through all SAMRecords in file.
      * Starting point of iteration is wherever current file position is when the iterator is constructed.
      */
-    private class BAMFileIterator implements CloseableIterator<SAMRecord> {
+    private class BAMFileIterator extends AbstractBamIterator {
         private SAMRecord mNextRecord = null;
         private final BAMRecordCodec bamRecordCodec;
         private long samRecordIndex = 0; // Records at what position (counted in records) we are at in the file
-        private boolean isClosed = false;
 
         BAMFileIterator() {
             this(true);
@@ -501,32 +595,18 @@ class BAMFileReader extends SAMFileReader.ReaderImplementation {
             }
         }
 
-        public void close() {
-            if (!isClosed) {
-                if (mCurrentIterator != null && this != mCurrentIterator) {
-                    throw new IllegalStateException("Attempt to close non-current iterator");
-                }
-                mCurrentIterator = null;
-                isClosed = true;
-            }
-        }
-
         public boolean hasNext() {
-            if (isClosed) throw new IllegalStateException("Iterator has been closed");
+            assertOpen();
             return (mNextRecord != null);
         }
 
         public SAMRecord next() {
-            if (isClosed) throw new IllegalStateException("Iterator has been closed");
+            assertOpen();
             final SAMRecord result = mNextRecord;
             advance();
             return result;
         }
 
-        public void remove() {
-            throw new UnsupportedOperationException("Not supported: remove");
-        }
-
         void advance() {
             try {
                 mNextRecord = getNextRecord();
@@ -545,7 +625,7 @@ class BAMFileReader extends SAMFileReader.ReaderImplementation {
                 if (eagerDecode && mNextRecord != null) {
                     mNextRecord.eagerDecode();
                 }
-            } catch (IOException exc) {
+            } catch (final IOException exc) {
                 throw new RuntimeException(exc.getMessage(), exc);
             }
         }
@@ -573,25 +653,65 @@ class BAMFileReader extends SAMFileReader.ReaderImplementation {
     }
 
     /**
-     * Prepare to iterate through SAMRecords matching the target interval.
-     * @param sequence Desired reference sequence.
-     * @param start 1-based start of target interval, inclusive.
-     * @param end 1-based end of target interval, inclusive.
-     * @param queryType contained, overlapping, or starting-at query.
+     * Prepare to iterate through SAMRecords in the given reference that start exactly at the given start coordinate.
+     * @param referenceIndex Desired reference sequence.
+     * @param start 1-based alignment start.
+     */
+    private CloseableIterator<SAMRecord> createStartingAtIndexIterator(final int referenceIndex,
+                                                                       final int start) {
+
+        // Hit the index to determine the chunk boundaries for the required data.
+        final BAMIndex fileIndex = getIndex();
+        final BAMFileSpan fileSpan = fileIndex.getSpanOverlapping(referenceIndex, start, 0);
+        final long[] filePointers = fileSpan != null ? fileSpan.toCoordinateArray() : null;
+
+        // Create an iterator over the above chunk boundaries.
+        final BAMFileIndexIterator iterator = new BAMFileIndexIterator(filePointers);
+
+        // Add some preprocessing filters for edge-case reads that don't fit into this
+        // query type.
+        return new BAMQueryFilteringIterator(iterator,new BAMStartingAtIteratorFilter(referenceIndex,start));
+    }
+
+    /**
+     * @throws java.lang.IllegalArgumentException if the intervals are not optimized
+     * @see net.sf.samtools.SAMFileReader.QueryInterval#optimizeIntervals(net.sf.samtools.SAMFileReader.QueryInterval[])
      */
-    private CloseableIterator<SAMRecord> createIndexIterator(final String sequence,
-                                                             final int start,
-                                                             final int end,
-                                                             final QueryType queryType) {
-        long[] filePointers = null;
+    private void assertIntervalsOptimized(final SAMFileReader.QueryInterval[] intervals) {
+        if (intervals.length == 0) return;
+        for (int i = 1; i < intervals.length; ++i) {
+        final SAMFileReader.QueryInterval prev = intervals[i-1];
+        final SAMFileReader.QueryInterval thisInterval = intervals[i];
+            if (prev.compareTo(thisInterval) >= 0) {
+                throw new IllegalArgumentException(String.format("List of intervals is not sorted: %s >= %s", prev, thisInterval));
+            }
+            if (prev.overlaps(thisInterval)) {
+                throw new IllegalArgumentException(String.format("List of intervals is not optimized: %s intersects %s", prev, thisInterval));
+            }
+            if (prev.abuts(thisInterval)) {
+                throw new IllegalArgumentException(String.format("List of intervals is not optimized: %s abuts %s", prev, thisInterval));
+            }
+        }
+    }
+
+    private CloseableIterator<SAMRecord> createIndexIterator(final SAMFileReader.QueryInterval[] intervals,
+                                                             final boolean contained) {
+
+        assertIntervalsOptimized(intervals);
 
         // Hit the index to determine the chunk boundaries for the required data.
-        final SAMFileHeader fileHeader = getFileHeader();
-        final int referenceIndex = fileHeader.getSequenceIndex(sequence);
-        if (referenceIndex != -1) {
-            final BAMIndex fileIndex = getIndex();
-            final BAMFileSpan fileSpan = fileIndex.getSpanOverlapping(referenceIndex, start, end);
-            filePointers = fileSpan != null ? fileSpan.toCoordinateArray() : null;
+        final BAMFileSpan[] inputSpans = new BAMFileSpan[intervals.length];
+        final BAMIndex fileIndex = getIndex();
+        for (int i = 0; i < intervals.length; ++i) {
+            final SAMFileReader.QueryInterval interval = intervals[i];
+            final BAMFileSpan span = fileIndex.getSpanOverlapping(interval.referenceIndex, interval.start, interval.end);
+            inputSpans[i] = span;
+        }
+        final long[] filePointers;
+        if (inputSpans.length > 0) {
+            filePointers = BAMFileSpan.merge(inputSpans).toCoordinateArray();
+        } else {
+            filePointers = null;
         }
 
         // Create an iterator over the above chunk boundaries.
@@ -599,10 +719,11 @@ class BAMFileReader extends SAMFileReader.ReaderImplementation {
 
         // Add some preprocessing filters for edge-case reads that don't fit into this
         // query type.
-        return new BAMQueryFilteringIterator(iterator,sequence,start,end,queryType);
+        return new BAMQueryFilteringIterator(iterator, new BAMQueryMultipleIntervalsIteratorFilter(intervals, contained));
     }
 
-    enum QueryType {CONTAINED, OVERLAPPING, STARTING_AT}
+
+
 
     /**
      * Look for BAM index file according to standard naming convention.
@@ -630,8 +751,11 @@ class BAMFileReader extends SAMFileReader.ReaderImplementation {
         } else {
             return null;
         }
-    }    
+    }
 
+    /**
+     * Iterate over the SAMRecords defined by the sections of the file described in the ctor argument.
+     */
     private class BAMFileIndexIterator extends BAMFileIterator {
 
         private long[] mFilePointers = null;
@@ -667,37 +791,23 @@ class BAMFileReader extends SAMFileReader.ReaderImplementation {
     }
 
     /**
-     * A decorating iterator that filters out records that are outside the bounds of the
-     * given query parameters.
+     * Pull SAMRecords from a coordinate-sorted iterator, and filter out any that do not match the filter.
      */
-    private class BAMQueryFilteringIterator implements CloseableIterator<SAMRecord> {
+    public class BAMQueryFilteringIterator extends AbstractBamIterator {
         /**
          * The wrapped iterator.
          */
-        private final CloseableIterator<SAMRecord> wrappedIterator;
-
+        protected final CloseableIterator<SAMRecord> wrappedIterator;
         /**
          * The next record to be returned.  Will be null if no such record exists.
          */
-        private SAMRecord mNextRecord;
-
-        private final int mReferenceIndex;
-        private final int mRegionStart;
-        private final int mRegionEnd;
-        private final QueryType mQueryType;
-        private boolean isClosed = false;
+        protected SAMRecord mNextRecord;
+        private final BAMIteratorFilter iteratorFilter;
 
-        public BAMQueryFilteringIterator(final CloseableIterator<SAMRecord> iterator,final String sequence, final int start, final int end, final QueryType queryType) {
+        public BAMQueryFilteringIterator(final CloseableIterator<SAMRecord> iterator,
+                                         final BAMIteratorFilter iteratorFilter) {
             this.wrappedIterator = iterator;
-            final SAMFileHeader fileHeader = getFileHeader();
-            mReferenceIndex = fileHeader.getSequenceIndex(sequence);
-            mRegionStart = start;
-            if (queryType == QueryType.STARTING_AT) {
-                mRegionEnd = mRegionStart;
-            } else {
-                mRegionEnd = (end <= 0) ? Integer.MAX_VALUE : end;
-            }
-            mQueryType = queryType;
+            this.iteratorFilter = iteratorFilter;
             mNextRecord = advance();
         }
 
@@ -705,7 +815,7 @@ class BAMFileReader extends SAMFileReader.ReaderImplementation {
          * Returns true if a next element exists; false otherwise.
          */
         public boolean hasNext() {
-            if (isClosed) throw new IllegalStateException("Iterator has been closed");
+            assertOpen();
             return mNextRecord != null;
         }
 
@@ -721,26 +831,6 @@ class BAMFileReader extends SAMFileReader.ReaderImplementation {
             return currentRead;
         }
 
-        /**
-         * Closes down the existing iterator.
-         */
-        public void close() {
-            if (!isClosed) {
-            if (this != mCurrentIterator) {
-                throw new IllegalStateException("Attempt to close non-current iterator");
-            }
-                mCurrentIterator = null;
-                isClosed = true;
-            }
-        }
-
-        /**
-         * @throws UnsupportedOperationException always.
-         */
-        public void remove() {
-            throw new UnsupportedOperationException("Not supported: remove");
-        }
-
         SAMRecord advance() {
             while (true) {
                 // Pull next record from stream
@@ -748,51 +838,64 @@ class BAMFileReader extends SAMFileReader.ReaderImplementation {
                     return null;
 
                 final SAMRecord record = wrappedIterator.next();
-                // If beyond the end of this reference sequence, end iteration
-                final int referenceIndex = record.getReferenceIndex();
-                if (referenceIndex != mReferenceIndex) {
-                    if (referenceIndex < 0 ||
-                        referenceIndex > mReferenceIndex) {
-                        return null;
-                    }
-                    // If before this reference sequence, continue
-                    continue;
-                }
-                if (mRegionStart == 0 && mRegionEnd == Integer.MAX_VALUE) {
-                    // Quick exit to avoid expensive alignment end calculation
-                    return record;
-                }
-                final int alignmentStart = record.getAlignmentStart();
-                // If read is unmapped but has a coordinate, return it if the coordinate is within
-                // the query region, regardless of whether the mapped mate will be returned.
-                final int alignmentEnd;
-                if (mQueryType == QueryType.STARTING_AT) {
-                    alignmentEnd = -1;
-                } else {
-                    alignmentEnd = (record.getAlignmentEnd() != SAMRecord.NO_ALIGNMENT_START?
-                            record.getAlignmentEnd(): alignmentStart);
+                switch (iteratorFilter.compareToFilter(record)) {
+                    case MATCHES_FILTER: return record;
+                    case STOP_ITERATION: return null;
+                    case CONTINUE_ITERATION: break; // keep looping
+                    default: throw new SAMException("Unexpected return from compareToFilter");
                 }
+            }
+        }
+    }
 
-                if (alignmentStart > mRegionEnd) {
-                    // If scanned beyond target region, end iteration
-                    return null;
-                }
-                // Filter for overlap with region
-                if (mQueryType == QueryType.CONTAINED) {
-                    if (alignmentStart >= mRegionStart && alignmentEnd <= mRegionEnd) {
-                        return record;
-                    }
-                } else if (mQueryType == QueryType.OVERLAPPING) {
-                    if (alignmentEnd >= mRegionStart && alignmentStart <= mRegionEnd) {
-                        return record;
-                    }
-                } else {
-                    if (alignmentStart == mRegionStart) {
-                        return record;
-                    }
-                }
+    interface BAMIteratorFilter {
+        /**
+         * Determine if given record passes the filter, and if it does not, whether iteration should continue
+         * or if this record is beyond the region(s) of interest.
+         */
+        FilteringIteratorState compareToFilter(final SAMRecord record);
+    }
+
+    /**
+     * A decorating iterator that filters out records that do not match the given reference and start position.
+     */
+    private class BAMStartingAtIteratorFilter implements BAMIteratorFilter {
+
+        private final int mReferenceIndex;
+        private final int mRegionStart;
+
+        public BAMStartingAtIteratorFilter(final int referenceIndex, final int start) {
+            mReferenceIndex = referenceIndex;
+            mRegionStart = start;
+        }
+
+        /**
+         *
+         * @return MATCHES_FILTER if this record matches the filter;
+         * CONTINUE_ITERATION if does not match filter but iteration should continue;
+         * STOP_ITERATION if does not match filter and iteration should end.
+         */
+        @Override
+        public FilteringIteratorState compareToFilter(final SAMRecord record) {
+            // If beyond the end of this reference sequence, end iteration
+            final int referenceIndex = record.getReferenceIndex();
+            if (referenceIndex < 0 || referenceIndex > mReferenceIndex) {
+                return FilteringIteratorState.STOP_ITERATION;
+            } else if (referenceIndex < mReferenceIndex) {
+                // If before this reference sequence, continue
+                return FilteringIteratorState.CONTINUE_ITERATION;
+            }
+            final int alignmentStart = record.getAlignmentStart();
+            if (alignmentStart > mRegionStart) {
+                // If scanned beyond target region, end iteration
+                return FilteringIteratorState.STOP_ITERATION;
+            } else  if (alignmentStart == mRegionStart) {
+                    return FilteringIteratorState.MATCHES_FILTER;
+            } else {
+                return FilteringIteratorState.CONTINUE_ITERATION;
             }
         }
+
     }
 
     private class BAMFileIndexUnmappedIterator extends BAMFileIterator  {
@@ -803,4 +906,64 @@ class BAMFileReader extends SAMFileReader.ReaderImplementation {
         }
     }
 
+    /**
+     * Filters out records that do not match any of the given intervals and query type.
+     */
+    private class BAMQueryMultipleIntervalsIteratorFilter implements BAMIteratorFilter {
+        final SAMFileReader.QueryInterval[] intervals;
+        final boolean contained;
+        int intervalIndex = 0;
+
+
+        public BAMQueryMultipleIntervalsIteratorFilter(final SAMFileReader.QueryInterval[] intervals,
+                                                       final boolean contained) {
+            this.contained = contained;
+            this.intervals = intervals;
+        }
+
+        @Override
+        public FilteringIteratorState compareToFilter(final SAMRecord record) {
+            while (intervalIndex < intervals.length) {
+                final IntervalComparison comparison = compareIntervalToRecord(intervals[intervalIndex], record);
+                switch (comparison) {
+                    // Interval is before SAMRecord.  Try next interval;
+                    case BEFORE: ++intervalIndex; break;
+                    // Interval is after SAMRecord.  Keep scanning forward in SAMRecords
+                    case AFTER: return FilteringIteratorState.CONTINUE_ITERATION;
+                    // Found a good record
+                    case CONTAINED: return FilteringIteratorState.MATCHES_FILTER;
+                    // Either found a good record, or else keep scanning SAMRecords
+                    case OVERLAPPING: return
+                            (contained ? FilteringIteratorState.CONTINUE_ITERATION : FilteringIteratorState.MATCHES_FILTER);
+                }
+            }
+            // Went past the last interval
+            return FilteringIteratorState.STOP_ITERATION;
+        }
+
+        private IntervalComparison compareIntervalToRecord(final SAMFileReader.QueryInterval interval, final SAMRecord record) {
+            // interval.end <= 0 implies the end of the reference sequence.
+            final int intervalEnd = (interval.end <= 0? Integer.MAX_VALUE: interval.end);
+
+            if (interval.referenceIndex < record.getReferenceIndex()) return IntervalComparison.BEFORE;
+            else if (interval.referenceIndex > record.getReferenceIndex()) return IntervalComparison.AFTER;
+            else if (intervalEnd < record.getAlignmentStart()) return IntervalComparison.BEFORE;
+            else if (record.getAlignmentEnd() < interval.start) return IntervalComparison.AFTER;
+            else if (CoordMath.encloses(interval.start, intervalEnd, record.getAlignmentStart(), record.getAlignmentEnd())) {
+                return IntervalComparison.CONTAINED;
+            } else return IntervalComparison.OVERLAPPING;
+        }
+    }
+
+    private enum IntervalComparison {
+        BEFORE, AFTER, OVERLAPPING, CONTAINED
+    }
+
+    /**
+     * Type returned by BAMIteratorFilter that tell BAMQueryFilteringIterator how to handle each SAMRecord.
+     */
+    private enum FilteringIteratorState {
+        MATCHES_FILTER, STOP_ITERATION, CONTINUE_ITERATION
+
+    }
 }
diff --git a/src/java/net/sf/samtools/CachingBAMFileIndex.java b/src/java/net/sf/samtools/CachingBAMFileIndex.java
index 91c684d..516ca77 100644
--- a/src/java/net/sf/samtools/CachingBAMFileIndex.java
+++ b/src/java/net/sf/samtools/CachingBAMFileIndex.java
@@ -35,17 +35,17 @@ import java.util.*;
 class CachingBAMFileIndex extends AbstractBAMFileIndex implements BrowseableBAMIndex
 {
     private Integer mLastReferenceRetrieved = null;
-    private WeakHashMap<Integer,BAMIndexContent> mQueriesByReference = new WeakHashMap<Integer,BAMIndexContent>();
+    private final WeakHashMap<Integer,BAMIndexContent> mQueriesByReference = new WeakHashMap<Integer,BAMIndexContent>();
 
-    public CachingBAMFileIndex(final File file, SAMSequenceDictionary dictionary) {
+    public CachingBAMFileIndex(final File file, final SAMSequenceDictionary dictionary) {
         super(file, dictionary);
     }
 
-    public CachingBAMFileIndex(final SeekableStream stream, SAMSequenceDictionary dictionary) {
+    public CachingBAMFileIndex(final SeekableStream stream, final SAMSequenceDictionary dictionary) {
         super(stream, dictionary);
     }
 
-    public CachingBAMFileIndex(final File file, SAMSequenceDictionary dictionary, boolean useMemoryMapping) {
+    public CachingBAMFileIndex(final File file, final SAMSequenceDictionary dictionary, final boolean useMemoryMapping) {
         super(file, dictionary, useMemoryMapping);
     }
 
@@ -58,16 +58,16 @@ class CachingBAMFileIndex extends AbstractBAMFileIndex implements BrowseableBAMI
      *         in a range that can be scanned to find SAMRecords that overlap the given positions.
      */
     public BAMFileSpan getSpanOverlapping(final int referenceIndex, final int startPos, final int endPos) {
-        BAMIndexContent queryResults = getQueryResults(referenceIndex);
+        final BAMIndexContent queryResults = getQueryResults(referenceIndex);
 
         if(queryResults == null)
             return null;
 
-        BinList overlappingBins = getBinsOverlapping(referenceIndex,startPos,endPos);
+        final BinList overlappingBins = getBinsOverlapping(referenceIndex,startPos,endPos);
 
         // System.out.println("# Sequence target TID: " + referenceIndex);
-        List<Bin> bins = new ArrayList<Bin>();
-        for(Bin bin: queryResults.getBins()) {
+        final List<Bin> bins = new ArrayList<Bin>();
+        for(final Bin bin: queryResults.getBins()) {
             if (overlappingBins.getBins().get(bin.getBinNumber()))
                 bins.add(bin);
         }
@@ -77,8 +77,8 @@ class CachingBAMFileIndex extends AbstractBAMFileIndex implements BrowseableBAMI
         }
 
         List<Chunk> chunkList = new ArrayList<Chunk>();
-        for(Bin bin: bins) {
-            for(Chunk chunk: bin.getChunkList())
+        for(final Bin bin: bins) {
+            for(final Chunk chunk: bin.getChunkList())
                 chunkList.add(chunk.clone());
         }
 
@@ -86,7 +86,7 @@ class CachingBAMFileIndex extends AbstractBAMFileIndex implements BrowseableBAMI
             return null;
         }
 
-        chunkList = optimizeChunkList(chunkList,queryResults.getLinearIndex().getMinimumOffset(startPos));
+        chunkList = Chunk.optimizeChunkList(chunkList,queryResults.getLinearIndex().getMinimumOffset(startPos));
         return new BAMFileSpan(chunkList);
     }
 
@@ -115,7 +115,7 @@ class CachingBAMFileIndex extends AbstractBAMFileIndex implements BrowseableBAMI
             return null;
 
         final int referenceSequence = bin.getReferenceSequence();
-        BAMIndexContent indexQuery = getQueryResults(referenceSequence);
+        final BAMIndexContent indexQuery = getQueryResults(referenceSequence);
 
         if(indexQuery == null)
             return null;
@@ -124,7 +124,7 @@ class CachingBAMFileIndex extends AbstractBAMFileIndex implements BrowseableBAMI
         final int firstLocusInBin = getFirstLocusInBin(bin);
 
         // Add the specified bin to the tree if it exists.
-        List<Bin> binTree = new ArrayList<Bin>();
+        final List<Bin> binTree = new ArrayList<Bin>();
         if(indexQuery.containsBin(bin))
             binTree.add(indexQuery.getBins().getBin(bin.getBinNumber()));
 
@@ -133,19 +133,19 @@ class CachingBAMFileIndex extends AbstractBAMFileIndex implements BrowseableBAMI
             final int binStart = getFirstBinInLevel(currentBinLevel);
             final int binWidth = getMaxAddressibleGenomicLocation()/getLevelSize(currentBinLevel);
             final int binNumber = firstLocusInBin/binWidth + binStart;
-            Bin parentBin = indexQuery.getBins().getBin(binNumber);
+            final Bin parentBin = indexQuery.getBins().getBin(binNumber);
             if(parentBin != null && indexQuery.containsBin(parentBin))
                 binTree.add(parentBin);
         }
 
         List<Chunk> chunkList = new ArrayList<Chunk>();
-        for(Bin coveringBin: binTree) {
-            for(Chunk chunk: coveringBin.getChunkList())
+        for(final Bin coveringBin: binTree) {
+            for(final Chunk chunk: coveringBin.getChunkList())
                 chunkList.add(chunk.clone());
         }
 
         final int start = getFirstLocusInBin(bin);
-        chunkList = optimizeChunkList(chunkList,indexQuery.getLinearIndex().getMinimumOffset(start));
+        chunkList = Chunk.optimizeChunkList(chunkList,indexQuery.getLinearIndex().getMinimumOffset(start));
         return new BAMFileSpan(chunkList);
     }
 
diff --git a/src/java/net/sf/samtools/Chunk.java b/src/java/net/sf/samtools/Chunk.java
index 9dc8da2..0555f56 100644
--- a/src/java/net/sf/samtools/Chunk.java
+++ b/src/java/net/sf/samtools/Chunk.java
@@ -3,10 +3,7 @@ package net.sf.samtools;
 import net.sf.samtools.util.BlockCompressedFilePointerUtil;
 
 import java.io.Serializable;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
 
 /**
  * A [start,stop) file pointer pairing into the BAM file, stored
@@ -86,16 +83,16 @@ class Chunk implements Cloneable, Serializable,Comparable<Chunk> {
      * @return True if the chunks overlap.  Returns false if the two chunks abut or are disjoint.
      */
     public boolean overlaps(final Chunk other) {
-        int comparison = this.compareTo(other);
+        final int comparison = this.compareTo(other);
         if(comparison == 0)
             return true;
 
         // "sort" the two chunks using the comparator.
-        Chunk leftMost = comparison==-1 ? this : other;
-        Chunk rightMost = comparison==1 ? this : other;
+        final Chunk leftMost = comparison==-1 ? this : other;
+        final Chunk rightMost = comparison==1 ? this : other;
 
-        long leftMostBlockAddress = BlockCompressedFilePointerUtil.getBlockAddress(leftMost.getChunkEnd());
-        long rightMostBlockAddress = BlockCompressedFilePointerUtil.getBlockAddress(rightMost.getChunkStart());
+        final long leftMostBlockAddress = BlockCompressedFilePointerUtil.getBlockAddress(leftMost.getChunkEnd());
+        final long rightMostBlockAddress = BlockCompressedFilePointerUtil.getBlockAddress(rightMost.getChunkStart());
 
         // If the left block's address is after the right block's address, compare the two blocks.
         // If the two blocks are identical, compare the block offsets.
@@ -103,8 +100,8 @@ class Chunk implements Cloneable, Serializable,Comparable<Chunk> {
         if(leftMostBlockAddress > rightMostBlockAddress)
             return true;
         else if(leftMostBlockAddress == rightMostBlockAddress) {
-            int leftMostOffset = BlockCompressedFilePointerUtil.getBlockOffset(leftMost.getChunkEnd());
-            int rightMostOffset = BlockCompressedFilePointerUtil.getBlockOffset(rightMost.getChunkStart());
+            final int leftMostOffset = BlockCompressedFilePointerUtil.getBlockOffset(leftMost.getChunkEnd());
+            final int rightMostOffset = BlockCompressedFilePointerUtil.getBlockOffset(rightMost.getChunkStart());
             return leftMostOffset > rightMostOffset;
         }
         else
@@ -136,4 +133,35 @@ class Chunk implements Cloneable, Serializable,Comparable<Chunk> {
     public String toString() {
         return String.format("%d:%d-%d:%d",mChunkStart >> 16,mChunkStart & 0xFFFF,mChunkEnd >> 16,mChunkEnd & 0xFFFF);
     }
+
+    /**
+     * @param minimumOffset Discard chunks that end before this file offset.
+     * @return sorted list of chunks in which adjacent chunks are coalesced.
+     */
+    public static List<Chunk> optimizeChunkList(final List<Chunk> chunks, final long minimumOffset) {
+        Chunk lastChunk = null;
+        Collections.sort(chunks);
+        final List<Chunk> result = new ArrayList<Chunk>();
+        for (final Chunk chunk : chunks) {
+            if (chunk.getChunkEnd() <= minimumOffset) {
+                continue;               // linear index optimization
+            }
+            if (result.isEmpty()) {
+                result.add(chunk);
+                lastChunk = chunk;
+                continue;
+            }
+            // Coalesce chunks that are in adjacent file blocks.
+            // This is a performance optimization.
+            if (!lastChunk.overlaps(chunk) && !lastChunk.isAdjacentTo(chunk)) {
+                result.add(chunk);
+                lastChunk = chunk;
+            } else {
+                if (chunk.getChunkEnd() > lastChunk.getChunkEnd()) {
+                    lastChunk.setChunkEnd(chunk.getChunkEnd());
+                }
+            }
+        }
+        return result;
+    }
 }
diff --git a/src/java/net/sf/samtools/Defaults.java b/src/java/net/sf/samtools/Defaults.java
index 4c3a652..199e00a 100644
--- a/src/java/net/sf/samtools/Defaults.java
+++ b/src/java/net/sf/samtools/Defaults.java
@@ -22,12 +22,21 @@ public class Defaults {
     /** Buffer size, in bytes, used whenever reading/writing files or streams.  Default = 128k. */
     public static final int BUFFER_SIZE;
 
+    /** Should BlockCompressedOutputStream attempt to load libIntelDeflater? */
+    public static final boolean TRY_USE_INTEL_DEFLATER;
+
+    /** Path to libIntelDeflater.so.  If this is not set, the library is looked for in the directory
+     * where the executable jar lives. */
+    public static final String INTEL_DEFLATER_SHARED_LIBRARY_PATH;
+
     static {
         CREATE_INDEX      = getBooleanProperty("create_index", false);
         CREATE_MD5        = getBooleanProperty("create_md5", false);
         USE_ASYNC_IO      = getBooleanProperty("use_async_io", false);
         COMPRESSION_LEVEL = getIntProperty("compression_level", 5);
         BUFFER_SIZE       = getIntProperty("buffer_size", 1024 * 128);
+        TRY_USE_INTEL_DEFLATER = getBooleanProperty("try_use_intel_deflater", true);
+        INTEL_DEFLATER_SHARED_LIBRARY_PATH = getStringProperty("intel_deflater_so_path", null);
     }
 
     /** Gets a string system property, prefixed with "samjdk." using the default if the property does not exist.*/
diff --git a/src/java/net/sf/samtools/DiskBasedBAMFileIndex.java b/src/java/net/sf/samtools/DiskBasedBAMFileIndex.java
index 84bff64..7a00666 100644
--- a/src/java/net/sf/samtools/DiskBasedBAMFileIndex.java
+++ b/src/java/net/sf/samtools/DiskBasedBAMFileIndex.java
@@ -34,15 +34,15 @@ import java.util.List;
  */
 class DiskBasedBAMFileIndex extends AbstractBAMFileIndex
 {
-    DiskBasedBAMFileIndex(final File file, SAMSequenceDictionary dictionary) {
+    DiskBasedBAMFileIndex(final File file, final SAMSequenceDictionary dictionary) {
         super(file, dictionary);
     }
 
-    DiskBasedBAMFileIndex(final SeekableStream stream, SAMSequenceDictionary dictionary) {
+    DiskBasedBAMFileIndex(final SeekableStream stream, final SAMSequenceDictionary dictionary) {
         super(stream, dictionary);
     }
 
-    DiskBasedBAMFileIndex(final File file, SAMSequenceDictionary dictionary, boolean useMemoryMapping) {
+    DiskBasedBAMFileIndex(final File file, final SAMSequenceDictionary dictionary, final boolean useMemoryMapping) {
         super(file, dictionary, useMemoryMapping);
     }
 
@@ -57,19 +57,19 @@ class DiskBasedBAMFileIndex extends AbstractBAMFileIndex
      * the range that may contain the indicated SAMRecords.
      */
     public BAMFileSpan getSpanOverlapping(final int referenceIndex, final int startPos, final int endPos) {
-        BAMIndexContent queryResults = query(referenceIndex,startPos,endPos);
+        final BAMIndexContent queryResults = query(referenceIndex,startPos,endPos);
 
         if(queryResults == null)
             return null;
 
         List<Chunk> chunkList = new ArrayList<Chunk>();
-        for(Chunk chunk: queryResults.getAllChunks())
+        for(final Chunk chunk: queryResults.getAllChunks())
             chunkList.add(chunk.clone());
-        chunkList = optimizeChunkList(chunkList,queryResults.getLinearIndex().getMinimumOffset(startPos));
+        chunkList = Chunk.optimizeChunkList(chunkList,queryResults.getLinearIndex().getMinimumOffset(startPos));
         return new BAMFileSpan(chunkList);
     }
 
-     protected BAMIndexContent getQueryResults(int reference){
+     protected BAMIndexContent getQueryResults(final int reference){
          throw new UnsupportedOperationException();
          // todo: there ought to be a way to support this using the first startPos for the reference and the last
          // return query(reference, 1, -1);
diff --git a/src/java/net/sf/samtools/SAMFileHeader.java b/src/java/net/sf/samtools/SAMFileHeader.java
index a40eb25..a0abe96 100644
--- a/src/java/net/sf/samtools/SAMFileHeader.java
+++ b/src/java/net/sf/samtools/SAMFileHeader.java
@@ -233,10 +233,11 @@ public class SAMFileHeader extends AbstractSAMHeaderRecord
     }
 
     public SortOrder getSortOrder() {
-        if (getAttribute("SO") == null) {
+        final String so = getAttribute("SO");
+        if (so == null || so.equals("unknown")) {
             return SortOrder.unsorted;
         }
-        return SortOrder.valueOf((String)getAttribute("SO"));
+        return SortOrder.valueOf((String) so);
     }
 
     public void setSortOrder(final SortOrder so) {
diff --git a/src/java/net/sf/samtools/SAMFileReader.java b/src/java/net/sf/samtools/SAMFileReader.java
index 4a16b9a..d3fd9db 100644
--- a/src/java/net/sf/samtools/SAMFileReader.java
+++ b/src/java/net/sf/samtools/SAMFileReader.java
@@ -30,7 +30,10 @@ import net.sf.samtools.seekablestream.SeekableHTTPStream;
 import net.sf.samtools.seekablestream.SeekableStream;
 
 import java.io.*;
+import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 import java.util.zip.GZIPInputStream;
 import java.net.URL;
 
@@ -111,6 +114,7 @@ public class SAMFileReader implements Iterable<SAMRecord>, Closeable {
         abstract CloseableIterator<SAMRecord>  getIterator(SAMFileSpan fileSpan);
         abstract SAMFileSpan getFilePointerSpanningReads();
         abstract CloseableIterator<SAMRecord> query(String sequence, int start, int end, boolean contained);
+        abstract CloseableIterator<SAMRecord> query(QueryInterval[] intervals, boolean contained);
         abstract CloseableIterator<SAMRecord> queryAlignmentStart(String sequence, int start);
         abstract public CloseableIterator<SAMRecord> queryUnmapped();
         abstract void close();
@@ -301,7 +305,7 @@ public class SAMFileReader implements Iterable<SAMRecord>, Closeable {
      * @throws SAMException if no such index is available.
      */
     public BrowseableBAMIndex getBrowseableIndex() {
-        BAMIndex index = getIndex();
+        final BAMIndex index = getIndex();
         if(!(index instanceof BrowseableBAMIndex))
             throw new SAMException("Cannot return index: index created by BAM is not browseable.");
         return BrowseableBAMIndex.class.cast(index);
@@ -415,6 +419,83 @@ public class SAMFileReader implements Iterable<SAMRecord>, Closeable {
         return query(sequence, start, end, true);
     }
 
+    /**
+     * Iterate over records that match one of the given intervals.  This may be more efficient than querying
+     * each interval separately, because multiple reads of the same SAMRecords is avoided.
+     * <p/>
+     * Only valid to call this if hasIndex() == true.
+     * <p/>
+     * Only a single open iterator on a given SAMFileReader may be extant at any one time.  If you want to start
+     * a second iteration, the first one must be closed first.  You can use a second SAMFileReader to iterate
+     * in parallel over the same underlying file.
+     * <p/>
+     * Note that indexed lookup is not perfectly efficient in terms of disk I/O.  I.e. some SAMRecords may be read
+     * and then discarded because they do not match an interval of interest.
+     * <p/>
+     * Note that an unmapped read will be returned by this call if it has a coordinate for the purpose of sorting that
+     * is in the query region.
+     *
+     * @param intervals  Intervals to be queried.  The intervals must be optimized, i.e. in order, with overlapping
+     *                   and abutting intervals merged.  This can be done with
+     *                   net.sf.samtools.SAMFileReader.QueryInterval#optimizeIntervals(net.sf.samtools.SAMFileReader.QueryInterval[])
+     * @param contained If true, each SAMRecord returned is will have its alignment completely contained in one of the
+     *                  intervals of interest.  If false, the alignment of the returned SAMRecords need only overlap one of
+     *                  the intervals of interest.
+     * @return Iterator over the SAMRecords matching the interval.
+     */
+    public SAMRecordIterator query(final QueryInterval[] intervals, final boolean contained) {
+        return new AssertableIterator(mReader.query(intervals, contained));
+    }
+
+    /**
+     * Iterate over records that overlap any of the given intervals.  This may be more efficient than querying
+     * each interval separately, because multiple reads of the same SAMRecords is avoided.
+     * <p/>
+     * Only valid to call this if hasIndex() == true.
+     * <p/>
+     * Only a single open iterator on a given SAMFileReader may be extant at any one time.  If you want to start
+     * a second iteration, the first one must be closed first.
+     * <p/>
+     * Note that indexed lookup is not perfectly efficient in terms of disk I/O.  I.e. some SAMRecords may be read
+     * and then discarded because they do not match the interval of interest.
+     * <p/>
+     * Note that an unmapped read will be returned by this call if it has a coordinate for the purpose of sorting that
+     * is in the query region.
+     *
+     * @param intervals  Intervals to be queried.  The intervals must be optimized, i.e. in order, with overlapping
+     *                   and abutting intervals merged.  This can be done with
+     *                   net.sf.samtools.SAMFileReader.QueryInterval#optimizeIntervals(net.sf.samtools.SAMFileReader.QueryInterval[])
+     * @return Iterator over the SAMRecords overlapping any of the intervals.
+     */
+    public SAMRecordIterator queryOverlapping(final QueryInterval[] intervals) {
+        return query(intervals, false);
+    }
+
+    /**
+     * Iterate over records that are contained in the given interval.  This may be more efficient than querying
+     * each interval separately, because multiple reads of the same SAMRecords is avoided.
+     * <p/>
+     * Only valid to call this if hasIndex() == true.
+     * <p/>
+     * Only a single open iterator on a given SAMFileReader may be extant at any one time.  If you want to start
+     * a second iteration, the first one must be closed first.
+     * <p/>
+     * Note that indexed lookup is not perfectly efficient in terms of disk I/O.  I.e. some SAMRecords may be read
+     * and then discarded because they do not match the interval of interest.
+     * <p/>
+     * Note that an unmapped read will be returned by this call if it has a coordinate for the purpose of sorting that
+     * is in the query region.
+     *
+     * @param intervals  Intervals to be queried.  The intervals must be optimized, i.e. in order, with overlapping
+     *                   and abutting intervals merged.  This can be done with
+     *                   net.sf.samtools.SAMFileReader.QueryInterval#optimizeIntervals(net.sf.samtools.SAMFileReader.QueryInterval[])
+     * @return Iterator over the SAMRecords contained in any of the intervals.
+     */
+    public SAMRecordIterator queryContained(final QueryInterval[] intervals) {
+        return query(intervals, true);
+    }
+
+
     public SAMRecordIterator queryUnmapped() {
         return new AssertableIterator(mReader.queryUnmapped());
     }
@@ -509,7 +590,7 @@ public class SAMFileReader implements Iterable<SAMRecord>, Closeable {
             }
             setValidationStringency(validationStringency);
         }
-        catch (IOException e) {
+        catch (final IOException e) {
             throw new RuntimeIOException(e);
         }
     }
@@ -526,14 +607,14 @@ public class SAMFileReader implements Iterable<SAMRecord>, Closeable {
             }
             setValidationStringency(validationStringency);
         }
-        catch (IOException e) {
+        catch (final IOException e) {
             throw new RuntimeIOException(e);
         }
     }
 
     // Its too expensive to examine the remote file to determine type.
     // Rely on file extension.
-    private boolean streamLooksLikeBam(SeekableStream strm) {
+    private boolean streamLooksLikeBam(final SeekableStream strm) {
         String source = strm.getSource();
         if(source == null) return true;
         source = source.toLowerCase();
@@ -542,13 +623,13 @@ public class SAMFileReader implements Iterable<SAMRecord>, Closeable {
         return source.endsWith(".bam") || source.contains(".bam?")|| source.contains(".bam&") || source.contains(".bam%26");
     }
 
-    private void init(final InputStream stream, final File file, File indexFile, final boolean eagerDecode, final ValidationStringency validationStringency) {
+    private void init(final InputStream stream, final File file, final File indexFile, final boolean eagerDecode, final ValidationStringency validationStringency) {
         if (stream != null && file != null) throw new IllegalArgumentException("stream and file are mutually exclusive");
         this.samFile = file;
 
         try {
             final BufferedInputStream bufferedStream;
-            if (file != null) bufferedStream = new BufferedInputStream(new FileInputStream(file), IOUtil.STANDARD_BUFFER_SIZE);
+            if (file != null) bufferedStream = new BufferedInputStream(new FileInputStream(file), Defaults.BUFFER_SIZE);
             else bufferedStream = IOUtil.toBufferedStream(stream);
             if (isBAMFile(bufferedStream)) {
                 mIsBinary = true;
@@ -580,7 +661,7 @@ public class SAMFileReader implements Iterable<SAMRecord>, Closeable {
             setValidationStringency(validationStringency);
             mReader.setSAMRecordFactory(this.samRecordFactory);
         }
-        catch (IOException e) {
+        catch (final IOException e) {
             throw new RuntimeIOException(e);
         }
     }
@@ -632,14 +713,14 @@ public class SAMFileReader implements Iterable<SAMRecord>, Closeable {
             final int ch = gunzip.read();
             return true;
         }
-        catch (IOException ioe) {
+        catch (final IOException ioe) {
             return false;
         }
         finally {
             try {
                 stream.reset();
             }
-            catch (IOException ioe) {
+            catch (final IOException ioe) {
                 throw new IllegalStateException("Could not reset stream.");
             }
         }
@@ -668,11 +749,11 @@ public class SAMFileReader implements Iterable<SAMRecord>, Closeable {
         private SAMRecord previous = null;
         private SAMRecordComparator comparator = null;
 
-        public AssertableIterator(CloseableIterator<SAMRecord> iterator) {
+        public AssertableIterator(final CloseableIterator<SAMRecord> iterator) {
             wrappedIterator = iterator;
         }
 
-        public SAMRecordIterator assertSorted(SAMFileHeader.SortOrder sortOrder) {
+        public SAMRecordIterator assertSorted(final SAMFileHeader.SortOrder sortOrder) {
 
             if (sortOrder == null || sortOrder == SAMFileHeader.SortOrder.unsorted) {
                 comparator = null;
@@ -684,7 +765,7 @@ public class SAMFileReader implements Iterable<SAMRecord>, Closeable {
         }
 
         public SAMRecord next() {
-            SAMRecord result = wrappedIterator.next();
+            final SAMRecord result = wrappedIterator.next();
             if (comparator != null) {
                 if (previous != null) {
                     if (comparator.fileOrderCompare(previous, result) > 0) {
@@ -706,4 +787,123 @@ public class SAMFileReader implements Iterable<SAMRecord>, Closeable {
     }
 
 
+    /**
+     * Interval relative to a reference, for querying a BAM file.
+     */
+    public static class QueryInterval implements Comparable<QueryInterval> {
+
+        /** Index of reference sequence, based on the sequence dictionary of the BAM file being queried. */
+        public final int referenceIndex;
+        /** 1-based, inclusive */
+        public final int start;
+        /** 1-based, inclusive.  If <= 0, implies that the interval goes to the end of the reference sequence */
+        public final int end;
+
+
+        public QueryInterval(final int referenceIndex, final int start, final int end) {
+            if (referenceIndex < 0) {
+                throw new IllegalArgumentException("Invalid reference index " + referenceIndex);
+            }
+            this.referenceIndex = referenceIndex;
+            this.start = start;
+            this.end = end;
+        }
+
+
+        public int compareTo(final QueryInterval other) {
+            int comp = this.referenceIndex - other.referenceIndex;
+            if (comp != 0) return comp;
+            comp = this.start - other.start;
+            if (comp != 0) return comp;
+            else if (this.end == other.end) return 0;
+            else if (this.end == 0) return 1;
+            else if (other.end == 0) return -1;
+            else return this.end - other.end;
+        }
+
+        /**
+         * @return true if both are on same reference, and other starts exactly where this ends.
+         */
+        public boolean abuts(final QueryInterval other) {
+            return this.referenceIndex == other.referenceIndex && this.end == other.start;
+        }
+
+        /**
+         * @return true if both are on same reference, and the overlap.
+         */
+        public boolean overlaps(final QueryInterval other) {
+            if (this.referenceIndex != other.referenceIndex) {
+                return false;
+            }
+            final int thisEnd = (this.end == 0? Integer.MAX_VALUE: this.end);
+            final int otherEnd = (other.end == 0? Integer.MAX_VALUE: other.end);
+            return CoordMath.overlaps(this.start, thisEnd, other.start, otherEnd);
+        }
+
+        @Override
+        public String toString() {
+            return String.format("%d:%d-%d", referenceIndex, start, end);
+        }
+
+        private static final QueryInterval[] EMPTY_QUERY_INTERVAL_ARRAY = new QueryInterval[0];
+
+        /**
+         *
+         * @param inputIntervals WARNING: This list is modified (sorted) by this method.
+         * @return Ordered list of intervals in which abutting and overlapping intervals are merged.
+         */
+        public static QueryInterval[] optimizeIntervals(final QueryInterval[] inputIntervals) {
+            if (inputIntervals.length == 0) return EMPTY_QUERY_INTERVAL_ARRAY;
+            Arrays.sort(inputIntervals);
+
+            final List<QueryInterval> unique = new ArrayList<QueryInterval>();
+            QueryInterval previous = inputIntervals[0];
+
+
+            for(int i = 1; i < inputIntervals.length; ++i) {
+                final QueryInterval next = inputIntervals[i];
+                if (previous.abuts(next) || previous.overlaps(next)) {
+                    final int newEnd = ((previous.end == 0 || next.end == 0)? 0: Math.max(previous.end, next.end));
+                    previous = new QueryInterval(previous.referenceIndex, previous.start, newEnd);
+                }
+                else {
+                    unique.add(previous);
+                    previous = next;
+                }
+            }
+
+            if (previous != null) unique.add(previous);
+
+            return unique.toArray(EMPTY_QUERY_INTERVAL_ARRAY);
+        }
+    }
+
+    /**
+     * Convenience method to create a QueryInterval
+     * @param sequence sequence of interest, must exist in sequence dictionary
+     * @param start 1-based start position, must be >= 1
+     * @param end 1-based end position.
+     * @throws java.lang.IllegalArgumentException if sequence not found in sequence dictionary, or start position < 1
+     */
+    public QueryInterval makeQueryInterval(final String sequence, int start, int end) {
+        int referenceIndex = getFileHeader().getSequenceIndex(sequence);
+        if (referenceIndex < 0) {
+            throw new IllegalArgumentException(String.format("Sequence '%s' not found in sequence dictionary", sequence));
+        }
+        if (start < 1) {
+            throw new IllegalArgumentException("Start position must be >= 1");
+        }
+        return new QueryInterval(referenceIndex, start, end);
+    }
+
+    /**
+     * Convenience method to create a QueryInterval that goes from start to end of given sequence.
+     * @param sequence sequence of interest, must exist in sequence dictionary
+     * @param start 1-based start position, must be >= 1
+     * @throws java.lang.IllegalArgumentException if sequence not found in sequence dictionary, or start position < 1
+     */
+    public QueryInterval makeQueryInterval(final String sequence, int start) {
+        return makeQueryInterval(sequence, start, 0);
+    }
+
 }
diff --git a/src/java/net/sf/samtools/SAMFileSpan.java b/src/java/net/sf/samtools/SAMFileSpan.java
index 7f9b696..4b0bf69 100644
--- a/src/java/net/sf/samtools/SAMFileSpan.java
+++ b/src/java/net/sf/samtools/SAMFileSpan.java
@@ -23,10 +23,12 @@
  */
 package net.sf.samtools;
 
-import java.util.List;
+import net.sf.samtools.util.StringUtil;
+
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.io.Serializable;
+import java.util.List;
 
 /**
  * A interface representing a collection of (possibly) discontinuous segments in the
@@ -110,8 +112,8 @@ class BAMFileSpan implements SAMFileSpan, Serializable {
      * @return A copy of the chunk list.
      */
     public BAMFileSpan clone() {
-        BAMFileSpan clone = new BAMFileSpan();
-        for(Chunk chunk: chunks)
+        final BAMFileSpan clone = new BAMFileSpan();
+        for(final Chunk chunk: chunks)
             clone.chunks.add(chunk.clone());
         return clone;
     }
@@ -130,15 +132,15 @@ class BAMFileSpan implements SAMFileSpan, Serializable {
         if(!(fileSpan instanceof BAMFileSpan))
             throw new SAMException("Unable to compare ");
 
-        BAMFileSpan bamFileSpan = (BAMFileSpan)fileSpan;
+        final BAMFileSpan bamFileSpan = (BAMFileSpan)fileSpan;
 
         if(bamFileSpan.isEmpty())
             return clone();
 
         validateSorted();
 
-        BAMFileSpan trimmedChunkList = new BAMFileSpan();
-        for(Chunk chunkToTrim: chunks) {
+        final BAMFileSpan trimmedChunkList = new BAMFileSpan();
+        for(final Chunk chunkToTrim: chunks) {
             if(chunkToTrim.getChunkEnd() > chunkToTrim.getChunkStart()) {
                 if(chunkToTrim.getChunkStart() >= bamFileSpan.chunks.get(0).getChunkStart()) {
                     // This chunk from the list is completely beyond the start of the filtering chunk.
@@ -170,7 +172,7 @@ class BAMFileSpan implements SAMFileSpan, Serializable {
      * @param span - span with chunks to add to this one
      */
     public void add(final BAMFileSpan span) {
-        for (Chunk c : span.chunks) {
+        for (final Chunk c : span.chunks) {
             chunks.add(c);
         }
     }
@@ -206,7 +208,7 @@ class BAMFileSpan implements SAMFileSpan, Serializable {
      * @return The first offset in the span
      */
     protected long getFirstOffset() {
-        long result = 0;
+        final long result = 0;
         if (chunks == null){
             return result;
         }
@@ -243,11 +245,11 @@ class BAMFileSpan implements SAMFileSpan, Serializable {
      * @param coordinateArray List of chunks to convert.
      * @return A list of chunks.
      */
-    protected static SAMFileSpan toChunkList(long[] coordinateArray) {
+    protected static SAMFileSpan toChunkList(final long[] coordinateArray) {
         if(coordinateArray.length % 2 != 0)
             throw new SAMException("Data supplied does not appear to be in coordinate array format.");
 
-        BAMFileSpan chunkList = new BAMFileSpan();
+        final BAMFileSpan chunkList = new BAMFileSpan();
         for(int i = 0; i < coordinateArray.length; i += 2)
             chunkList.add(new Chunk(coordinateArray[i],coordinateArray[i+1]));
 
@@ -271,15 +273,19 @@ class BAMFileSpan implements SAMFileSpan, Serializable {
      */
     @Override
     public String toString() {
-        StringBuilder builder = new StringBuilder();
-        boolean first = true;
-        for(Chunk chunk: chunks) {
-            if(!first) {
-                builder.append(';');
-                first = false;
-            }
-            builder.append(chunk);
-        }
-        return builder.toString();
+        return StringUtil.join(";", chunks);
+    }
+
+    /**
+     *
+     * @return A single BAMFileSpan that is an intelligent merge of the input spans, i.e. contiguous, overlapping
+     * and contained chunks are intelligently merged, and the chunks are sorted.
+     */
+    public static BAMFileSpan merge(final BAMFileSpan[] spans) {
+        int numInputChunks = 0;
+        for (final BAMFileSpan span : spans) numInputChunks += span.chunks.size();
+        final ArrayList<Chunk> inputChunks = new ArrayList<Chunk>(numInputChunks);
+        for (final BAMFileSpan span : spans) inputChunks.addAll(span.chunks);
+        return new BAMFileSpan(Chunk.optimizeChunkList(inputChunks, 0));
     }
 }
diff --git a/src/java/net/sf/samtools/SAMSequenceDictionary.java b/src/java/net/sf/samtools/SAMSequenceDictionary.java
index bb2bc96..49f3f61 100644
--- a/src/java/net/sf/samtools/SAMSequenceDictionary.java
+++ b/src/java/net/sf/samtools/SAMSequenceDictionary.java
@@ -50,6 +50,7 @@ public class SAMSequenceDictionary {
 
     /**
      * Replaces the existing list of SAMSequenceRecords with the given list.
+     *
      * @param list This value is used directly, rather than being copied.
      */
     public void setSequences(final List<SAMSequenceRecord> list) {
@@ -115,6 +116,33 @@ public class SAMSequenceDictionary {
         return mSequences.isEmpty();
     }
 
+    private static String DICT_MISMATCH_TEMPLATE = "SAM dictionaries are not the same: %s.";
+    /**
+     * Non-comprehensive {@link #equals(Object)}-assertion: instead of calling {@link SAMSequenceRecord#equals(Object)} on constituent
+     * {@link SAMSequenceRecord}s in this dictionary against its pair in the target dictionary, in order,  call 
+     * {@link SAMSequenceRecord#isSameSequence(SAMSequenceRecord)}.
+     *
+     * @throws AssertionError When the dictionaries are not the same, with some human-readable information as to why
+     */
+    public void assertSameDictionary(final SAMSequenceDictionary that) {
+        if (this == that) return;
+        
+        final Iterator<SAMSequenceRecord> thatSequences = that.mSequences.iterator();
+        for (final SAMSequenceRecord thisSequence : mSequences) {
+            if (!thatSequences.hasNext())
+                throw new AssertionError(String.format(DICT_MISMATCH_TEMPLATE, thisSequence + " is present in only one dictionary"));
+            else {
+                final SAMSequenceRecord thatSequence = thatSequences.next();
+                if(!thatSequence.isSameSequence(thisSequence))
+                    throw new AssertionError(
+                            String.format(DICT_MISMATCH_TEMPLATE, thatSequence + " was found when " + thisSequence + " was expected")
+                    );
+            }
+        }
+        if (thatSequences.hasNext())
+            throw new AssertionError(String.format(DICT_MISMATCH_TEMPLATE, thatSequences.next() + " is present in only one dictionary"));
+    }
+    
     @Override
     public boolean equals(Object o) {
         if (this == o) return true;
diff --git a/src/java/net/sf/samtools/SAMSequenceRecord.java b/src/java/net/sf/samtools/SAMSequenceRecord.java
index 629a70a..f49fd31 100644
--- a/src/java/net/sf/samtools/SAMSequenceRecord.java
+++ b/src/java/net/sf/samtools/SAMSequenceRecord.java
@@ -211,5 +211,15 @@ public class SAMSequenceRecord extends AbstractSAMHeaderRecord implements Clonea
         }
     }
 
+    @Override
+    public String toString() {
+        return String.format(
+                "SAMSequenceRecord(name=%s,length=%s,dict_index=%s,assembly=%s)", 
+                getSequenceName(), 
+                getSequenceLength(), 
+                getSequenceIndex(),
+                getAssembly()
+        );
+    }
 }
 
diff --git a/src/java/net/sf/samtools/SAMTextReader.java b/src/java/net/sf/samtools/SAMTextReader.java
index adef9d8..bf651ff 100644
--- a/src/java/net/sf/samtools/SAMTextReader.java
+++ b/src/java/net/sf/samtools/SAMTextReader.java
@@ -168,6 +168,11 @@ class SAMTextReader extends SAMFileReader.ReaderImplementation {
         throw new UnsupportedOperationException("Cannot query SAM text files");
     }
 
+    @Override
+    CloseableIterator<SAMRecord> query(final SAMFileReader.QueryInterval[] intervals, final boolean contained) {
+        throw new UnsupportedOperationException("Cannot query SAM text files");
+    }
+
     /**
      * Unsupported for SAM text files.
      */
diff --git a/src/java/net/sf/samtools/SAMUtils.java b/src/java/net/sf/samtools/SAMUtils.java
index e9b4930..71a8203 100644
--- a/src/java/net/sf/samtools/SAMUtils.java
+++ b/src/java/net/sf/samtools/SAMUtils.java
@@ -455,7 +455,7 @@ public final class SAMUtils
         }
     }
 
-    static void processValidationError(final SAMValidationError validationError,
+    public static void processValidationError(final SAMValidationError validationError,
                                        SAMFileReader.ValidationStringency validationStringency) {
         if (validationStringency == SAMFileReader.ValidationStringency.STRICT) {
             throw new SAMFormatException("SAM validation error: " + validationError);
diff --git a/src/java/net/sf/samtools/seekablestream/ISeekableStreamFactory.java b/src/java/net/sf/samtools/seekablestream/ISeekableStreamFactory.java
new file mode 100644
index 0000000..901583d
--- /dev/null
+++ b/src/java/net/sf/samtools/seekablestream/ISeekableStreamFactory.java
@@ -0,0 +1,33 @@
+package net.sf.samtools.seekablestream;
+
+import java.io.IOException;
+import java.net.URL;
+
+/**
+ * Factory for creating {@link SeekableStream}s based on URLs/paths.
+ * Implementations can be set as the default with {@link SeekableStreamFactory#setInstance(ISeekableStreamFactory)}
+ * @author jacob
+ * @date 2013-Oct-24
+ */
+public interface ISeekableStreamFactory {
+
+    public SeekableStream getStreamFor(URL url) throws IOException;
+
+    public SeekableStream getStreamFor(String path) throws IOException;
+
+    /**
+     * Return a buffered {@code SeekableStream} which wraps the input {@code stream}
+     * using the default buffer size
+     * @param stream
+     * @return
+     */
+    public SeekableStream getBufferedStream(SeekableStream stream);
+
+    /**
+     * Return a buffered {@code SeekableStream} which wraps the input {@code stream}
+     * @param stream
+     * @param bufferSize
+     * @return
+     */
+    public SeekableStream getBufferedStream(SeekableStream stream, int bufferSize);
+}
diff --git a/src/java/net/sf/samtools/seekablestream/SeekableFTPStream.java b/src/java/net/sf/samtools/seekablestream/SeekableFTPStream.java
index 95b926c..253a568 100644
--- a/src/java/net/sf/samtools/seekablestream/SeekableFTPStream.java
+++ b/src/java/net/sf/samtools/seekablestream/SeekableFTPStream.java
@@ -92,7 +92,7 @@ public class SeekableFTPStream extends SeekableStream {
         long startPosition = (args.length < 2) ? 0x0b66c78l : Long.parseLong(args[1]);
         int len = (args.length < 3) ? 8 : Integer.parseInt(args[2]);
         int skipLen = (args.length < 4) ? 0x18 : Integer.parseInt(args[3]);
-        SeekableStream s = SeekableStreamFactory.getStreamFor(testURL);
+        SeekableStream s = SeekableStreamFactory.getInstance().getStreamFor(testURL);
         byte[] buffer = new byte[len];
         s.seek(startPosition);
         s.read(buffer, 0, len);
diff --git a/src/java/net/sf/samtools/seekablestream/SeekableStreamFactory.java b/src/java/net/sf/samtools/seekablestream/SeekableStreamFactory.java
index fc44448..e69ca72 100644
--- a/src/java/net/sf/samtools/seekablestream/SeekableStreamFactory.java
+++ b/src/java/net/sf/samtools/seekablestream/SeekableStreamFactory.java
@@ -28,13 +28,29 @@ import java.io.IOException;
 import java.net.URL;
 
 /**
+ * Singleton class for getting {@link SeekableStream}s from URL/paths
+ * Applications using this library can set their own factory
  * @author jrobinso
  * @date Nov 30, 2009
  */
-public class SeekableStreamFactory {
+public class SeekableStreamFactory{
 
-    public static SeekableStream getStreamFor(URL url) throws IOException{
-        return getStreamFor(url.toExternalForm());
+    private static final ISeekableStreamFactory DEFAULT_FACTORY;
+    private static ISeekableStreamFactory currentFactory;
+
+    static{
+        DEFAULT_FACTORY = new DefaultSeekableStreamFactory();
+        currentFactory = DEFAULT_FACTORY;
+    }
+
+    private SeekableStreamFactory(){}
+
+    public static void setInstance(final ISeekableStreamFactory factory){
+        currentFactory = factory;
+    }
+
+    public static ISeekableStreamFactory getInstance(){
+        return currentFactory;
     }
 
     /**
@@ -46,17 +62,33 @@ public class SeekableStreamFactory {
         return ! ( path.startsWith("http:") || path.startsWith("https:") || path.startsWith("ftp:") );
     }
 
-    public static SeekableStream getStreamFor(String path) throws IOException {
-        // todo -- add support for SeekableBlockInputStream
+    private static class DefaultSeekableStreamFactory implements ISeekableStreamFactory {
+
+        public SeekableStream getStreamFor(final URL url) throws IOException {
+            return getStreamFor(url.toExternalForm());
+        }
+
+        public SeekableStream getStreamFor(final String path) throws IOException {
+            // todo -- add support for SeekableBlockInputStream
+
+            if (path.startsWith("http:") || path.startsWith("https:")) {
+                final URL url = new URL(path);
+                return new SeekableHTTPStream(url);
+            } else if (path.startsWith("ftp:")) {
+                return new SeekableFTPStream(new URL(path));
+            } else {
+                return new SeekableFileStream(new File(path));
+            }
+        }
 
-        if (path.startsWith("http:") || path.startsWith("https:")) {
-            final URL url = new URL(path);
-            return new SeekableHTTPStream(url);
-        } else if (path.startsWith("ftp:")) {
-            return new SeekableFTPStream(new URL(path));
-        } else {
-            return new SeekableFileStream(new File(path));
+        public SeekableStream getBufferedStream(SeekableStream stream){
+            return getBufferedStream(stream, SeekableBufferedStream.DEFAULT_BUFFER_SIZE);
         }
+
+        public SeekableStream getBufferedStream(SeekableStream stream, int bufferSize){
+            return new SeekableBufferedStream(stream, bufferSize);
+        }
+
     }
 
 }
diff --git a/src/java/net/sf/samtools/util/BlockCompressedOutputStream.java b/src/java/net/sf/samtools/util/BlockCompressedOutputStream.java
index 5b453e6..ac1834c 100644
--- a/src/java/net/sf/samtools/util/BlockCompressedOutputStream.java
+++ b/src/java/net/sf/samtools/util/BlockCompressedOutputStream.java
@@ -23,6 +23,8 @@
  */
 package net.sf.samtools.util;
 
+import net.sf.samtools.util.zip.DeflaterFactory;
+
 import java.io.File;
 import java.io.IOException;
 import java.io.OutputStream;
@@ -83,6 +85,8 @@ public class BlockCompressedOutputStream
     // which would attempt to compress up to 64K bytes, and if the resulting compressed block was too large,
     // try compressing fewer input bytes (aka "downshifting').  The problem with downshifting is that
     // getFilePointer might return an inaccurate value.
+    // I assume (AW 29-Oct-2013) that there is no value in using hardware-assisted deflater for no-compression mode,
+    // so just use JDK standard.
     private final Deflater noCompressionDeflater = new Deflater(Deflater.NO_COMPRESSION, true);
     private final CRC32 crc32 = new CRC32();
     private File file = null;
@@ -121,7 +125,7 @@ public class BlockCompressedOutputStream
     public BlockCompressedOutputStream(final File file, final int compressionLevel) {
         this.file = file;
         codec = new BinaryCodec(file, true);
-        deflater = new Deflater(compressionLevel, true);
+        deflater = DeflaterFactory.makeDeflater(compressionLevel, true);
     }
 
     /**
@@ -138,7 +142,7 @@ public class BlockCompressedOutputStream
         if (file != null) {
             codec.setOutputFileName(file.getAbsolutePath());
         }
-        deflater = new Deflater(compressionLevel, true);
+        deflater = DeflaterFactory.makeDeflater(compressionLevel, true);
     }
 
     /**
diff --git a/src/java/net/sf/samtools/util/CollectionUtil.java b/src/java/net/sf/samtools/util/CollectionUtil.java
index e8a4760..58bcd5f 100755
--- a/src/java/net/sf/samtools/util/CollectionUtil.java
+++ b/src/java/net/sf/samtools/util/CollectionUtil.java
@@ -31,6 +31,14 @@ import java.util.*;
  */
 public class CollectionUtil {
 
+    /** Simple case-insensitive lexical comparator of objects using their {@link Object#toString()} value. */
+    final public static Comparator<Object> OBJECT_TOSTRING_COMPARATOR = new Comparator<Object>() {
+        @Override
+        public int compare(final Object o1, final Object o2) {
+            return o1.toString().compareToIgnoreCase(o2.toString());
+        }
+    };
+
     public static <T> List<T> makeList (final T... list) {
         final List<T> result = new ArrayList<T>();
         Collections.addAll(result, list);
diff --git a/src/java/net/sf/samtools/util/IOUtil.java b/src/java/net/sf/samtools/util/IOUtil.java
index 9665c68..875ee48 100644
--- a/src/java/net/sf/samtools/util/IOUtil.java
+++ b/src/java/net/sf/samtools/util/IOUtil.java
@@ -96,7 +96,7 @@ public class IOUtil {
         File f = null;
 
         for (int i=0; i<tmpDirs.length; ++i) {
-            if (tmpDirs[i].getUsableSpace() > minBytesFree || i == tmpDirs.length-1) {
+            if ( i == tmpDirs.length-1 || tmpDirs[i].getUsableSpace() > minBytesFree) {
                 f = File.createTempFile(prefix, suffix, tmpDirs[i]);
                 f.deleteOnExit();
                 break;
diff --git a/src/java/net/sf/samtools/util/Lazy.java b/src/java/net/sf/samtools/util/Lazy.java
new file mode 100644
index 0000000..0d8c3ec
--- /dev/null
+++ b/src/java/net/sf/samtools/util/Lazy.java
@@ -0,0 +1,35 @@
+package net.sf.samtools.util;
+
+/**
+ * Simple utility for building an on-demand (lazy) object-initializer.
+ * 
+ * Works by accepting an initializer describing how to build the on-demand object, which is only called once and only after the first
+ * invocation of {@link #get()} (or it may not be called at all).
+ * 
+ * @author mccowan
+ */
+public class Lazy<T> {
+    private final LazyInitializer<T> initializer;
+    private boolean isInitialized = false;
+    private T instance;
+
+    /** Simple cons */
+    public Lazy(final LazyInitializer<T> initializer) {
+        this.initializer = initializer;
+    }
+
+    /** Returns the instance associated with this {@link Lazy}, initializing it if necessary. */
+    public synchronized T get() {
+        if (!isInitialized) {
+            this.instance = initializer.make();
+            isInitialized = true;
+        }
+        return instance;
+    }
+
+    /** Describes how to build the instance of the lazy object. */
+    public interface LazyInitializer<T> {
+        /** Returns the desired object instance. */
+        T make();
+    }
+}
diff --git a/src/java/net/sf/samtools/util/StringUtil.java b/src/java/net/sf/samtools/util/StringUtil.java
index 22b60a7..eee2161 100644
--- a/src/java/net/sf/samtools/util/StringUtil.java
+++ b/src/java/net/sf/samtools/util/StringUtil.java
@@ -458,4 +458,9 @@ public class StringUtil {
         return String.valueOf(output);
     }
 
+    /** Returns {@link Object#toString()} of the provided value if it isn't null; "" otherwise. */
+    public static final String EMPTY_STRING = "";
+    public static String asEmptyIfNull(final Object string) {
+        return string == null ? EMPTY_STRING : string.toString();
+    }
 }
diff --git a/src/java/net/sf/samtools/util/ftp/FTPUtils.java b/src/java/net/sf/samtools/util/ftp/FTPUtils.java
index 37bde32..539f13d 100644
--- a/src/java/net/sf/samtools/util/ftp/FTPUtils.java
+++ b/src/java/net/sf/samtools/util/ftp/FTPUtils.java
@@ -64,13 +64,19 @@ public class FTPUtils {
     }
 
     public static long getContentLength(URL url) throws IOException {
-        // Use JDK url
-        URLConnection connection = url.openConnection();
-        connection.setConnectTimeout(TIMEOUT);
-        //For reasons beyond my ken, on Java 7 getContentLength
-        //returns -1 without attempting a connection
-        //contentLength = connection.getContentLength();
-        return connection.getInputStream().available();
+        FTPClient ftp = null;
+        try {
+            ftp = FTPUtils.connect(url.getHost(), url.getUserInfo(), null);
+            String sizeString = ftp.executeCommand("size " + url.getPath()).getReplyString();
+            return Integer.parseInt(sizeString);
+        } catch (Exception e) {
+            return -1 ;
+        }
+        finally {
+            if(ftp != null) {
+                ftp.disconnect();
+            }
+        }
     }
 
 
diff --git a/src/java/net/sf/samtools/util/zip/DeflaterFactory.java b/src/java/net/sf/samtools/util/zip/DeflaterFactory.java
new file mode 100644
index 0000000..0c6af8c
--- /dev/null
+++ b/src/java/net/sf/samtools/util/zip/DeflaterFactory.java
@@ -0,0 +1,78 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2013 The Broad Institute
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package net.sf.samtools.util.zip;
+
+import net.sf.samtools.Defaults;
+import net.sf.samtools.SAMException;
+
+import java.lang.reflect.Constructor;
+import java.util.zip.Deflater;
+
+/**
+ * Create zlib-based Deflater if JNI library and other require libraries are available, otherwise create standard
+ * JDK Deflater.
+ * Java 7 has its own Deflater implementation (libzip.so).  This is almost as fast as a zlib-based Deflater, so in general
+ * there isn't a compelling reason to use zlib.  However, Intel has created a hardware-assisted zlib implementation
+ * as part of their IPP (Integrated Performance Primitives) package that can run significantly faster on some Intel
+ * hardware.  We have seen compression times reduced by 13% to 33% depending on particular hardware, and hope that
+ * newer Intel processors will be even better.
+ *
+ * Note that this class will no longer be necessary once Java 8 is required, because JDK 8 will use zlib instead
+ * of libzip implementation.
+ */
+public class DeflaterFactory {
+
+    private static Constructor<IntelDeflater> intelDeflaterConstructor;
+
+    static {
+        try {
+            if (Defaults.TRY_USE_INTEL_DEFLATER) {
+                final Class<IntelDeflater> clazz = (Class<IntelDeflater>) Class.forName("net.sf.samtools.util.zip.IntelDeflater");
+                intelDeflaterConstructor = clazz.getConstructor(Integer.TYPE, Boolean.TYPE);
+            }
+        } catch (ClassNotFoundException e) {
+            intelDeflaterConstructor = null;
+        } catch (NoSuchMethodException e) {
+            intelDeflaterConstructor = null;
+        } catch (UnsatisfiedLinkError e) {
+            intelDeflaterConstructor = null;
+        }
+    }
+
+    public static Deflater makeDeflater(final int compressionLevel, final boolean nowrap) {
+        if (intelDeflaterConstructor != null) {
+            try {
+                return intelDeflaterConstructor.newInstance(compressionLevel, nowrap);
+            } catch (Exception e) {
+                throw new SAMException("Exception constructing IntelDeflater", e);
+            }
+        } else {
+            return new Deflater(compressionLevel, nowrap);
+        }
+    }
+
+    public static boolean usingIntelDeflater() {
+        return intelDeflaterConstructor != null;
+    }
+}
diff --git a/src/java/net/sf/samtools/util/zip/IntelDeflater.java b/src/java/net/sf/samtools/util/zip/IntelDeflater.java
new file mode 100644
index 0000000..1ce5de6
--- /dev/null
+++ b/src/java/net/sf/samtools/util/zip/IntelDeflater.java
@@ -0,0 +1,567 @@
+/*
+ * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package net.sf.samtools.util.zip;
+
+import net.sf.samtools.Defaults;
+
+import java.io.File;
+import java.net.URL;
+import java.util.zip.Deflater;
+
+/**
+ * This is a copy of java.util.zip.Deflater from OpenJDK 7, with the following changes:
+ * - package and class name changed
+ * - static block to load libIntelDeflater library
+ * - extends java.util.zip.Deflater so that IntelDeflater object can be used as regular Deflater object.
+ *   Note however that all methods of Deflater are overridden.
+ *
+ * The shared library is found via one of the following mechanisms:
+ * 1. if samjdk.intel_deflater_so_path system property is set, this is assumed to be the path of libIntelDeflater.so
+ * 2. If system property is not set, directory where the jarfile that this class came from lives is tried as location
+ *    of libIntelDeflater.so
+ * 3. If either of the above fails to find the library, regular LD_LIBRARY_PATH is used to find the library.
+ * 4. If that doesn't work, class fails to load and code falls back to regular Java Deflater class.
+ *
+ *
+ * The rest of this document is copied verbatim from the original OpenJDK file.
+ *
+ * This class provides support for general purpose compression using the
+ * popular ZLIB compression library. The ZLIB compression library was
+ * initially developed as part of the PNG graphics standard and is not
+ * protected by patents. It is fully described in the specifications at
+ * the <a href="package-summary.html#package_description">java.util.zip
+ * package description</a>.
+ *
+ * <p>The following code fragment demonstrates a trivial compression
+ * and decompression of a string using <tt>IntelDeflater</tt> and
+ * <tt>Inflater</tt>.
+ *
+ * <blockquote><pre>
+ * try {
+ *     // Encode a String into bytes
+ *     String inputString = "blahblahblah";
+ *     byte[] input = inputString.getBytes("UTF-8");
+ *
+ *     // Compress the bytes
+ *     byte[] output = new byte[100];
+ *     IntelDeflater compresser = new IntelDeflater();
+ *     compresser.setInput(input);
+ *     compresser.finish();
+ *     int compressedDataLength = compresser.deflate(output);
+ *     compresser.end();
+ *
+ *     // Decompress the bytes
+ *     Inflater decompresser = new Inflater();
+ *     decompresser.setInput(output, 0, compressedDataLength);
+ *     byte[] result = new byte[100];
+ *     int resultLength = decompresser.inflate(result);
+ *     decompresser.end();
+ *
+ *     // Decode the bytes into a String
+ *     String outputString = new String(result, 0, resultLength, "UTF-8");
+ * } catch(java.io.UnsupportedEncodingException ex) {
+ *     // handle
+ * } catch (java.util.zip.DataFormatException ex) {
+ *     // handle
+ * }
+ * </pre></blockquote>
+ *
+ * @see         java.util.zip.Inflater
+ * @author      David Connelly
+ */
+public
+class IntelDeflater extends Deflater {
+
+    private final ZStreamRef zsRef;
+    private byte[] buf = new byte[0];
+    private int off, len;
+    private int level, strategy;
+    private boolean setParams;
+    private boolean finish, finished;
+
+    /**
+     * Compression flush mode used to achieve best compression result.
+     *
+     * @see IntelDeflater#deflate(byte[], int, int, int)
+     * @since 1.7
+     */
+    public static final int NO_FLUSH = 0;
+
+    /**
+     * Compression flush mode used to flush out all pending output; may
+     * degrade compression for some compression algorithms.
+     *
+     * @see IntelDeflater#deflate(byte[], int, int, int)
+     * @since 1.7
+     */
+    public static final int SYNC_FLUSH = 2;
+
+    /**
+     * Compression flush mode used to flush out all pending output and
+     * reset the deflater. Using this mode too often can seriously degrade
+     * compression.
+     *
+     * @see IntelDeflater#deflate(byte[], int, int, int)
+     * @since 1.7
+     */
+    public static final int FULL_FLUSH = 3;
+
+    static {
+        try {
+            final File sharedLibrary;
+            if (Defaults.INTEL_DEFLATER_SHARED_LIBRARY_PATH != null) {
+                // Load via path set by -Dsamjdk.intel_deflater_so_path=<path>
+                sharedLibrary = new File(Defaults.INTEL_DEFLATER_SHARED_LIBRARY_PATH);
+            } else {
+                // Look in directory containing this class for the library
+                URL jarUrl = IntelDeflater.class.getProtectionDomain().getCodeSource().getLocation();
+                sharedLibrary = new File(new File(jarUrl.getPath()).getParentFile(), "libIntelDeflater.so");
+            }
+            System.load(sharedLibrary.getAbsolutePath());
+        } catch (Throwable e) {
+            // Possible exceptions:
+            // System.load: UnsatisfiedLinkError
+            // getProtectionDomain: SecurityException
+            // NullPointerException due to getCodeSource returning null
+
+            // Try to find via LD_LIBRARY_PATH
+            System.loadLibrary("IntelDeflater");
+        }
+        initIDs();
+    }
+
+    /**
+     * Creates a new compressor using the specified compression level.
+     * If 'nowrap' is true then the ZLIB header and checksum fields will
+     * not be used in order to support the compression format used in
+     * both GZIP and PKZIP.
+     * @param level the compression level (0-9)
+     * @param nowrap if true then use GZIP compatible compression
+     */
+    public IntelDeflater(int level, boolean nowrap) {
+        this.level = level;
+        this.strategy = DEFAULT_STRATEGY;
+        this.zsRef = new ZStreamRef(init(level, DEFAULT_STRATEGY, nowrap));
+    }
+
+    /**
+     * Creates a new compressor using the specified compression level.
+     * Compressed data will be generated in ZLIB format.
+     * @param level the compression level (0-9)
+     */
+    public IntelDeflater(int level) {
+        this(level, false);
+    }
+
+    /**
+     * Creates a new compressor with the default compression level.
+     * Compressed data will be generated in ZLIB format.
+     */
+    public IntelDeflater() {
+        this(DEFAULT_COMPRESSION, false);
+    }
+
+    /**
+     * Sets input data for compression. This should be called whenever
+     * needsInput() returns true indicating that more input data is required.
+     * @param b the input data bytes
+     * @param off the start offset of the data
+     * @param len the length of the data
+     * @see IntelDeflater#needsInput
+     */
+    @Override
+    public void setInput(byte[] b, int off, int len) {
+        if (b== null) {
+            throw new NullPointerException();
+        }
+        if (off < 0 || len < 0 || off > b.length - len) {
+            throw new ArrayIndexOutOfBoundsException();
+        }
+        synchronized (zsRef) {
+            this.buf = b;
+            this.off = off;
+            this.len = len;
+        }
+    }
+
+    /**
+     * Sets input data for compression. This should be called whenever
+     * needsInput() returns true indicating that more input data is required.
+     * @param b the input data bytes
+     * @see IntelDeflater#needsInput
+     */
+    @Override
+    public void setInput(byte[] b) {
+        setInput(b, 0, b.length);
+    }
+
+    /**
+     * Sets preset dictionary for compression. A preset dictionary is used
+     * when the history buffer can be predetermined. When the data is later
+     * uncompressed with Inflater.inflate(), Inflater.getAdler() can be called
+     * in order to get the Adler-32 value of the dictionary required for
+     * decompression.
+     * @param b the dictionary data bytes
+     * @param off the start offset of the data
+     * @param len the length of the data
+     * @see java.util.zip.Inflater#inflate
+     * @see java.util.zip.Inflater#getAdler
+     */
+    @Override
+    public void setDictionary(byte[] b, int off, int len) {
+        if (b == null) {
+            throw new NullPointerException();
+        }
+        if (off < 0 || len < 0 || off > b.length - len) {
+            throw new ArrayIndexOutOfBoundsException();
+        }
+        synchronized (zsRef) {
+            ensureOpen();
+            setDictionary(zsRef.address(), b, off, len);
+        }
+    }
+
+    /**
+     * Sets preset dictionary for compression. A preset dictionary is used
+     * when the history buffer can be predetermined. When the data is later
+     * uncompressed with Inflater.inflate(), Inflater.getAdler() can be called
+     * in order to get the Adler-32 value of the dictionary required for
+     * decompression.
+     * @param b the dictionary data bytes
+     * @see java.util.zip.Inflater#inflate
+     * @see java.util.zip.Inflater#getAdler
+     */
+    @Override
+    public void setDictionary(byte[] b) {
+        setDictionary(b, 0, b.length);
+    }
+
+    /**
+     * Sets the compression strategy to the specified value.
+     * @param strategy the new compression strategy
+     * @exception IllegalArgumentException if the compression strategy is
+     *                                     invalid
+     */
+    @Override
+    public void setStrategy(int strategy) {
+        switch (strategy) {
+            case DEFAULT_STRATEGY:
+            case FILTERED:
+            case HUFFMAN_ONLY:
+                break;
+            default:
+                throw new IllegalArgumentException();
+        }
+        synchronized (zsRef) {
+            if (this.strategy != strategy) {
+                this.strategy = strategy;
+                setParams = true;
+            }
+        }
+    }
+
+    /**
+     * Sets the current compression level to the specified value.
+     * @param level the new compression level (0-9)
+     * @exception IllegalArgumentException if the compression level is invalid
+     */
+    @Override
+    public void setLevel(int level) {
+        if ((level < 0 || level > 9) && level != DEFAULT_COMPRESSION) {
+            throw new IllegalArgumentException("invalid compression level");
+        }
+        synchronized (zsRef) {
+            if (this.level != level) {
+                this.level = level;
+                setParams = true;
+            }
+        }
+    }
+
+    /**
+     * Returns true if the input data buffer is empty and setInput()
+     * should be called in order to provide more input.
+     * @return true if the input data buffer is empty and setInput()
+     * should be called in order to provide more input
+     */
+    @Override
+    public boolean needsInput() {
+        return len <= 0;
+    }
+
+    /**
+     * When called, indicates that compression should end with the current
+     * contents of the input buffer.
+     */
+    @Override
+    public void finish() {
+        synchronized (zsRef) {
+            finish = true;
+        }
+    }
+
+    /**
+     * Returns true if the end of the compressed data output stream has
+     * been reached.
+     * @return true if the end of the compressed data output stream has
+     * been reached
+     */
+    @Override
+    public boolean finished() {
+        synchronized (zsRef) {
+            return finished;
+        }
+    }
+
+    /**
+     * Compresses the input data and fills specified buffer with compressed
+     * data. Returns actual number of bytes of compressed data. A return value
+     * of 0 indicates that {@link #needsInput() needsInput} should be called
+     * in order to determine if more input data is required.
+     *
+     * <p>This method uses {@link #NO_FLUSH} as its compression flush mode.
+     * An invocation of this method of the form {@code deflater.deflate(b, off, len)}
+     * yields the same result as the invocation of
+     * {@code deflater.deflate(b, off, len, IntelDeflater.NO_FLUSH)}.
+     *
+     * @param b the buffer for the compressed data
+     * @param off the start offset of the data
+     * @param len the maximum number of bytes of compressed data
+     * @return the actual number of bytes of compressed data written to the
+     *         output buffer
+     */
+    @Override
+    public int deflate(byte[] b, int off, int len) {
+        return deflate(b, off, len, NO_FLUSH);
+    }
+
+    /**
+     * Compresses the input data and fills specified buffer with compressed
+     * data. Returns actual number of bytes of compressed data. A return value
+     * of 0 indicates that {@link #needsInput() needsInput} should be called
+     * in order to determine if more input data is required.
+     *
+     * <p>This method uses {@link #NO_FLUSH} as its compression flush mode.
+     * An invocation of this method of the form {@code deflater.deflate(b)}
+     * yields the same result as the invocation of
+     * {@code deflater.deflate(b, 0, b.length, IntelDeflater.NO_FLUSH)}.
+     *
+     * @param b the buffer for the compressed data
+     * @return the actual number of bytes of compressed data written to the
+     *         output buffer
+     */
+    @Override
+    public int deflate(byte[] b) {
+        return deflate(b, 0, b.length, NO_FLUSH);
+    }
+
+    /**
+     * Compresses the input data and fills the specified buffer with compressed
+     * data. Returns actual number of bytes of data compressed.
+     *
+     * <p>Compression flush mode is one of the following three modes:
+     *
+     * <ul>
+     * <li>{@link #NO_FLUSH}: allows the deflater to decide how much data
+     * to accumulate, before producing output, in order to achieve the best
+     * compression (should be used in normal use scenario). A return value
+     * of 0 in this flush mode indicates that {@link #needsInput()} should
+     * be called in order to determine if more input data is required.
+     *
+     * <li>{@link #SYNC_FLUSH}: all pending output in the deflater is flushed,
+     * to the specified output buffer, so that an inflater that works on
+     * compressed data can get all input data available so far (In particular
+     * the {@link #needsInput()} returns {@code true} after this invocation
+     * if enough output space is provided). Flushing with {@link #SYNC_FLUSH}
+     * may degrade compression for some compression algorithms and so it
+     * should be used only when necessary.
+     *
+     * <li>{@link #FULL_FLUSH}: all pending output is flushed out as with
+     * {@link #SYNC_FLUSH}. The compression state is reset so that the inflater
+     * that works on the compressed output data can restart from this point
+     * if previous compressed data has been damaged or if random access is
+     * desired. Using {@link #FULL_FLUSH} too often can seriously degrade
+     * compression.
+     * </ul>
+     *
+     * <p>In the case of {@link #FULL_FLUSH} or {@link #SYNC_FLUSH}, if
+     * the return value is {@code len}, the space available in output
+     * buffer {@code b}, this method should be invoked again with the same
+     * {@code flush} parameter and more output space.
+     *
+     * @param b the buffer for the compressed data
+     * @param off the start offset of the data
+     * @param len the maximum number of bytes of compressed data
+     * @param flush the compression flush mode
+     * @return the actual number of bytes of compressed data written to
+     *         the output buffer
+     *
+     * @throws IllegalArgumentException if the flush mode is invalid
+     * @since 1.7
+     */
+    public int deflate(byte[] b, int off, int len, int flush) {
+        //System.out.println("Inside IntelDeflater\n");
+        if (b == null) {
+            throw new NullPointerException();
+        }
+        if (off < 0 || len < 0 || off > b.length - len) {
+            throw new ArrayIndexOutOfBoundsException();
+        }
+        synchronized (zsRef) {
+            ensureOpen();
+            if (flush == NO_FLUSH || flush == SYNC_FLUSH ||
+                    flush == FULL_FLUSH)
+                return deflateBytes(zsRef.address(), b, off, len, flush);
+            throw new IllegalArgumentException();
+        }
+    }
+
+    /**
+     * Returns the ADLER-32 value of the uncompressed data.
+     * @return the ADLER-32 value of the uncompressed data
+     */
+    @Override
+    public int getAdler() {
+        synchronized (zsRef) {
+            ensureOpen();
+            return getAdler(zsRef.address());
+        }
+    }
+
+    /**
+     * Returns the total number of uncompressed bytes input so far.
+     *
+     * <p>Since the number of bytes may be greater than
+     * Integer.MAX_VALUE, the {@link #getBytesRead()} method is now
+     * the preferred means of obtaining this information.</p>
+     *
+     * @return the total number of uncompressed bytes input so far
+     */
+    @Override
+    public int getTotalIn() {
+        return (int) getBytesRead();
+    }
+
+    /**
+     * Returns the total number of uncompressed bytes input so far.</p>
+     *
+     * @return the total (non-negative) number of uncompressed bytes input so far
+     * @since 1.5
+     */
+    @Override
+    public long getBytesRead() {
+        synchronized (zsRef) {
+            ensureOpen();
+            return getBytesRead(zsRef.address());
+        }
+    }
+
+    /**
+     * Returns the total number of compressed bytes output so far.
+     *
+     * <p>Since the number of bytes may be greater than
+     * Integer.MAX_VALUE, the {@link #getBytesWritten()} method is now
+     * the preferred means of obtaining this information.</p>
+     *
+     * @return the total number of compressed bytes output so far
+     */
+    @Override
+    public int getTotalOut() {
+        return (int) getBytesWritten();
+    }
+
+    /**
+     * Returns the total number of compressed bytes output so far.</p>
+     *
+     * @return the total (non-negative) number of compressed bytes output so far
+     * @since 1.5
+     */
+    @Override
+    public long getBytesWritten() {
+        synchronized (zsRef) {
+            ensureOpen();
+            return getBytesWritten(zsRef.address());
+        }
+    }
+
+    /**
+     * Resets deflater so that a new set of input data can be processed.
+     * Keeps current compression level and strategy settings.
+     */
+    @Override
+    public void reset() {
+        synchronized (zsRef) {
+            ensureOpen();
+            reset(zsRef.address());
+            finish = false;
+            finished = false;
+            off = len = 0;
+        }
+    }
+
+    /**
+     * Closes the compressor and discards any unprocessed input.
+     * This method should be called when the compressor is no longer
+     * being used, but will also be called automatically by the
+     * finalize() method. Once this method is called, the behavior
+     * of the IntelDeflater object is undefined.
+     */
+    @Override
+    public void end() {
+        synchronized (zsRef) {
+            long addr = zsRef.address();
+            zsRef.clear();
+            if (addr != 0) {
+                end(addr);
+                buf = null;
+            }
+        }
+    }
+
+    /**
+     * Closes the compressor when garbage is collected.
+     */
+    protected void finalize() {
+        end();
+    }
+
+    private void ensureOpen() {
+        assert Thread.holdsLock(zsRef);
+        if (zsRef.address() == 0)
+            throw new NullPointerException("IntelDeflater has been closed");
+    }
+
+    private static native void initIDs();
+    private native static long init(int level, int strategy, boolean nowrap);
+    private native static void setDictionary(long addr, byte[] b, int off, int len);
+    private native int deflateBytes(long addr, byte[] b, int off, int len,
+                                    int flush);
+    private native static int getAdler(long addr);
+    private native static long getBytesRead(long addr);
+    private native static long getBytesWritten(long addr);
+    private native static void reset(long addr);
+    private native static void end(long addr);
+}
+
diff --git a/src/java/net/sf/samtools/util/zip/ZStreamRef.java b/src/java/net/sf/samtools/util/zip/ZStreamRef.java
new file mode 100644
index 0000000..5a49d8a
--- /dev/null
+++ b/src/java/net/sf/samtools/util/zip/ZStreamRef.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package net.sf.samtools.util.zip;
+
+/**
+ * Copied from OpenJDK 7.  Only change is package name, because IntelDeflater needs this and
+ * the original class is private to java.util.zip package.
+ *
+ * A reference to the native zlib's z_stream structure.
+ */
+
+class ZStreamRef {
+
+    private long address;
+    ZStreamRef (long address) {
+        this.address = address;
+    }
+
+    long address() {
+        return address;
+    }
+
+    void clear() {
+        address = 0;
+    }
+}
diff --git a/src/java/org/broad/tribble/AbstractFeatureReader.java b/src/java/org/broad/tribble/AbstractFeatureReader.java
index 2856578..4853375 100644
--- a/src/java/org/broad/tribble/AbstractFeatureReader.java
+++ b/src/java/org/broad/tribble/AbstractFeatureReader.java
@@ -41,22 +41,37 @@ public abstract class AbstractFeatureReader<T extends Feature, SOURCE> implement
     protected final FeatureCodec<T, SOURCE> codec;
     protected FeatureCodecHeader header;
 
-    /** Convenience overload which defaults to requiring an index. */
+    private static ComponentMethods methods = new ComponentMethods();
+
+    /**
+     * Calls {@link #getFeatureReader(String, FeatureCodec, boolean)} with {@code requireIndex} = true
+     */
     public static <FEATURE extends Feature, SOURCE> AbstractFeatureReader<FEATURE, SOURCE> getFeatureReader(final String featureFile, final FeatureCodec<FEATURE, SOURCE> codec) throws TribbleException {
         return getFeatureReader(featureFile, codec, true);
     }
 
     /**
-     * factory for unknown file type,  could be ascii, binary, or could be tabix, or something else.
+     * {@link #getFeatureReader(String, String, FeatureCodec, boolean)} with {@code null} for indexResource
+     * @throws TribbleException
+     */
+    public static <FEATURE extends Feature, SOURCE> AbstractFeatureReader<FEATURE, SOURCE> getFeatureReader(final String featureResource, final FeatureCodec<FEATURE, SOURCE> codec, final boolean requireIndex) throws TribbleException {
+        return getFeatureReader(featureResource, null, codec, requireIndex);
+    }
+
+    /**
      *
      * @param featureResource the feature file to create from
-     * @param codec           the codec to read features with
+     * @param indexResource   the index for the feature file. If null, will auto-generate (if necessary)
+     * @param codec
+     * @param requireIndex    whether an index is required for this file
+     * @return
+     * @throws TribbleException
      */
-    public static <FEATURE extends Feature, SOURCE> AbstractFeatureReader<FEATURE, SOURCE> getFeatureReader(final String featureResource, final FeatureCodec<FEATURE, SOURCE> codec, final boolean requireIndex) throws TribbleException {
+    public static <FEATURE extends Feature, SOURCE> AbstractFeatureReader<FEATURE, SOURCE> getFeatureReader(final String featureResource, String indexResource, final FeatureCodec<FEATURE, SOURCE> codec, final boolean requireIndex) throws TribbleException {
 
         try {
             // Test for tabix index
-            if (featureResource.endsWith(".gz") && ParsingUtils.resourceExists(featureResource + ".tbi")) {
+            if (methods.isTabix(featureResource, indexResource)) {
                 if ( ! (codec instanceof AsciiFeatureCodec) )
                     throw new TribbleException("Tabix indexed files only work with ASCII codecs, but received non-Ascii codec " + codec.getClass().getSimpleName());
                 return new TabixFeatureReader<FEATURE, SOURCE>(featureResource, (AsciiFeatureCodec) codec);
@@ -96,6 +111,18 @@ public abstract class AbstractFeatureReader<T extends Feature, SOURCE> implement
         this.codec = codec;
     }
 
+    /**
+     * Whether the reader has an index or not
+     * Default implementation returns false
+     * @return
+     */
+    public boolean hasIndex(){
+        return false;
+    }
+
+    public static void setComponentMethods(ComponentMethods methods){
+        AbstractFeatureReader.methods = methods;
+    }
 
     /**
      * get the header
@@ -113,4 +140,14 @@ public abstract class AbstractFeatureReader<T extends Feature, SOURCE> implement
         public void remove() { }
         @Override public void close() { }
     }
+
+    public static class ComponentMethods{
+
+        public boolean isTabix(String resourcePath, String indexPath) throws IOException{
+            if(indexPath == null){
+                indexPath = ParsingUtils.appendToPath(resourcePath, ".tbi");
+            }
+            return resourcePath.endsWith(".gz") && ParsingUtils.resourceExists(indexPath);
+        }
+    }
 }
diff --git a/src/java/org/broad/tribble/TabixFeatureReader.java b/src/java/org/broad/tribble/TabixFeatureReader.java
index ad028e8..cdaba0b 100644
--- a/src/java/org/broad/tribble/TabixFeatureReader.java
+++ b/src/java/org/broad/tribble/TabixFeatureReader.java
@@ -76,6 +76,11 @@ public class TabixFeatureReader<T extends Feature, SOURCE> extends AbstractFeatu
         }
     }
 
+    @Override
+    public boolean hasIndex(){
+        return true;
+    }
+
 
     public List<String> getSequenceNames() {
         return sequenceNames;
diff --git a/src/java/org/broad/tribble/Tribble.java b/src/java/org/broad/tribble/Tribble.java
index 3544e14..abccbb7 100644
--- a/src/java/org/broad/tribble/Tribble.java
+++ b/src/java/org/broad/tribble/Tribble.java
@@ -23,6 +23,8 @@
  */
 package org.broad.tribble;
 
+import org.broad.tribble.util.ParsingUtils;
+
 import java.io.File;
 
 /**
@@ -40,7 +42,7 @@ public class Tribble {
      * @return
      */
     public static String indexFile(String filename) {
-        return filename + STANDARD_INDEX_EXTENSION;
+        return ParsingUtils.appendToPath(filename, STANDARD_INDEX_EXTENSION);
     }
 
     /**
@@ -52,4 +54,5 @@ public class Tribble {
     public static File indexFile(File file) {
         return new File(file.getAbsoluteFile() + STANDARD_INDEX_EXTENSION);
     }
+
 }
diff --git a/src/java/org/broad/tribble/TribbleIndexedFeatureReader.java b/src/java/org/broad/tribble/TribbleIndexedFeatureReader.java
index a243e4b..fd77a16 100644
--- a/src/java/org/broad/tribble/TribbleIndexedFeatureReader.java
+++ b/src/java/org/broad/tribble/TribbleIndexedFeatureReader.java
@@ -78,7 +78,7 @@ public class TribbleIndexedFeatureReader<T extends Feature, SOURCE> extends Abst
                 index = IndexFactory.loadIndex(indexFile);
             } else {
                 // See if the index itself is gzipped
-                indexFile = indexFile + ".gz";
+                indexFile = ParsingUtils.appendToPath(indexFile, ".gz");
                 if (ParsingUtils.resourceExists(indexFile)) {
                     index = IndexFactory.loadIndex(indexFile);
                 } else {
@@ -107,11 +107,11 @@ public class TribbleIndexedFeatureReader<T extends Feature, SOURCE> extends Abst
         final SeekableStream result;
         if (reuseStreamInQuery()) {
             // if the stream points to an underlying file, only create the underlying seekable stream once
-            if (seekableStream == null) seekableStream = SeekableStreamFactory.getStreamFor(path);
+            if (seekableStream == null) seekableStream = SeekableStreamFactory.getInstance().getStreamFor(path);
             result = seekableStream;
         } else {
             // we are not reusing the stream, so make a fresh copy each time we request it
-            result = SeekableStreamFactory.getStreamFor(path);
+            result = SeekableStreamFactory.getInstance().getStreamFor(path);
         }
 
         return result;
@@ -152,6 +152,10 @@ public class TribbleIndexedFeatureReader<T extends Feature, SOURCE> extends Abst
         return index == null ? new ArrayList<String>() : new ArrayList<String>(index.getSequenceNames());
     }
 
+    @Override
+    public boolean hasIndex() {
+        return index != null;
+    }
 
     /**
      * read the header from the file
diff --git a/src/java/org/broad/tribble/readers/TabixReader.java b/src/java/org/broad/tribble/readers/TabixReader.java
index 8c3c940..e7a3965 100644
--- a/src/java/org/broad/tribble/readers/TabixReader.java
+++ b/src/java/org/broad/tribble/readers/TabixReader.java
@@ -29,15 +29,19 @@ import java.util.HashMap;
 import java.util.Arrays;
 import java.lang.StringBuffer;
 
+import net.sf.samtools.seekablestream.ISeekableStreamFactory;
 import net.sf.samtools.seekablestream.SeekableStream;
 import net.sf.samtools.util.BlockCompressedInputStream;
 import net.sf.samtools.seekablestream.SeekableStreamFactory;
+import org.broad.tribble.Tribble;
+import org.broad.tribble.util.ParsingUtils;
 
 /**
  * @author Heng Li <hengli at broadinstitute.org>
  */
 public class TabixReader {
     private String mFn;
+    private String mIdxFn;
     BlockCompressedInputStream mFp;
 
     private int mPreset;
@@ -91,7 +95,7 @@ public class TabixReader {
      * @param fn File name of the data file
      */
     public TabixReader(final String fn) throws IOException {
-        this(fn, SeekableStreamFactory.getStreamFor(fn));
+        this(fn, SeekableStreamFactory.getInstance().getBufferedStream(SeekableStreamFactory.getInstance().getStreamFor(fn)));
     }
 
     /**
@@ -99,8 +103,20 @@ public class TabixReader {
      * @param stream Seekable stream from which the data is read 
      */
     public TabixReader(final String fn, SeekableStream stream) throws IOException {
+        this(fn, null, stream);
+    }
+
+    /**
+     * @param fn File name of the data file  (used for error messages only)
+     * @param idxFn Full path to the index file. Auto-generated if null
+     * @param stream Seekable stream from which the data is read
+     */
+    public TabixReader(final String fn, final String idxFn, SeekableStream stream) throws IOException {
         mFn = fn;
-        mFp = new BlockCompressedInputStream(stream); //  new File(fn));
+        mFp = new BlockCompressedInputStream(stream);
+        if(idxFn == null){
+            mIdxFn = ParsingUtils.appendToPath(fn, ".tbi");
+        }
         readIndex();
     }
 
@@ -202,7 +218,8 @@ public class TabixReader {
      * Read the Tabix index from the default file.
      */
     public void readIndex() throws IOException {
-        readIndex(SeekableStreamFactory.getStreamFor(mFn + ".tbi"));
+        ISeekableStreamFactory ssf = SeekableStreamFactory.getInstance();
+        readIndex(ssf.getBufferedStream(ssf.getStreamFor(mIdxFn), 128000));
     }
 
     /**
diff --git a/src/java/org/broad/tribble/util/ParsingUtils.java b/src/java/org/broad/tribble/util/ParsingUtils.java
index 42b4980..25bc9ce 100644
--- a/src/java/org/broad/tribble/util/ParsingUtils.java
+++ b/src/java/org/broad/tribble/util/ParsingUtils.java
@@ -23,6 +23,8 @@
  */
 package org.broad.tribble.util;
 
+import net.sf.samtools.util.HttpUtils;
+
 import java.awt.*;
 import java.io.File;
 import java.io.FileInputStream;
@@ -415,4 +417,31 @@ public class ParsingUtils {
         }
         urlHelperClass = helperClass;
     }
+
+    /**
+     * Add the {@code indexExtension} to the {@code filepath}, preserving
+     * query string elements if present. Intended for use where {@code filepath}
+     * is a URL. Will behave correctly on regular file paths (just add the extension
+     * to the end)
+     * @param filepath
+     * @param indexExtension
+     * @return
+     */
+    public static String appendToPath(String filepath, String indexExtension) {
+        String tabxIndex = null;
+        URL url = null;
+        try{
+            url = new URL(filepath);
+        }catch (MalformedURLException e){
+            //pass
+        }
+        if (url != null) {
+            String path = url.getPath();
+            String indexPath = path + indexExtension;
+            tabxIndex = filepath.replace(path, indexPath);
+        } else {
+            tabxIndex = filepath + indexExtension;
+        }
+        return tabxIndex;
+    }
 }
diff --git a/src/java/org/broadinstitute/variant/variantcontext/Allele.java b/src/java/org/broadinstitute/variant/variantcontext/Allele.java
index 79d5ec9..0113923 100644
--- a/src/java/org/broadinstitute/variant/variantcontext/Allele.java
+++ b/src/java/org/broadinstitute/variant/variantcontext/Allele.java
@@ -46,8 +46,8 @@ import java.util.Collection;
  * In these cases, where are the alleles?
  *
  * SNP polymorphism of C/G  -> { C , G } -> C is the reference allele
- * 1 base deletion of C     -> { C , - } -> C is the reference allele
- * 1 base insertion of A    -> { - ; A } -> Null is the reference allele
+ * 1 base deletion of C     -> { tC , t } -> C is the reference allele and we include the preceding reference base (null alleles are not allowed)
+ * 1 base insertion of A    -> { C ; CA } -> C is the reference allele (because null alleles are not allowed)
  *
  * Suppose I see a the following in the population:
  *
@@ -59,6 +59,10 @@ import java.util.Collection;
  *
  *  { C , G , - }
  *
+ *  and these are represented as:
+ *
+ *  { tC, tG, t }
+ *
  * Now suppose I have this more complex example:
  *
  * Ref: a t C g a // C is the reference base
@@ -68,12 +72,11 @@ import java.util.Collection;
  *
  * There are actually four segregating alleles:
  *
- *   { C g , - g, - -, and CAg } over bases 2-4
+ *   { Cg , -g, --, and CAg } over bases 2-4
  *
- * However, the molecular equivalence explicitly listed above is usually discarded, so the actual
- * segregating alleles are:
+ *   represented as:
  *
- *   { C g, g, -, C a g }
+ *   { tCg, tg, t, tCAg }
  *
  * Critically, it should be possible to apply an allele to a reference sequence to create the
  * correct haplotype sequence:
@@ -85,7 +88,7 @@ import java.util.Collection;
  *
  * Given list of alleles it's possible to determine the "type" of the variation
  *
- *      A / C @ loc => SNP with
+ *      A / C @ loc => SNP
  *      - / A => INDEL
  *
  * If you know where allele is the reference, you can determine whether the variant is an insertion or deletion.
diff --git a/src/java/org/broadinstitute/variant/variantcontext/VariantContext.java b/src/java/org/broadinstitute/variant/variantcontext/VariantContext.java
index 52eb957..a18fd32 100644
--- a/src/java/org/broadinstitute/variant/variantcontext/VariantContext.java
+++ b/src/java/org/broadinstitute/variant/variantcontext/VariantContext.java
@@ -40,7 +40,7 @@ import java.util.*;
  *
  * The VariantContext object is a single general class system for representing genetic variation data composed of:
  *
- * * Allele: representing single genetic haplotypes (A, T, ATC, -)
+ * * Allele: representing single genetic haplotypes (A, T, ATC, -) (note that null alleles are used here for illustration; see the Allele class for how to represent indels)
  * * Genotype: an assignment of alleles for each chromosome of a single named sample at a particular locus
  * * VariantContext: an abstract class holding all segregating alleles at a locus as well as genotypes
  *    for multiple individuals containing alleles at that locus
@@ -72,10 +72,10 @@ import java.util.*;
  * A [ref] / T at 10
  * GenomeLoc snpLoc = GenomeLocParser.createGenomeLoc("chr1", 10, 10);
  *
- * - / ATC [ref] from 20-23
+ * A / ATC [ref] from 20-23
  * GenomeLoc delLoc = GenomeLocParser.createGenomeLoc("chr1", 20, 22);
  *
- *  // - [ref] / ATC immediately after 20
+ *  // A [ref] / ATC immediately after 20
  * GenomeLoc insLoc = GenomeLocParser.createGenomeLoc("chr1", 20, 20);
  *
  * === Alleles ===
@@ -86,9 +86,8 @@ import java.util.*;
  *
  * Alleles can be either reference or non-reference
  *
- * Example alleles used here:
+ * Examples of alleles used here:
  *
- *   del = new Allele("-");
  *   A = new Allele("A");
  *   Aref = new Allele("A", true);
  *   T = new Allele("T");
@@ -116,10 +115,8 @@ import java.util.*;
  * VariantContext vc = new VariantContext(name, delLoc, Arrays.asList(ATCref, del));
  * </pre>
  *
- * The only 2 things that distinguishes between a insertion and deletion are the reference allele
- * and the location of the variation.  An insertion has a Null reference allele and at least
- * one non-reference Non-Null allele.  Additionally, the location of the insertion is immediately after
- * a 1-bp GenomeLoc (at say 20).
+ * The only thing that distinguishes between an insertion and deletion is which is the reference allele.
+ * An insertion has a reference allele that is smaller than the non-reference allele, and vice versa for deletions.
  *
  * <pre>
  * VariantContext vc = new VariantContext("name", insLoc, Arrays.asList(delRef, ATC));
@@ -237,6 +234,53 @@ public class VariantContext implements Feature { // to enable tribble integratio
     /* cached monomorphic value: null -> not yet computed, False, True */
     private Boolean monomorphic = null;
 
+    /*
+* Determine which genotype fields are in use in the genotypes in VC
+* @return an ordered list of genotype fields in use in VC.  If vc has genotypes this will always include GT first
+*/
+    public List<String> calcVCFGenotypeKeys(final VCFHeader header) {
+        final Set<String> keys = new HashSet<String>();
+
+        boolean sawGoodGT = false;
+        boolean sawGoodQual = false;
+        boolean sawGenotypeFilter = false;
+        boolean sawDP = false;
+        boolean sawAD = false;
+        boolean sawPL = false;
+        for (final Genotype g : this.getGenotypes()) {
+            keys.addAll(g.getExtendedAttributes().keySet());
+            if ( g.isAvailable() ) sawGoodGT = true;
+            if ( g.hasGQ() ) sawGoodQual = true;
+            if ( g.hasDP() ) sawDP = true;
+            if ( g.hasAD() ) sawAD = true;
+            if ( g.hasPL() ) sawPL = true;
+            if (g.isFiltered()) sawGenotypeFilter = true;
+        }
+
+        if ( sawGoodQual ) keys.add(VCFConstants.GENOTYPE_QUALITY_KEY);
+        if ( sawDP ) keys.add(VCFConstants.DEPTH_KEY);
+        if ( sawAD ) keys.add(VCFConstants.GENOTYPE_ALLELE_DEPTHS);
+        if ( sawPL ) keys.add(VCFConstants.GENOTYPE_PL_KEY);
+        if ( sawGenotypeFilter ) keys.add(VCFConstants.GENOTYPE_FILTER_KEY);
+
+        List<String> sortedList = ParsingUtils.sortList(new ArrayList<String>(keys));
+
+        // make sure the GT is first
+        if (sawGoodGT) {
+            final List<String> newList = new ArrayList<String>(sortedList.size()+1);
+            newList.add(VCFConstants.GENOTYPE_KEY);
+            newList.addAll(sortedList);
+            sortedList = newList;
+        }
+
+        if (sortedList.isEmpty() && header.hasGenotypingData()) {
+            // this needs to be done in case all samples are no-calls
+            return Collections.singletonList(VCFConstants.GENOTYPE_KEY);
+        } else {
+            return sortedList;
+        }
+    }
+
     // ---------------------------------------------------------------------------------------------------------
     //
     // validation mode
@@ -1142,14 +1186,14 @@ public class VariantContext implements Feature { // to enable tribble integratio
             }
 
             if ( getAttribute(VCFConstants.ALLELE_COUNT_KEY) instanceof List ) {
-                Collections.sort(observedACs);
-                List reportedACs = (List)getAttribute(VCFConstants.ALLELE_COUNT_KEY);
-                Collections.sort(reportedACs);
+                final List reportedACs = (List)getAttribute(VCFConstants.ALLELE_COUNT_KEY);
                 if ( observedACs.size() != reportedACs.size() )
                     throw new TribbleException.InternalCodecException(String.format("the Allele Count (AC) tag doesn't have the correct number of values for the record at position %s:%d, %d vs. %d", getChr(), getStart(), reportedACs.size(), observedACs.size()));
                 for (int i = 0; i < observedACs.size(); i++) {
-                    if ( Integer.valueOf(reportedACs.get(i).toString()) != observedACs.get(i) )
-                        throw new TribbleException.InternalCodecException(String.format("the Allele Count (AC) tag is incorrect for the record at position %s:%d, %s vs. %d", getChr(), getStart(), reportedACs.get(i), observedACs.get(i)));
+                    // need to cast to int to make sure we don't have an issue below with object equals (earlier bug) - EB
+                    final int reportedAC = Integer.valueOf(reportedACs.get(i).toString());
+                    if ( reportedAC != observedACs.get(i) )
+                        throw new TribbleException.InternalCodecException(String.format("the Allele Count (AC) tag is incorrect for the record at position %s:%d, %s vs. %d", getChr(), getStart(), reportedAC, observedACs.get(i)));
                 }
             } else {
                 if ( observedACs.size() != 1 )
diff --git a/src/java/org/broadinstitute/variant/variantcontext/VariantContextBuilder.java b/src/java/org/broadinstitute/variant/variantcontext/VariantContextBuilder.java
index 276a693..bbacbc1 100644
--- a/src/java/org/broadinstitute/variant/variantcontext/VariantContextBuilder.java
+++ b/src/java/org/broadinstitute/variant/variantcontext/VariantContextBuilder.java
@@ -209,7 +209,7 @@ public class VariantContextBuilder {
     /**
      * Removes key if present in the attributes
      *
-     * @param key
+     * @param key  key to remove
      * @return
      */
     @Requires({"key != null"})
@@ -221,6 +221,21 @@ public class VariantContextBuilder {
     }
 
     /**
+     * Removes list of keys if present in the attributes
+     *
+     * @param keys  list of keys to remove
+     * @return
+     */
+    @Requires({"keys != null"})
+    @Ensures({"this.attributes.size() <= old(this.attributes.size())"})
+    public VariantContextBuilder rmAttributes(final List<String> keys) {
+        makeAttributesModifiable();
+        for ( final String key : keys )
+            attributes.remove(key);
+        return this;
+    }
+
+    /**
      * Makes the attributes field modifiable.  In many cases attributes is just a pointer to an immutable
      * collection, so methods that want to add / remove records require the attributes to be copied to a
      */
diff --git a/src/java/org/broadinstitute/variant/variantcontext/VariantContextComparator.java b/src/java/org/broadinstitute/variant/variantcontext/VariantContextComparator.java
index 1f51e5c..7a8b9cb 100644
--- a/src/java/org/broadinstitute/variant/variantcontext/VariantContextComparator.java
+++ b/src/java/org/broadinstitute/variant/variantcontext/VariantContextComparator.java
@@ -1,15 +1,10 @@
 package org.broadinstitute.variant.variantcontext;
 
+import net.sf.samtools.SAMSequenceDictionary;
+import net.sf.samtools.SAMSequenceRecord;
 import org.broadinstitute.variant.vcf.VCFContigHeaderLine;
 
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 
 /**
  * A Comparator that orders VariantContexts by the ordering of the contigs/chromosomes in the List
@@ -17,6 +12,14 @@ import java.util.Set;
  */
 public class VariantContextComparator implements Comparator<VariantContext> {
 
+	public static List<String> getSequenceNameList(final SAMSequenceDictionary dictionary) {
+		final List<String> list = new ArrayList<String>();
+		for (final SAMSequenceRecord record : dictionary.getSequences()) {
+			list.add(record.getSequenceName());
+		}
+		return list;
+	}
+
 	// For fast lookup of the contig's index in the contig list
 	private final Map<String, Integer> contigIndexLookup;
 
@@ -61,6 +64,10 @@ public class VariantContextComparator implements Comparator<VariantContext> {
 		this.contigIndexLookup = Collections.unmodifiableMap(protoContigIndexLookup);
 	}
 
+    public VariantContextComparator(final SAMSequenceDictionary dictionary) {
+	    this(getSequenceNameList(dictionary));
+    }
+
 	@Override
 	public int compare(final VariantContext firstVariantContext, final VariantContext secondVariantContext) {
 		// Will throw NullPointerException -- happily -- if either of the chromosomes/contigs aren't
diff --git a/src/java/org/broadinstitute/variant/variantcontext/VariantContextUtils.java b/src/java/org/broadinstitute/variant/variantcontext/VariantContextUtils.java
index a5b7b6c..a23bcbb 100644
--- a/src/java/org/broadinstitute/variant/variantcontext/VariantContextUtils.java
+++ b/src/java/org/broadinstitute/variant/variantcontext/VariantContextUtils.java
@@ -27,6 +27,7 @@ package org.broadinstitute.variant.variantcontext;
 
 import com.google.java.contract.Ensures;
 import com.google.java.contract.Requires;
+import net.sf.samtools.util.Lazy;
 import org.apache.commons.jexl2.Expression;
 import org.apache.commons.jexl2.JexlEngine;
 import org.broad.tribble.TribbleException;
@@ -36,18 +37,43 @@ import org.broadinstitute.variant.vcf.*;
 import java.util.*;
 
 public class VariantContextUtils {
-
     private static Set<String> MISSING_KEYS_WARNED_ABOUT = new HashSet<String>();
 
-    final public static JexlEngine engine = new JexlEngine();
+    /** Use a {@link Lazy} {@link JexlEngine} instance to avoid class-loading issues. (Applications that access this class are otherwise
+     * forced to build a {@link JexlEngine} instance, which depends on some apache logging libraries that mightn't be packaged.) */
+    final public static Lazy<JexlEngine> engine = new Lazy<JexlEngine>(new Lazy.LazyInitializer<JexlEngine>() {
+        @Override
+        public JexlEngine make() {
+            final JexlEngine jexl = new JexlEngine();
+            jexl.setSilent(false); // will throw errors now for selects that don't evaluate properly
+            jexl.setLenient(false);
+            jexl.setDebug(false);
+            return jexl;
+        }
+    });
     private final static boolean ASSUME_MISSING_FIELDS_ARE_STRINGS = false;
-
-    static {
-        engine.setSilent(false); // will throw errors now for selects that don't evaluate properly
-        engine.setLenient(false);
-        engine.setDebug(false);
+    
+    /**
+     * Computes the alternate allele frequency at the provided {@link VariantContext} by dividing its "AN" by its "AC".
+     * @param vc The variant whose alternate allele frequency is computed
+     * @return The alternate allele frequency in [0, 1]
+     * @throws AssertionError When either annotation is missing, or when the compuated frequency is outside the expected range
+     */
+    public static double calculateAltAlleleFrequency(final VariantContext vc) {
+        if (!vc.hasAttribute(VCFConstants.ALLELE_NUMBER_KEY) || !vc.hasAttribute(VCFConstants.ALLELE_COUNT_KEY))
+            throw new AssertionError(String.format(
+                    "Cannot compute the provided variant's alt allele frequency because it does not have both %s and %s annotations: %s",
+                    VCFConstants.ALLELE_NUMBER_KEY,
+                    VCFConstants.ALLELE_COUNT_KEY,
+                    vc));
+        final double altAlleleCount = vc.getAttributeAsInt(VCFConstants.ALLELE_COUNT_KEY, 0);
+        final double totalCount = vc.getAttributeAsInt(VCFConstants.ALLELE_NUMBER_KEY, 0);
+        final double aaf = altAlleleCount / totalCount;
+        if (aaf > 1 || aaf < 0)
+            throw new AssertionError(String.format("Expected a minor allele frequency in the range [0, 1], but got %s. vc=%s", aaf, vc));
+        return aaf;
     }
-
+    
     /**
      * Update the attributes of the attributes map given the VariantContext to reflect the
      * proper chromosome-based VCF tags
@@ -230,7 +256,7 @@ public class VariantContextUtils {
 
             if ( name == null || expStr == null ) throw new IllegalArgumentException("Cannot create null expressions : " + name +  " " + expStr);
             try {
-                Expression exp = engine.createExpression(expStr);
+                Expression exp = engine.get().createExpression(expStr);
                 exps.add(new JexlVCMatchExp(name, exp));
             } catch (Exception e) {
                 throw new IllegalArgumentException("Argument " + name + "has a bad value. Invalid expression used (" + expStr + "). Please see the JEXL docs for correct syntax.") ;
@@ -316,26 +342,11 @@ public class VariantContextUtils {
         return r;
     }
 
-    //    TODO: remove that after testing
-//    static private void verifyUniqueSampleNames(Collection<VariantContext> unsortedVCs) {
-//        Set<String> names = new HashSet<String>();
-//        for ( VariantContext vc : unsortedVCs ) {
-//            for ( String name : vc.getSampleNames() ) {
-//                //System.out.printf("Checking %s %b%n", name, names.contains(name));
-//                if ( names.contains(name) )
-//                    throw new IllegalStateException("REQUIRE_UNIQUE sample names is true but duplicate names were discovered " + name);
-//            }
-//
-//            names.addAll(vc.getSampleNames());
-//        }
-//    }
-
-
     public static int getSize( VariantContext vc ) {
         return vc.getEnd() - vc.getStart() + 1;
     }
 
-    public static final Set<String> genotypeNames(final Collection<Genotype> genotypes) {
+    public static Set<String> genotypeNames(final Collection<Genotype> genotypes) {
         final Set<String> names = new HashSet<String>(genotypes.size());
         for ( final Genotype g : genotypes )
             names.add(g.getSampleName());
diff --git a/src/java/org/broadinstitute/variant/variantcontext/writer/BCF2FieldEncoder.java b/src/java/org/broadinstitute/variant/variantcontext/writer/BCF2FieldEncoder.java
index a04a6bf..88b9c49 100644
--- a/src/java/org/broadinstitute/variant/variantcontext/writer/BCF2FieldEncoder.java
+++ b/src/java/org/broadinstitute/variant/variantcontext/writer/BCF2FieldEncoder.java
@@ -35,6 +35,7 @@ import org.broadinstitute.variant.vcf.VCFHeaderLineCount;
 import org.broadinstitute.variant.variantcontext.VariantContext;
 
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
@@ -334,8 +335,11 @@ public abstract class BCF2FieldEncoder {
                 return "";
             else if (value instanceof List) {
                 final List<String> l = (List<String>)value;
-                if ( l.isEmpty() ) return "";
-                else return BCF2Utils.collapseStringList(l);
+                return BCF2Utils.collapseStringList(l);
+            } else if ( value.getClass().isArray() ) {
+                final List<String> l = new ArrayList<String>();
+                Collections.addAll(l, (String[])value);
+                return BCF2Utils.collapseStringList(l);
             } else
                 return (String)value;
         }
@@ -507,12 +511,18 @@ public abstract class BCF2FieldEncoder {
      * o is a list => o
      * else => [o]
      *
-     * @param o
+     * @param c  the class of the object
+     * @param o  the object to convert to a Java List
      * @return
      */
     private final static <T> List<T> toList(final Class<T> c, final Object o) {
         if ( o == null ) return Collections.emptyList();
         else if ( o instanceof List ) return (List<T>)o;
+        else if ( o.getClass().isArray() ) {
+            final List<T> l = new ArrayList<T>();
+            Collections.addAll(l, (T[])o);
+            return l;
+        }
         else return Collections.singletonList((T)o);
     }
 }
diff --git a/src/java/org/broadinstitute/variant/variantcontext/writer/BCF2Writer.java b/src/java/org/broadinstitute/variant/variantcontext/writer/BCF2Writer.java
index c24ffec..462f32d 100644
--- a/src/java/org/broadinstitute/variant/variantcontext/writer/BCF2Writer.java
+++ b/src/java/org/broadinstitute/variant/variantcontext/writer/BCF2Writer.java
@@ -28,6 +28,7 @@ package org.broadinstitute.variant.variantcontext.writer;
 import com.google.java.contract.Ensures;
 import com.google.java.contract.Requires;
 import net.sf.samtools.SAMSequenceDictionary;
+import org.broad.tribble.index.IndexCreator;
 import org.broadinstitute.variant.bcf2.BCF2Codec;
 import org.broadinstitute.variant.bcf2.BCF2Type;
 import org.broadinstitute.variant.bcf2.BCF2Utils;
@@ -107,13 +108,21 @@ class BCF2Writer extends IndexingVariantContextWriter {
     private VCFHeader lastVCFHeaderOfUnparsedGenotypes = null;
     private boolean canPassOnUnparsedGenotypeDataForLastVCFHeader = false;
 
-
-    public BCF2Writer(final File location, final OutputStream output, final SAMSequenceDictionary refDict, final boolean enableOnTheFlyIndexing, final boolean doNotWriteGenotypes) {
+    public BCF2Writer(final File location, final OutputStream output, final SAMSequenceDictionary refDict,
+                      final boolean enableOnTheFlyIndexing, final boolean doNotWriteGenotypes) {
         super(writerName(location, output), location, output, refDict, enableOnTheFlyIndexing);
         this.outputStream = getOutputStream();
         this.doNotWriteGenotypes = doNotWriteGenotypes;
     }
 
+    public BCF2Writer(final File location, final OutputStream output, final SAMSequenceDictionary refDict,
+                      final IndexCreator indexCreator,
+                      final boolean enableOnTheFlyIndexing, final boolean doNotWriteGenotypes) {
+        super(writerName(location, output), location, output, refDict, enableOnTheFlyIndexing, indexCreator);
+        this.outputStream = getOutputStream();
+        this.doNotWriteGenotypes = doNotWriteGenotypes;
+    }
+
     // --------------------------------------------------------------------------------
     //
     // Interface functions
@@ -151,7 +160,7 @@ class BCF2Writer extends IndexingVariantContextWriter {
         fieldManager.setup(header, encoder, stringDictionaryMap);
 
         try {
-            // write out the header into a byte stream, get it's length, and write everything to the file
+            // write out the header into a byte stream, get its length, and write everything to the file
             final ByteArrayOutputStream capture = new ByteArrayOutputStream();
             final OutputStreamWriter writer = new OutputStreamWriter(capture);
             this.header = VCFWriter.writeHeader(header, writer, doNotWriteGenotypes, VCFWriter.getVersionLine(), "BCF2 stream");
@@ -294,9 +303,9 @@ class BCF2Writer extends IndexingVariantContextWriter {
      * @param vc
      * @return
      */
-    private final int getNGenotypeFormatFields(final VariantContext vc) {
+    private int getNGenotypeFormatFields(final VariantContext vc) {
         final BCF2Codec.LazyData lazyData = getLazyData(vc);
-        return lazyData != null ? lazyData.nGenotypeFields : VCFWriter.calcVCFGenotypeKeys(vc, header).size();
+        return lazyData != null ? lazyData.nGenotypeFields : vc.calcVCFGenotypeKeys(header).size();
     }
 
     private void buildID( VariantContext vc ) throws IOException {
@@ -341,7 +350,7 @@ class BCF2Writer extends IndexingVariantContextWriter {
         }
 
         // we have to do work to convert the VC into a BCF2 byte stream
-        final List<String> genotypeFields = VCFWriter.calcVCFGenotypeKeys(vc, header);
+        final List<String> genotypeFields = vc.calcVCFGenotypeKeys(header);
         for ( final String field : genotypeFields ) {
             final BCF2FieldWriter.GenotypesWriter writer = fieldManager.getGenotypeFieldWriter(field);
             if ( writer == null ) errorUnexpectedFieldToWrite(vc, field, "FORMAT");
@@ -367,7 +376,7 @@ class BCF2Writer extends IndexingVariantContextWriter {
      * @param field
      * @param fieldType
      */
-    private final void errorUnexpectedFieldToWrite(final VariantContext vc, final String field, final String fieldType) {
+    private void errorUnexpectedFieldToWrite(final VariantContext vc, final String field, final String fieldType) {
         throw new IllegalStateException("Found field " + field + " in the " + fieldType + " fields of VariantContext at " +
                 vc.getChr() + ":" + vc.getStart() + " from " + vc.getSource() + " but this hasn't been defined in the VCFHeader");
     }
@@ -395,7 +404,7 @@ class BCF2Writer extends IndexingVariantContextWriter {
 
     @Requires("! strings.isEmpty()")
     @Ensures("result.isIntegerType()")
-    private final BCF2Type encodeStringsByRef(final Collection<String> strings) throws IOException {
+    private BCF2Type encodeStringsByRef(final Collection<String> strings) throws IOException {
         final List<Integer> offsets = new ArrayList<Integer>(strings.size());
 
         // iterate over strings until we find one that needs 16 bits, and break
@@ -417,7 +426,7 @@ class BCF2Writer extends IndexingVariantContextWriter {
      * @param contigLines
      */
     @Requires("contigDictionary.isEmpty()")
-    private final void createContigDictionary(final Collection<VCFContigHeaderLine> contigLines) {
+    private void createContigDictionary(final Collection<VCFContigHeaderLine> contigLines) {
         int offset = 0;
         for ( VCFContigHeaderLine contig : contigLines )
             contigDictionary.put(contig.getID(), offset++);
diff --git a/src/java/org/broadinstitute/variant/variantcontext/writer/IndexingVariantContextWriter.java b/src/java/org/broadinstitute/variant/variantcontext/writer/IndexingVariantContextWriter.java
index 800cb84..c036d5d 100644
--- a/src/java/org/broadinstitute/variant/variantcontext/writer/IndexingVariantContextWriter.java
+++ b/src/java/org/broadinstitute/variant/variantcontext/writer/IndexingVariantContextWriter.java
@@ -32,6 +32,7 @@ import net.sf.samtools.SAMSequenceRecord;
 import org.broad.tribble.Tribble;
 import org.broad.tribble.index.DynamicIndexCreator;
 import org.broad.tribble.index.Index;
+import org.broad.tribble.index.IndexCreator;
 import org.broad.tribble.index.IndexFactory;
 import org.broad.tribble.util.LittleEndianOutputStream;
 import org.broadinstitute.variant.vcf.VCFHeader;
@@ -44,35 +45,80 @@ import java.io.*;
  */
 abstract class IndexingVariantContextWriter implements VariantContextWriter {
     private final String name;
+    private final File location;
     private final SAMSequenceDictionary refDict;
 
     private OutputStream outputStream;
     private PositionalOutputStream positionalOutputStream = null;
-    private DynamicIndexCreator indexer = null;
+    private IndexCreator indexer = null;
     private LittleEndianOutputStream idxStream = null;
 
+    private IndexingVariantContextWriter(final String name, final File location, final OutputStream output, final SAMSequenceDictionary refDict) {
+        this.name = name;
+        this.location = location;
+        this.outputStream = output;
+        this.refDict = refDict;
+    }
+
+    /**
+     * Create a VariantContextWriter with an associated index using the default index creator
+     *
+     * @param name  the name of this writer (i.e. the file name or stream)
+     * @param location  the path to the output file
+     * @param output    the output stream to write to
+     * @param refDict   the reference dictionary
+     * @param enableOnTheFlyIndexing    is OTF indexing enabled?
+     */
     @Requires({"name != null",
             "! ( location == null && output == null )",
             "! ( enableOnTheFlyIndexing && location == null )"})
-    protected IndexingVariantContextWriter(final String name, final File location, final OutputStream output, final SAMSequenceDictionary refDict, final boolean enableOnTheFlyIndexing) {
-        outputStream = output;
-        this.name = name;
-        this.refDict = refDict;
+    protected IndexingVariantContextWriter(final String name, final File location, final OutputStream output, final SAMSequenceDictionary refDict,
+                                           final boolean enableOnTheFlyIndexing) {
+        this(name, location, output, refDict);
 
         if ( enableOnTheFlyIndexing ) {
-            try {
-                idxStream = new LittleEndianOutputStream(new FileOutputStream(Tribble.indexFile(location)));
-                //System.out.println("Creating index on the fly for " + location);
-                indexer = new DynamicIndexCreator(IndexFactory.IndexBalanceApproach.FOR_SEEK_TIME);
-                indexer.initialize(location, indexer.defaultBinSize());
-                positionalOutputStream = new PositionalOutputStream(output);
-                outputStream = positionalOutputStream;
-            } catch ( IOException ex ) {
-                // No matter what we keep going, since we don't care if we can't create the index file
-                idxStream = null;
-                indexer = null;
-                positionalOutputStream = null;
-            }
+            final IndexCreator idxCreator = new DynamicIndexCreator(IndexFactory.IndexBalanceApproach.FOR_SEEK_TIME);
+            idxCreator.initialize(location, idxCreator.defaultBinSize());
+            initIndexingWriter(idxCreator);
+        }
+    }
+
+    /**
+     * Create a VariantContextWriter with an associated index using a custom index creator
+     *
+     * @param name  the name of this writer (i.e. the file name or stream)
+     * @param location  the path to the output file
+     * @param output    the output stream to write to
+     * @param refDict   the reference dictionary
+     * @param enableOnTheFlyIndexing    is OTF indexing enabled?
+     * @param idxCreator    the custom index creator.  NOTE: must be initialized
+     */
+    @Requires({"name != null",
+            "! ( location == null && output == null )",
+            "! ( enableOnTheFlyIndexing && location == null )",
+            "idxCreator != null"})
+    protected IndexingVariantContextWriter(final String name, final File location, final OutputStream output, final SAMSequenceDictionary refDict,
+                                           final boolean enableOnTheFlyIndexing, final IndexCreator idxCreator) {
+        this(name, location, output, refDict);
+
+        if ( enableOnTheFlyIndexing ) {
+            initIndexingWriter(idxCreator);
+        }
+    }
+
+    @Requires({"idxCreator != null"})
+    private void initIndexingWriter(final IndexCreator idxCreator) {
+        try {
+            indexer = idxCreator;
+            idxStream = new LittleEndianOutputStream(new FileOutputStream(Tribble.indexFile(location)));
+            //System.out.println("Creating index on the fly for " + location);
+            positionalOutputStream = new PositionalOutputStream(outputStream);
+            outputStream = positionalOutputStream;
+        } catch ( IOException ex ) {
+            // No matter what we keep going, since we don't care if we can't create the index file
+            idxStream = null;
+            indexer = null;
+            positionalOutputStream = null;
         }
     }
 
diff --git a/src/java/org/broadinstitute/variant/variantcontext/writer/IntGenotypeFieldAccessors.java b/src/java/org/broadinstitute/variant/variantcontext/writer/IntGenotypeFieldAccessors.java
index f02612b..9a485d2 100644
--- a/src/java/org/broadinstitute/variant/variantcontext/writer/IntGenotypeFieldAccessors.java
+++ b/src/java/org/broadinstitute/variant/variantcontext/writer/IntGenotypeFieldAccessors.java
@@ -38,7 +38,7 @@ import java.util.HashMap;
  * @author Mark DePristo
  * @since 6/12
  */
-class IntGenotypeFieldAccessors {
+public class IntGenotypeFieldAccessors {
     // initialized once per writer to allow parallel writers to work
     private final HashMap<String, Accessor> intGenotypeFieldEncoders = new HashMap<String, Accessor>();
 
diff --git a/src/java/org/broadinstitute/variant/variantcontext/writer/VCFWriter.java b/src/java/org/broadinstitute/variant/variantcontext/writer/VCFWriter.java
index c91dc79..7a43e83 100644
--- a/src/java/org/broadinstitute/variant/variantcontext/writer/VCFWriter.java
+++ b/src/java/org/broadinstitute/variant/variantcontext/writer/VCFWriter.java
@@ -26,36 +26,43 @@
 package org.broadinstitute.variant.variantcontext.writer;
 
 import net.sf.samtools.SAMSequenceDictionary;
-import org.broad.tribble.TribbleException;
-import org.broad.tribble.util.ParsingUtils;
-import org.broadinstitute.variant.vcf.*;
-import org.broadinstitute.variant.variantcontext.*;
-
-import java.io.*;
-import java.lang.reflect.Array;
-import java.nio.charset.Charset;
-import java.util.*;
+import org.broad.tribble.index.IndexCreator;
+import org.broadinstitute.variant.variantcontext.VariantContext;
+import org.broadinstitute.variant.variantcontext.VariantContextBuilder;
+import org.broadinstitute.variant.vcf.VCFConstants;
+import org.broadinstitute.variant.vcf.VCFEncoder;
+import org.broadinstitute.variant.vcf.VCFHeader;
+import org.broadinstitute.variant.vcf.VCFHeaderLine;
+import org.broadinstitute.variant.vcf.VCFHeaderVersion;
+
+import java.io.BufferedWriter;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
 
 /**
  * this class writes VCF files
  */
 class VCFWriter extends IndexingVariantContextWriter {
-    private final static String VERSION_LINE = VCFHeader.METADATA_INDICATOR + VCFHeaderVersion.VCF4_1.getFormatString() + "=" + VCFHeaderVersion.VCF4_1.getVersionString();
 
-    /**
-     * The encoding used for VCF files.  ISO-8859-1
-     */
-    static final private Charset charset = Charset.forName("ISO-8859-1");
-    
-    // should we write genotypes or just sites?
-    final protected boolean doNotWriteGenotypes;
+    private static final String VERSION_LINE =
+		    VCFHeader.METADATA_INDICATOR + VCFHeaderVersion.VCF4_1.getFormatString() + "=" + VCFHeaderVersion.VCF4_1.getVersionString();
+
+	// Initialized when the header is written to the output stream
+	private VCFEncoder vcfEncoder = null;
 
     // the VCF header we're storing
     protected VCFHeader mHeader = null;
 
-    final private boolean allowMissingFieldsInHeader;
+	private final boolean allowMissingFieldsInHeader;
 
-    /**
+	// should we write genotypes or just sites?
+	private final boolean doNotWriteGenotypes;
+
+    /*
      * The VCF writer uses an internal Writer, based by the ByteArrayOutputStream lineBuffer,
      * to temp. buffer the header and per-site output before flushing the per line output
      * in one go to the super.getOutputStream.  This results in high-performance, proper encoding,
@@ -65,28 +72,34 @@ class VCFWriter extends IndexingVariantContextWriter {
      */
     private static final int INITIAL_BUFFER_SIZE = 1024 * 16;
     private final ByteArrayOutputStream lineBuffer = new ByteArrayOutputStream(INITIAL_BUFFER_SIZE);
-    /** Wrapping in a {@link BufferedWriter} avoids frequent conversions with individual writes to OutputStreamWriter. */
-    private final Writer writer = new BufferedWriter(new OutputStreamWriter(lineBuffer, charset));
-    private IntGenotypeFieldAccessors intGenotypeFieldAccessors = new IntGenotypeFieldAccessors();
+    /* Wrapping in a {@link BufferedWriter} avoids frequent conversions with individual writes to OutputStreamWriter. */
+    private final Writer writer = new BufferedWriter(new OutputStreamWriter(lineBuffer, VCFEncoder.VCF_CHARSET));
 
     public VCFWriter(final File location, final OutputStream output, final SAMSequenceDictionary refDict,
-                     final boolean enableOnTheFlyIndexing, boolean doNotWriteGenotypes,
-                     final boolean allowMissingFieldsInHeader ) {
+                     final boolean enableOnTheFlyIndexing,
+                     final boolean doNotWriteGenotypes, final boolean allowMissingFieldsInHeader ) {
         super(writerName(location, output), location, output, refDict, enableOnTheFlyIndexing);
         this.doNotWriteGenotypes = doNotWriteGenotypes;
-        this.allowMissingFieldsInHeader = allowMissingFieldsInHeader;
+	    this.allowMissingFieldsInHeader = allowMissingFieldsInHeader;
     }
 
+    public VCFWriter(final File location, final OutputStream output, final SAMSequenceDictionary refDict,
+                     final IndexCreator indexCreator, final boolean enableOnTheFlyIndexing,
+                     final boolean doNotWriteGenotypes, final boolean allowMissingFieldsInHeader ) {
+        super(writerName(location, output), location, output, refDict, enableOnTheFlyIndexing, indexCreator);
+        this.doNotWriteGenotypes = doNotWriteGenotypes;
+        this.allowMissingFieldsInHeader = allowMissingFieldsInHeader;
+    }
     // --------------------------------------------------------------------------------
     //
     // VCFWriter interface functions
     //
     // --------------------------------------------------------------------------------
 
-    /**
+    /*
      * Write String s to the internal buffered writer.
      *
-     * flushBuffer() must be called to actually write the data to the true output stream.
+     * writeAndResetBuffer() must be called to actually write the data to the true output stream.
      *
      * @param s the string to write
      * @throws IOException
@@ -95,26 +108,25 @@ class VCFWriter extends IndexingVariantContextWriter {
         writer.write(s);
     }
 
-    /**
-     * Actually write the line buffer contents to the destination output stream.
-     *
-     * After calling this function the line buffer is reset, so the contents of the buffer can be reused
-     *
-     * @throws IOException
+    /*
+     * Actually write the line buffer contents to the destination output stream. After calling this function
+     * the line buffer is reset so the contents of the buffer can be reused
      */
-    private void flushBuffer() throws IOException {
+    private void writeAndResetBuffer() throws IOException {
         writer.flush();
         getOutputStream().write(lineBuffer.toByteArray());
         lineBuffer.reset();
     }
 
     @Override
-    public void writeHeader(VCFHeader header) {
+    public void writeHeader(final VCFHeader header) {
         // note we need to update the mHeader object after this call because they header
         // may have genotypes trimmed out of it, if doNotWriteGenotypes is true
         try {
-            mHeader = writeHeader(header, writer, doNotWriteGenotypes, getVersionLine(), getStreamName());
-            flushBuffer();
+            this.mHeader = writeHeader(header, writer, doNotWriteGenotypes, getVersionLine(), getStreamName());
+	        this.vcfEncoder = new VCFEncoder(this.mHeader, this.allowMissingFieldsInHeader);
+            writeAndResetBuffer();
+
         } catch ( IOException e ) {
             throw new RuntimeException("Couldn't write file " + getStreamName(), e);
         }
@@ -135,7 +147,7 @@ class VCFWriter extends IndexingVariantContextWriter {
             // the file format field needs to be written first
             writer.write(versionLine + "\n");
 
-            for ( VCFHeaderLine line : header.getMetaDataInSortedOrder() ) {
+            for (final VCFHeaderLine line : header.getMetaDataInSortedOrder() ) {
                 if ( VCFHeaderVersion.isFormatString(line.getKey()) )
                     continue;
 
@@ -147,7 +159,7 @@ class VCFWriter extends IndexingVariantContextWriter {
             // write out the column line
             writer.write(VCFHeader.HEADER_INDICATOR);
             boolean isFirst = true;
-            for ( VCFHeader.HEADER_FIELDS field : header.getHeaderFields() ) {
+            for (final VCFHeader.HEADER_FIELDS field : header.getHeaderFields() ) {
                 if ( isFirst )
                     isFirst = false; // don't write out a field separator
                 else
@@ -158,7 +170,7 @@ class VCFWriter extends IndexingVariantContextWriter {
             if ( header.hasGenotypingData() ) {
                 writer.write(VCFConstants.FIELD_SEPARATOR);
                 writer.write("FORMAT");
-                for ( String sample : header.getGenotypeSamples() ) {
+                for (final String sample : header.getGenotypeSamples() ) {
                     writer.write(VCFConstants.FIELD_SEPARATOR);
                     writer.write(sample);
                 }
@@ -191,414 +203,21 @@ class VCFWriter extends IndexingVariantContextWriter {
     }
 
     /**
-     * add a record to the file
-     *
-     * @param vc      the Variant Context object
+     * Add a record to the file
      */
     @Override
-    public void add(VariantContext vc) {
-        if ( mHeader == null )
-            throw new IllegalStateException("The VCF Header must be written before records can be added: " + getStreamName());
-
-        if ( doNotWriteGenotypes )
-            vc = new VariantContextBuilder(vc).noGenotypes().make();
-
+    public void add(final VariantContext context) {
         try {
-            super.add(vc);
-
-            Map<Allele, String> alleleMap = buildAlleleMap(vc);
-
-            // CHROM
-            write(vc.getChr());
-            write(VCFConstants.FIELD_SEPARATOR);
-
-            // POS
-            write(String.valueOf(vc.getStart()));
-            write(VCFConstants.FIELD_SEPARATOR);
-
-            // ID
-            String ID = vc.getID();
-            write(ID);
-            write(VCFConstants.FIELD_SEPARATOR);
-
-            // REF
-            String refString = vc.getReference().getDisplayString();
-            write(refString);
-            write(VCFConstants.FIELD_SEPARATOR);
-
-            // ALT
-            if ( vc.isVariant() ) {
-                Allele altAllele = vc.getAlternateAllele(0);
-                String alt = altAllele.getDisplayString();
-                write(alt);
-
-                for (int i = 1; i < vc.getAlternateAlleles().size(); i++) {
-                    altAllele = vc.getAlternateAllele(i);
-                    alt = altAllele.getDisplayString();
-                    write(",");
-                    write(alt);
-                }
-            } else {
-                write(VCFConstants.EMPTY_ALTERNATE_ALLELE_FIELD);
-            }
-            write(VCFConstants.FIELD_SEPARATOR);
-
-            // QUAL
-            if ( !vc.hasLog10PError() )
-                write(VCFConstants.MISSING_VALUE_v4);
-            else
-                write(formatQualValue(vc.getPhredScaledQual()));
-            write(VCFConstants.FIELD_SEPARATOR);
-
-            // FILTER
-            String filters = getFilterString(vc);
-            write(filters);
-            write(VCFConstants.FIELD_SEPARATOR);
+            super.add(context);
 
-            // INFO
-            Map<String, String> infoFields = new TreeMap<String, String>();
-            for ( Map.Entry<String, Object> field : vc.getAttributes().entrySet() ) {
-                String key = field.getKey();
+	        if (this.doNotWriteGenotypes) write(this.vcfEncoder.encode(new VariantContextBuilder(context).noGenotypes().make()));
+	        else write(this.vcfEncoder.encode(context));
+	        write("\n");
 
-                if ( ! mHeader.hasInfoLine(key) )
-                    fieldIsMissingFromHeaderError(vc, key, "INFO");
+            writeAndResetBuffer();
 
-                String outputValue = formatVCFField(field.getValue());
-                if ( outputValue != null )
-                    infoFields.put(key, outputValue);
-            }
-            writeInfoString(infoFields);
-
-            // FORMAT
-            final GenotypesContext gc = vc.getGenotypes();
-            if ( gc.isLazyWithData() && ((LazyGenotypesContext)gc).getUnparsedGenotypeData() instanceof String ) {
-                write(VCFConstants.FIELD_SEPARATOR);
-                write(((LazyGenotypesContext) gc).getUnparsedGenotypeData().toString());
-            } else {
-                List<String> genotypeAttributeKeys = calcVCFGenotypeKeys(vc, mHeader);
-                if ( ! genotypeAttributeKeys.isEmpty() ) {
-                    for ( final String format : genotypeAttributeKeys )
-                        if ( ! mHeader.hasFormatLine(format) )
-                            fieldIsMissingFromHeaderError(vc, format, "FORMAT");
-
-                    final String genotypeFormatString = ParsingUtils.join(VCFConstants.GENOTYPE_FIELD_SEPARATOR, genotypeAttributeKeys);
-
-                    write(VCFConstants.FIELD_SEPARATOR);
-                    write(genotypeFormatString);
-
-                    addGenotypeData(vc, alleleMap, genotypeAttributeKeys);
-                }
-            }
-            
-            write("\n");
-            // note that we cannot call flush here if we want block gzipping to work properly
-            // calling flush results in all gzipped blocks for each variant
-            flushBuffer();
         } catch (IOException e) {
             throw new RuntimeException("Unable to write the VCF object to " + getStreamName(), e);
         }
     }
-
-    private static Map<Allele, String> buildAlleleMap(final VariantContext vc) {
-        final Map<Allele, String> alleleMap = new HashMap<Allele, String>(vc.getAlleles().size()+1);
-        alleleMap.put(Allele.NO_CALL, VCFConstants.EMPTY_ALLELE); // convenience for lookup
-
-        final List<Allele> alleles = vc.getAlleles();
-        for ( int i = 0; i < alleles.size(); i++ ) {
-            alleleMap.put(alleles.get(i), String.valueOf(i));
-        }
-
-        return alleleMap;
-    }
-
-    // --------------------------------------------------------------------------------
-    //
-    // implementation functions
-    //
-    // --------------------------------------------------------------------------------
-
-    private final String getFilterString(final VariantContext vc) {
-        if ( vc.isFiltered() ) {
-            for ( final String filter : vc.getFilters() )
-                if ( ! mHeader.hasFilterLine(filter) )
-                    fieldIsMissingFromHeaderError(vc, filter, "FILTER");
-
-            return ParsingUtils.join(";", ParsingUtils.sortList(vc.getFilters()));
-        }
-        else if ( vc.filtersWereApplied() )
-            return VCFConstants.PASSES_FILTERS_v4;
-        else
-            return VCFConstants.UNFILTERED;
-    }
-
-    private static final String QUAL_FORMAT_STRING = "%.2f";
-    private static final String QUAL_FORMAT_EXTENSION_TO_TRIM = ".00";
-
-    private String formatQualValue(double qual) {
-        String s = String.format(QUAL_FORMAT_STRING, qual);
-        if ( s.endsWith(QUAL_FORMAT_EXTENSION_TO_TRIM) )
-            s = s.substring(0, s.length() - QUAL_FORMAT_EXTENSION_TO_TRIM.length());
-        return s;
-    }
-
-    /**
-     * create the info string; assumes that no values are null
-     *
-     * @param infoFields a map of info fields
-     * @throws IOException for writer
-     */
-    private void writeInfoString(Map<String, String> infoFields) throws IOException {
-        if ( infoFields.isEmpty() ) {
-            write(VCFConstants.EMPTY_INFO_FIELD);
-            return;
-        }
-
-        boolean isFirst = true;
-        for ( Map.Entry<String, String> entry : infoFields.entrySet() ) {
-            if ( isFirst )
-                isFirst = false;
-            else
-                write(VCFConstants.INFO_FIELD_SEPARATOR);
-
-            String key = entry.getKey();
-            write(key);
-
-            if ( !entry.getValue().equals("") ) {
-                VCFInfoHeaderLine metaData = mHeader.getInfoHeaderLine(key);
-                if ( metaData == null || metaData.getCountType() != VCFHeaderLineCount.INTEGER || metaData.getCount() != 0 ) {
-                    write("=");
-                    write(entry.getValue());
-                }
-            }
-        }
-    }
-
-    /**
-     * add the genotype data
-     *
-     * @param vc                     the variant context
-     * @param genotypeFormatKeys  Genotype formatting string
-     * @param alleleMap              alleles for this context
-     * @throws IOException for writer
-     */
-    private void addGenotypeData(VariantContext vc, Map<Allele, String> alleleMap, List<String> genotypeFormatKeys)
-    throws IOException {
-        final int ploidy = vc.getMaxPloidy(2);
-
-        for ( String sample : mHeader.getGenotypeSamples() ) {
-            write(VCFConstants.FIELD_SEPARATOR);
-
-            Genotype g = vc.getGenotype(sample);
-            if ( g == null ) g = GenotypeBuilder.createMissing(sample, ploidy);
-
-            final List<String> attrs = new ArrayList<String>(genotypeFormatKeys.size());
-            for ( String field : genotypeFormatKeys ) {
-                if ( field.equals(VCFConstants.GENOTYPE_KEY) ) {
-                    if ( !g.isAvailable() ) {
-                        throw new IllegalStateException("GTs cannot be missing for some samples if they are available for others in the record");
-                    }
-
-                    writeAllele(g.getAllele(0), alleleMap);
-                    for (int i = 1; i < g.getPloidy(); i++) {
-                        write(g.isPhased() ? VCFConstants.PHASED : VCFConstants.UNPHASED);
-                        writeAllele(g.getAllele(i), alleleMap);
-                    }
-
-                    continue;
-                } else {
-                    String outputValue;
-                    if ( field.equals(VCFConstants.GENOTYPE_FILTER_KEY ) ) {
-                        outputValue = g.isFiltered() ? g.getFilters() : VCFConstants.PASSES_FILTERS_v4;
-                    } else {
-                        final IntGenotypeFieldAccessors.Accessor accessor = intGenotypeFieldAccessors.getAccessor(field);
-                        if ( accessor != null ) {
-                            final int[] intValues = accessor.getValues(g);
-                            if ( intValues == null )
-                                outputValue = VCFConstants.MISSING_VALUE_v4;
-                            else if ( intValues.length == 1 ) // fast path
-                                outputValue = Integer.toString(intValues[0]);
-                            else {
-                                StringBuilder sb = new StringBuilder();
-                                sb.append(intValues[0]);
-                                for ( int i = 1; i < intValues.length; i++) {
-                                    sb.append(",");
-                                    sb.append(intValues[i]);
-                                }
-                                outputValue = sb.toString();
-                            }
-                        } else {
-                            Object val = g.hasExtendedAttribute(field) ? g.getExtendedAttribute(field) : VCFConstants.MISSING_VALUE_v4;
-
-                            VCFFormatHeaderLine metaData = mHeader.getFormatHeaderLine(field);
-                            if ( metaData != null ) {
-                                int numInFormatField = metaData.getCount(vc);
-                                if ( numInFormatField > 1 && val.equals(VCFConstants.MISSING_VALUE_v4) ) {
-                                    // If we have a missing field but multiple values are expected, we need to construct a new string with all fields.
-                                    // For example, if Number=2, the string has to be ".,."
-                                    StringBuilder sb = new StringBuilder(VCFConstants.MISSING_VALUE_v4);
-                                    for ( int i = 1; i < numInFormatField; i++ ) {
-                                        sb.append(",");
-                                        sb.append(VCFConstants.MISSING_VALUE_v4);
-                                    }
-                                    val = sb.toString();
-                                }
-                            }
-
-                            // assume that if key is absent, then the given string encoding suffices
-                            outputValue = formatVCFField(val);
-                        }
-                    }
-
-                    if ( outputValue != null )
-                        attrs.add(outputValue);
-                }
-            }
-
-            // strip off trailing missing values
-            for (int i = attrs.size()-1; i >= 0; i--) {
-                if ( isMissingValue(attrs.get(i)) )
-                    attrs.remove(i);
-                else
-                    break;
-            }
-
-            for (int i = 0; i < attrs.size(); i++) {
-                if ( i > 0 || genotypeFormatKeys.contains(VCFConstants.GENOTYPE_KEY) )
-                    write(VCFConstants.GENOTYPE_FIELD_SEPARATOR);
-                write(attrs.get(i));
-            }
-        }
-    }
-
-    private boolean isMissingValue(String s) {
-        // we need to deal with the case that it's a list of missing values
-        return (countOccurrences(VCFConstants.MISSING_VALUE_v4.charAt(0), s) + countOccurrences(',', s) == s.length());
-    }
-
-    private void writeAllele(Allele allele, Map<Allele, String> alleleMap) throws IOException {
-        String encoding = alleleMap.get(allele);
-        if ( encoding == null )
-            throw new TribbleException.InternalCodecException("Allele " + allele + " is not an allele in the variant context");
-        write(encoding);
-    }
-
-    /**
-     * Takes a double value and pretty prints it to a String for display
-     *
-     * Large doubles => gets %.2f style formatting
-     * Doubles < 1 / 10 but > 1/100 </>=> get %.3f style formatting
-     * Double < 1/100 => %.3e formatting
-     * @param d
-     * @return
-     */
-    public static final String formatVCFDouble(final double d) {
-        String format;
-        if ( d < 1 ) {
-            if ( d < 0.01 ) {
-                if ( Math.abs(d) >= 1e-20 )
-                    format = "%.3e";
-                else {
-                    // return a zero format
-                    return "0.00";
-                }
-            } else {
-                format = "%.3f";
-            }
-        } else {
-            format = "%.2f";
-        }
-
-        return String.format(format, d);
-    }
-
-    public static String formatVCFField(Object val) {
-        String result;
-        if ( val == null )
-            result = VCFConstants.MISSING_VALUE_v4;
-        else if ( val instanceof Double )
-            result = formatVCFDouble((Double) val);
-        else if ( val instanceof Boolean )
-            result = (Boolean)val ? "" : null; // empty string for true, null for false
-        else if ( val instanceof List ) {
-            result = formatVCFField(((List)val).toArray());
-        } else if ( val.getClass().isArray() ) {
-            final int length = Array.getLength(val);
-            if ( length == 0 )
-                return formatVCFField(null);
-            final StringBuilder sb = new StringBuilder(formatVCFField(Array.get(val, 0)));
-            for ( int i = 1; i < length; i++) {
-                sb.append(",");
-                sb.append(formatVCFField(Array.get(val, i)));
-            }
-            result = sb.toString();
-        } else
-            result = val.toString();
-
-        return result;
-    }
-
-    /**
-     * Determine which genotype fields are in use in the genotypes in VC
-     * @param vc
-     * @return an ordered list of genotype fields in use in VC.  If vc has genotypes this will always include GT first
-     */
-    public static List<String> calcVCFGenotypeKeys(final VariantContext vc, final VCFHeader header) {
-        Set<String> keys = new HashSet<String>();
-
-        boolean sawGoodGT = false;
-        boolean sawGoodQual = false;
-        boolean sawGenotypeFilter = false;
-        boolean sawDP = false;
-        boolean sawAD = false;
-        boolean sawPL = false;
-        for ( final Genotype g : vc.getGenotypes() ) {
-            keys.addAll(g.getExtendedAttributes().keySet());
-            if ( g.isAvailable() ) sawGoodGT = true;
-            if ( g.hasGQ() ) sawGoodQual = true;
-            if ( g.hasDP() ) sawDP = true;
-            if ( g.hasAD() ) sawAD = true;
-            if ( g.hasPL() ) sawPL = true;
-            if (g.isFiltered()) sawGenotypeFilter = true;
-        }
-
-        if ( sawGoodQual ) keys.add(VCFConstants.GENOTYPE_QUALITY_KEY);
-        if ( sawDP ) keys.add(VCFConstants.DEPTH_KEY);
-        if ( sawAD ) keys.add(VCFConstants.GENOTYPE_ALLELE_DEPTHS);
-        if ( sawPL ) keys.add(VCFConstants.GENOTYPE_PL_KEY);
-        if ( sawGenotypeFilter ) keys.add(VCFConstants.GENOTYPE_FILTER_KEY);
-
-        List<String> sortedList = ParsingUtils.sortList(new ArrayList<String>(keys));
-
-        // make sure the GT is first
-        if ( sawGoodGT ) {
-            List<String> newList = new ArrayList<String>(sortedList.size()+1);
-            newList.add(VCFConstants.GENOTYPE_KEY);
-            newList.addAll(sortedList);
-            sortedList = newList;
-        }
-
-        if ( sortedList.isEmpty() && header.hasGenotypingData() ) {
-            // this needs to be done in case all samples are no-calls
-            return Collections.singletonList(VCFConstants.GENOTYPE_KEY);
-        } else {
-            return sortedList;
-        }
-    }
-
-
-    private static int countOccurrences(char c, String s) {
-           int count = 0;
-           for (int i = 0; i < s.length(); i++) {
-               count += s.charAt(i) == c ? 1 : 0;
-           }
-           return count;
-    }
-
-    private final void fieldIsMissingFromHeaderError(final VariantContext vc, final String id, final String field) {
-        if ( !allowMissingFieldsInHeader)
-            throw new IllegalStateException("Key " + id + " found in VariantContext field " + field
-                    + " at " + vc.getChr() + ":" + vc.getStart()
-                    + " but this key isn't defined in the VCFHeader.  We require all VCFs to have"
-                    + " complete VCF headers by default.");
-    }
 }
diff --git a/src/java/org/broadinstitute/variant/variantcontext/writer/VariantContextWriterFactory.java b/src/java/org/broadinstitute/variant/variantcontext/writer/VariantContextWriterFactory.java
index 57e69d2..ee23333 100644
--- a/src/java/org/broadinstitute/variant/variantcontext/writer/VariantContextWriterFactory.java
+++ b/src/java/org/broadinstitute/variant/variantcontext/writer/VariantContextWriterFactory.java
@@ -25,8 +25,8 @@
 
 package org.broadinstitute.variant.variantcontext.writer;
 
-import net.sf.samtools.Defaults;
 import net.sf.samtools.SAMSequenceDictionary;
+import org.broad.tribble.index.IndexCreator;
 
 import java.io.*;
 import java.util.EnumSet;
@@ -82,6 +82,25 @@ public class VariantContextWriterFactory {
         }
     }
 
+    public static VariantContextWriter create(final File location,
+                                              final OutputStream output,
+                                              final SAMSequenceDictionary refDict,
+                                              final IndexCreator indexCreator,
+                                              final EnumSet<Options> options) {
+        final boolean enableBCF = isBCFOutput(location, options);
+
+        if ( enableBCF )
+            return new BCF2Writer(location, output, refDict, indexCreator,
+                    options.contains(Options.INDEX_ON_THE_FLY),
+                    options.contains(Options.DO_NOT_WRITE_GENOTYPES));
+        else {
+            return new VCFWriter(location, output, refDict, indexCreator,
+                    options.contains(Options.INDEX_ON_THE_FLY),
+                    options.contains(Options.DO_NOT_WRITE_GENOTYPES),
+                    options.contains(Options.ALLOW_MISSING_FIELDS_IN_HEADER));
+        }
+    }
+
     /**
      * Should we output a BCF file based solely on the name of the file at location?
      *
diff --git a/src/java/org/broadinstitute/variant/vcf/AbstractVCFCodec.java b/src/java/org/broadinstitute/variant/vcf/AbstractVCFCodec.java
index b23aaf6..9975488 100644
--- a/src/java/org/broadinstitute/variant/vcf/AbstractVCFCodec.java
+++ b/src/java/org/broadinstitute/variant/vcf/AbstractVCFCodec.java
@@ -195,6 +195,21 @@ public abstract class AbstractVCFCodec extends AsciiFeatureCodec<VariantContext>
         return this.header;
     }
 
+	/**
+	 * Explicitly set the VCFHeader on this codec. This will overwrite the header read from the file
+	 * and the version state stored in this instance; conversely, reading the header from a file will
+	 * overwrite whatever is set here. The returned header may not be identical to the header argument
+	 * since the header lines may be "repaired" (i.e., rewritten) if doOnTheFlyModifications is set.
+	 */
+	public VCFHeader setVCFHeader(final VCFHeader header, final VCFHeaderVersion version) {
+		this.version = version;
+
+		if (this.doOnTheFlyModifications) this.header = VCFStandardHeaderLines.repairStandardHeaderLines(header);
+		else this.header = header;
+
+		return this.header;
+	}
+
     /**
      * the fast decode function
      * @param line the line of text for the record
@@ -213,7 +228,7 @@ public abstract class AbstractVCFCodec extends AsciiFeatureCodec<VariantContext>
         return decodeLine(line, true);
     }
 
-    private final VariantContext decodeLine(final String line, final boolean includeGenotypes) {
+    private VariantContext decodeLine(final String line, final boolean includeGenotypes) {
         // the same line reader is not used for parsing the header and parsing lines, if we see a #, we've seen a header line
         if (line.startsWith(VCFHeader.HEADER_INDICATOR)) return null;
 
@@ -223,9 +238,10 @@ public abstract class AbstractVCFCodec extends AsciiFeatureCodec<VariantContext>
         if (parts == null)
             parts = new String[Math.min(header.getColumnCount(), NUM_STANDARD_FIELDS+1)];
 
-        int nParts = ParsingUtils.split(line, parts, VCFConstants.FIELD_SEPARATOR_CHAR, true);
+        final int nParts = ParsingUtils.split(line, parts, VCFConstants.FIELD_SEPARATOR_CHAR, true);
 
-        // if we have don't have a header, or we have a header with no genotyping data check that we have eight columns.  Otherwise check that we have nine (normal colummns + genotyping data)
+        // if we have don't have a header, or we have a header with no genotyping data check that we
+        // have eight columns.  Otherwise check that we have nine (normal columns + genotyping data)
         if (( (header == null || !header.hasGenotypingData()) && nParts != NUM_STANDARD_FIELDS) ||
                 (header != null && header.hasGenotypingData() && nParts != (NUM_STANDARD_FIELDS + 1)) )
             throw new TribbleException("Line " + lineNo + ": there aren't enough columns for line " + line + " (we expected " + (header == null ? NUM_STANDARD_FIELDS : NUM_STANDARD_FIELDS + 1) +
@@ -354,11 +370,11 @@ public abstract class AbstractVCFCodec extends AsciiFeatureCodec<VariantContext>
         Map<String, Object> attributes = new HashMap<String, Object>();
 
         if ( infoField.length() == 0 )
-            generateException("The VCF specification requires a valid info field");
+            generateException("The VCF specification requires a valid (non-zero length) info field");
 
         if ( !infoField.equals(VCFConstants.EMPTY_INFO_FIELD) ) {
             if ( infoField.indexOf("\t") != -1 || infoField.indexOf(" ") != -1 )
-                generateException("The VCF specification does not allow for whitespace in the INFO field");
+                generateException("The VCF specification does not allow for whitespace in the INFO field. Offending field value was \"" + infoField + "\"");
 
             int infoFieldSplitSize = ParsingUtils.split(infoField, infoFieldArray, VCFConstants.INFO_FIELD_SEPARATOR_CHAR, false);
             for (int i = 0; i < infoFieldSplitSize; i++) {
@@ -507,7 +523,7 @@ public abstract class AbstractVCFCodec extends AsciiFeatureCodec<VariantContext>
      */
     private static void checkAllele(String allele, boolean isRef, int lineNo) {
         if ( allele == null || allele.length() == 0 )
-            generateException("Empty alleles are not permitted in VCF records", lineNo);
+            generateException(generateExceptionTextForBadAlleleBases(""), lineNo);
 
         if ( GeneralUtils.DEBUG_MODE_ENABLED && MAX_ALLELE_SIZE_BEFORE_WARNING != -1 && allele.length() > MAX_ALLELE_SIZE_BEFORE_WARNING ) {
             System.err.println(String.format("Allele detected with length %d exceeding max size %d at approximately line %d, likely resulting in degraded VCF processing performance", allele.length(), MAX_ALLELE_SIZE_BEFORE_WARNING, lineNo));
@@ -524,7 +540,7 @@ public abstract class AbstractVCFCodec extends AsciiFeatureCodec<VariantContext>
                         " convert your file to VCF4 using VCFTools, available at http://vcftools.sourceforge.net/index.html", lineNo);
 
             if (!Allele.acceptableAlleleBases(allele))
-                generateException("Unparsable vcf record with allele " + allele, lineNo);
+                generateException(generateExceptionTextForBadAlleleBases(allele), lineNo);
 
             if ( isRef && allele.equals(VCFConstants.EMPTY_ALLELE) )
                 generateException("The reference allele cannot be missing", lineNo);
@@ -532,6 +548,20 @@ public abstract class AbstractVCFCodec extends AsciiFeatureCodec<VariantContext>
     }
 
     /**
+     * Generates the exception text for the case where the allele string contains unacceptable bases.
+     *
+     * @param allele   non-null allele string
+     * @return non-null exception text string
+     */
+    private static String generateExceptionTextForBadAlleleBases(final String allele) {
+        if ( allele.length() == 0 )
+            return "empty alleles are not permitted in VCF records";
+        if ( allele.contains("[") || allele.contains("]") || allele.contains(":") || allele.contains(".") )
+            return "VCF support for complex rearrangements with breakends has not yet been implemented";
+        return "unparsable vcf record with allele " + allele;
+    }
+
+    /**
      * return true if this is a symbolic allele (e.g. <SOMETAG>) or
      * structural variation breakend (with [ or ]), otherwise false
      * @param allele the allele to check
@@ -692,8 +722,12 @@ public abstract class AbstractVCFCodec extends AsciiFeatureCodec<VariantContext>
     private final static int[] decodeInts(final String string) {
         final int nValues = ParsingUtils.split(string, INT_DECODE_ARRAY, ',');
         final int[] values = new int[nValues];
-        for ( int i = 0; i < nValues; i++ )
-            values[i] = Integer.valueOf(INT_DECODE_ARRAY[i]);
+        try {
+            for ( int i = 0; i < nValues; i++ )
+                values[i] = Integer.valueOf(INT_DECODE_ARRAY[i]);
+        } catch (final NumberFormatException e) {
+            return null;
+        }
         return values;
     }
 
diff --git a/src/java/org/broadinstitute/variant/vcf/VCFContigHeaderLine.java b/src/java/org/broadinstitute/variant/vcf/VCFContigHeaderLine.java
index abb6a67..d65c56a 100644
--- a/src/java/org/broadinstitute/variant/vcf/VCFContigHeaderLine.java
+++ b/src/java/org/broadinstitute/variant/vcf/VCFContigHeaderLine.java
@@ -59,7 +59,7 @@ public class VCFContigHeaderLine extends VCFSimpleHeaderLine {
     }
 
 	VCFContigHeaderLine(final SAMSequenceRecord sequenceRecord, final String assembly) {
-		super(sequenceRecord.getId(), new HashMap<String, String>() {{
+		super(VCFHeader.CONTIG_KEY, new HashMap<String, String>() {{
 			// Now inside an init block in an anon HashMap subclass
 			this.put("ID", sequenceRecord.getSequenceName());
 			this.put("length", Integer.toString(sequenceRecord.getSequenceLength()));
diff --git a/src/java/org/broadinstitute/variant/vcf/VCFEncoder.java b/src/java/org/broadinstitute/variant/vcf/VCFEncoder.java
new file mode 100644
index 0000000..fdb5883
--- /dev/null
+++ b/src/java/org/broadinstitute/variant/vcf/VCFEncoder.java
@@ -0,0 +1,381 @@
+package org.broadinstitute.variant.vcf;
+
+import org.broad.tribble.util.ParsingUtils;
+import org.broadinstitute.variant.variantcontext.Allele;
+import org.broadinstitute.variant.variantcontext.Genotype;
+import org.broadinstitute.variant.variantcontext.GenotypeBuilder;
+import org.broadinstitute.variant.variantcontext.GenotypesContext;
+import org.broadinstitute.variant.variantcontext.LazyGenotypesContext;
+import org.broadinstitute.variant.variantcontext.VariantContext;
+import org.broadinstitute.variant.variantcontext.writer.IntGenotypeFieldAccessors;
+
+import java.lang.reflect.Array;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+/**
+ * Functions specific to encoding VCF records.
+ */
+public class VCFEncoder {
+
+    /**
+     * The encoding used for VCF files: ISO-8859-1
+     */
+    public static final Charset VCF_CHARSET = Charset.forName("ISO-8859-1");
+    private static final String QUAL_FORMAT_STRING = "%.2f";
+	private static final String QUAL_FORMAT_EXTENSION_TO_TRIM = ".00";
+
+	private final IntGenotypeFieldAccessors GENOTYPE_FIELD_ACCESSORS = new IntGenotypeFieldAccessors();
+
+	private VCFHeader header;
+
+	private boolean allowMissingFieldsInHeader = false;
+
+	/**
+	 * Prepare a VCFEncoder that will encode records appropriate to the given VCF header, optionally
+	 * allowing missing fields in the header.
+	 */
+	public VCFEncoder(final VCFHeader header, final boolean allowMissingFieldsInHeader) {
+		if (header == null) throw new NullPointerException("The VCF header must not be null.");
+		this.header = header;
+		this.allowMissingFieldsInHeader = allowMissingFieldsInHeader;
+	}
+
+	/**
+	 * Please see the notes in the default constructor
+	 */
+	@Deprecated
+	public void setVCFHeader(final VCFHeader header) {
+		this.header = header;
+	}
+
+	/**
+	 * Please see the notes in the default constructor
+	 */
+	@Deprecated
+	public void setAllowMissingFieldsInHeader(final boolean allow) {
+		this.allowMissingFieldsInHeader = allow;
+	}
+
+	public String encode(final VariantContext context) {
+		if (this.header == null) {
+			throw new NullPointerException("The header field must be set on the VCFEncoder before encoding records.");
+		}
+
+		final StringBuilder stringBuilder = new StringBuilder();
+
+		// CHROM
+		stringBuilder.append(context.getChr()).append(VCFConstants.FIELD_SEPARATOR);
+
+		// POS
+		stringBuilder.append(String.valueOf(context.getStart())).append(VCFConstants.FIELD_SEPARATOR);
+
+		// ID
+		stringBuilder.append(context.getID()).append(VCFConstants.FIELD_SEPARATOR);
+
+		// REF
+		stringBuilder.append(context.getReference().getDisplayString()).append(VCFConstants.FIELD_SEPARATOR);
+
+		// ALT
+		if ( context.isVariant() ) {
+			Allele altAllele = context.getAlternateAllele(0);
+			String alt = altAllele.getDisplayString();
+			stringBuilder.append(alt);
+
+			for (int i = 1; i < context.getAlternateAlleles().size(); i++) {
+				altAllele = context.getAlternateAllele(i);
+				alt = altAllele.getDisplayString();
+				stringBuilder.append(",");
+				stringBuilder.append(alt);
+			}
+		} else {
+			stringBuilder.append(VCFConstants.EMPTY_ALTERNATE_ALLELE_FIELD);
+		}
+
+		stringBuilder.append(VCFConstants.FIELD_SEPARATOR);
+
+		// QUAL
+		if ( ! context.hasLog10PError()) stringBuilder.append(VCFConstants.MISSING_VALUE_v4);
+		else stringBuilder.append(formatQualValue(context.getPhredScaledQual()));
+		stringBuilder.append(VCFConstants.FIELD_SEPARATOR);
+
+		// FILTER
+		stringBuilder.append(getFilterString(context)).append(VCFConstants.FIELD_SEPARATOR);
+
+		// INFO
+		final Map<String, String> infoFields = new TreeMap<String, String>();
+		for (final Map.Entry<String, Object> field : context.getAttributes().entrySet() ) {
+			if ( ! this.header.hasInfoLine(field.getKey())) fieldIsMissingFromHeaderError(context, field.getKey(), "INFO");
+
+			final String outputValue = formatVCFField(field.getValue());
+			if (outputValue != null) infoFields.put(field.getKey(), outputValue);
+		}
+		writeInfoString(infoFields, stringBuilder);
+
+		// FORMAT
+		final GenotypesContext gc = context.getGenotypes();
+		if (gc.isLazyWithData() && ((LazyGenotypesContext) gc).getUnparsedGenotypeData() instanceof String) {
+			stringBuilder.append(VCFConstants.FIELD_SEPARATOR);
+			stringBuilder.append(((LazyGenotypesContext) gc).getUnparsedGenotypeData().toString());
+		} else {
+			final List<String> genotypeAttributeKeys = context.calcVCFGenotypeKeys(this.header);
+			if ( ! genotypeAttributeKeys.isEmpty()) {
+				for (final String format : genotypeAttributeKeys)
+					if ( ! this.header.hasFormatLine(format))
+						fieldIsMissingFromHeaderError(context, format, "FORMAT");
+
+				final String genotypeFormatString = ParsingUtils.join(VCFConstants.GENOTYPE_FIELD_SEPARATOR, genotypeAttributeKeys);
+
+				stringBuilder.append(VCFConstants.FIELD_SEPARATOR);
+				stringBuilder.append(genotypeFormatString);
+
+				final Map<Allele, String> alleleStrings = buildAlleleStrings(context);
+				addGenotypeData(context, alleleStrings, genotypeAttributeKeys, stringBuilder);
+			}
+		}
+
+		return stringBuilder.toString();
+	}
+
+	VCFHeader getVCFHeader() {
+		return this.header;
+	}
+
+	boolean getAllowMissingFieldsInHeader() {
+		return this.allowMissingFieldsInHeader;
+	}
+
+	private String getFilterString(final VariantContext vc) {
+		if (vc.isFiltered()) {
+			for (final String filter : vc.getFilters()) {
+				if ( ! this.header.hasFilterLine(filter)) fieldIsMissingFromHeaderError(vc, filter, "FILTER");
+			}
+
+			return ParsingUtils.join(";", ParsingUtils.sortList(vc.getFilters()));
+		}
+		else if (vc.filtersWereApplied()) return VCFConstants.PASSES_FILTERS_v4;
+		else return VCFConstants.UNFILTERED;
+	}
+
+	private String formatQualValue(final double qual) {
+		String s = String.format(QUAL_FORMAT_STRING, qual);
+		if ( s.endsWith(QUAL_FORMAT_EXTENSION_TO_TRIM) )
+			s = s.substring(0, s.length() - QUAL_FORMAT_EXTENSION_TO_TRIM.length());
+		return s;
+	}
+
+	private void fieldIsMissingFromHeaderError(final VariantContext vc, final String id, final String field) {
+		if ( ! allowMissingFieldsInHeader)
+			throw new IllegalStateException("Key " + id + " found in VariantContext field " + field
+					+ " at " + vc.getChr() + ":" + vc.getStart()
+					+ " but this key isn't defined in the VCFHeader.  We require all VCFs to have"
+					+ " complete VCF headers by default.");
+	}
+
+	String formatVCFField(final Object val) {
+		final String result;
+		if ( val == null )
+			result = VCFConstants.MISSING_VALUE_v4;
+		else if ( val instanceof Double )
+			result = formatVCFDouble((Double) val);
+		else if ( val instanceof Boolean )
+			result = (Boolean)val ? "" : null; // empty string for true, null for false
+		else if ( val instanceof List ) {
+			result = formatVCFField(((List)val).toArray());
+		} else if ( val.getClass().isArray() ) {
+			final int length = Array.getLength(val);
+			if ( length == 0 )
+				return formatVCFField(null);
+			final StringBuilder sb = new StringBuilder(formatVCFField(Array.get(val, 0)));
+			for ( int i = 1; i < length; i++) {
+				sb.append(",");
+				sb.append(formatVCFField(Array.get(val, i)));
+			}
+			result = sb.toString();
+		} else
+			result = val.toString();
+
+		return result;
+	}
+
+	/**
+	 * Takes a double value and pretty prints it to a String for display
+	 *
+	 * Large doubles => gets %.2f style formatting
+	 * Doubles < 1 / 10 but > 1/100 </>=> get %.3f style formatting
+	 * Double < 1/100 => %.3e formatting
+	 * @param d
+	 * @return
+	 */
+	public static String formatVCFDouble(final double d) {
+		final String format;
+		if ( d < 1 ) {
+			if ( d < 0.01 ) {
+				if ( Math.abs(d) >= 1e-20 )
+					format = "%.3e";
+				else {
+					// return a zero format
+					return "0.00";
+				}
+			} else {
+				format = "%.3f";
+			}
+		} else {
+			format = "%.2f";
+		}
+
+		return String.format(format, d);
+	}
+
+	static int countOccurrences(final char c, final String s) {
+		int count = 0;
+		for (int i = 0; i < s.length(); i++) {
+			count += s.charAt(i) == c ? 1 : 0;
+		}
+		return count;
+	}
+
+	static boolean isMissingValue(final String s) {
+		// we need to deal with the case that it's a list of missing values
+		return (countOccurrences(VCFConstants.MISSING_VALUE_v4.charAt(0), s) + countOccurrences(',', s) == s.length());
+	}
+
+	/*
+	 * Add the genotype data
+	 */
+	private void addGenotypeData(final VariantContext vc, final Map<Allele, String> alleleMap, final List<String> genotypeFormatKeys, final StringBuilder builder) {
+		final int ploidy = vc.getMaxPloidy(2);
+
+		for (final String sample : this.header.getGenotypeSamples()) {
+			builder.append(VCFConstants.FIELD_SEPARATOR);
+
+			Genotype g = vc.getGenotype(sample);
+			if (g == null) g = GenotypeBuilder.createMissing(sample, ploidy);
+
+			final List<String> attrs = new ArrayList<String>(genotypeFormatKeys.size());
+			for (final String field : genotypeFormatKeys) {
+				if (field.equals(VCFConstants.GENOTYPE_KEY)) {
+					if ( ! g.isAvailable()) {
+						throw new IllegalStateException("GTs cannot be missing for some samples if they are available for others in the record");
+					}
+
+					writeAllele(g.getAllele(0), alleleMap, builder);
+					for (int i = 1; i < g.getPloidy(); i++) {
+						builder.append(g.isPhased() ? VCFConstants.PHASED : VCFConstants.UNPHASED);
+						writeAllele(g.getAllele(i), alleleMap, builder);
+					}
+					continue;
+
+				} else {
+					final String outputValue;
+					if ( field.equals(VCFConstants.GENOTYPE_FILTER_KEY ) ) {
+						outputValue = g.isFiltered() ? g.getFilters() : VCFConstants.PASSES_FILTERS_v4;
+					} else {
+						final IntGenotypeFieldAccessors.Accessor accessor = GENOTYPE_FIELD_ACCESSORS.getAccessor(field);
+						if ( accessor != null ) {
+							final int[] intValues = accessor.getValues(g);
+							if ( intValues == null )
+								outputValue = VCFConstants.MISSING_VALUE_v4;
+							else if ( intValues.length == 1 ) // fast path
+								outputValue = Integer.toString(intValues[0]);
+							else {
+								final StringBuilder sb = new StringBuilder();
+								sb.append(intValues[0]);
+								for ( int i = 1; i < intValues.length; i++) {
+									sb.append(",");
+									sb.append(intValues[i]);
+								}
+								outputValue = sb.toString();
+							}
+						} else {
+							Object val = g.hasExtendedAttribute(field) ? g.getExtendedAttribute(field) : VCFConstants.MISSING_VALUE_v4;
+
+							final VCFFormatHeaderLine metaData = this.header.getFormatHeaderLine(field);
+							if ( metaData != null ) {
+								final int numInFormatField = metaData.getCount(vc);
+								if ( numInFormatField > 1 && val.equals(VCFConstants.MISSING_VALUE_v4) ) {
+									// If we have a missing field but multiple values are expected, we need to construct a new string with all fields.
+									// For example, if Number=2, the string has to be ".,."
+									final StringBuilder sb = new StringBuilder(VCFConstants.MISSING_VALUE_v4);
+									for ( int i = 1; i < numInFormatField; i++ ) {
+										sb.append(",");
+										sb.append(VCFConstants.MISSING_VALUE_v4);
+									}
+									val = sb.toString();
+								}
+							}
+
+							// assume that if key is absent, then the given string encoding suffices
+							outputValue = formatVCFField(val);
+						}
+					}
+
+					if ( outputValue != null )
+						attrs.add(outputValue);
+				}
+			}
+
+			// strip off trailing missing values
+			for (int i = attrs.size()-1; i >= 0; i--) {
+				if ( isMissingValue(attrs.get(i))) attrs.remove(i);
+				else break;
+			}
+
+			for (int i = 0; i < attrs.size(); i++) {
+				if ( i > 0 || genotypeFormatKeys.contains(VCFConstants.GENOTYPE_KEY)) {
+					builder.append(VCFConstants.GENOTYPE_FIELD_SEPARATOR);
+				}
+				builder.append(attrs.get(i));
+			}
+		}
+	}
+
+	/*
+	 * Create the info string; assumes that no values are null
+	 */
+	private void writeInfoString(final Map<String, String> infoFields, final StringBuilder builder) {
+		if ( infoFields.isEmpty() ) {
+			builder.append(VCFConstants.EMPTY_INFO_FIELD);
+			return;
+		}
+
+		boolean isFirst = true;
+		for (final Map.Entry<String, String> entry : infoFields.entrySet()) {
+			if (isFirst) isFirst = false;
+			else builder.append(VCFConstants.INFO_FIELD_SEPARATOR);
+
+			builder.append(entry.getKey());
+
+			if ( ! entry.getValue().equals("")) {
+				final VCFInfoHeaderLine metaData = this.header.getInfoHeaderLine(entry.getKey());
+				if ( metaData == null || metaData.getCountType() != VCFHeaderLineCount.INTEGER || metaData.getCount() != 0 ) {
+					builder.append("=");
+					builder.append(entry.getValue());
+				}
+			}
+		}
+	}
+
+	private Map<Allele, String> buildAlleleStrings(final VariantContext vc) {
+		final Map<Allele, String> alleleMap = new HashMap<Allele, String>(vc.getAlleles().size()+1);
+		alleleMap.put(Allele.NO_CALL, VCFConstants.EMPTY_ALLELE); // convenience for lookup
+
+		final List<Allele> alleles = vc.getAlleles();
+		for ( int i = 0; i < alleles.size(); i++ ) {
+			alleleMap.put(alleles.get(i), String.valueOf(i));
+		}
+
+		return alleleMap;
+	}
+
+	private void writeAllele(final Allele allele, final Map<Allele, String> alleleMap, final StringBuilder builder) {
+		final String encoding = alleleMap.get(allele);
+		if ( encoding == null )
+			throw new RuntimeException("Allele " + allele + " is not an allele in the variant context");
+		builder.append(encoding);
+	}
+}
diff --git a/src/java/org/broadinstitute/variant/vcf/VCFHeader.java b/src/java/org/broadinstitute/variant/vcf/VCFHeader.java
index 59c5f27..42365e3 100644
--- a/src/java/org/broadinstitute/variant/vcf/VCFHeader.java
+++ b/src/java/org/broadinstitute/variant/vcf/VCFHeader.java
@@ -208,8 +208,10 @@ public class VCFHeader {
 	public void setSequenceDictionary(final SAMSequenceDictionary dictionary) {
 		this.contigMetaData.clear();
 		for (final SAMSequenceRecord record : dictionary.getSequences()) {
-			this.contigMetaData.add(new VCFContigHeaderLine(record, null));
+			contigMetaData.add(new VCFContigHeaderLine(record, null));
 		}
+
+		this.mMetaData.addAll(contigMetaData);
 	}
 
 	public VariantContextComparator getVCFRecordComparator() {
diff --git a/src/java/org/broadinstitute/variant/vcf/VCFRecordCodec.java b/src/java/org/broadinstitute/variant/vcf/VCFRecordCodec.java
new file mode 100644
index 0000000..15cbf59
--- /dev/null
+++ b/src/java/org/broadinstitute/variant/vcf/VCFRecordCodec.java
@@ -0,0 +1,63 @@
+package org.broadinstitute.variant.vcf;
+
+import net.sf.samtools.util.SortingCollection;
+import org.broadinstitute.variant.variantcontext.VariantContext;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.PrintStream;
+
+/**
+ * Writes VariantContext instances to an OutputStream without headers or metadata. For use
+ * with SortingCollection ONLY.
+ */
+public class VCFRecordCodec implements SortingCollection.Codec<VariantContext> {
+
+	final VCFCodec vcfDecoder = new VCFCodec();
+
+	final VCFEncoder vcfEncoder;
+
+	private PrintStream outputStream = null;
+
+	private BufferedReader inputReader = null;
+
+	public VCFRecordCodec(final VCFHeader header) {
+		this.vcfEncoder = new VCFEncoder(header, false);
+		// Explicitly set the version because it's not available in the header itself.
+		this.vcfDecoder.setVCFHeader(header, VCFHeaderVersion.VCF4_1);
+	}
+
+	@Override
+	public void setOutputStream(final OutputStream stream) {
+		this.outputStream = new PrintStream(stream);
+	}
+
+	@Override
+	public void setInputStream(final InputStream stream) {
+		this.inputReader = new BufferedReader(new InputStreamReader(stream));
+	}
+
+	@Override
+	public void encode(final VariantContext context) {
+		this.outputStream.println(this.vcfEncoder.encode(context));
+	}
+
+	@Override
+	public VariantContext decode() {
+		try {
+			final String line;
+			return ((line = inputReader.readLine()) != null) ? this.vcfDecoder.decode(line) : null;
+		} catch (final IOException ioe) {
+			throw new RuntimeException("Could not decode/read a VCF record for a sorting collection: " + ioe.getMessage(), ioe);
+		}
+	}
+
+	@Override
+	public VCFRecordCodec clone() {
+		return new VCFRecordCodec(this.vcfEncoder.getVCFHeader());
+	}
+}
+
diff --git a/src/scripts/build_intel_deflater.sh b/src/scripts/build_intel_deflater.sh
new file mode 100644
index 0000000..49d018c
--- /dev/null
+++ b/src/scripts/build_intel_deflater.sh
@@ -0,0 +1,64 @@
+#! /bin/bash
+#
+# The MIT License
+#
+# Copyright (c) 2013 The Broad Institute
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+
+# Build libIntelDeflater.so, the JNI library that wraps Intel IPP compression library.
+# Note that this is not built as part of standard release process.  Rather, it is built manually and then
+# copied to Picard-public/lib/jni.
+
+# Assumes OpenJDK exists at $OPENJDK.  I used openjdk-7-fcs-src-b147-27_jun_2011.zip
+# Assumes that Picard-public java sources have been compiled
+# Assumes IPP8_CODE_SAMPLES_DIR points to Intel IPP sample code built with -fPIC
+set -e
+
+if [ "$OPENJDK" = "" ]
+then echo "ERROR: OPENJDK environment variable not defined." >&2
+     exit 1
+fi
+
+if [ "$IPP8_CODE_SAMPLES_DIR" = "" ]
+then echo "ERROR: IPP8_CODE_SAMPLES_DIR environment variable not defined." >&2
+     exit 1
+fi
+
+rootdir=$(dirname $(dirname $(dirname $0)))
+
+
+builddir=$rootdir/lib_build
+rm -rf $builddir
+mkdir -p $builddir
+
+# Create JNI C header file
+javah -jni -classpath $rootdir/classes -d $builddir net.sf.samtools.util.zip.IntelDeflater
+
+# Compile source and create library.
+gcc -I$builddir -I$JAVA_HOME/include/ -I$JAVA_HOME/include/linux/ -I$OPENJDK/jdk/src/share/native/common/ \
+-I$OPENJDK/jdk/src/solaris/native/common/ -c -O3 -fPIC IntelDeflater.c
+gcc  -shared -o $builddir/libIntelDeflater.so IntelDeflater.o  -L${IPP8_CODE_SAMPLES_DIR}/__cmake/data-compression.intel64.make.static.release/__lib/release \
+-lzlib  -lstdc++ -Wl,-Bstatic  -lbfp754  -ldecimal  -liomp5  -liompstubs5  -lipgo  -lippac  -lippcc  -lippch  -lippcv  \
+-lippdc  -lippdi  -lippgen  -lippi  -lippj  -lippm  -lippr  -lippsc  -lippvc  -lippvm  -lirng  -lmatmul  -lpdbx  \
+-lpdbxinst  -lsvml  -lipps  -limf  -lirc  -lirc_s  -lippcore -Wl,-Bdynamic
+
+
+
diff --git a/src/scripts/net/sf/picard/analysis/rnaSeqCoverage.R b/src/scripts/net/sf/picard/analysis/rnaSeqCoverage.R
index db64b0f..1cf004e 100644
--- a/src/scripts/net/sf/picard/analysis/rnaSeqCoverage.R
+++ b/src/scripts/net/sf/picard/analysis/rnaSeqCoverage.R
@@ -3,7 +3,7 @@
 # @author Tim Fennell
 
 # Parse the arguments
-args <- commandArgs(trailing=T)
+args <- commandArgs(trailing = TRUE)
 metricsFile  <- args[1]
 outputFile   <- args[2]
 bamName  <- args[3]
@@ -26,7 +26,6 @@ for (i in 1:length(startFinder)) {
 }
 
 data <- read.table(metricsFile, header=T, sep="\t", skip=secondBlankLine, check.names=FALSE)
-pdf(outputFile)
 
 # The histogram has a normalized_position and normalized_coverage column for each metric "level"
 # This code parses out the distinct levels so we can output one graph per level
@@ -38,34 +37,34 @@ headers <- sapply(sub(".normalized_coverage","",names(data),fixed=TRUE), "[[" ,1
 if (any(duplicated(headers))) {
   print(paste("Not creating insert size PDF as there are duplicated header names:", headers[which(duplicated(headers))]))
 } else {
+    pdf(outputFile)
     levels <- c()
     for (i in 2:length(headers)) {
         if (!(headers[i] %in% levels)) {
             levels[length(levels)+1] <- headers[i]
         }
     }
-}
-
-# Some constants that are used below
-COLORS = c("royalblue", "#FFAAAA", "palegreen3");
 
-# For each level, plot of the normalized coverage by GC
-for (i in 1:length(levels)) {
+    # Some constants that are used below
+    COLORS = c("royalblue", "#FFAAAA", "palegreen3");
 
-    # Reconstitutes the histogram column header for this level
-    nc <- paste(levels[i], "normalized_coverage", sep=".")
+    # For each level, plot of the normalized coverage by GC
+    for (i in 1:length(levels)) {
 
-    plot(x=data$normalized_position, y=as.matrix(data[nc]),
-        type="o",
-        xlab="Normalized Distance Along Transcript",
-        ylab="Normalized Coverage",
-        xlim=c(0, 100),
-        ylim=range(0, max(data[nc])),
-        col="royalblue",
-        main=paste("RNA-Seq Coverage vs. Transcript Position\n", levels[i], " ", ifelse(subtitle=="", "", paste("(", subtitle, ")", sep="")), "\nin file ", bamName,sep=""))
+        # Reconstitutes the histogram column header for this level
+        nc <- paste(levels[i], "normalized_coverage", sep=".")
 
-    # Add a horizontal line at coverage=1
-    abline(h=1, col="lightgrey");
-}
+        plot(x=data$normalized_position, y=as.matrix(data[nc]),
+            type="o",
+            xlab="Normalized Distance Along Transcript",
+            ylab="Normalized Coverage",
+            xlim=c(0, 100),
+            ylim=range(0, max(data[nc])),
+            col="royalblue",
+            main=paste("RNA-Seq Coverage vs. Transcript Position\n", levels[i], " ", ifelse(subtitle=="", "", paste("(", subtitle, ")", sep="")), "\nin file ", bamName,sep=""))
 
-dev.off();
\ No newline at end of file
+        # Add a horizontal line at coverage=1
+        abline(h=1, col="lightgrey");
+    }
+    dev.off();
+}
\ No newline at end of file
diff --git a/src/scripts/release_picard.sh b/src/scripts/release_picard.sh
index a77c9a0..340a0d2 100755
--- a/src/scripts/release_picard.sh
+++ b/src/scripts/release_picard.sh
@@ -75,7 +75,8 @@ SVNROOT=svn+ssh://$USERNAME@svn.code.sf.net/p/picard/code
 
 RELEASE_ID=$1
 
-PREV_RELEASE_ID=`svn --username $USERNAME ls $SVNROOT/tags | tail -1 | sed 's/\/$//'`
+# Since releases are lexically sorted, need to filter in order to have 1.1xx be at the bottom.
+PREV_RELEASE_ID=`svn --username $USERNAME ls $SVNROOT/tags | egrep '[.]\d\d\d' | tail -1 | sed 's/\/$//'`
 
 if branch_exists $SVNROOT/branches/$RELEASE_ID
 then echo "ERROR: $SVNROOT/branches/$RELEASE_ID already exists.">&2
diff --git a/src/tests/java/net/sf/picard/illumina/IlluminaBasecallsToFastqTest.java b/src/tests/java/net/sf/picard/illumina/IlluminaBasecallsToFastqTest.java
index e278174..d20c8ec 100644
--- a/src/tests/java/net/sf/picard/illumina/IlluminaBasecallsToFastqTest.java
+++ b/src/tests/java/net/sf/picard/illumina/IlluminaBasecallsToFastqTest.java
@@ -29,7 +29,6 @@ import net.sf.samtools.util.BufferedLineReader;
 import net.sf.samtools.util.LineReader;
 import net.sf.samtools.util.StringUtil;
 import net.sf.samtools.util.TestUtil;
-import org.testng.Assert;
 import org.testng.annotations.Test;
 
 import java.io.File;
@@ -58,14 +57,16 @@ public class IlluminaBasecallsToFastqTest {
                 "LANE=" + lane,
                 "READ_STRUCTURE=76T76T",
                 "OUTPUT_PREFIX=" + outputPrefix,
-                "RUN_BARCODE=HiMom"
+                "RUN_BARCODE=HiMom",
+                "MACHINE_NAME=machine1",
+                "FLOWCELL_BARCODE=abcdeACXX"
         });
         IoUtil.assertFilesEqual(outputFastq1, new File(TEST_DATA_DIR, "nonBarcoded.1.fastq"));
         IoUtil.assertFilesEqual(outputFastq2, new File(TEST_DATA_DIR, "nonBarcoded.2.fastq"));
     }
 
     @Test
-    public void testMultiplex() throws Exception {
+    public void testMultiplexWithIlluminaReadNameHeaders() throws Exception {
         final File outputDir = File.createTempFile("testMultiplex.", ".dir");
         try {
             outputDir.delete();
@@ -80,7 +81,10 @@ public class IlluminaBasecallsToFastqTest {
                     "LANE=" + 7,
                     "RUN_BARCODE=HiMom",
                     "READ_STRUCTURE=" + "30T8B",
-                    "OUTPUT_PREFIX=" + outputPrefix.getAbsolutePath()
+                    "OUTPUT_PREFIX=" + outputPrefix.getAbsolutePath(),
+                    "MACHINE_NAME=machine1",
+                    "FLOWCELL_BARCODE=abcdeACXX",
+                    "READ_NAME_FORMAT=" + IlluminaBasecallsToFastq.ReadNameFormat.ILLUMINA
             });
 
             final String[] filenames = new String[]{
@@ -148,7 +152,9 @@ public class IlluminaBasecallsToFastqTest {
                     "LANE=" + lane,
                     "RUN_BARCODE=HiMom",
                     "READ_STRUCTURE=" + readStructureString,
-                    "MULTIPLEX_PARAMS=" + libraryParams
+                    "MULTIPLEX_PARAMS=" + libraryParams,
+                    "MACHINE_NAME=machine1",
+                    "FLOWCELL_BARCODE=abcdeACXX"
             });
 
             final ReadStructure readStructure = new ReadStructure(readStructureString);
diff --git a/src/tests/java/net/sf/picard/io/IoUtilTest.java b/src/tests/java/net/sf/picard/io/IoUtilTest.java
index 04cdf2d..7e8373b 100644
--- a/src/tests/java/net/sf/picard/io/IoUtilTest.java
+++ b/src/tests/java/net/sf/picard/io/IoUtilTest.java
@@ -37,6 +37,8 @@ import java.util.List;
 public class IoUtilTest {
 
     private static final File SLURP_TEST_FILE = new File("testdata/net/sf/picard/io/slurptest.txt");
+    private static final File EMPTY_FILE = new File("testdata/net/sf/picard/io/empty.txt");;
+    private static final File FIVE_SPACES_THEN_A_NEWLINE_THEN_FIVE_SPACES_FILE = new File("testdata/net/sf/picard/io/5newline5.txt");
     private static final List<String> SLURP_TEST_LINES = Arrays.asList("bacon   and rice   ","for breakfast  ","wont you join me");
     private static final String SLURP_TEST_LINE_SEPARATOR = "\n";
     private static final String TEST_FILE_PREFIX = "foo";
@@ -119,6 +121,16 @@ public class IoUtilTest {
     public void slurpLinesTest() throws FileNotFoundException {
         Assert.assertEquals(IoUtil.slurpLines(SLURP_TEST_FILE), SLURP_TEST_LINES);
     }
+
+    @Test
+    public void slurpWhitespaceOnlyFileTest() throws FileNotFoundException {
+        Assert.assertEquals(IoUtil.slurp(FIVE_SPACES_THEN_A_NEWLINE_THEN_FIVE_SPACES_FILE), "     \n     ");
+    }
+    
+    @Test
+    public void slurpEmptyFileTest() throws FileNotFoundException {
+        Assert.assertEquals(IoUtil.slurp(EMPTY_FILE), "");
+    }
     
     @Test
     public void slurpTest() throws FileNotFoundException {
diff --git a/src/tests/java/net/sf/picard/sam/CleanSamTest.java b/src/tests/java/net/sf/picard/sam/CleanSamTest.java
new file mode 100644
index 0000000..6a3d678
--- /dev/null
+++ b/src/tests/java/net/sf/picard/sam/CleanSamTest.java
@@ -0,0 +1,78 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2014 The Broad Institute
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package net.sf.picard.sam;
+
+import net.sf.samtools.SAMFileReader;
+import net.sf.samtools.SAMRecord;
+import net.sf.samtools.SAMValidationError;
+import net.sf.samtools.util.TestUtil;
+import org.testng.Assert;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.Collection;
+
+public class CleanSamTest {
+
+    private static final File TEST_DATA_DIR = new File("testdata/net/sf/picard/sam/CleanSam");
+
+    @Test(dataProvider = "testCleanSamDataProvider")
+    public void testCleanSam(final String samFile, final String expectedCigar) throws IOException {
+        final File cleanedFile = File.createTempFile(samFile + ".", ".sam");
+        cleanedFile.deleteOnExit();
+        final CleanSam cleanSam = new CleanSam();
+        cleanSam.INPUT = new File(TEST_DATA_DIR, samFile);
+        cleanSam.OUTPUT = cleanedFile;
+        Assert.assertEquals(cleanSam.doWork(), 0);
+        final SamFileValidator validator = new SamFileValidator(new PrintWriter(System.out), 8000);
+        validator.setIgnoreWarnings(true);
+        validator.setVerbose(true, 1000);
+        validator.setErrorsToIgnore(Arrays.asList(SAMValidationError.Type.MISSING_READ_GROUP));
+        SAMFileReader samReader = new SAMFileReader(cleanedFile);
+        samReader.setValidationStringency(SAMFileReader.ValidationStringency.LENIENT);
+        final SAMRecord rec = samReader.iterator().next();
+        samReader.close();
+        Assert.assertEquals(rec.getCigarString(), expectedCigar);
+        samReader = new SAMFileReader(cleanedFile);
+        final boolean validated = validator.validateSamFileVerbose(samReader, null);
+        samReader.close();
+        Assert.assertTrue(validated, "ValidateSamFile failed");
+    }
+
+    @DataProvider(name = "testCleanSamDataProvider")
+    public Object[][] testCleanSamDataProvider() {
+        return new Object[][]{
+                {"simple_fits.sam", "100M"},
+                {"simple_overhang.sam", "99M1S"},
+                {"fits_with_deletion.sam", "91M2D9M"},
+                {"overhang_with_deletion.sam", "91M2D8M1S"},
+                {"trailing_insertion.sam", "99M1I"},
+                {"long_trailing_insertion.sam", "90M10I"},
+        };
+    }
+}
diff --git a/src/tests/java/net/sf/picard/sam/FastqToSamTest.java b/src/tests/java/net/sf/picard/sam/FastqToSamTest.java
index 3da1ba1..fbb679d 100644
--- a/src/tests/java/net/sf/picard/sam/FastqToSamTest.java
+++ b/src/tests/java/net/sf/picard/sam/FastqToSamTest.java
@@ -33,6 +33,8 @@ import org.testng.annotations.Test;
 
 import java.io.File;
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * Tests for FastqToBam
@@ -80,6 +82,22 @@ public class FastqToSamTest {
         };
     }
 
+    // permissive fastq format, i.e. contain blank lines at various places
+    @DataProvider(name = "permissiveFormatFiles")
+    public Object[][] permissiveFormatFiles() {
+        return new Object[][] {
+                {"permissive-format/pair1.txt",          "permissive-format/pair2.txt", FastqQualityFormat.Standard },
+                {"permissive-format/s_1_1_sequence.txt",    "permissive-format/s_1_2_sequence.txt", FastqQualityFormat.Illumina},
+                {"permissive-format/pair1.txt", null, FastqQualityFormat.Standard},
+                {"permissive-format/pair2.txt", null, FastqQualityFormat.Standard},
+                {"permissive-format/s_1_1_sequence.txt", null, FastqQualityFormat.Illumina},
+                {"permissive-format/s_1_2_sequence.txt", null, FastqQualityFormat.Illumina},
+                {"permissive-format/s_1_sequence.txt", null, FastqQualityFormat.Illumina},
+
+        };
+    }
+
+
     // OK paired fastq files
     @DataProvider(name = "okPairedFiles")
     public Object[][] okPairedFiles() {
@@ -102,15 +120,24 @@ public class FastqToSamTest {
         };
     }
 
+    @Test(dataProvider = "permissiveFormatFiles")
+    public void testPermissiveOk(final String filename1, final String filename2, final FastqQualityFormat version) throws IOException {
+        convertFile(filename1,filename2,version,true);
+    }
+
+    @Test(dataProvider = "permissiveFormatFiles",expectedExceptions = PicardException.class)
+    public void testPermissiveFail(final String filename1, final String filename2, final FastqQualityFormat version) throws IOException {
+        convertFile(filename1,filename2,version,false);
+    }
 
     @Test(dataProvider = "okVersionFiles")
     public void testFastqVersionOk(final String fastqVersionFilename, final FastqQualityFormat version) throws IOException {
-        final File fastqVersionSamFile = convertFile(fastqVersionFilename, version);
+        convertFile(fastqVersionFilename, version);
     }
 
     @Test(dataProvider = "badVersionFiles", expectedExceptions= PicardException.class)
     public void testFastqVersionBad(final String fastqVersionFilename, final FastqQualityFormat version) throws IOException {
-        final File fastqVersionSamFile = convertFile(fastqVersionFilename, version);
+        convertFile(fastqVersionFilename, version);
     }
 
     @Test(dataProvider = "badFormatFiles", expectedExceptions= PicardException.class) 
@@ -132,35 +159,28 @@ public class FastqToSamTest {
         return convertFile(filename, null, version);
     }
 
-    private File convertFile(final String fastqFilename1, final String fastqFilename2, final FastqQualityFormat version) throws IOException {
+    private File convertFile(final String fastqFilename1, final String fastqFilename2, final FastqQualityFormat version) throws IOException{
+        return convertFile(fastqFilename1, fastqFilename2, version,false);
+    }
+
+    private File convertFile(final String fastqFilename1, final String fastqFilename2, final FastqQualityFormat version,final boolean permissiveFormat) throws IOException {
         final File fastq1 = new File(TEST_DATA_DIR, fastqFilename1);
         final File fastq2 = (fastqFilename2 != null) ? new File(TEST_DATA_DIR, fastqFilename2) : null;
         final File samFile = newTempSamFile(fastq1.getName());
 
-        String [] args;
-
-        if(fastqFilename2 != null) {
-            args = new String[] {
-                "FASTQ=" + fastq1.getAbsolutePath(),
-                "FASTQ2=" + fastq2.getAbsolutePath(),
-                "OUTPUT=" + samFile.getAbsolutePath(),
-                "QUALITY_FORMAT=" + version,
-                "READ_GROUP_NAME=rg",
-                "SAMPLE_NAME=s1"
-            };
-        } else {
-            args = new String[] {
-                "FASTQ=" + fastq1.getAbsolutePath(),
-                "OUTPUT=" + samFile.getAbsolutePath(),
-                "QUALITY_FORMAT=" + version,
-                "READ_GROUP_NAME=rg",
-                "SAMPLE_NAME=s1"
-            };
-
-        }
-
-        FastqToSam fqToSam = new FastqToSam();
-        Assert.assertEquals(fqToSam.instanceMain(args), 0);
+        final List<String> args =new ArrayList<String>();
+
+        args.add("FASTQ=" + fastq1.getAbsolutePath());
+        args.add("OUTPUT=" + samFile.getAbsolutePath());
+        args.add("QUALITY_FORMAT=" + version);
+        args.add("READ_GROUP_NAME=rg");
+        args.add("SAMPLE_NAME=s1");
+
+        if(fastqFilename2 != null) args.add("FASTQ2=" + fastq2.getAbsolutePath());
+        if(permissiveFormat) args.add("ALLOW_AND_IGNORE_EMPTY_LINES=true");
+
+        final FastqToSam fqToSam = new FastqToSam();
+        Assert.assertEquals(fqToSam.instanceMain(args.toArray(new String[args.size()])), 0);
         return samFile ;
     }
 
@@ -181,13 +201,12 @@ public class FastqToSamTest {
 //  an existing file.
 
     private static final FastqToSam fastqToSam = new FastqToSam();
-    private static File dummyFile ;
     private static FastqReader freader1 ;
     private static FastqReader freader2 ;
 
     @BeforeClass
     public static void beforeClass() throws IOException {
-        dummyFile = newTempFile("dummy");
+        final File dummyFile = newTempFile("dummy");
         freader1 = new FastqReader(dummyFile);
         freader2 = new FastqReader(dummyFile);
     }
diff --git a/src/tests/java/net/sf/picard/sam/MergeBamAlignmentTest.java b/src/tests/java/net/sf/picard/sam/MergeBamAlignmentTest.java
index 0f4d095..df61c10 100644
--- a/src/tests/java/net/sf/picard/sam/MergeBamAlignmentTest.java
+++ b/src/tests/java/net/sf/picard/sam/MergeBamAlignmentTest.java
@@ -69,7 +69,8 @@ public class MergeBamAlignmentTest {
     @Test
     public void testMergerWithSupplemental() throws Exception {
         final File outputWithSupplemental = File.createTempFile("mergeWithSupplementalTest", ".sam");
-        outputWithSupplemental.deleteOnExit();
+        System.out.println(outputWithSupplemental.getAbsolutePath());
+        // outputWithSupplemental.deleteOnExit();
         final MergeBamAlignment merger = new MergeBamAlignment();
         merger.UNMAPPED_BAM = unmappedBam;
         merger.ALIGNED_BAM = Arrays.asList(supplementalReadAlignedBam);
@@ -99,15 +100,19 @@ public class MergeBamAlignmentTest {
 
             // This tests that we clip both (a) when the adapter is marked in the unmapped BAM file and
             // (b) when the insert size is less than the read length
-            if (sam.getReadName().equals("both_reads_align_clip_adapter") ||
-                    sam.getReadName().equals("both_reads_align_clip_marked")) {
+            if (sam.getReadName().equals("both_reads_align_clip_marked")) {
                 Assert.assertEquals(sam.getReferenceName(), "chr7");
                 if (sam.getReadNegativeStrandFlag()) {
-                    Assert.assertEquals(sam.getCigarString(), "5S96M", "Incorrect CIGAR string for " +
-                            sam.getReadName());
+                    Assert.assertEquals(sam.getCigarString(), "5S96M", "Incorrect CIGAR string for " + sam.getReadName());
                 } else {
-                    Assert.assertEquals(sam.getCigarString(), "96M5S", "Incorrect CIGAR string for " +
-                            sam.getReadName());
+                    Assert.assertEquals(sam.getCigarString(), "96M5S", "Incorrect CIGAR string for " + sam.getReadName());
+                }
+            }
+            else if (sam.getReadName().equals("both_reads_align_clip_adapter")) {
+                Assert.assertEquals(sam.getReferenceName(), "chr7");
+                if (!sam.getSupplementaryAlignmentFlag()) {
+                    if (sam.getReadNegativeStrandFlag()) Assert.assertEquals(sam.getCigarString(), "5S96M", "Incorrect CIGAR string for " + sam.getReadName());
+                    else Assert.assertEquals(sam.getCigarString(), "96M5S", "Incorrect CIGAR string for " + sam.getReadName());
                 }
             }
             // This tests that we DON'T clip when we run off the end if there are equal to or more than
@@ -133,7 +138,7 @@ public class MergeBamAlignmentTest {
         }
 
         // Make sure that we have the appropriate primary and supplementary reads in the new file
-        Assert.assertEquals(clipAdapterFlags.size(), foundClipAdapterFlags.size());
+        Assert.assertEquals(foundClipAdapterFlags.size(), clipAdapterFlags.size());
         Collections.sort(clipAdapterFlags);
         Collections.sort(foundClipAdapterFlags);
         for (int i = 0; i < clipAdapterFlags.size(); i++) {
diff --git a/src/tests/java/net/sf/picard/sam/SamToFastqTest.java b/src/tests/java/net/sf/picard/sam/SamToFastqTest.java
index ea929e8..7f052ed 100644
--- a/src/tests/java/net/sf/picard/sam/SamToFastqTest.java
+++ b/src/tests/java/net/sf/picard/sam/SamToFastqTest.java
@@ -30,6 +30,7 @@ import net.sf.picard.fastq.FastqReader;
 import net.sf.picard.fastq.FastqRecord;
 import net.sf.picard.io.IoUtil;
 import net.sf.samtools.SAMFileReader;
+import net.sf.samtools.SAMFormatException;
 import net.sf.samtools.SAMRecord;
 import net.sf.samtools.util.IOUtil;
 import org.testng.Assert;
@@ -183,7 +184,7 @@ public class SamToFastqTest {
     }
 
 
-    @Test (dataProvider = "badFiles", expectedExceptions= PicardException.class)
+    @Test (dataProvider = "badFiles", expectedExceptions= SAMFormatException.class)
     public void testBadFile(final String samFilename) throws IOException {
         final File samFile = new File(TEST_DATA_DIR,samFilename);
         final File pair1 = File.createTempFile("tt-pair1.", ".fastq");
diff --git a/src/tests/java/net/sf/picard/util/MathUtilTest.java b/src/tests/java/net/sf/picard/util/MathUtilTest.java
new file mode 100644
index 0000000..ea17612
--- /dev/null
+++ b/src/tests/java/net/sf/picard/util/MathUtilTest.java
@@ -0,0 +1,45 @@
+package net.sf.picard.util;
+
+import org.testng.Assert;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import java.util.Arrays;
+
+/**
+ * @author mccowan
+ */
+public class MathUtilTest {
+    @Test
+    public void logMathTest() {
+        Assert.assertEquals(MathUtil.LOG_10_MATH.getLogValue(10), 1d, 0.00001d);
+        Assert.assertEquals(MathUtil.LOG_10_MATH.getNonLogValue(1), 10d, 0.00001d);
+        Assert.assertEquals(MathUtil.LOG_10_MATH.mean(5, 5, 5), 5d, 0.00001d);
+        // http://www.wolframalpha.com/input/?i=log10%2810%5E1.23%2B10%5E4.56%2B10%5E99999%29
+        Assert.assertEquals(MathUtil.LOG_10_MATH.sum(1.23, 4.56, 2), 4.5613970317323586660874152202433434022756298235604568d, 0.00001d);
+        // http://www.wolframalpha.com/input/?i=log10%2810%5E1.23+*+10%5E4.56+*+10%5E2%29
+        Assert.assertEquals(MathUtil.LOG_10_MATH.product(1.23, 4.56, 2), 7.7899999999999999999999999999999999999999999999999999d, 0.00001d);
+    }
+
+    @DataProvider
+    public Object[][] seqMethodTestCases() {
+        return new Object[][] {
+                new Object[] {0d, 5d, 1d,     new double[] {0,1,2,3,4,5}},
+                new Object[] {0d, 0.5d, 0.1d, new double[] {0, 0.1, 0.2, 0.3, 0.4, 0.5}},
+                new Object[] {0d, 0.5d, 0.11d,new double[] {0, 0.11, 0.22, 0.33, 0.44}},
+                new Object[] {50d, 55d, 1.25d,new double[] {50, 51.25, 52.5, 53.75, 55}},
+                new Object[] {10d, 0d, 02d,    new double[] {}},
+                new Object[] {10d, 0d, -2d,    new double[] {10, 8, 6, 4, 2, 0}},
+        };
+    }
+
+    @Test(dataProvider="seqMethodTestCases")
+    public void testSeqGeneration(final double from, final double to, final double by, final double[] expected) {
+        final double[] actual = MathUtil.seq(from, to, by);
+        Assert.assertEquals(actual.length, expected.length);
+
+        for (int i=0; i<expected.length; ++i) {
+            Assert.assertTrue(Math.abs(actual[i] - expected[i]) < 0.0000001);
+        }
+    }
+}
diff --git a/src/tests/java/net/sf/picard/vcf/MergeVcfsTest.java b/src/tests/java/net/sf/picard/vcf/MergeVcfsTest.java
index 8378255..d4590d0 100644
--- a/src/tests/java/net/sf/picard/vcf/MergeVcfsTest.java
+++ b/src/tests/java/net/sf/picard/vcf/MergeVcfsTest.java
@@ -9,6 +9,7 @@ import org.testng.Assert;
 import org.testng.annotations.Test;
 
 import java.io.File;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.LinkedList;
@@ -70,10 +71,11 @@ public class MergeVcfsTest {
 	}
 
 	@Test
-	public void testMergeIndelsSnps() {
+	public void testMergeIndelsSnps() throws IOException {
 		final File indelInputFile = new File(TEST_DATA_PATH + "CEUTrio-indels.vcf");
 		final File snpInputFile = new File(TEST_DATA_PATH + "CEUTrio-snps.vcf");
-		final File output = new File(TEST_DATA_PATH + "merge-indels-snps-test-output-delete-me.vcf");
+		final File output = File.createTempFile("merge-indels-snps-test-output.", ".vcf");
+        output.deleteOnExit();
 
 		final Queue<String> indelContigPositions = loadContigPositions(indelInputFile);
 		final Queue<String> snpContigPositions = loadContigPositions(snpInputFile);
@@ -101,6 +103,7 @@ public class MergeVcfsTest {
 			if (last != null) Assert.assertTrue(outputComparator.compare(last, outputContext) < 0);
 			last = outputContext;
 		}
+        iterator.close();
 
 		// We should have polled everything off the indel (snp) queues
 		Assert.assertEquals(indelContigPositions.size(), 0);
@@ -110,7 +113,7 @@ public class MergeVcfsTest {
 	}
 
 	@Test
-	public void testMergeRandomScatter() {
+	public void testMergeRandomScatter() throws IOException {
 		final File zero = new File(TEST_DATA_PATH, "CEUTrio-random-scatter-0.vcf");
 		final File one = new File(TEST_DATA_PATH, "CEUTrio-random-scatter-1.vcf");
 		final File two = new File(TEST_DATA_PATH, "CEUTrio-random-scatter-2.vcf");
@@ -126,7 +129,7 @@ public class MergeVcfsTest {
 		positionQueues.add(4, loadContigPositions(four));
 		positionQueues.add(5, loadContigPositions(five));
 
-		final File output = new File(TEST_DATA_PATH + "random-scatter-test-output-delete-me.vcf");
+		final File output = File.createTempFile("random-scatter-test-output.", ".vcf");
 		output.deleteOnExit();
 
 		final MergeVcfs mergeVcfs = new MergeVcfs();
@@ -153,6 +156,7 @@ public class MergeVcfsTest {
 			if (last != null) Assert.assertTrue(outputComparator.compare(last, outputContext) < 0);
 			last = outputContext;
 		}
+        iterator.close();
 
 		for (final Queue<String> positionQueue : positionQueues) {
 			Assert.assertEquals(positionQueue.size(), 0);
diff --git a/src/tests/java/net/sf/picard/vcf/SplitVcfsTest.java b/src/tests/java/net/sf/picard/vcf/SplitVcfsTest.java
index ad0092a..18caa9c 100644
--- a/src/tests/java/net/sf/picard/vcf/SplitVcfsTest.java
+++ b/src/tests/java/net/sf/picard/vcf/SplitVcfsTest.java
@@ -1,5 +1,6 @@
 package net.sf.picard.vcf;
 
+import net.sf.picard.io.IoUtil;
 import net.sf.samtools.util.CloseableIterator;
 import org.broadinstitute.variant.variantcontext.VariantContext;
 import org.broadinstitute.variant.variantcontext.VariantContext.Type;
@@ -7,6 +8,7 @@ import org.broadinstitute.variant.variantcontext.writer.VariantContextWriter;
 import org.broadinstitute.variant.variantcontext.writer.VariantContextWriterFactory;
 import org.broadinstitute.variant.vcf.VCFFileReader;
 import org.testng.Assert;
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.Test;
 
 import java.io.File;
@@ -16,13 +18,19 @@ import java.util.Queue;
 
 public class SplitVcfsTest {
 
-	private static final String TEST_DATA_PATH = "testdata/net/sf/picard/vcf/";
+	private static final File OUTPUT_DATA_PATH = IoUtil.createTempDir("SplitVcfsTest", null);
+	private static final File TEST_DATA_PATH = new File("testdata/net/sf/picard/vcf/");
+
+	@AfterClass
+	public void teardown() {
+		IoUtil.deleteDirectoryTree(OUTPUT_DATA_PATH);
+	}
 
 	@Test
 	public void testSplit() {
-		final File indelOutputFile = new File(TEST_DATA_PATH + "split-vcfs-test-indels-delete-me.vcf");
-		final File snpOutputFile = new File(TEST_DATA_PATH + "split-vcfs-test-snps-delete-me.vcf");
-		final File input = new File(TEST_DATA_PATH + "CEUTrio-merged-indels-snps.vcf");
+		final File indelOutputFile = new File(OUTPUT_DATA_PATH, "split-vcfs-test-indels-delete-me.vcf");
+		final File snpOutputFile = new File(OUTPUT_DATA_PATH, "split-vcfs-test-snps-delete-me.vcf");
+		final File input = new File(TEST_DATA_PATH, "CEUTrio-merged-indels-snps.vcf");
 
 		indelOutputFile.deleteOnExit();
 		snpOutputFile.deleteOnExit();
diff --git a/src/tests/java/net/sf/samtools/BAMFileIndexTest.java b/src/tests/java/net/sf/samtools/BAMFileIndexTest.java
index a02fa20..bce9cb8 100755
--- a/src/tests/java/net/sf/samtools/BAMFileIndexTest.java
+++ b/src/tests/java/net/sf/samtools/BAMFileIndexTest.java
@@ -27,13 +27,12 @@ import net.sf.samtools.util.CloseableIterator;
 import net.sf.samtools.util.StopWatch;
 import org.testng.Assert;
 import static org.testng.Assert.*;
+
+import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
 import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
+import java.util.*;
 
 /**
  * Test BAM file indexing.
@@ -70,7 +69,7 @@ public class BAMFileIndexTest
         assertEquals(runQueryTest(BAM_FILE, "chrM", 10400, 10600, false), 2);
     }
 
-    @Test(enabled = false)
+    @Test(groups = {"slow"})
     public void testRandomQueries()
         throws Exception {
         runRandomTest(BAM_FILE, 1000, new Random());
@@ -112,9 +111,7 @@ public class BAMFileIndexTest
         final StopWatch linearScan = new StopWatch();
         final StopWatch queryUnmapped = new StopWatch();
         int unmappedCountFromLinearScan = 0;
-        final File bamFile =
-                BAM_FILE;
-                //new File("/Users/alecw/tmp/30ED6AAXX.1.aligned.duplicates_marked.bam");
+        final File bamFile = BAM_FILE;
         final SAMFileReader reader = new SAMFileReader(bamFile);
         linearScan.start();
         CloseableIterator<SAMRecord> it = reader.iterator();
@@ -194,10 +191,10 @@ public class BAMFileIndexTest
         Assert.assertEquals(originalRec, rec);
 
         // Both ends mapped
-        CloseableIterator<SAMRecord> it = reader.queryUnmapped();
+        final CloseableIterator<SAMRecord> it = reader.queryUnmapped();
         rec = null;
         while (it.hasNext()) {
-            SAMRecord next = it.next();
+            final SAMRecord next = it.next();
             if (next.getReadName().equals("2615")) {
                 rec = next;
                 break;
@@ -219,10 +216,56 @@ public class BAMFileIndexTest
         Assert.assertFalse(mate.getFirstOfPairFlag() == rec.getFirstOfPairFlag());
     }
 
+    /**
+     * Compare the results of a multi-interval query versus the union of the results from each interval done
+     * separately.
+     */
+    @Test(dataProvider = "testMultiIntervalQueryDataProvider")
+    public void testMultiIntervalQuery(final boolean contained) {
+        final List<String> referenceNames = getReferenceNames(BAM_FILE);
+
+        final SAMFileReader.QueryInterval[] intervals = generateRandomIntervals(referenceNames.size(), 1000, new Random());
+        final Set<SAMRecord> multiIntervalRecords = new HashSet<SAMRecord>();
+        final Set<SAMRecord> singleIntervalRecords = new HashSet<SAMRecord>();
+        final SAMFileReader reader = new SAMFileReader(BAM_FILE);
+        for (final SAMFileReader.QueryInterval interval : intervals) {
+            consumeAll(singleIntervalRecords, reader.query(referenceNames.get(interval.referenceIndex), interval.start, interval.end, contained));
+        }
+
+        final SAMFileReader.QueryInterval[] optimizedIntervals = SAMFileReader.QueryInterval.optimizeIntervals(intervals);
+        consumeAll(multiIntervalRecords, reader.query(optimizedIntervals, contained));
+        final Iterator<SAMRecord> singleIntervalRecordIterator = singleIntervalRecords.iterator();
+        boolean failed = false;
+        while (singleIntervalRecordIterator.hasNext()) {
+            final SAMRecord record = singleIntervalRecordIterator.next();
+            if (!multiIntervalRecords.remove(record)) {
+                System.out.println("SingleIntervalQuery found " + record + " but MultiIntervalQuery did not");
+                failed = true;
+            }
+        }
+        for (final SAMRecord record : multiIntervalRecords) {
+            System.out.println("MultiIntervalQuery found " + record + " but SingleIntervalQuery did not");
+            failed = true;
+        }
+        Assert.assertFalse(failed);
+    }
+
+    @DataProvider(name = "testMultiIntervalQueryDataProvider")
+    private Object[][] testMultiIntervalQueryDataProvider() {
+        return new Object[][]{{true}, {false}};
+    }
+
+    private <E> void consumeAll(final Collection<E> collection, final CloseableIterator<E> iterator) {
+        while (iterator.hasNext()) {
+            collection.add(iterator.next());
+        }
+        iterator.close();
+    }
+
     private SAMRecord getSingleRecordStartingAt(final SAMFileReader reader, final String sequence, final int alignmentStart) {
-        CloseableIterator<SAMRecord> it = reader.queryAlignmentStart(sequence, alignmentStart);
+        final CloseableIterator<SAMRecord> it = reader.queryAlignmentStart(sequence, alignmentStart);
         Assert.assertTrue(it.hasNext());
-        SAMRecord rec = it.next();
+        final SAMRecord rec = it.next();
         Assert.assertNotNull(rec);
         Assert.assertFalse(it.hasNext());
         it.close();
@@ -244,19 +287,17 @@ public class BAMFileIndexTest
     }
 
     private void runRandomTest(final File bamFile, final int count, final Random generator) {
-        final int maxCoordinate = 10000000;
         final List<String> referenceNames = getReferenceNames(bamFile);
-        for (int i = 0; i < count; i++) {
-            final String refName = referenceNames.get(generator.nextInt(referenceNames.size()));
-            final int coord1 = generator.nextInt(maxCoordinate+1);
-            final int coord2 = generator.nextInt(maxCoordinate+1);
-            final int startPos = Math.min(coord1, coord2);
-            final int endPos = Math.max(coord1, coord2);
+        final SAMFileReader.QueryInterval[] intervals = generateRandomIntervals(referenceNames.size(), count, generator);
+        for (final SAMFileReader.QueryInterval interval : intervals) {
+            final String refName = referenceNames.get(interval.referenceIndex);
+            final int startPos = interval.start;
+            final int endPos = interval.end;
             System.out.println("Testing query " + refName + ":" + startPos + "-" + endPos + " ...");
             try {
                 runQueryTest(bamFile, refName, startPos, endPos, true);
                 runQueryTest(bamFile, refName, startPos, endPos, false);
-            } catch (Throwable exc) {
+            } catch (final Throwable exc) {
                 String message = "Query test failed: " + refName + ":" + startPos + "-" + endPos;
                 message += ": " + exc.getMessage();
                 throw new RuntimeException(message, exc);
@@ -264,6 +305,21 @@ public class BAMFileIndexTest
         }
     }
 
+    private SAMFileReader.QueryInterval[] generateRandomIntervals(final int numReferences, final int count, final Random generator) {
+        final SAMFileReader.QueryInterval[] intervals = new SAMFileReader.QueryInterval[count];
+        final int maxCoordinate = 10000000;
+        for (int i = 0; i < count; i++) {
+            final int referenceIndex = generator.nextInt(numReferences);
+            final int coord1 = generator.nextInt(maxCoordinate+1);
+            final int coord2 = generator.nextInt(maxCoordinate+1);
+            final int startPos = Math.min(coord1, coord2);
+            final int endPos = Math.max(coord1, coord2);
+            intervals[i] = new SAMFileReader.QueryInterval(referenceIndex, startPos, endPos);
+        }
+
+        return intervals;
+    }
+
     private List<String> getReferenceNames(final File bamFile) {
         final SAMFileReader reader = new SAMFileReader(bamFile);
         final List<String> result = new ArrayList<String>();
diff --git a/src/tests/java/org/broadinstitute/variant/variantcontext/VariantJEXLContextUnitTest.java b/src/tests/java/org/broadinstitute/variant/variantcontext/VariantJEXLContextUnitTest.java
index 8d25697..e92df8a 100644
--- a/src/tests/java/org/broadinstitute/variant/variantcontext/VariantJEXLContextUnitTest.java
+++ b/src/tests/java/org/broadinstitute/variant/variantcontext/VariantJEXLContextUnitTest.java
@@ -59,7 +59,7 @@ public class VariantJEXLContextUnitTest extends VariantBaseTest {
     @BeforeClass
     public void beforeClass() {
         try {
-            exp = new VariantContextUtils.JexlVCMatchExp("name", VariantContextUtils.engine.createExpression(expression));
+            exp = new VariantContextUtils.JexlVCMatchExp("name", VariantContextUtils.engine.get().createExpression(expression));
         } catch (Exception e) {
             Assert.fail("Unable to create expression" + e.getMessage());
         }
diff --git a/src/tests/java/org/broadinstitute/variant/variantcontext/writer/VCFWriterUnitTest.java b/src/tests/java/org/broadinstitute/variant/variantcontext/writer/VCFWriterUnitTest.java
index 5b963dd..7a1117d 100644
--- a/src/tests/java/org/broadinstitute/variant/variantcontext/writer/VCFWriterUnitTest.java
+++ b/src/tests/java/org/broadinstitute/variant/variantcontext/writer/VCFWriterUnitTest.java
@@ -31,17 +31,30 @@ import org.broad.tribble.AbstractFeatureReader;
 import org.broad.tribble.FeatureReader;
 import org.broad.tribble.Tribble;
 import org.broadinstitute.variant.VariantBaseTest;
+import org.broadinstitute.variant.variantcontext.Allele;
+import org.broadinstitute.variant.variantcontext.Genotype;
+import org.broadinstitute.variant.variantcontext.GenotypeBuilder;
+import org.broadinstitute.variant.variantcontext.GenotypesContext;
+import org.broadinstitute.variant.variantcontext.VariantContext;
+import org.broadinstitute.variant.variantcontext.VariantContextBuilder;
 import org.broadinstitute.variant.vcf.VCFCodec;
 import org.broadinstitute.variant.vcf.VCFHeader;
 import org.broadinstitute.variant.vcf.VCFHeaderLine;
 import org.broadinstitute.variant.vcf.VCFHeaderVersion;
-import org.broadinstitute.variant.variantcontext.*;
 import org.testng.Assert;
-import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
-import java.io.*;
-import java.util.*;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 
 /**
@@ -52,13 +65,16 @@ import java.util.*;
  *         This class tests out the ability of the VCF writer to correctly write VCF files
  */
 public class VCFWriterUnitTest extends VariantBaseTest {
-    private Set<VCFHeaderLine> metaData = new HashSet<VCFHeaderLine>();
-    private Set<String> additionalColumns = new HashSet<String>();
-    private File fakeVCFFile = new File("FAKEVCFFILEFORTESTING.vcf");
+    private Set<VCFHeaderLine> metaData;
+    private Set<String> additionalColumns;
 
     /** test, using the writer and reader, that we can output and input a VCF file without problems */
     @Test
-    public void testBasicWriteAndRead() {
+    public void testBasicWriteAndRead() throws IOException {
+        File fakeVCFFile = File.createTempFile("testBasicWriteAndRead.", ".vcf");
+        fakeVCFFile.deleteOnExit();
+        metaData = new HashSet<VCFHeaderLine>();
+        additionalColumns = new HashSet<String>();
         VCFHeader header = createFakeHeader(metaData,additionalColumns);
         final EnumSet<Options> options = EnumSet.of(Options.ALLOW_MISSING_FIELDS_IN_HEADER);
         VariantContextWriter writer = VariantContextWriterFactory.create(fakeVCFFile, createArtificialSequenceDictionary(), options);
@@ -155,42 +171,10 @@ public class VCFWriterUnitTest extends VariantBaseTest {
         Assert.assertEquals(index, additionalColumns.size());
     }
 
-    @DataProvider(name = "VCFWriterDoubleFormatTestData")
-    public Object[][] makeVCFWriterDoubleFormatTestData() {
-        List<Object[]> tests = new ArrayList<Object[]>();
-        tests.add(new Object[]{1.0, "1.00"});
-        tests.add(new Object[]{10.1, "10.10"});
-        tests.add(new Object[]{10.01, "10.01"});
-        tests.add(new Object[]{10.012, "10.01"});
-        tests.add(new Object[]{10.015, "10.02"});
-        tests.add(new Object[]{0.0, "0.00"});
-        tests.add(new Object[]{0.5, "0.500"});
-        tests.add(new Object[]{0.55, "0.550"});
-        tests.add(new Object[]{0.555, "0.555"});
-        tests.add(new Object[]{0.5555, "0.556"});
-        tests.add(new Object[]{0.1, "0.100"});
-        tests.add(new Object[]{0.050, "0.050"});
-        tests.add(new Object[]{0.010, "0.010"});
-        tests.add(new Object[]{0.012, "0.012"});
-        tests.add(new Object[]{0.0012, "1.200e-03"});
-        tests.add(new Object[]{1.2e-4, "1.200e-04"});
-        tests.add(new Object[]{1.21e-4, "1.210e-04"});
-        tests.add(new Object[]{1.212e-5, "1.212e-05"});
-        tests.add(new Object[]{1.2123e-6, "1.212e-06"});
-        tests.add(new Object[]{Double.POSITIVE_INFINITY, "Infinity"});
-        tests.add(new Object[]{Double.NEGATIVE_INFINITY, "-Infinity"});
-        tests.add(new Object[]{Double.NaN, "NaN"});
-        return tests.toArray(new Object[][]{});
-    }
-
-    @Test(dataProvider = "VCFWriterDoubleFormatTestData")
-    public void testVCFWriterDoubleFormatTestData(final double d, final String expected) {
-        Assert.assertEquals(VCFWriter.formatVCFDouble(d), expected, "Failed to pretty print double in VCFWriter");
-    }
-
     @Test(enabled=true)
     public void TestWritingLargeVCF() throws FileNotFoundException, InterruptedException {
 
+        Set<VCFHeaderLine> metaData = new HashSet<VCFHeaderLine>();
         final Set<String> Columns = new HashSet<String>();
         for (int i = 0; i < 123; i++) {
 
@@ -222,6 +206,5 @@ public class VCFWriterUnitTest extends VariantBaseTest {
             Assert.assertTrue(vcf.lastModified() <= vcfIndex.lastModified());
         }
     }
-
 }
 
diff --git a/src/tests/java/org/broadinstitute/variant/vcf/VCFEncoderTest.java b/src/tests/java/org/broadinstitute/variant/vcf/VCFEncoderTest.java
new file mode 100644
index 0000000..d9fa13e
--- /dev/null
+++ b/src/tests/java/org/broadinstitute/variant/vcf/VCFEncoderTest.java
@@ -0,0 +1,45 @@
+package org.broadinstitute.variant.vcf;
+
+import org.testng.Assert;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class VCFEncoderTest {
+
+	@DataProvider(name = "VCFWriterDoubleFormatTestData")
+	public Object[][] makeVCFWriterDoubleFormatTestData() {
+		List<Object[]> tests = new ArrayList<Object[]>();
+		tests.add(new Object[]{1.0, "1.00"});
+		tests.add(new Object[]{10.1, "10.10"});
+		tests.add(new Object[]{10.01, "10.01"});
+		tests.add(new Object[]{10.012, "10.01"});
+		tests.add(new Object[]{10.015, "10.02"});
+		tests.add(new Object[]{0.0, "0.00"});
+		tests.add(new Object[]{0.5, "0.500"});
+		tests.add(new Object[]{0.55, "0.550"});
+		tests.add(new Object[]{0.555, "0.555"});
+		tests.add(new Object[]{0.5555, "0.556"});
+		tests.add(new Object[]{0.1, "0.100"});
+		tests.add(new Object[]{0.050, "0.050"});
+		tests.add(new Object[]{0.010, "0.010"});
+		tests.add(new Object[]{0.012, "0.012"});
+		tests.add(new Object[]{0.0012, "1.200e-03"});
+		tests.add(new Object[]{1.2e-4, "1.200e-04"});
+		tests.add(new Object[]{1.21e-4, "1.210e-04"});
+		tests.add(new Object[]{1.212e-5, "1.212e-05"});
+		tests.add(new Object[]{1.2123e-6, "1.212e-06"});
+		tests.add(new Object[]{Double.POSITIVE_INFINITY, "Infinity"});
+		tests.add(new Object[]{Double.NEGATIVE_INFINITY, "-Infinity"});
+		tests.add(new Object[]{Double.NaN, "NaN"});
+		return tests.toArray(new Object[][]{});
+	}
+
+	@Test(dataProvider = "VCFWriterDoubleFormatTestData")
+	public void testVCFWriterDoubleFormatTestData(final double d, final String expected) {
+		Assert.assertEquals(VCFEncoder.formatVCFDouble(d), expected, "Failed to pretty print double in VCFWriter");
+	}
+
+}
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGAC.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGAC.1.fastq
index b90b0bd..7c7dde1 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGAC.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGAC.1.fastq
@@ -1,52 +1,52 @@
- at HiMom:7:1:2:358
+ at machine1:HiMom:abcdeACXX:7:1:2:358 :N:0:AACTTGAC
 NTCTGTTGTTATTTCCCTGTTACTTTTGGT
 +
 ##############################
- at HiMom:7:1:3:1222
+ at machine1:HiMom:abcdeACXX:7:1:3:1222 :Y:0:AACTTGAC
 TGGCATCCAGCTTTGTACTCATGAAAATTG
 +
 A?=@CBA@=7A@>@9 at BBA?>B=;<=@?B@
- at HiMom:7:1:3:1450
+ at machine1:HiMom:abcdeACXX:7:1:3:1450 :N:0:AACTTGAC
 NGATTCGATTAGAATCATCGAATGGACTCG
 +
 ##############################
- at HiMom:7:1:3:162
+ at machine1:HiMom:abcdeACXX:7:1:3:162 :Y:0:AACTTGAC
 AATGAAGGCCACAGAGTGGTCCAAATAGCC
 +
 ?@@5@@@>>A<0?;=0839:2<AAABA=##
- at HiMom:7:1:3:1677
+ at machine1:HiMom:abcdeACXX:7:1:3:1677 :Y:0:AACTTGAC
 AGTGCAGTGGCGTGATCTTGGCTCACTGCA
 +
 A?7BBB@?9969A7B7;@;1>9:'=7;7 at B
- at HiMom:7:1:3:1760
+ at machine1:HiMom:abcdeACXX:7:1:3:1760 :Y:0:AACTTGAC
 ACAAGAGACCCTAACATTAGGTAGGAATAT
 +
 A:@@5A<B<48 at B@=>?A?:;:?5>AB?@@
- at HiMom:7:1:3:985
+ at machine1:HiMom:abcdeACXX:7:1:3:985 :Y:0:AACTTGAC
 AGGTTTAATTGGTTCCAGGAGGTCACACTG
 +
 ?898 at BBB?@6<;@>;B::>:-79BA at A@:
- at HiMom:7:2:2:1365
+ at machine1:HiMom:abcdeACXX:7:2:2:1365 :N:0:AACTTGAC
 NATAAAGATTATCCGTGAATGGCGCCTCCA
 +
 ##############################
- at HiMom:7:2:3:1209
+ at machine1:HiMom:abcdeACXX:7:2:3:1209 :Y:0:AACTTGAC
 NTTGAGGATGTTACTACATTATTATACAAA
 +
 %/3370/010.55#################
- at HiMom:7:2:3:1326
+ at machine1:HiMom:abcdeACXX:7:2:3:1326 :N:0:AACTTGAC
 AGGAGGGAATGATGAACCAGTAGGTTAAGG
 +
 B>=<28+<B5%9:/;A78>+/=A#######
- at HiMom:7:2:3:1807
+ at machine1:HiMom:abcdeACXX:7:2:3:1807 :N:0:AACTTGAC
 NGCATACTTCTTTCTTTCTTATTTTTCTTT
 +
 ##############################
- at HiMom:7:2:3:1941
+ at machine1:HiMom:abcdeACXX:7:2:3:1941 :Y:0:AACTTGAC
 TGTACTCGTGTAGCCTTTCACAGGCACAGC
 +
 B<.ACBBB2;9C>@5ABBBCBCBABCCC5B
- at HiMom:7:2:3:2038
+ at machine1:HiMom:abcdeACXX:7:2:3:2038 :N:0:AACTTGAC
 NANAGATAGATAGATAGATAGATAGATAGA
 +
 ##############################
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGAC.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGAC.barcode_1.fastq
index 6db8795..d1921ed 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGAC.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGAC.barcode_1.fastq
@@ -1,52 +1,52 @@
- at HiMom:7:1:2:358
+ at machine1:HiMom:abcdeACXX:7:1:2:358 :N:0:AACTTGAC
 AACTTGAC
 +
 A?;65173
- at HiMom:7:1:3:1222
+ at machine1:HiMom:abcdeACXX:7:1:3:1222 :Y:0:AACTTGAC
 AACTTGAC
 +
 @CC=@@>B
- at HiMom:7:1:3:1450
+ at machine1:HiMom:abcdeACXX:7:1:3:1450 :N:0:AACTTGAC
 AACTTGAC
 +
 BC1'<7A#
- at HiMom:7:1:3:162
+ at machine1:HiMom:abcdeACXX:7:1:3:162 :Y:0:AACTTGAC
 AACTTGAC
 +
 BBBC at 5>?
- at HiMom:7:1:3:1677
+ at machine1:HiMom:abcdeACXX:7:1:3:1677 :Y:0:AACTTGAC
 AACTTGAC
 +
 BCA>=4=B
- at HiMom:7:1:3:1760
+ at machine1:HiMom:abcdeACXX:7:1:3:1760 :Y:0:AACTTGAC
 AACTTGAC
 +
 BABBABAA
- at HiMom:7:1:3:985
+ at machine1:HiMom:abcdeACXX:7:1:3:985 :Y:0:AACTTGAC
 AACTTGAC
 +
 BBBB@>@B
- at HiMom:7:2:2:1365
+ at machine1:HiMom:abcdeACXX:7:2:2:1365 :N:0:AACTTGAC
 AACTTGAC
 +
 BCAB>>AB
- at HiMom:7:2:3:1209
+ at machine1:HiMom:abcdeACXX:7:2:3:1209 :Y:0:AACTTGAC
 AACTTGAC
 +
 3?@?92;B
- at HiMom:7:2:3:1326
+ at machine1:HiMom:abcdeACXX:7:2:3:1326 :N:0:AACTTGAC
 AACTTGAC
 +
 BCBBB3BB
- at HiMom:7:2:3:1807
+ at machine1:HiMom:abcdeACXX:7:2:3:1807 :N:0:AACTTGAC
 AACTTGAC
 +
 B?4=B@><
- at HiMom:7:2:3:1941
+ at machine1:HiMom:abcdeACXX:7:2:3:1941 :Y:0:AACTTGAC
 AACTTGAC
 +
 BCBBBBBB
- at HiMom:7:2:3:2038
+ at machine1:HiMom:abcdeACXX:7:2:3:2038 :N:0:AACTTGAC
 AACTTGAC
 +
 BA@;(1>B
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGACTTGAGCCT.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGACTTGAGCCT.1.fastq
index 5889e62..c2dcba1 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGACTTGAGCCT.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGACTTGAGCCT.1.fastq
@@ -1,52 +1,52 @@
- at HiMom:9:1:2:358
+ at machine1:HiMom:abcdeACXX:9:1:2:358 :N:0:AACTTGACTTGAGCCT
 NTCTGTTGTTATTTCCCTGTTACTTTTGGT
 +
 ##############################
- at HiMom:9:1:3:1222
+ at machine1:HiMom:abcdeACXX:9:1:3:1222 :Y:0:AACTTGACTTGAGCCT
 TGGCATCCAGCTTTGTACTCATGAAAATTG
 +
 A?=@CBA@=7A@>@9 at BBA?>B=;<=@?B@
- at HiMom:9:1:3:1450
+ at machine1:HiMom:abcdeACXX:9:1:3:1450 :N:0:AACTTGACTTGAGCCT
 NGATTCGATTAGAATCATCGAATGGACTCG
 +
 ##############################
- at HiMom:9:1:3:162
+ at machine1:HiMom:abcdeACXX:9:1:3:162 :Y:0:AACTTGACTTGAGCCT
 AATGAAGGCCACAGAGTGGTCCAAATAGCC
 +
 ?@@5@@@>>A<0?;=0839:2<AAABA=##
- at HiMom:9:1:3:1677
+ at machine1:HiMom:abcdeACXX:9:1:3:1677 :Y:0:AACTTGACTTGAGCCT
 AGTGCAGTGGCGTGATCTTGGCTCACTGCA
 +
 A?7BBB@?9969A7B7;@;1>9:'=7;7 at B
- at HiMom:9:1:3:1760
+ at machine1:HiMom:abcdeACXX:9:1:3:1760 :Y:0:AACTTGACTTGAGCCT
 ACAAGAGACCCTAACATTAGGTAGGAATAT
 +
 A:@@5A<B<48 at B@=>?A?:;:?5>AB?@@
- at HiMom:9:1:3:985
+ at machine1:HiMom:abcdeACXX:9:1:3:985 :Y:0:AACTTGACTTGAGCCT
 AGGTTTAATTGGTTCCAGGAGGTCACACTG
 +
 ?898 at BBB?@6<;@>;B::>:-79BA at A@:
- at HiMom:9:2:2:1365
+ at machine1:HiMom:abcdeACXX:9:2:2:1365 :N:0:AACTTGACTTGAGCCT
 NATAAAGATTATCCGTGAATGGCGCCTCCA
 +
 ##############################
- at HiMom:9:2:3:1209
+ at machine1:HiMom:abcdeACXX:9:2:3:1209 :Y:0:AACTTGACTTGAGCCT
 NTTGAGGATGTTACTACATTATTATACAAA
 +
 %/3370/010.55#################
- at HiMom:9:2:3:1326
+ at machine1:HiMom:abcdeACXX:9:2:3:1326 :N:0:AACTTGACTTGAGCCT
 AGGAGGGAATGATGAACCAGTAGGTTAAGG
 +
 B>=<28+<B5%9:/;A78>+/=A#######
- at HiMom:9:2:3:1807
+ at machine1:HiMom:abcdeACXX:9:2:3:1807 :N:0:AACTTGACTTGAGCCT
 NGCATACTTCTTTCTTTCTTATTTTTCTTT
 +
 ##############################
- at HiMom:9:2:3:1941
+ at machine1:HiMom:abcdeACXX:9:2:3:1941 :Y:0:AACTTGACTTGAGCCT
 TGTACTCGTGTAGCCTTTCACAGGCACAGC
 +
 B<.ACBBB2;9C>@5ABBBCBCBABCCC5B
- at HiMom:9:2:3:2038
+ at machine1:HiMom:abcdeACXX:9:2:3:2038 :N:0:AACTTGACTTGAGCCT
 NANAGATAGATAGATAGATAGATAGATAGA
 +
 ##############################
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGACTTGAGCCT.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGACTTGAGCCT.barcode_1.fastq
index 2ba42e1..34ef16f 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGACTTGAGCCT.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGACTTGAGCCT.barcode_1.fastq
@@ -1,52 +1,52 @@
- at HiMom:9:1:2:358
+ at machine1:HiMom:abcdeACXX:9:1:2:358 :N:0:AACTTGACTTGAGCCT
 AACTTGAC
 +
 A?;65173
- at HiMom:9:1:3:1222
+ at machine1:HiMom:abcdeACXX:9:1:3:1222 :Y:0:AACTTGACTTGAGCCT
 AACTTGAC
 +
 @CC=@@>B
- at HiMom:9:1:3:1450
+ at machine1:HiMom:abcdeACXX:9:1:3:1450 :N:0:AACTTGACTTGAGCCT
 AACTTGAC
 +
 BC1'<7A#
- at HiMom:9:1:3:162
+ at machine1:HiMom:abcdeACXX:9:1:3:162 :Y:0:AACTTGACTTGAGCCT
 AACTTGAC
 +
 BBBC at 5>?
- at HiMom:9:1:3:1677
+ at machine1:HiMom:abcdeACXX:9:1:3:1677 :Y:0:AACTTGACTTGAGCCT
 AACTTGAC
 +
 BCA>=4=B
- at HiMom:9:1:3:1760
+ at machine1:HiMom:abcdeACXX:9:1:3:1760 :Y:0:AACTTGACTTGAGCCT
 AACTTGAC
 +
 BABBABAA
- at HiMom:9:1:3:985
+ at machine1:HiMom:abcdeACXX:9:1:3:985 :Y:0:AACTTGACTTGAGCCT
 AACTTGAC
 +
 BBBB@>@B
- at HiMom:9:2:2:1365
+ at machine1:HiMom:abcdeACXX:9:2:2:1365 :N:0:AACTTGACTTGAGCCT
 AACTTGAC
 +
 BCAB>>AB
- at HiMom:9:2:3:1209
+ at machine1:HiMom:abcdeACXX:9:2:3:1209 :Y:0:AACTTGACTTGAGCCT
 AACTTGAC
 +
 3?@?92;B
- at HiMom:9:2:3:1326
+ at machine1:HiMom:abcdeACXX:9:2:3:1326 :N:0:AACTTGACTTGAGCCT
 AACTTGAC
 +
 BCBBB3BB
- at HiMom:9:2:3:1807
+ at machine1:HiMom:abcdeACXX:9:2:3:1807 :N:0:AACTTGACTTGAGCCT
 AACTTGAC
 +
 B?4=B@><
- at HiMom:9:2:3:1941
+ at machine1:HiMom:abcdeACXX:9:2:3:1941 :Y:0:AACTTGACTTGAGCCT
 AACTTGAC
 +
 BCBBBBBB
- at HiMom:9:2:3:2038
+ at machine1:HiMom:abcdeACXX:9:2:3:2038 :N:0:AACTTGACTTGAGCCT
 AACTTGAC
 +
 BA@;(1>B
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGACTTGAGCCT.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGACTTGAGCCT.barcode_2.fastq
index 42df6cb..068fcfd 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGACTTGAGCCT.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AACTTGACTTGAGCCT.barcode_2.fastq
@@ -1,52 +1,52 @@
- at HiMom:9:1:2:358
+ at machine1:HiMom:abcdeACXX:9:1:2:358 :N:0:AACTTGACTTGAGCCT
 TTGAGCCT
 +
 A?;65173
- at HiMom:9:1:3:1222
+ at machine1:HiMom:abcdeACXX:9:1:3:1222 :Y:0:AACTTGACTTGAGCCT
 TTGAGCCT
 +
 @CC=@@>B
- at HiMom:9:1:3:1450
+ at machine1:HiMom:abcdeACXX:9:1:3:1450 :N:0:AACTTGACTTGAGCCT
 TTGAGCCT
 +
 BC1'<7A#
- at HiMom:9:1:3:162
+ at machine1:HiMom:abcdeACXX:9:1:3:162 :Y:0:AACTTGACTTGAGCCT
 TTGAGCCT
 +
 BBBC at 5>?
- at HiMom:9:1:3:1677
+ at machine1:HiMom:abcdeACXX:9:1:3:1677 :Y:0:AACTTGACTTGAGCCT
 TTGAGCCT
 +
 BCA>=4=B
- at HiMom:9:1:3:1760
+ at machine1:HiMom:abcdeACXX:9:1:3:1760 :Y:0:AACTTGACTTGAGCCT
 TTGAGCCT
 +
 BABBABAA
- at HiMom:9:1:3:985
+ at machine1:HiMom:abcdeACXX:9:1:3:985 :Y:0:AACTTGACTTGAGCCT
 TTGAGCCT
 +
 BBBB@>@B
- at HiMom:9:2:2:1365
+ at machine1:HiMom:abcdeACXX:9:2:2:1365 :N:0:AACTTGACTTGAGCCT
 TTGAGCCT
 +
 BCAB>>AB
- at HiMom:9:2:3:1209
+ at machine1:HiMom:abcdeACXX:9:2:3:1209 :Y:0:AACTTGACTTGAGCCT
 TTGAGCCT
 +
 3?@?92;B
- at HiMom:9:2:3:1326
+ at machine1:HiMom:abcdeACXX:9:2:3:1326 :N:0:AACTTGACTTGAGCCT
 TTGAGCCT
 +
 BCBBB3BB
- at HiMom:9:2:3:1807
+ at machine1:HiMom:abcdeACXX:9:2:3:1807 :N:0:AACTTGACTTGAGCCT
 TTGAGCCT
 +
 B?4=B@><
- at HiMom:9:2:3:1941
+ at machine1:HiMom:abcdeACXX:9:2:3:1941 :Y:0:AACTTGACTTGAGCCT
 TTGAGCCT
 +
 BCBBBBBB
- at HiMom:9:2:3:2038
+ at machine1:HiMom:abcdeACXX:9:2:3:2038 :N:0:AACTTGACTTGAGCCT
 TTGAGCCT
 +
 BA@;(1>B
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGT.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGT.1.fastq
index a19858d..c0696c6 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGT.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGT.1.fastq
@@ -1,52 +1,52 @@
- at HiMom:7:1:2:1417
+ at machine1:HiMom:abcdeACXX:7:1:2:1417 :Y:0:AAGGATGT
 NATTCCATTCGATGATTCCATTCGAGTCCA
 +
 %-::567;93-510788014:8538122##
- at HiMom:7:1:2:1889
+ at machine1:HiMom:abcdeACXX:7:1:2:1889 :Y:0:AAGGATGT
 NGAAATGTATCAAGGTTTGTATAATTGCTG
 +
 %-7<<:::<2:::8:4<<:07547765978
- at HiMom:7:1:3:1764
+ at machine1:HiMom:abcdeACXX:7:1:3:1764 :N:0:AAGGATGT
 NTCTATGGGGTGTGTATCTGTTTCTGGACT
 +
 %09::845(4586/6666884;8851.314
- at HiMom:7:1:3:2027
+ at machine1:HiMom:abcdeACXX:7:1:3:2027 :Y:0:AAGGATGT
 AATGTATTATGTTTCATAAGAAAACAAAAG
 +
 BA7/- at 8=@4,*1=>?:A@:>B at BBCB@8#
- at HiMom:7:1:3:273
+ at machine1:HiMom:abcdeACXX:7:1:3:273 :N:0:AAGGATGT
 NAATTGACATAAATCAATATTGTTAAAATG
 +
 ##############################
- at HiMom:7:1:3:608
+ at machine1:HiMom:abcdeACXX:7:1:3:608 :Y:0:AAGGATGT
 NTGTGCTTCAATGATGCTATCAGGTGTGTT
 +
 %.9675:747:766553::9:7119::8::
- at HiMom:7:2:2:1842
+ at machine1:HiMom:abcdeACXX:7:2:2:1842 :N:0:AAGGATGT
 NGGTGGATCCCCTGAGGTCAGGAGTTCAAG
 +
 ##############################
- at HiMom:7:2:2:1944
+ at machine1:HiMom:abcdeACXX:7:2:2:1944 :Y:0:AAGGATGT
 NATTAAATATATATTTTATTCTGAACATAA
 +
 %09::<<<<<;:<<<:99<<9<<;<;<:<<
- at HiMom:7:2:2:1985
+ at machine1:HiMom:abcdeACXX:7:2:2:1985 :N:0:AAGGATGT
 NGACTATCACTCTAGGGCCTCCACCCTTGC
 +
 %%2266466667186(66############
- at HiMom:7:2:3:1952
+ at machine1:HiMom:abcdeACXX:7:2:3:1952 :Y:0:AAGGATGT
 NATAGATGATAAAAACATTTGACAGTGAAA
 +
 %.8737868:::<;<;9;9979::9858;;
- at HiMom:7:2:3:470
+ at machine1:HiMom:abcdeACXX:7:2:3:470 :Y:0:AAGGATGT
 TGTGGATTCCATTCGAATTCATTCGATTAT
 +
 BBCBBACC at CCCC>)@CBA>@CB?BCCCCC
- at HiMom:7:2:3:490
+ at machine1:HiMom:abcdeACXX:7:2:3:490 :N:0:AAGGATGT
 NCTAATTGATGGGTAAGAGGCAAAGCATGA
 +
 ##############################
- at HiMom:7:2:3:589
+ at machine1:HiMom:abcdeACXX:7:2:3:589 :Y:0:AAGGATGT
 TGAATGCAGGTGCCAGGGAGACGTGACTTC
 +
 =8ACBB??>@=?<ACB9<;?A>??;A<>?3
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGT.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGT.barcode_1.fastq
index 878aacb..f4f317f 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGT.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGT.barcode_1.fastq
@@ -1,52 +1,52 @@
- at HiMom:7:1:2:1417
+ at machine1:HiMom:abcdeACXX:7:1:2:1417 :Y:0:AAGGATGT
 AAGGATGT
 +
 B?5??BC?
- at HiMom:7:1:2:1889
+ at machine1:HiMom:abcdeACXX:7:1:2:1889 :Y:0:AAGGATGT
 NAGGATGT
 +
 %.46:;;9
- at HiMom:7:1:3:1764
+ at machine1:HiMom:abcdeACXX:7:1:3:1764 :N:0:AAGGATGT
 AAGGATGT
 +
 BB?BB@:A
- at HiMom:7:1:3:2027
+ at machine1:HiMom:abcdeACXX:7:1:3:2027 :Y:0:AAGGATGT
 AAGGATGT
 +
 B>7-<::#
- at HiMom:7:1:3:273
+ at machine1:HiMom:abcdeACXX:7:1:3:273 :N:0:AAGGATGT
 AAGGATGT
 +
 38=5+AC7
- at HiMom:7:1:3:608
+ at machine1:HiMom:abcdeACXX:7:1:3:608 :Y:0:AAGGATGT
 AAGGATGT
 +
 AA5B?BB@
- at HiMom:7:2:2:1842
+ at machine1:HiMom:abcdeACXX:7:2:2:1842 :N:0:AAGGATGT
 AAGGATGT
 +
 @:1;39B>
- at HiMom:7:2:2:1944
+ at machine1:HiMom:abcdeACXX:7:2:2:1944 :Y:0:AAGGATGT
 AAGGATGT
 +
 BB9BBA:#
- at HiMom:7:2:2:1985
+ at machine1:HiMom:abcdeACXX:7:2:2:1985 :N:0:AAGGATGT
 AAGGATGT
 +
 BC?7>2<8
- at HiMom:7:2:3:1952
+ at machine1:HiMom:abcdeACXX:7:2:3:1952 :Y:0:AAGGATGT
 AAGGATGT
 +
 BB?BB at B<
- at HiMom:7:2:3:470
+ at machine1:HiMom:abcdeACXX:7:2:3:470 :Y:0:AAGGATGT
 AAGGATGT
 +
 B at 6::=B:
- at HiMom:7:2:3:490
+ at machine1:HiMom:abcdeACXX:7:2:3:490 :N:0:AAGGATGT
 AAGGATGT
 +
 ?#######
- at HiMom:7:2:3:589
+ at machine1:HiMom:abcdeACXX:7:2:3:589 :Y:0:AAGGATGT
 AAGGATGT
 +
 ?BB9BB at 9
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGTTTCGCTGA.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGTTTCGCTGA.1.fastq
index 6485a6d..377ac1f 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGTTTCGCTGA.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGTTTCGCTGA.1.fastq
@@ -1,52 +1,52 @@
- at HiMom:9:1:2:1417
+ at machine1:HiMom:abcdeACXX:9:1:2:1417 :Y:0:AAGGATGTTTCGCTGA
 NATTCCATTCGATGATTCCATTCGAGTCCA
 +
 %-::567;93-510788014:8538122##
- at HiMom:9:1:2:1889
+ at machine1:HiMom:abcdeACXX:9:1:2:1889 :Y:0:AAGGATGTTTCGCTGA
 NGAAATGTATCAAGGTTTGTATAATTGCTG
 +
 %-7<<:::<2:::8:4<<:07547765978
- at HiMom:9:1:3:1764
+ at machine1:HiMom:abcdeACXX:9:1:3:1764 :N:0:AAGGATGTTTCGCTGA
 NTCTATGGGGTGTGTATCTGTTTCTGGACT
 +
 %09::845(4586/6666884;8851.314
- at HiMom:9:1:3:2027
+ at machine1:HiMom:abcdeACXX:9:1:3:2027 :Y:0:AAGGATGTTTCGCTGA
 AATGTATTATGTTTCATAAGAAAACAAAAG
 +
 BA7/- at 8=@4,*1=>?:A@:>B at BBCB@8#
- at HiMom:9:1:3:273
+ at machine1:HiMom:abcdeACXX:9:1:3:273 :N:0:AAGGATGTTTCGCTGA
 NAATTGACATAAATCAATATTGTTAAAATG
 +
 ##############################
- at HiMom:9:1:3:608
+ at machine1:HiMom:abcdeACXX:9:1:3:608 :Y:0:AAGGATGTTTCGCTGA
 NTGTGCTTCAATGATGCTATCAGGTGTGTT
 +
 %.9675:747:766553::9:7119::8::
- at HiMom:9:2:2:1842
+ at machine1:HiMom:abcdeACXX:9:2:2:1842 :N:0:AAGGATGTTTCGCTGA
 NGGTGGATCCCCTGAGGTCAGGAGTTCAAG
 +
 ##############################
- at HiMom:9:2:2:1944
+ at machine1:HiMom:abcdeACXX:9:2:2:1944 :Y:0:AAGGATGTTTCGCTGA
 NATTAAATATATATTTTATTCTGAACATAA
 +
 %09::<<<<<;:<<<:99<<9<<;<;<:<<
- at HiMom:9:2:2:1985
+ at machine1:HiMom:abcdeACXX:9:2:2:1985 :N:0:AAGGATGTTTCGCTGA
 NGACTATCACTCTAGGGCCTCCACCCTTGC
 +
 %%2266466667186(66############
- at HiMom:9:2:3:1952
+ at machine1:HiMom:abcdeACXX:9:2:3:1952 :Y:0:AAGGATGTTTCGCTGA
 NATAGATGATAAAAACATTTGACAGTGAAA
 +
 %.8737868:::<;<;9;9979::9858;;
- at HiMom:9:2:3:470
+ at machine1:HiMom:abcdeACXX:9:2:3:470 :Y:0:AAGGATGTTTCGCTGA
 TGTGGATTCCATTCGAATTCATTCGATTAT
 +
 BBCBBACC at CCCC>)@CBA>@CB?BCCCCC
- at HiMom:9:2:3:490
+ at machine1:HiMom:abcdeACXX:9:2:3:490 :N:0:AAGGATGTTTCGCTGA
 NCTAATTGATGGGTAAGAGGCAAAGCATGA
 +
 ##############################
- at HiMom:9:2:3:589
+ at machine1:HiMom:abcdeACXX:9:2:3:589 :Y:0:AAGGATGTTTCGCTGA
 TGAATGCAGGTGCCAGGGAGACGTGACTTC
 +
 =8ACBB??>@=?<ACB9<;?A>??;A<>?3
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGTTTCGCTGA.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGTTTCGCTGA.barcode_1.fastq
index dca7f0b..99ac8f1 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGTTTCGCTGA.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGTTTCGCTGA.barcode_1.fastq
@@ -1,52 +1,52 @@
- at HiMom:9:1:2:1417
+ at machine1:HiMom:abcdeACXX:9:1:2:1417 :Y:0:AAGGATGTTTCGCTGA
 AAGGATGT
 +
 B?5??BC?
- at HiMom:9:1:2:1889
+ at machine1:HiMom:abcdeACXX:9:1:2:1889 :Y:0:AAGGATGTTTCGCTGA
 NAGGATGT
 +
 %.46:;;9
- at HiMom:9:1:3:1764
+ at machine1:HiMom:abcdeACXX:9:1:3:1764 :N:0:AAGGATGTTTCGCTGA
 AAGGATGT
 +
 BB?BB@:A
- at HiMom:9:1:3:2027
+ at machine1:HiMom:abcdeACXX:9:1:3:2027 :Y:0:AAGGATGTTTCGCTGA
 AAGGATGT
 +
 B>7-<::#
- at HiMom:9:1:3:273
+ at machine1:HiMom:abcdeACXX:9:1:3:273 :N:0:AAGGATGTTTCGCTGA
 AAGGATGT
 +
 38=5+AC7
- at HiMom:9:1:3:608
+ at machine1:HiMom:abcdeACXX:9:1:3:608 :Y:0:AAGGATGTTTCGCTGA
 AAGGATGT
 +
 AA5B?BB@
- at HiMom:9:2:2:1842
+ at machine1:HiMom:abcdeACXX:9:2:2:1842 :N:0:AAGGATGTTTCGCTGA
 AAGGATGT
 +
 @:1;39B>
- at HiMom:9:2:2:1944
+ at machine1:HiMom:abcdeACXX:9:2:2:1944 :Y:0:AAGGATGTTTCGCTGA
 AAGGATGT
 +
 BB9BBA:#
- at HiMom:9:2:2:1985
+ at machine1:HiMom:abcdeACXX:9:2:2:1985 :N:0:AAGGATGTTTCGCTGA
 AAGGATGT
 +
 BC?7>2<8
- at HiMom:9:2:3:1952
+ at machine1:HiMom:abcdeACXX:9:2:3:1952 :Y:0:AAGGATGTTTCGCTGA
 AAGGATGT
 +
 BB?BB at B<
- at HiMom:9:2:3:470
+ at machine1:HiMom:abcdeACXX:9:2:3:470 :Y:0:AAGGATGTTTCGCTGA
 AAGGATGT
 +
 B at 6::=B:
- at HiMom:9:2:3:490
+ at machine1:HiMom:abcdeACXX:9:2:3:490 :N:0:AAGGATGTTTCGCTGA
 AAGGATGT
 +
 ?#######
- at HiMom:9:2:3:589
+ at machine1:HiMom:abcdeACXX:9:2:3:589 :Y:0:AAGGATGTTTCGCTGA
 AAGGATGT
 +
 ?BB9BB at 9
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGTTTCGCTGA.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGTTTCGCTGA.barcode_2.fastq
index c6a434b..b4130ae 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGTTTCGCTGA.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AAGGATGTTTCGCTGA.barcode_2.fastq
@@ -1,52 +1,52 @@
- at HiMom:9:1:2:1417
+ at machine1:HiMom:abcdeACXX:9:1:2:1417 :Y:0:AAGGATGTTTCGCTGA
 TTCGCTGA
 +
 B?5??BC?
- at HiMom:9:1:2:1889
+ at machine1:HiMom:abcdeACXX:9:1:2:1889 :Y:0:AAGGATGTTTCGCTGA
 TTCGCTGA
 +
 %.46:;;9
- at HiMom:9:1:3:1764
+ at machine1:HiMom:abcdeACXX:9:1:3:1764 :N:0:AAGGATGTTTCGCTGA
 TTCGCTGA
 +
 BB?BB@:A
- at HiMom:9:1:3:2027
+ at machine1:HiMom:abcdeACXX:9:1:3:2027 :Y:0:AAGGATGTTTCGCTGA
 TTCGCTGA
 +
 B>7-<::#
- at HiMom:9:1:3:273
+ at machine1:HiMom:abcdeACXX:9:1:3:273 :N:0:AAGGATGTTTCGCTGA
 TTCGCTGA
 +
 38=5+AC7
- at HiMom:9:1:3:608
+ at machine1:HiMom:abcdeACXX:9:1:3:608 :Y:0:AAGGATGTTTCGCTGA
 TTCGCTGA
 +
 AA5B?BB@
- at HiMom:9:2:2:1842
+ at machine1:HiMom:abcdeACXX:9:2:2:1842 :N:0:AAGGATGTTTCGCTGA
 TTCGCTGA
 +
 @:1;39B>
- at HiMom:9:2:2:1944
+ at machine1:HiMom:abcdeACXX:9:2:2:1944 :Y:0:AAGGATGTTTCGCTGA
 TTCGCTGA
 +
 BB9BBA:#
- at HiMom:9:2:2:1985
+ at machine1:HiMom:abcdeACXX:9:2:2:1985 :N:0:AAGGATGTTTCGCTGA
 TTCGCTGA
 +
 BC?7>2<8
- at HiMom:9:2:3:1952
+ at machine1:HiMom:abcdeACXX:9:2:3:1952 :Y:0:AAGGATGTTTCGCTGA
 TTCGCTGA
 +
 BB?BB at B<
- at HiMom:9:2:3:470
+ at machine1:HiMom:abcdeACXX:9:2:3:470 :Y:0:AAGGATGTTTCGCTGA
 TTCGCTGA
 +
 B at 6::=B:
- at HiMom:9:2:3:490
+ at machine1:HiMom:abcdeACXX:9:2:3:490 :N:0:AAGGATGTTTCGCTGA
 TTCGCTGA
 +
 ?#######
- at HiMom:9:2:3:589
+ at machine1:HiMom:abcdeACXX:9:2:3:589 :Y:0:AAGGATGTTTCGCTGA
 TTCGCTGA
 +
 ?BB9BB at 9
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTG.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTG.1.fastq
index 1b524a9..9cc5451 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTG.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTG.1.fastq
@@ -1,36 +1,36 @@
- at HiMom:7:1:3:1219
+ at machine1:HiMom:abcdeACXX:7:1:3:1219 :Y:0:ACCAACTG
 AGTTACTTATAGTGAATGGTTATTACTCCA
 +
 BA>BBBBBBA@?:?AA;;<8 at B9=97>9>A
- at HiMom:7:1:3:1319
+ at machine1:HiMom:abcdeACXX:7:1:3:1319 :N:0:ACCAACTG
 TAAATGATTGCCTTCCACAGTATACATGTG
 +
 BAAA<::=B at 7:89)>=>B+)B at B@=####
- at HiMom:7:1:3:795
+ at machine1:HiMom:abcdeACXX:7:1:3:795 :N:0:ACCAACTG
 NGTAATGGAAGTCCTAGTACTAAAAATTAG
 +
 ##############################
- at HiMom:7:2:2:1298
+ at machine1:HiMom:abcdeACXX:7:2:2:1298 :N:0:ACCAACTG
 NGATTCCATTCAATGAATCCATTCGATTCC
 +
 %.235+22976###################
- at HiMom:7:2:2:1745
+ at machine1:HiMom:abcdeACXX:7:2:2:1745 :Y:0:ACCAACTG
 NGGGAGCTAAGTAACTGGAACAAGTTTTTG
 +
 %-5237789999:8886689:9:9569887
- at HiMom:7:2:2:1874
+ at machine1:HiMom:abcdeACXX:7:2:2:1874 :Y:0:ACCAACTG
 NGGCATATATCCTTTTACATACCCAACACA
 +
 %,0137:949699;9;88798789717996
- at HiMom:7:2:2:904
+ at machine1:HiMom:abcdeACXX:7:2:2:904 :N:0:ACCAACTG
 NTTAGACACCATGAAGGTAACTTCCTACTC
 +
 %0:62667999/&.6058::5978489366
- at HiMom:7:2:3:207
+ at machine1:HiMom:abcdeACXX:7:2:3:207 :Y:0:ACCAACTG
 AGTTAGAAACAGAATACGGGTAATAATGTA
 +
 BBCCCA at BA@AAABC at CC@AACBCBBBCBC
- at HiMom:7:2:3:577
+ at machine1:HiMom:abcdeACXX:7:2:3:577 :N:0:ACCAACTG
 NTTCAACTCTGGGAGTTGAATGCAAACATC
 +
 ##############################
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTG.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTG.barcode_1.fastq
index f5b5b30..a43dd6e 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTG.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTG.barcode_1.fastq
@@ -1,36 +1,36 @@
- at HiMom:7:1:3:1219
+ at machine1:HiMom:abcdeACXX:7:1:3:1219 :Y:0:ACCAACTG
 ACCAACTG
 +
 B?@@A??9
- at HiMom:7:1:3:1319
+ at machine1:HiMom:abcdeACXX:7:1:3:1319 :N:0:ACCAACTG
 ACCAACTG
 +
 ??8 at A>8:
- at HiMom:7:1:3:795
+ at machine1:HiMom:abcdeACXX:7:1:3:795 :N:0:ACCAACTG
 ACCAACTG
 +
 >88 at A>##
- at HiMom:7:2:2:1298
+ at machine1:HiMom:abcdeACXX:7:2:2:1298 :N:0:ACCAACTG
 ACCAACTG
 +
 A7><<%;<
- at HiMom:7:2:2:1745
+ at machine1:HiMom:abcdeACXX:7:2:2:1745 :Y:0:ACCAACTG
 ACCAACTG
 +
 BA>BBABB
- at HiMom:7:2:2:1874
+ at machine1:HiMom:abcdeACXX:7:2:2:1874 :Y:0:ACCAACTG
 ACCAACTG
 +
 B>>>?8@=
- at HiMom:7:2:2:904
+ at machine1:HiMom:abcdeACXX:7:2:2:904 :N:0:ACCAACTG
 ACCAACTG
 +
 A?ABB?;7
- at HiMom:7:2:3:207
+ at machine1:HiMom:abcdeACXX:7:2:3:207 :Y:0:ACCAACTG
 ACCAACTG
 +
 BA;6@??@
- at HiMom:7:2:3:577
+ at machine1:HiMom:abcdeACXX:7:2:3:577 :N:0:ACCAACTG
 ACCAACTG
 +
 B?:4<A??
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTGTGTCGGAT.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTGTGTCGGAT.1.fastq
index 92ff10f..c9771ab 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTGTGTCGGAT.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTGTGTCGGAT.1.fastq
@@ -1,36 +1,36 @@
- at HiMom:9:1:3:1219
+ at machine1:HiMom:abcdeACXX:9:1:3:1219 :Y:0:ACCAACTGTGTCGGAT
 AGTTACTTATAGTGAATGGTTATTACTCCA
 +
 BA>BBBBBBA@?:?AA;;<8 at B9=97>9>A
- at HiMom:9:1:3:1319
+ at machine1:HiMom:abcdeACXX:9:1:3:1319 :N:0:ACCAACTGTGTCGGAT
 TAAATGATTGCCTTCCACAGTATACATGTG
 +
 BAAA<::=B at 7:89)>=>B+)B at B@=####
- at HiMom:9:1:3:795
+ at machine1:HiMom:abcdeACXX:9:1:3:795 :N:0:ACCAACTGTGTCGGAT
 NGTAATGGAAGTCCTAGTACTAAAAATTAG
 +
 ##############################
- at HiMom:9:2:2:1298
+ at machine1:HiMom:abcdeACXX:9:2:2:1298 :N:0:ACCAACTGTGTCGGAT
 NGATTCCATTCAATGAATCCATTCGATTCC
 +
 %.235+22976###################
- at HiMom:9:2:2:1745
+ at machine1:HiMom:abcdeACXX:9:2:2:1745 :Y:0:ACCAACTGTGTCGGAT
 NGGGAGCTAAGTAACTGGAACAAGTTTTTG
 +
 %-5237789999:8886689:9:9569887
- at HiMom:9:2:2:1874
+ at machine1:HiMom:abcdeACXX:9:2:2:1874 :Y:0:ACCAACTGTGTCGGAT
 NGGCATATATCCTTTTACATACCCAACACA
 +
 %,0137:949699;9;88798789717996
- at HiMom:9:2:2:904
+ at machine1:HiMom:abcdeACXX:9:2:2:904 :N:0:ACCAACTGTGTCGGAT
 NTTAGACACCATGAAGGTAACTTCCTACTC
 +
 %0:62667999/&.6058::5978489366
- at HiMom:9:2:3:207
+ at machine1:HiMom:abcdeACXX:9:2:3:207 :Y:0:ACCAACTGTGTCGGAT
 AGTTAGAAACAGAATACGGGTAATAATGTA
 +
 BBCCCA at BA@AAABC at CC@AACBCBBBCBC
- at HiMom:9:2:3:577
+ at machine1:HiMom:abcdeACXX:9:2:3:577 :N:0:ACCAACTGTGTCGGAT
 NTTCAACTCTGGGAGTTGAATGCAAACATC
 +
 ##############################
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTGTGTCGGAT.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTGTGTCGGAT.barcode_1.fastq
index 0dcb66f..bdc8147 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTGTGTCGGAT.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTGTGTCGGAT.barcode_1.fastq
@@ -1,36 +1,36 @@
- at HiMom:9:1:3:1219
+ at machine1:HiMom:abcdeACXX:9:1:3:1219 :Y:0:ACCAACTGTGTCGGAT
 ACCAACTG
 +
 B?@@A??9
- at HiMom:9:1:3:1319
+ at machine1:HiMom:abcdeACXX:9:1:3:1319 :N:0:ACCAACTGTGTCGGAT
 ACCAACTG
 +
 ??8 at A>8:
- at HiMom:9:1:3:795
+ at machine1:HiMom:abcdeACXX:9:1:3:795 :N:0:ACCAACTGTGTCGGAT
 ACCAACTG
 +
 >88 at A>##
- at HiMom:9:2:2:1298
+ at machine1:HiMom:abcdeACXX:9:2:2:1298 :N:0:ACCAACTGTGTCGGAT
 ACCAACTG
 +
 A7><<%;<
- at HiMom:9:2:2:1745
+ at machine1:HiMom:abcdeACXX:9:2:2:1745 :Y:0:ACCAACTGTGTCGGAT
 ACCAACTG
 +
 BA>BBABB
- at HiMom:9:2:2:1874
+ at machine1:HiMom:abcdeACXX:9:2:2:1874 :Y:0:ACCAACTGTGTCGGAT
 ACCAACTG
 +
 B>>>?8@=
- at HiMom:9:2:2:904
+ at machine1:HiMom:abcdeACXX:9:2:2:904 :N:0:ACCAACTGTGTCGGAT
 ACCAACTG
 +
 A?ABB?;7
- at HiMom:9:2:3:207
+ at machine1:HiMom:abcdeACXX:9:2:3:207 :Y:0:ACCAACTGTGTCGGAT
 ACCAACTG
 +
 BA;6@??@
- at HiMom:9:2:3:577
+ at machine1:HiMom:abcdeACXX:9:2:3:577 :N:0:ACCAACTGTGTCGGAT
 ACCAACTG
 +
 B?:4<A??
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTGTGTCGGAT.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTGTGTCGGAT.barcode_2.fastq
index e4b4fd7..95db720 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTGTGTCGGAT.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ACCAACTGTGTCGGAT.barcode_2.fastq
@@ -1,36 +1,36 @@
- at HiMom:9:1:3:1219
+ at machine1:HiMom:abcdeACXX:9:1:3:1219 :Y:0:ACCAACTGTGTCGGAT
 TGTCGGAT
 +
 B?@@A??9
- at HiMom:9:1:3:1319
+ at machine1:HiMom:abcdeACXX:9:1:3:1319 :N:0:ACCAACTGTGTCGGAT
 TGTCGGAT
 +
 ??8 at A>8:
- at HiMom:9:1:3:795
+ at machine1:HiMom:abcdeACXX:9:1:3:795 :N:0:ACCAACTGTGTCGGAT
 TGTCGGAT
 +
 >88 at A>##
- at HiMom:9:2:2:1298
+ at machine1:HiMom:abcdeACXX:9:2:2:1298 :N:0:ACCAACTGTGTCGGAT
 TGTCGGAT
 +
 A7><<%;<
- at HiMom:9:2:2:1745
+ at machine1:HiMom:abcdeACXX:9:2:2:1745 :Y:0:ACCAACTGTGTCGGAT
 TGTCGGAT
 +
 BA>BBABB
- at HiMom:9:2:2:1874
+ at machine1:HiMom:abcdeACXX:9:2:2:1874 :Y:0:ACCAACTGTGTCGGAT
 TGTCGGAT
 +
 B>>>?8@=
- at HiMom:9:2:2:904
+ at machine1:HiMom:abcdeACXX:9:2:2:904 :N:0:ACCAACTGTGTCGGAT
 TGTCGGAT
 +
 A?ABB?;7
- at HiMom:9:2:3:207
+ at machine1:HiMom:abcdeACXX:9:2:3:207 :Y:0:ACCAACTGTGTCGGAT
 TGTCGGAT
 +
 BA;6@??@
- at HiMom:9:2:3:577
+ at machine1:HiMom:abcdeACXX:9:2:3:577 :N:0:ACCAACTGTGTCGGAT
 TGTCGGAT
 +
 B?:4<A??
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTC.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTC.1.fastq
index e6d4d68..d967158 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTC.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTC.1.fastq
@@ -1,32 +1,32 @@
- at HiMom:7:1:2:1507
+ at machine1:HiMom:abcdeACXX:7:1:2:1507 :Y:0:AGCAATTC
 NGGCTTGGAAAGTGTAGGAGGGAGAGTCAC
 +
 ##############################
- at HiMom:7:1:2:658
+ at machine1:HiMom:abcdeACXX:7:1:2:658 :Y:0:AGCAATTC
 NGATGCTTCTGTCCTAAGAAGCTTGAGACA
 +
 %%2632887412107753560555542255
- at HiMom:7:2:2:599
+ at machine1:HiMom:abcdeACXX:7:2:2:599 :N:0:AGCAATTC
 NAAACAAAAAAGCTGATGGCCTGGCGGGGT
 +
 %.836844751583,38-)/8638######
- at HiMom:7:2:3:1133
+ at machine1:HiMom:abcdeACXX:7:2:3:1133 :Y:0:AGCAATTC
 AGAAGCTTTCTATTCTGATCCCCAAGGAGT
 +
 BACBA>BB=1;?BA??5A>:@25<=.43;?
- at HiMom:7:2:3:157
+ at machine1:HiMom:abcdeACXX:7:2:3:157 :Y:0:AGCAATTC
 TGGGTGGTTCAAACTAAGCAGTCCAACTGC
 +
 BACC at BBABBBBCBBCBBBBBB?AAB?B?A
- at HiMom:7:2:3:1602
+ at machine1:HiMom:abcdeACXX:7:2:3:1602 :Y:0:AGCAATTC
 AATTCATGAATACTTTTCAGTCTTTAAAAA
 +
 BCBAAABBBBB?<@BAB?AA=?BBBBBBBB
- at HiMom:7:2:3:808
+ at machine1:HiMom:abcdeACXX:7:2:3:808 :N:0:AGCAATTC
 NGAGTGTAATACAATGGTATGGATTTTAAC
 +
 ##############################
- at HiMom:7:2:3:991
+ at machine1:HiMom:abcdeACXX:7:2:3:991 :Y:0:AGCAATTC
 TGGAAGCCAGCCAAAGATACACTCTTGGCA
 +
 BABC>6BBCBBBBCAAA at BACB<<?BABBB
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTC.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTC.barcode_1.fastq
index 96f11c2..f6603a3 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTC.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTC.barcode_1.fastq
@@ -1,32 +1,32 @@
- at HiMom:7:1:2:1507
+ at machine1:HiMom:abcdeACXX:7:1:2:1507 :Y:0:AGCAATTC
 AGCAATTC
 +
 ?2=@9A<>
- at HiMom:7:1:2:658
+ at machine1:HiMom:abcdeACXX:7:1:2:658 :Y:0:AGCAATTC
 AGCAATTC
 +
 @7=@@@=;
- at HiMom:7:2:2:599
+ at machine1:HiMom:abcdeACXX:7:2:2:599 :N:0:AGCAATTC
 AGCAATTC
 +
 :-8BABB?
- at HiMom:7:2:3:1133
+ at machine1:HiMom:abcdeACXX:7:2:3:1133 :Y:0:AGCAATTC
 AGCAATTC
 +
 ??9 at 5AB;
- at HiMom:7:2:3:157
+ at machine1:HiMom:abcdeACXX:7:2:3:157 :Y:0:AGCAATTC
 AGCAATTC
 +
 BBB??CBA
- at HiMom:7:2:3:1602
+ at machine1:HiMom:abcdeACXX:7:2:3:1602 :Y:0:AGCAATTC
 AGCAATTC
 +
 ?6<A at B>8
- at HiMom:7:2:3:808
+ at machine1:HiMom:abcdeACXX:7:2:3:808 :N:0:AGCAATTC
 AGCAATTC
 +
 >25:9?##
- at HiMom:7:2:3:991
+ at machine1:HiMom:abcdeACXX:7:2:3:991 :Y:0:AGCAATTC
 AGCAATTC
 +
 BBAB at BB<
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTCTGCTCGAC.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTCTGCTCGAC.1.fastq
index baaeb61..f3139dd 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTCTGCTCGAC.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTCTGCTCGAC.1.fastq
@@ -1,32 +1,32 @@
- at HiMom:9:1:2:1507
+ at machine1:HiMom:abcdeACXX:9:1:2:1507 :Y:0:AGCAATTCTGCTCGAC
 NGGCTTGGAAAGTGTAGGAGGGAGAGTCAC
 +
 ##############################
- at HiMom:9:1:2:658
+ at machine1:HiMom:abcdeACXX:9:1:2:658 :Y:0:AGCAATTCTGCTCGAC
 NGATGCTTCTGTCCTAAGAAGCTTGAGACA
 +
 %%2632887412107753560555542255
- at HiMom:9:2:2:599
+ at machine1:HiMom:abcdeACXX:9:2:2:599 :N:0:AGCAATTCTGCTCGAC
 NAAACAAAAAAGCTGATGGCCTGGCGGGGT
 +
 %.836844751583,38-)/8638######
- at HiMom:9:2:3:1133
+ at machine1:HiMom:abcdeACXX:9:2:3:1133 :Y:0:AGCAATTCTGCTCGAC
 AGAAGCTTTCTATTCTGATCCCCAAGGAGT
 +
 BACBA>BB=1;?BA??5A>:@25<=.43;?
- at HiMom:9:2:3:157
+ at machine1:HiMom:abcdeACXX:9:2:3:157 :Y:0:AGCAATTCTGCTCGAC
 TGGGTGGTTCAAACTAAGCAGTCCAACTGC
 +
 BACC at BBABBBBCBBCBBBBBB?AAB?B?A
- at HiMom:9:2:3:1602
+ at machine1:HiMom:abcdeACXX:9:2:3:1602 :Y:0:AGCAATTCTGCTCGAC
 AATTCATGAATACTTTTCAGTCTTTAAAAA
 +
 BCBAAABBBBB?<@BAB?AA=?BBBBBBBB
- at HiMom:9:2:3:808
+ at machine1:HiMom:abcdeACXX:9:2:3:808 :N:0:AGCAATTCTGCTCGAC
 NGAGTGTAATACAATGGTATGGATTTTAAC
 +
 ##############################
- at HiMom:9:2:3:991
+ at machine1:HiMom:abcdeACXX:9:2:3:991 :Y:0:AGCAATTCTGCTCGAC
 TGGAAGCCAGCCAAAGATACACTCTTGGCA
 +
 BABC>6BBCBBBBCAAA at BACB<<?BABBB
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTCTGCTCGAC.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTCTGCTCGAC.barcode_1.fastq
index 5b7c119..8d51016 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTCTGCTCGAC.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTCTGCTCGAC.barcode_1.fastq
@@ -1,32 +1,32 @@
- at HiMom:9:1:2:1507
+ at machine1:HiMom:abcdeACXX:9:1:2:1507 :Y:0:AGCAATTCTGCTCGAC
 AGCAATTC
 +
 ?2=@9A<>
- at HiMom:9:1:2:658
+ at machine1:HiMom:abcdeACXX:9:1:2:658 :Y:0:AGCAATTCTGCTCGAC
 AGCAATTC
 +
 @7=@@@=;
- at HiMom:9:2:2:599
+ at machine1:HiMom:abcdeACXX:9:2:2:599 :N:0:AGCAATTCTGCTCGAC
 AGCAATTC
 +
 :-8BABB?
- at HiMom:9:2:3:1133
+ at machine1:HiMom:abcdeACXX:9:2:3:1133 :Y:0:AGCAATTCTGCTCGAC
 AGCAATTC
 +
 ??9 at 5AB;
- at HiMom:9:2:3:157
+ at machine1:HiMom:abcdeACXX:9:2:3:157 :Y:0:AGCAATTCTGCTCGAC
 AGCAATTC
 +
 BBB??CBA
- at HiMom:9:2:3:1602
+ at machine1:HiMom:abcdeACXX:9:2:3:1602 :Y:0:AGCAATTCTGCTCGAC
 AGCAATTC
 +
 ?6<A at B>8
- at HiMom:9:2:3:808
+ at machine1:HiMom:abcdeACXX:9:2:3:808 :N:0:AGCAATTCTGCTCGAC
 AGCAATTC
 +
 >25:9?##
- at HiMom:9:2:3:991
+ at machine1:HiMom:abcdeACXX:9:2:3:991 :Y:0:AGCAATTCTGCTCGAC
 AGCAATTC
 +
 BBAB at BB<
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTCTGCTCGAC.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTCTGCTCGAC.barcode_2.fastq
index f8c2096..93196d5 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTCTGCTCGAC.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGCAATTCTGCTCGAC.barcode_2.fastq
@@ -1,32 +1,32 @@
- at HiMom:9:1:2:1507
+ at machine1:HiMom:abcdeACXX:9:1:2:1507 :Y:0:AGCAATTCTGCTCGAC
 TGCTCGAC
 +
 ?2=@9A<>
- at HiMom:9:1:2:658
+ at machine1:HiMom:abcdeACXX:9:1:2:658 :Y:0:AGCAATTCTGCTCGAC
 TGCTCGAC
 +
 @7=@@@=;
- at HiMom:9:2:2:599
+ at machine1:HiMom:abcdeACXX:9:2:2:599 :N:0:AGCAATTCTGCTCGAC
 TGCTCGAC
 +
 :-8BABB?
- at HiMom:9:2:3:1133
+ at machine1:HiMom:abcdeACXX:9:2:3:1133 :Y:0:AGCAATTCTGCTCGAC
 TGCTCGAC
 +
 ??9 at 5AB;
- at HiMom:9:2:3:157
+ at machine1:HiMom:abcdeACXX:9:2:3:157 :Y:0:AGCAATTCTGCTCGAC
 TGCTCGAC
 +
 BBB??CBA
- at HiMom:9:2:3:1602
+ at machine1:HiMom:abcdeACXX:9:2:3:1602 :Y:0:AGCAATTCTGCTCGAC
 TGCTCGAC
 +
 ?6<A at B>8
- at HiMom:9:2:3:808
+ at machine1:HiMom:abcdeACXX:9:2:3:808 :N:0:AGCAATTCTGCTCGAC
 TGCTCGAC
 +
 >25:9?##
- at HiMom:9:2:3:991
+ at machine1:HiMom:abcdeACXX:9:2:3:991 :Y:0:AGCAATTCTGCTCGAC
 TGCTCGAC
 +
 BBAB at BB<
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTT.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTT.1.fastq
index 6864836..efd45c4 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTT.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTT.1.fastq
@@ -1,32 +1,32 @@
- at HiMom:7:1:3:1341
+ at machine1:HiMom:abcdeACXX:7:1:3:1341 :Y:0:AGTTGCTT
 TGAAGAGTTTCTGGCACATAGGCACTCAAC
 +
 B7AACB;>C7A??4AB<B>B:':@CAAAAB
- at HiMom:7:1:3:1861
+ at machine1:HiMom:abcdeACXX:7:1:3:1861 :Y:0:AGTTGCTT
 NGATTAATGAATAGAGTGAATAGTGTCTGA
 +
 %-07:::5.3<<7788529:<<530:9646
- at HiMom:7:1:3:699
+ at machine1:HiMom:abcdeACXX:7:1:3:699 :N:0:AGTTGCTT
 NTGTCTTCTTACACTATTTTTTTTAAAATC
 +
 ##############################
- at HiMom:7:2:3:1962
+ at machine1:HiMom:abcdeACXX:7:2:3:1962 :Y:0:AGTTGCTT
 ACTAAATCCAAGAGCACATCAAAATGTTAA
 +
 B5;BBB@@8 at BAB9>BBBABACB@@B;@BB
- at HiMom:7:2:3:274
+ at machine1:HiMom:abcdeACXX:7:2:3:274 :Y:0:AGTTGCTT
 AGTGAAGTGCTTAGCACCTGGGCCAGCAGC
 +
 :57.:@@>96=@97>@=;=>;@;@=@9=9;
- at HiMom:7:2:3:640
+ at machine1:HiMom:abcdeACXX:7:2:3:640 :Y:0:AGTTGCTT
 AGATTAAAAAAAAATGACGTGACAAATTAA
 +
 =6CBC at CABCBBCBC@>@=@ABBCCBBBCC
- at HiMom:7:2:3:691
+ at machine1:HiMom:abcdeACXX:7:2:3:691 :Y:0:AGTTGCTT
 ATTTTCAAATCATAAATATGGATTGCTGTG
 +
 BBBABACBBA at ABBBBBBB727AB8+;B55
- at HiMom:7:2:3:72
+ at machine1:HiMom:abcdeACXX:7:2:3:72 :Y:0:AGTTGCTT
 CTAGTCTTTGACTTATATCAATTCAGTATT
 +
 BBC?ACCCCCB at CCCCCCCBCCCCCA@BCC
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTT.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTT.barcode_1.fastq
index 49ea5fe..d3c3fdc 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTT.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTT.barcode_1.fastq
@@ -1,32 +1,32 @@
- at HiMom:7:1:3:1341
+ at machine1:HiMom:abcdeACXX:7:1:3:1341 :Y:0:AGTTGCTT
 AGATGCTT
 +
 B#######
- at HiMom:7:1:3:1861
+ at machine1:HiMom:abcdeACXX:7:1:3:1861 :Y:0:AGTTGCTT
 AGTTGCTT
 +
 B9@><A<C
- at HiMom:7:1:3:699
+ at machine1:HiMom:abcdeACXX:7:1:3:699 :N:0:AGTTGCTT
 AGTTGCTT
 +
 98?>8>##
- at HiMom:7:2:3:1962
+ at machine1:HiMom:abcdeACXX:7:2:3:1962 :Y:0:AGTTGCTT
 AGTTGCTT
 +
 A76 at 8=0=
- at HiMom:7:2:3:274
+ at machine1:HiMom:abcdeACXX:7:2:3:274 :Y:0:AGTTGCTT
 AGTTGCTT
 +
 @@??<?BC
- at HiMom:7:2:3:640
+ at machine1:HiMom:abcdeACXX:7:2:3:640 :Y:0:AGTTGCTT
 AGTTGCTT
 +
 A=BBB;<A
- at HiMom:7:2:3:691
+ at machine1:HiMom:abcdeACXX:7:2:3:691 :Y:0:AGTTGCTT
 AGTTGCTT
 +
 @=8@>@?A
- at HiMom:7:2:3:72
+ at machine1:HiMom:abcdeACXX:7:2:3:72 :Y:0:AGTTGCTT
 AGTTGCTT
 +
 BCBCA>BB
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTTTCTGGCGA.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTTTCTGGCGA.1.fastq
index d074f97..0e8e846 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTTTCTGGCGA.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTTTCTGGCGA.1.fastq
@@ -1,32 +1,32 @@
- at HiMom:9:1:3:1341
+ at machine1:HiMom:abcdeACXX:9:1:3:1341 :Y:0:AGTTGCTTTCTGGCGA
 TGAAGAGTTTCTGGCACATAGGCACTCAAC
 +
 B7AACB;>C7A??4AB<B>B:':@CAAAAB
- at HiMom:9:1:3:1861
+ at machine1:HiMom:abcdeACXX:9:1:3:1861 :Y:0:AGTTGCTTTCTGGCGA
 NGATTAATGAATAGAGTGAATAGTGTCTGA
 +
 %-07:::5.3<<7788529:<<530:9646
- at HiMom:9:1:3:699
+ at machine1:HiMom:abcdeACXX:9:1:3:699 :N:0:AGTTGCTTTCTGGCGA
 NTGTCTTCTTACACTATTTTTTTTAAAATC
 +
 ##############################
- at HiMom:9:2:3:1962
+ at machine1:HiMom:abcdeACXX:9:2:3:1962 :Y:0:AGTTGCTTTCTGGCGA
 ACTAAATCCAAGAGCACATCAAAATGTTAA
 +
 B5;BBB@@8 at BAB9>BBBABACB@@B;@BB
- at HiMom:9:2:3:274
+ at machine1:HiMom:abcdeACXX:9:2:3:274 :Y:0:AGTTGCTTTCTGGCGA
 AGTGAAGTGCTTAGCACCTGGGCCAGCAGC
 +
 :57.:@@>96=@97>@=;=>;@;@=@9=9;
- at HiMom:9:2:3:640
+ at machine1:HiMom:abcdeACXX:9:2:3:640 :Y:0:AGTTGCTTTCTGGCGA
 AGATTAAAAAAAAATGACGTGACAAATTAA
 +
 =6CBC at CABCBBCBC@>@=@ABBCCBBBCC
- at HiMom:9:2:3:691
+ at machine1:HiMom:abcdeACXX:9:2:3:691 :Y:0:AGTTGCTTTCTGGCGA
 ATTTTCAAATCATAAATATGGATTGCTGTG
 +
 BBBABACBBA at ABBBBBBB727AB8+;B55
- at HiMom:9:2:3:72
+ at machine1:HiMom:abcdeACXX:9:2:3:72 :Y:0:AGTTGCTTTCTGGCGA
 CTAGTCTTTGACTTATATCAATTCAGTATT
 +
 BBC?ACCCCCB at CCCCCCCBCCCCCA@BCC
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTTTCTGGCGA.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTTTCTGGCGA.barcode_1.fastq
index f658475..de4d00e 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTTTCTGGCGA.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTTTCTGGCGA.barcode_1.fastq
@@ -1,32 +1,32 @@
- at HiMom:9:1:3:1341
+ at machine1:HiMom:abcdeACXX:9:1:3:1341 :Y:0:AGTTGCTTTCTGGCGA
 AGATGCTT
 +
 B#######
- at HiMom:9:1:3:1861
+ at machine1:HiMom:abcdeACXX:9:1:3:1861 :Y:0:AGTTGCTTTCTGGCGA
 AGTTGCTT
 +
 B9@><A<C
- at HiMom:9:1:3:699
+ at machine1:HiMom:abcdeACXX:9:1:3:699 :N:0:AGTTGCTTTCTGGCGA
 AGTTGCTT
 +
 98?>8>##
- at HiMom:9:2:3:1962
+ at machine1:HiMom:abcdeACXX:9:2:3:1962 :Y:0:AGTTGCTTTCTGGCGA
 AGTTGCTT
 +
 A76 at 8=0=
- at HiMom:9:2:3:274
+ at machine1:HiMom:abcdeACXX:9:2:3:274 :Y:0:AGTTGCTTTCTGGCGA
 AGTTGCTT
 +
 @@??<?BC
- at HiMom:9:2:3:640
+ at machine1:HiMom:abcdeACXX:9:2:3:640 :Y:0:AGTTGCTTTCTGGCGA
 AGTTGCTT
 +
 A=BBB;<A
- at HiMom:9:2:3:691
+ at machine1:HiMom:abcdeACXX:9:2:3:691 :Y:0:AGTTGCTTTCTGGCGA
 AGTTGCTT
 +
 @=8@>@?A
- at HiMom:9:2:3:72
+ at machine1:HiMom:abcdeACXX:9:2:3:72 :Y:0:AGTTGCTTTCTGGCGA
 AGTTGCTT
 +
 BCBCA>BB
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTTTCTGGCGA.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTTTCTGGCGA.barcode_2.fastq
index 86cb86c..17ca9ad 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTTTCTGGCGA.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/AGTTGCTTTCTGGCGA.barcode_2.fastq
@@ -1,32 +1,32 @@
- at HiMom:9:1:3:1341
+ at machine1:HiMom:abcdeACXX:9:1:3:1341 :Y:0:AGTTGCTTTCTGGCGA
 TCTGGCGA
 +
 B#######
- at HiMom:9:1:3:1861
+ at machine1:HiMom:abcdeACXX:9:1:3:1861 :Y:0:AGTTGCTTTCTGGCGA
 TCTGGCGA
 +
 B9@><A<C
- at HiMom:9:1:3:699
+ at machine1:HiMom:abcdeACXX:9:1:3:699 :N:0:AGTTGCTTTCTGGCGA
 TCTGGCGA
 +
 98?>8>##
- at HiMom:9:2:3:1962
+ at machine1:HiMom:abcdeACXX:9:2:3:1962 :Y:0:AGTTGCTTTCTGGCGA
 TCTGGCGA
 +
 A76 at 8=0=
- at HiMom:9:2:3:274
+ at machine1:HiMom:abcdeACXX:9:2:3:274 :Y:0:AGTTGCTTTCTGGCGA
 TCTGGCGA
 +
 @@??<?BC
- at HiMom:9:2:3:640
+ at machine1:HiMom:abcdeACXX:9:2:3:640 :Y:0:AGTTGCTTTCTGGCGA
 TCTGGCGA
 +
 A=BBB;<A
- at HiMom:9:2:3:691
+ at machine1:HiMom:abcdeACXX:9:2:3:691 :Y:0:AGTTGCTTTCTGGCGA
 TCTGGCGA
 +
 @=8@>@?A
- at HiMom:9:2:3:72
+ at machine1:HiMom:abcdeACXX:9:2:3:72 :Y:0:AGTTGCTTTCTGGCGA
 TCTGGCGA
 +
 BCBCA>BB
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTT.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTT.1.fastq
index 1643100..2ae8e10 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTT.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTT.1.fastq
@@ -1,12 +1,12 @@
- at HiMom:7:1:3:1867
+ at machine1:HiMom:abcdeACXX:7:1:3:1867 :Y:0:ATTATGTT
 AGAAGCATTCTCAGAAACTTATTTGTGATG
 +
 BB>81>BB?->?;07>4;B at BABB?:<@=:
- at HiMom:7:1:3:347
+ at machine1:HiMom:abcdeACXX:7:1:3:347 :N:0:ATTATGTT
 NGTGGTGTGAGGTGTATCTGGGTCAGCAGG
 +
 ##############################
- at HiMom:7:2:3:889
+ at machine1:HiMom:abcdeACXX:7:2:3:889 :N:0:ATTATGTT
 NTTTTTATAACACCTCAGGCATCGTCAAAC
 +
 ##############################
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTT.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTT.barcode_1.fastq
index 7b04426..7086d40 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTT.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTT.barcode_1.fastq
@@ -1,12 +1,12 @@
- at HiMom:7:1:3:1867
+ at machine1:HiMom:abcdeACXX:7:1:3:1867 :Y:0:ATTATGTT
 ATTATGTT
 +
 BBA at 79>B
- at HiMom:7:1:3:347
+ at machine1:HiMom:abcdeACXX:7:1:3:347 :N:0:ATTATGTT
 ATTATGTT
 +
 4A>?@)6<
- at HiMom:7:2:3:889
+ at machine1:HiMom:abcdeACXX:7:2:3:889 :N:0:ATTATGTT
 ATTATGTT
 +
 0A6=A<+A
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTTTCGGAATG.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTTTCGGAATG.1.fastq
index bd21d9c..c01ab5c 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTTTCGGAATG.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTTTCGGAATG.1.fastq
@@ -1,12 +1,12 @@
- at HiMom:9:1:3:1867
+ at machine1:HiMom:abcdeACXX:9:1:3:1867 :Y:0:ATTATGTTTCGGAATG
 AGAAGCATTCTCAGAAACTTATTTGTGATG
 +
 BB>81>BB?->?;07>4;B at BABB?:<@=:
- at HiMom:9:1:3:347
+ at machine1:HiMom:abcdeACXX:9:1:3:347 :N:0:ATTATGTTTCGGAATG
 NGTGGTGTGAGGTGTATCTGGGTCAGCAGG
 +
 ##############################
- at HiMom:9:2:3:889
+ at machine1:HiMom:abcdeACXX:9:2:3:889 :N:0:ATTATGTTTCGGAATG
 NTTTTTATAACACCTCAGGCATCGTCAAAC
 +
 ##############################
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTTTCGGAATG.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTTTCGGAATG.barcode_1.fastq
index 03fe4de..5d34be5 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTTTCGGAATG.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTTTCGGAATG.barcode_1.fastq
@@ -1,12 +1,12 @@
- at HiMom:9:1:3:1867
+ at machine1:HiMom:abcdeACXX:9:1:3:1867 :Y:0:ATTATGTTTCGGAATG
 ATTATGTT
 +
 BBA at 79>B
- at HiMom:9:1:3:347
+ at machine1:HiMom:abcdeACXX:9:1:3:347 :N:0:ATTATGTTTCGGAATG
 ATTATGTT
 +
 4A>?@)6<
- at HiMom:9:2:3:889
+ at machine1:HiMom:abcdeACXX:9:2:3:889 :N:0:ATTATGTTTCGGAATG
 ATTATGTT
 +
 0A6=A<+A
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTTTCGGAATG.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTTTCGGAATG.barcode_2.fastq
index c44fa36..84ebff8 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTTTCGGAATG.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/ATTATGTTTCGGAATG.barcode_2.fastq
@@ -1,12 +1,12 @@
- at HiMom:9:1:3:1867
+ at machine1:HiMom:abcdeACXX:9:1:3:1867 :Y:0:ATTATGTTTCGGAATG
 TCGGAATG
 +
 BBA at 79>B
- at HiMom:9:1:3:347
+ at machine1:HiMom:abcdeACXX:9:1:3:347 :N:0:ATTATGTTTCGGAATG
 TCGGAATG
 +
 4A>?@)6<
- at HiMom:9:2:3:889
+ at machine1:HiMom:abcdeACXX:9:2:3:889 :N:0:ATTATGTTTCGGAATG
 TCGGAATG
 +
 0A6=A<+A
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCT.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCT.1.fastq
index 4e2c306..739eb58 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCT.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCT.1.fastq
@@ -1,36 +1,36 @@
- at HiMom:7:1:2:1465
+ at machine1:HiMom:abcdeACXX:7:1:2:1465 :N:0:CACATCCT
 NTTGTATTTCTGAAACCCCGAAGGGCATGG
 +
 ##############################
- at HiMom:7:1:3:683
+ at machine1:HiMom:abcdeACXX:7:1:3:683 :Y:0:CACATCCT
 NAAGTTTTTATTTATACGTAGAATTTATAC
 +
 %.611<<:;<98;<<<93993789<;<;9:
- at HiMom:7:1:3:751
+ at machine1:HiMom:abcdeACXX:7:1:3:751 :Y:0:CACATCCT
 CACTTTTATTCTTAAGTACCACCTTCTGGA
 +
 6A=CCCCBCCCAAA??@CC8@@CCBC:>)@
- at HiMom:7:2:2:1012
+ at machine1:HiMom:abcdeACXX:7:2:2:1012 :Y:0:CACATCCT
 NAGAAATACCATTTGACCCACCAATCCCAT
 +
 %066:::9636963567778::88895-58
- at HiMom:7:2:2:1402
+ at machine1:HiMom:abcdeACXX:7:2:2:1402 :N:0:CACATCCT
 NGGATGGCTTCCAGTATGGGAACCTTTTCA
 +
 %.5484-/858865/78/(/62'/886555
- at HiMom:7:2:3:1094
+ at machine1:HiMom:abcdeACXX:7:2:3:1094 :Y:0:CACATCCT
 CATATGGTATCACCACTCAGATACATAAAG
 +
 AABB<:=1CBBCBC@?AA@)>CCBBCCB?=
- at HiMom:7:2:3:16
+ at machine1:HiMom:abcdeACXX:7:2:3:16 :Y:0:CACATCCT
 AGCTGGGCATGGTGATGCGCCCCTGTAATC
 +
 A;?;<<?@9?@@@@4=3)1 at 59??9<5.<2
- at HiMom:7:2:3:1712
+ at machine1:HiMom:abcdeACXX:7:2:3:1712 :Y:0:CACATCCT
 AGTGCTGTGGCCTGGATGGATGTCAGGATT
 +
 >91:?5:=5:77>305>/;=>1:<B9694;
- at HiMom:7:2:3:328
+ at machine1:HiMom:abcdeACXX:7:2:3:328 :N:0:CACATCCT
 AGCTTAATATAGCATAGCAGATAAGATTTG
 +
 (:*8>=,3:))<)?A<(8>###########
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCT.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCT.barcode_1.fastq
index 12d2016..209867c 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCT.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCT.barcode_1.fastq
@@ -1,36 +1,36 @@
- at HiMom:7:1:2:1465
+ at machine1:HiMom:abcdeACXX:7:1:2:1465 :N:0:CACATCCT
 CACATCCT
 +
 <:@=BB@@
- at HiMom:7:1:3:683
+ at machine1:HiMom:abcdeACXX:7:1:3:683 :Y:0:CACATCCT
 CACATCCT
 +
 B at 8@B?CB
- at HiMom:7:1:3:751
+ at machine1:HiMom:abcdeACXX:7:1:3:751 :Y:0:CACATCCT
 CACATCCT
 +
 9 at CACCCC
- at HiMom:7:2:2:1012
+ at machine1:HiMom:abcdeACXX:7:2:2:1012 :Y:0:CACATCCT
 CACATCCT
 +
 BB?BABBB
- at HiMom:7:2:2:1402
+ at machine1:HiMom:abcdeACXX:7:2:2:1402 :N:0:CACATCCT
 CACATCCT
 +
 =@@BABCB
- at HiMom:7:2:3:1094
+ at machine1:HiMom:abcdeACXX:7:2:3:1094 :Y:0:CACATCCT
 CACATCCT
 +
 ABCBC>:B
- at HiMom:7:2:3:16
+ at machine1:HiMom:abcdeACXX:7:2:3:16 :Y:0:CACATCCT
 CACATCCT
 +
 <<4@@='@
- at HiMom:7:2:3:1712
+ at machine1:HiMom:abcdeACXX:7:2:3:1712 :Y:0:CACATCCT
 CACATCCT
 +
 BB>@@?=>
- at HiMom:7:2:3:328
+ at machine1:HiMom:abcdeACXX:7:2:3:328 :N:0:CACATCCT
 CAAATCCT
 +
 3<)):<(<
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCTTACTTAGC.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCTTACTTAGC.1.fastq
index a69b4a9..ba8f8d3 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCTTACTTAGC.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCTTACTTAGC.1.fastq
@@ -1,36 +1,36 @@
- at HiMom:9:1:2:1465
+ at machine1:HiMom:abcdeACXX:9:1:2:1465 :N:0:CACATCCTTACTTAGC
 NTTGTATTTCTGAAACCCCGAAGGGCATGG
 +
 ##############################
- at HiMom:9:1:3:683
+ at machine1:HiMom:abcdeACXX:9:1:3:683 :Y:0:CACATCCTTACTTAGC
 NAAGTTTTTATTTATACGTAGAATTTATAC
 +
 %.611<<:;<98;<<<93993789<;<;9:
- at HiMom:9:1:3:751
+ at machine1:HiMom:abcdeACXX:9:1:3:751 :Y:0:CACATCCTTACTTAGC
 CACTTTTATTCTTAAGTACCACCTTCTGGA
 +
 6A=CCCCBCCCAAA??@CC8@@CCBC:>)@
- at HiMom:9:2:2:1012
+ at machine1:HiMom:abcdeACXX:9:2:2:1012 :Y:0:CACATCCTTACTTAGC
 NAGAAATACCATTTGACCCACCAATCCCAT
 +
 %066:::9636963567778::88895-58
- at HiMom:9:2:2:1402
+ at machine1:HiMom:abcdeACXX:9:2:2:1402 :N:0:CACATCCTTACTTAGC
 NGGATGGCTTCCAGTATGGGAACCTTTTCA
 +
 %.5484-/858865/78/(/62'/886555
- at HiMom:9:2:3:1094
+ at machine1:HiMom:abcdeACXX:9:2:3:1094 :Y:0:CACATCCTTACTTAGC
 CATATGGTATCACCACTCAGATACATAAAG
 +
 AABB<:=1CBBCBC@?AA@)>CCBBCCB?=
- at HiMom:9:2:3:16
+ at machine1:HiMom:abcdeACXX:9:2:3:16 :Y:0:CACATCCTTACTTAGC
 AGCTGGGCATGGTGATGCGCCCCTGTAATC
 +
 A;?;<<?@9?@@@@4=3)1 at 59??9<5.<2
- at HiMom:9:2:3:1712
+ at machine1:HiMom:abcdeACXX:9:2:3:1712 :Y:0:CACATCCTTACTTAGC
 AGTGCTGTGGCCTGGATGGATGTCAGGATT
 +
 >91:?5:=5:77>305>/;=>1:<B9694;
- at HiMom:9:2:3:328
+ at machine1:HiMom:abcdeACXX:9:2:3:328 :N:0:CACATCCTTACTTAGC
 AGCTTAATATAGCATAGCAGATAAGATTTG
 +
 (:*8>=,3:))<)?A<(8>###########
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCTTACTTAGC.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCTTACTTAGC.barcode_1.fastq
index 417accc..1f3c848 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCTTACTTAGC.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCTTACTTAGC.barcode_1.fastq
@@ -1,36 +1,36 @@
- at HiMom:9:1:2:1465
+ at machine1:HiMom:abcdeACXX:9:1:2:1465 :N:0:CACATCCTTACTTAGC
 CACATCCT
 +
 <:@=BB@@
- at HiMom:9:1:3:683
+ at machine1:HiMom:abcdeACXX:9:1:3:683 :Y:0:CACATCCTTACTTAGC
 CACATCCT
 +
 B at 8@B?CB
- at HiMom:9:1:3:751
+ at machine1:HiMom:abcdeACXX:9:1:3:751 :Y:0:CACATCCTTACTTAGC
 CACATCCT
 +
 9 at CACCCC
- at HiMom:9:2:2:1012
+ at machine1:HiMom:abcdeACXX:9:2:2:1012 :Y:0:CACATCCTTACTTAGC
 CACATCCT
 +
 BB?BABBB
- at HiMom:9:2:2:1402
+ at machine1:HiMom:abcdeACXX:9:2:2:1402 :N:0:CACATCCTTACTTAGC
 CACATCCT
 +
 =@@BABCB
- at HiMom:9:2:3:1094
+ at machine1:HiMom:abcdeACXX:9:2:3:1094 :Y:0:CACATCCTTACTTAGC
 CACATCCT
 +
 ABCBC>:B
- at HiMom:9:2:3:16
+ at machine1:HiMom:abcdeACXX:9:2:3:16 :Y:0:CACATCCTTACTTAGC
 CACATCCT
 +
 <<4@@='@
- at HiMom:9:2:3:1712
+ at machine1:HiMom:abcdeACXX:9:2:3:1712 :Y:0:CACATCCTTACTTAGC
 CACATCCT
 +
 BB>@@?=>
- at HiMom:9:2:3:328
+ at machine1:HiMom:abcdeACXX:9:2:3:328 :N:0:CACATCCTTACTTAGC
 CAAATCCT
 +
 3<)):<(<
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCTTACTTAGC.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCTTACTTAGC.barcode_2.fastq
index fc92bae..7d7b0f8 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCTTACTTAGC.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CACATCCTTACTTAGC.barcode_2.fastq
@@ -1,36 +1,36 @@
- at HiMom:9:1:2:1465
+ at machine1:HiMom:abcdeACXX:9:1:2:1465 :N:0:CACATCCTTACTTAGC
 TACTTAGC
 +
 <:@=BB@@
- at HiMom:9:1:3:683
+ at machine1:HiMom:abcdeACXX:9:1:3:683 :Y:0:CACATCCTTACTTAGC
 TACTTAGC
 +
 B at 8@B?CB
- at HiMom:9:1:3:751
+ at machine1:HiMom:abcdeACXX:9:1:3:751 :Y:0:CACATCCTTACTTAGC
 TACTTAGC
 +
 9 at CACCCC
- at HiMom:9:2:2:1012
+ at machine1:HiMom:abcdeACXX:9:2:2:1012 :Y:0:CACATCCTTACTTAGC
 TACTTAGC
 +
 BB?BABBB
- at HiMom:9:2:2:1402
+ at machine1:HiMom:abcdeACXX:9:2:2:1402 :N:0:CACATCCTTACTTAGC
 TACTTAGC
 +
 =@@BABCB
- at HiMom:9:2:3:1094
+ at machine1:HiMom:abcdeACXX:9:2:3:1094 :Y:0:CACATCCTTACTTAGC
 TACTTAGC
 +
 ABCBC>:B
- at HiMom:9:2:3:16
+ at machine1:HiMom:abcdeACXX:9:2:3:16 :Y:0:CACATCCTTACTTAGC
 TACTTAGC
 +
 <<4@@='@
- at HiMom:9:2:3:1712
+ at machine1:HiMom:abcdeACXX:9:2:3:1712 :Y:0:CACATCCTTACTTAGC
 TACTTAGC
 +
 BB>@@?=>
- at HiMom:9:2:3:328
+ at machine1:HiMom:abcdeACXX:9:2:3:328 :N:0:CACATCCTTACTTAGC
 TACTTAGC
 +
 3<)):<(<
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCC.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCC.1.fastq
index 44d7567..e13284a 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCC.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCC.1.fastq
@@ -1,36 +1,36 @@
- at HiMom:7:1:2:1336
+ at machine1:HiMom:abcdeACXX:7:1:2:1336 :Y:0:CAGGAGCC
 NAAGTCTAAAATTATCTTGAAGTAAAAAGT
 +
 %.75795:89<<<<4-7::58579<<<8.7
- at HiMom:7:1:2:1878
+ at machine1:HiMom:abcdeACXX:7:1:2:1878 :Y:0:CAGGAGCC
 NAATACTGAGATGTATTTAAGGCTGACACT
 +
 %.9:957/3767079:::7:5/57::9999
- at HiMom:7:1:2:425
+ at machine1:HiMom:abcdeACXX:7:1:2:425 :Y:0:CAGGAGCC
 NAATATATGCAAGACTCCTGTTATTAGAAA
 +
 %099:99055:726<<9<9977::9:::<<
- at HiMom:7:1:2:802
+ at machine1:HiMom:abcdeACXX:7:1:2:802 :Y:0:CAGGAGCC
 NAAGTTAATTGTGTATTATTAACATCATTC
 +
 %/627<<<<444358<<::::989957972
- at HiMom:7:1:3:1927
+ at machine1:HiMom:abcdeACXX:7:1:3:1927 :N:0:CAGGAGCC
 CACATCACCTTCTACTACATTTGAAATTCT
 +
 BCACA8B>C=BA?C8BC:'8=-5@)@=0=B
- at HiMom:7:2:2:303
+ at machine1:HiMom:abcdeACXX:7:2:2:303 :N:0:CAGGAGCC
 NAGATCTTGTCTTTCAATCTTTTTAAATTC
 +
 ##############################
- at HiMom:7:2:2:953
+ at machine1:HiMom:abcdeACXX:7:2:2:953 :N:0:CAGGAGCC
 NGTTTAGTACATACTAGGTTTCACCAAATT
 +
 ##############################
- at HiMom:7:2:3:151
+ at machine1:HiMom:abcdeACXX:7:2:3:151 :Y:0:CAGGAGCC
 AGAGAACAGATAGGTCTGTCAGGGCTGACC
 +
 ?>=99B>BA?B>)?;5AB;89;=6??<73>
- at HiMom:7:2:3:99
+ at machine1:HiMom:abcdeACXX:7:2:3:99 :N:0:CAGGAGCC
 CATATCTGTGTTATTTTAGCATAAATTTGA
 +
 1 at +@31?('4(A;73>)?73))@))@C?##
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCC.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCC.barcode_1.fastq
index ef8167d..4779a34 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCC.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCC.barcode_1.fastq
@@ -1,36 +1,36 @@
- at HiMom:7:1:2:1336
+ at machine1:HiMom:abcdeACXX:7:1:2:1336 :Y:0:CAGGAGCC
 CAGGAGCC
 +
 7 at 9=B=7@
- at HiMom:7:1:2:1878
+ at machine1:HiMom:abcdeACXX:7:1:2:1878 :Y:0:CAGGAGCC
 CAGGAGCC
 +
 B<81<=7;
- at HiMom:7:1:2:425
+ at machine1:HiMom:abcdeACXX:7:1:2:425 :Y:0:CAGGAGCC
 CAGGAGCC
 +
 AA@@=9;<
- at HiMom:7:1:2:802
+ at machine1:HiMom:abcdeACXX:7:1:2:802 :Y:0:CAGGAGCC
 CAGGAGCC
 +
 =>0>?7>#
- at HiMom:7:1:3:1927
+ at machine1:HiMom:abcdeACXX:7:1:3:1927 :N:0:CAGGAGCC
 CAGGAGCC
 +
 B@<@@=@?
- at HiMom:7:2:2:303
+ at machine1:HiMom:abcdeACXX:7:2:2:303 :N:0:CAGGAGCC
 CAGGAGCC
 +
 A>*@@9##
- at HiMom:7:2:2:953
+ at machine1:HiMom:abcdeACXX:7:2:2:953 :N:0:CAGGAGCC
 CAGGAACC
 +
 5(:9;';;
- at HiMom:7:2:3:151
+ at machine1:HiMom:abcdeACXX:7:2:3:151 :Y:0:CAGGAGCC
 CAGGAGCC
 +
 @A8/;A==
- at HiMom:7:2:3:99
+ at machine1:HiMom:abcdeACXX:7:2:3:99 :N:0:CAGGAGCC
 CAGGAGCG
 +
 (1;A;###
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCCGTATAACA.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCCGTATAACA.1.fastq
index 7f00684..ec27872 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCCGTATAACA.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCCGTATAACA.1.fastq
@@ -1,36 +1,36 @@
- at HiMom:9:1:2:1336
+ at machine1:HiMom:abcdeACXX:9:1:2:1336 :Y:0:CAGGAGCCGTATAACA
 NAAGTCTAAAATTATCTTGAAGTAAAAAGT
 +
 %.75795:89<<<<4-7::58579<<<8.7
- at HiMom:9:1:2:1878
+ at machine1:HiMom:abcdeACXX:9:1:2:1878 :Y:0:CAGGAGCCGTATAACA
 NAATACTGAGATGTATTTAAGGCTGACACT
 +
 %.9:957/3767079:::7:5/57::9999
- at HiMom:9:1:2:425
+ at machine1:HiMom:abcdeACXX:9:1:2:425 :Y:0:CAGGAGCCGTATAACA
 NAATATATGCAAGACTCCTGTTATTAGAAA
 +
 %099:99055:726<<9<9977::9:::<<
- at HiMom:9:1:2:802
+ at machine1:HiMom:abcdeACXX:9:1:2:802 :Y:0:CAGGAGCCGTATAACA
 NAAGTTAATTGTGTATTATTAACATCATTC
 +
 %/627<<<<444358<<::::989957972
- at HiMom:9:1:3:1927
+ at machine1:HiMom:abcdeACXX:9:1:3:1927 :N:0:CAGGAGCCGTATAACA
 CACATCACCTTCTACTACATTTGAAATTCT
 +
 BCACA8B>C=BA?C8BC:'8=-5@)@=0=B
- at HiMom:9:2:2:303
+ at machine1:HiMom:abcdeACXX:9:2:2:303 :N:0:CAGGAGCCGTATAACA
 NAGATCTTGTCTTTCAATCTTTTTAAATTC
 +
 ##############################
- at HiMom:9:2:2:953
+ at machine1:HiMom:abcdeACXX:9:2:2:953 :N:0:CAGGAGCCGTATAACA
 NGTTTAGTACATACTAGGTTTCACCAAATT
 +
 ##############################
- at HiMom:9:2:3:151
+ at machine1:HiMom:abcdeACXX:9:2:3:151 :Y:0:CAGGAGCCGTATAACA
 AGAGAACAGATAGGTCTGTCAGGGCTGACC
 +
 ?>=99B>BA?B>)?;5AB;89;=6??<73>
- at HiMom:9:2:3:99
+ at machine1:HiMom:abcdeACXX:9:2:3:99 :N:0:CAGGAGCCGTATAACA
 CATATCTGTGTTATTTTAGCATAAATTTGA
 +
 1 at +@31?('4(A;73>)?73))@))@C?##
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCCGTATAACA.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCCGTATAACA.barcode_1.fastq
index 9b0e584..5ad708c 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCCGTATAACA.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCCGTATAACA.barcode_1.fastq
@@ -1,36 +1,36 @@
- at HiMom:9:1:2:1336
+ at machine1:HiMom:abcdeACXX:9:1:2:1336 :Y:0:CAGGAGCCGTATAACA
 CAGGAGCC
 +
 7 at 9=B=7@
- at HiMom:9:1:2:1878
+ at machine1:HiMom:abcdeACXX:9:1:2:1878 :Y:0:CAGGAGCCGTATAACA
 CAGGAGCC
 +
 B<81<=7;
- at HiMom:9:1:2:425
+ at machine1:HiMom:abcdeACXX:9:1:2:425 :Y:0:CAGGAGCCGTATAACA
 CAGGAGCC
 +
 AA@@=9;<
- at HiMom:9:1:2:802
+ at machine1:HiMom:abcdeACXX:9:1:2:802 :Y:0:CAGGAGCCGTATAACA
 CAGGAGCC
 +
 =>0>?7>#
- at HiMom:9:1:3:1927
+ at machine1:HiMom:abcdeACXX:9:1:3:1927 :N:0:CAGGAGCCGTATAACA
 CAGGAGCC
 +
 B@<@@=@?
- at HiMom:9:2:2:303
+ at machine1:HiMom:abcdeACXX:9:2:2:303 :N:0:CAGGAGCCGTATAACA
 CAGGAGCC
 +
 A>*@@9##
- at HiMom:9:2:2:953
+ at machine1:HiMom:abcdeACXX:9:2:2:953 :N:0:CAGGAGCCGTATAACA
 CAGGAACC
 +
 5(:9;';;
- at HiMom:9:2:3:151
+ at machine1:HiMom:abcdeACXX:9:2:3:151 :Y:0:CAGGAGCCGTATAACA
 CAGGAGCC
 +
 @A8/;A==
- at HiMom:9:2:3:99
+ at machine1:HiMom:abcdeACXX:9:2:3:99 :N:0:CAGGAGCCGTATAACA
 CAGGAGCG
 +
 (1;A;###
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCCGTATAACA.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCCGTATAACA.barcode_2.fastq
index 58a20e1..f2361f4 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCCGTATAACA.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CAGGAGCCGTATAACA.barcode_2.fastq
@@ -1,36 +1,36 @@
- at HiMom:9:1:2:1336
+ at machine1:HiMom:abcdeACXX:9:1:2:1336 :Y:0:CAGGAGCCGTATAACA
 GTATAACA
 +
 7 at 9=B=7@
- at HiMom:9:1:2:1878
+ at machine1:HiMom:abcdeACXX:9:1:2:1878 :Y:0:CAGGAGCCGTATAACA
 GTATAACA
 +
 B<81<=7;
- at HiMom:9:1:2:425
+ at machine1:HiMom:abcdeACXX:9:1:2:425 :Y:0:CAGGAGCCGTATAACA
 GTATAACA
 +
 AA@@=9;<
- at HiMom:9:1:2:802
+ at machine1:HiMom:abcdeACXX:9:1:2:802 :Y:0:CAGGAGCCGTATAACA
 GTATAACA
 +
 =>0>?7>#
- at HiMom:9:1:3:1927
+ at machine1:HiMom:abcdeACXX:9:1:3:1927 :N:0:CAGGAGCCGTATAACA
 GTATAACA
 +
 B@<@@=@?
- at HiMom:9:2:2:303
+ at machine1:HiMom:abcdeACXX:9:2:2:303 :N:0:CAGGAGCCGTATAACA
 GTATAACA
 +
 A>*@@9##
- at HiMom:9:2:2:953
+ at machine1:HiMom:abcdeACXX:9:2:2:953 :N:0:CAGGAGCCGTATAACA
 GTATAACA
 +
 5(:9;';;
- at HiMom:9:2:3:151
+ at machine1:HiMom:abcdeACXX:9:2:3:151 :Y:0:CAGGAGCCGTATAACA
 GTATAACA
 +
 @A8/;A==
- at HiMom:9:2:3:99
+ at machine1:HiMom:abcdeACXX:9:2:3:99 :N:0:CAGGAGCCGTATAACA
 GTATAACA
 +
 (1;A;###
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGA.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGA.1.fastq
index 1ff81e0..27cd699 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGA.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGA.1.fastq
@@ -1,48 +1,48 @@
- at HiMom:7:1:2:119
+ at machine1:HiMom:abcdeACXX:7:1:2:119 :Y:0:CATAGCGA
 NGATTGGAATCAACCCGAGTGGAATGGAAT
 +
 %06:75577786742-6-66///288517#
- at HiMom:7:1:2:1895
+ at machine1:HiMom:abcdeACXX:7:1:2:1895 :Y:0:CATAGCGA
 NAAAACTTCTAAGTAATCATGAAGCTCTGC
 +
 %.7;9:::::<84:99989:<678<:6776
- at HiMom:7:1:2:190
+ at machine1:HiMom:abcdeACXX:7:1:2:190 :Y:0:CATAGCGA
 NATAAGTGTATATTTATTTGTACCATGACA
 +
 %-;8694777:8;;9<:<<<<99998:996
- at HiMom:7:1:3:1513
+ at machine1:HiMom:abcdeACXX:7:1:3:1513 :Y:0:CATAGCGA
 CACGCCACTGCGCCTGCAGCCTGGGCAATA
 +
 B=55 at AA6@=;>;>/;@@9@<>52<?@ABA
- at HiMom:7:1:3:277
+ at machine1:HiMom:abcdeACXX:7:1:3:277 :N:0:CATAGCGA
 NGATGGGAAGGCCCCGGCCTGGGGAGGTGG
 +
 ##############################
- at HiMom:7:2:2:463
+ at machine1:HiMom:abcdeACXX:7:2:2:463 :N:0:CATAGCGA
 NGTGCTTGGGGGCGTCTGTGTTGATGCGTG
 +
 ##############################
- at HiMom:7:2:2:611
+ at machine1:HiMom:abcdeACXX:7:2:2:611 :N:0:CATAGCGA
 NGGAACCAGGCAGGGCCACACACAGGTAGC
 +
 ##############################
- at HiMom:7:2:3:1016
+ at machine1:HiMom:abcdeACXX:7:2:3:1016 :Y:0:CATAGCGA
 TGGCTCTGTCCTAATATCTTATTCTTACAA
 +
 <3=@BBA?@<=BBCC@>6>BBBBB at B?@AC
- at HiMom:7:2:3:1898
+ at machine1:HiMom:abcdeACXX:7:2:3:1898 :N:0:CATAGCGA
 NTTGAATTGCTGGACTTCAATGTGTGTGGG
 +
 %08868:64680+0-5:8765255647522
- at HiMom:7:2:3:2013
+ at machine1:HiMom:abcdeACXX:7:2:3:2013 :N:0:CATAGCGA
 AGCAGAAGCCTGCTGTGGGAACACTCAGTC
 +
 B?B###########################
- at HiMom:7:2:3:399
+ at machine1:HiMom:abcdeACXX:7:2:3:399 :Y:0:CATAGCGA
 AGGGTATGTAAACCGAGTTTTGCGGGGGAT
 +
 A@@@>BBBBBAA>@;?B?BBAA>@:@:?AB
- at HiMom:7:2:3:983
+ at machine1:HiMom:abcdeACXX:7:2:3:983 :Y:0:CATAGCGA
 TGTTTTTTATTTTAACAGATGAAGTACCAA
 +
 B=BCCCCCCCCCCCA>AACCBCC at AC@>BC
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGA.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGA.barcode_1.fastq
index c22c114..6ccf796 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGA.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGA.barcode_1.fastq
@@ -1,48 +1,48 @@
- at HiMom:7:1:2:119
+ at machine1:HiMom:abcdeACXX:7:1:2:119 :Y:0:CATAGCGA
 CATAGCGA
 +
 ?@>=;<CB
- at HiMom:7:1:2:1895
+ at machine1:HiMom:abcdeACXX:7:1:2:1895 :Y:0:CATAGCGA
 CATAGCGA
 +
 ?@CC@>BC
- at HiMom:7:1:2:190
+ at machine1:HiMom:abcdeACXX:7:1:2:190 :Y:0:CATAGCGA
 CATAGCGA
 +
 AACC==@B
- at HiMom:7:1:3:1513
+ at machine1:HiMom:abcdeACXX:7:1:3:1513 :Y:0:CATAGCGA
 CATAGCGA
 +
 5 at B=37 at B
- at HiMom:7:1:3:277
+ at machine1:HiMom:abcdeACXX:7:1:3:277 :N:0:CATAGCGA
 CATAGCGA
 +
 BA?;3>B=
- at HiMom:7:2:2:463
+ at machine1:HiMom:abcdeACXX:7:2:2:463 :N:0:CATAGCGA
 CNTAGCGA
 +
 :%98.(>9
- at HiMom:7:2:2:611
+ at machine1:HiMom:abcdeACXX:7:2:2:611 :N:0:CATAGCGA
 CATAGCGA
 +
 8 at CCB=;@
- at HiMom:7:2:3:1016
+ at machine1:HiMom:abcdeACXX:7:2:3:1016 :Y:0:CATAGCGA
 CATAGCGA
 +
 >@C@@1 at C
- at HiMom:7:2:3:1898
+ at machine1:HiMom:abcdeACXX:7:2:3:1898 :N:0:CATAGCGA
 CATAGCGA
 +
 BBCB@=B@
- at HiMom:7:2:3:2013
+ at machine1:HiMom:abcdeACXX:7:2:3:2013 :N:0:CATAGCGA
 CATAGCGA
 +
 7BCB<@?<
- at HiMom:7:2:3:399
+ at machine1:HiMom:abcdeACXX:7:2:3:399 :Y:0:CATAGCGA
 CATAGCGA
 +
 =BB@==A@
- at HiMom:7:2:3:983
+ at machine1:HiMom:abcdeACXX:7:2:3:983 :Y:0:CATAGCGA
 CATAGCGA
 +
 ACCC@?A?
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGAGGTCCAGA.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGAGGTCCAGA.1.fastq
index e40d384..7b2474a 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGAGGTCCAGA.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGAGGTCCAGA.1.fastq
@@ -1,48 +1,48 @@
- at HiMom:9:1:2:119
+ at machine1:HiMom:abcdeACXX:9:1:2:119 :Y:0:CATAGCGAGGTCCAGA
 NGATTGGAATCAACCCGAGTGGAATGGAAT
 +
 %06:75577786742-6-66///288517#
- at HiMom:9:1:2:1895
+ at machine1:HiMom:abcdeACXX:9:1:2:1895 :Y:0:CATAGCGAGGTCCAGA
 NAAAACTTCTAAGTAATCATGAAGCTCTGC
 +
 %.7;9:::::<84:99989:<678<:6776
- at HiMom:9:1:2:190
+ at machine1:HiMom:abcdeACXX:9:1:2:190 :Y:0:CATAGCGAGGTCCAGA
 NATAAGTGTATATTTATTTGTACCATGACA
 +
 %-;8694777:8;;9<:<<<<99998:996
- at HiMom:9:1:3:1513
+ at machine1:HiMom:abcdeACXX:9:1:3:1513 :Y:0:CATAGCGAGGTCCAGA
 CACGCCACTGCGCCTGCAGCCTGGGCAATA
 +
 B=55 at AA6@=;>;>/;@@9@<>52<?@ABA
- at HiMom:9:1:3:277
+ at machine1:HiMom:abcdeACXX:9:1:3:277 :N:0:CATAGCGAGGTCCAGA
 NGATGGGAAGGCCCCGGCCTGGGGAGGTGG
 +
 ##############################
- at HiMom:9:2:2:463
+ at machine1:HiMom:abcdeACXX:9:2:2:463 :N:0:CATAGCGAGGTCCAGA
 NGTGCTTGGGGGCGTCTGTGTTGATGCGTG
 +
 ##############################
- at HiMom:9:2:2:611
+ at machine1:HiMom:abcdeACXX:9:2:2:611 :N:0:CATAGCGAGGTCCAGA
 NGGAACCAGGCAGGGCCACACACAGGTAGC
 +
 ##############################
- at HiMom:9:2:3:1016
+ at machine1:HiMom:abcdeACXX:9:2:3:1016 :Y:0:CATAGCGAGGTCCAGA
 TGGCTCTGTCCTAATATCTTATTCTTACAA
 +
 <3=@BBA?@<=BBCC@>6>BBBBB at B?@AC
- at HiMom:9:2:3:1898
+ at machine1:HiMom:abcdeACXX:9:2:3:1898 :N:0:CATAGCGAGGTCCAGA
 NTTGAATTGCTGGACTTCAATGTGTGTGGG
 +
 %08868:64680+0-5:8765255647522
- at HiMom:9:2:3:2013
+ at machine1:HiMom:abcdeACXX:9:2:3:2013 :N:0:CATAGCGAGGTCCAGA
 AGCAGAAGCCTGCTGTGGGAACACTCAGTC
 +
 B?B###########################
- at HiMom:9:2:3:399
+ at machine1:HiMom:abcdeACXX:9:2:3:399 :Y:0:CATAGCGAGGTCCAGA
 AGGGTATGTAAACCGAGTTTTGCGGGGGAT
 +
 A@@@>BBBBBAA>@;?B?BBAA>@:@:?AB
- at HiMom:9:2:3:983
+ at machine1:HiMom:abcdeACXX:9:2:3:983 :Y:0:CATAGCGAGGTCCAGA
 TGTTTTTTATTTTAACAGATGAAGTACCAA
 +
 B=BCCCCCCCCCCCA>AACCBCC at AC@>BC
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGAGGTCCAGA.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGAGGTCCAGA.barcode_1.fastq
index 6852a17..a18a3f0 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGAGGTCCAGA.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGAGGTCCAGA.barcode_1.fastq
@@ -1,48 +1,48 @@
- at HiMom:9:1:2:119
+ at machine1:HiMom:abcdeACXX:9:1:2:119 :Y:0:CATAGCGAGGTCCAGA
 CATAGCGA
 +
 ?@>=;<CB
- at HiMom:9:1:2:1895
+ at machine1:HiMom:abcdeACXX:9:1:2:1895 :Y:0:CATAGCGAGGTCCAGA
 CATAGCGA
 +
 ?@CC@>BC
- at HiMom:9:1:2:190
+ at machine1:HiMom:abcdeACXX:9:1:2:190 :Y:0:CATAGCGAGGTCCAGA
 CATAGCGA
 +
 AACC==@B
- at HiMom:9:1:3:1513
+ at machine1:HiMom:abcdeACXX:9:1:3:1513 :Y:0:CATAGCGAGGTCCAGA
 CATAGCGA
 +
 5 at B=37 at B
- at HiMom:9:1:3:277
+ at machine1:HiMom:abcdeACXX:9:1:3:277 :N:0:CATAGCGAGGTCCAGA
 CATAGCGA
 +
 BA?;3>B=
- at HiMom:9:2:2:463
+ at machine1:HiMom:abcdeACXX:9:2:2:463 :N:0:CATAGCGAGGTCCAGA
 CNTAGCGA
 +
 :%98.(>9
- at HiMom:9:2:2:611
+ at machine1:HiMom:abcdeACXX:9:2:2:611 :N:0:CATAGCGAGGTCCAGA
 CATAGCGA
 +
 8 at CCB=;@
- at HiMom:9:2:3:1016
+ at machine1:HiMom:abcdeACXX:9:2:3:1016 :Y:0:CATAGCGAGGTCCAGA
 CATAGCGA
 +
 >@C@@1 at C
- at HiMom:9:2:3:1898
+ at machine1:HiMom:abcdeACXX:9:2:3:1898 :N:0:CATAGCGAGGTCCAGA
 CATAGCGA
 +
 BBCB@=B@
- at HiMom:9:2:3:2013
+ at machine1:HiMom:abcdeACXX:9:2:3:2013 :N:0:CATAGCGAGGTCCAGA
 CATAGCGA
 +
 7BCB<@?<
- at HiMom:9:2:3:399
+ at machine1:HiMom:abcdeACXX:9:2:3:399 :Y:0:CATAGCGAGGTCCAGA
 CATAGCGA
 +
 =BB@==A@
- at HiMom:9:2:3:983
+ at machine1:HiMom:abcdeACXX:9:2:3:983 :Y:0:CATAGCGAGGTCCAGA
 CATAGCGA
 +
 ACCC@?A?
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGAGGTCCAGA.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGAGGTCCAGA.barcode_2.fastq
index 4db2d75..4c51eff 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGAGGTCCAGA.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATAGCGAGGTCCAGA.barcode_2.fastq
@@ -1,48 +1,48 @@
- at HiMom:9:1:2:119
+ at machine1:HiMom:abcdeACXX:9:1:2:119 :Y:0:CATAGCGAGGTCCAGA
 GGTCCAGA
 +
 ?@>=;<CB
- at HiMom:9:1:2:1895
+ at machine1:HiMom:abcdeACXX:9:1:2:1895 :Y:0:CATAGCGAGGTCCAGA
 GGTCCAGA
 +
 ?@CC@>BC
- at HiMom:9:1:2:190
+ at machine1:HiMom:abcdeACXX:9:1:2:190 :Y:0:CATAGCGAGGTCCAGA
 GGTCCAGA
 +
 AACC==@B
- at HiMom:9:1:3:1513
+ at machine1:HiMom:abcdeACXX:9:1:3:1513 :Y:0:CATAGCGAGGTCCAGA
 GGTCCAGA
 +
 5 at B=37 at B
- at HiMom:9:1:3:277
+ at machine1:HiMom:abcdeACXX:9:1:3:277 :N:0:CATAGCGAGGTCCAGA
 GGTCCAGA
 +
 BA?;3>B=
- at HiMom:9:2:2:463
+ at machine1:HiMom:abcdeACXX:9:2:2:463 :N:0:CATAGCGAGGTCCAGA
 GGTCCAGA
 +
 :%98.(>9
- at HiMom:9:2:2:611
+ at machine1:HiMom:abcdeACXX:9:2:2:611 :N:0:CATAGCGAGGTCCAGA
 GGTCCAGA
 +
 8 at CCB=;@
- at HiMom:9:2:3:1016
+ at machine1:HiMom:abcdeACXX:9:2:3:1016 :Y:0:CATAGCGAGGTCCAGA
 GGTCCAGA
 +
 >@C@@1 at C
- at HiMom:9:2:3:1898
+ at machine1:HiMom:abcdeACXX:9:2:3:1898 :N:0:CATAGCGAGGTCCAGA
 GGTCCAGA
 +
 BBCB@=B@
- at HiMom:9:2:3:2013
+ at machine1:HiMom:abcdeACXX:9:2:3:2013 :N:0:CATAGCGAGGTCCAGA
 GGTCCAGA
 +
 7BCB<@?<
- at HiMom:9:2:3:399
+ at machine1:HiMom:abcdeACXX:9:2:3:399 :Y:0:CATAGCGAGGTCCAGA
 GGTCCAGA
 +
 =BB@==A@
- at HiMom:9:2:3:983
+ at machine1:HiMom:abcdeACXX:9:2:3:983 :Y:0:CATAGCGAGGTCCAGA
 GGTCCAGA
 +
 ACCC@?A?
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTA.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTA.1.fastq
index b12f767..fae42f1 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTA.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTA.1.fastq
@@ -1,20 +1,20 @@
- at HiMom:7:1:3:1525
+ at machine1:HiMom:abcdeACXX:7:1:3:1525 :Y:0:CATGCTTA
 AGAAAATATCTGCATAGATGTGTTGAAGTC
 +
 BBBBBBAA@@?<3<:B=?B@@A at BAAA@=A
- at HiMom:7:2:2:679
+ at machine1:HiMom:abcdeACXX:7:2:2:679 :N:0:CATGCTTA
 NCTCTGTCTCAAAAAATAAAAATAAAAATA
 +
 ##############################
- at HiMom:7:2:3:1775
+ at machine1:HiMom:abcdeACXX:7:2:3:1775 :Y:0:CATGCTTA
 NAATCCGACAATTATGTGTCTTGGAGTTGC
 +
 %.22301499988866456250*.424955
- at HiMom:7:2:3:584
+ at machine1:HiMom:abcdeACXX:7:2:3:584 :Y:0:CATGCTTA
 AAAGTCCTGGGATTACAGGCATGAGCCACT
 +
 ABC2<@=>8;6=>?>3>-3<>B9@/=9A;<
- at HiMom:7:2:3:932
+ at machine1:HiMom:abcdeACXX:7:2:3:932 :Y:0:CATGCTTA
 AGAAAGACAGACAGACAAACTGACTCTCAG
 +
 @>@C at 4A=?2 at B@.>ABABBBB>=A:;>@#
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTA.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTA.barcode_1.fastq
index 6b2a857..ebfad4f 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTA.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTA.barcode_1.fastq
@@ -1,20 +1,20 @@
- at HiMom:7:1:3:1525
+ at machine1:HiMom:abcdeACXX:7:1:3:1525 :Y:0:CATGCTTA
 CATGCTTA
 +
 BBB;BBBB
- at HiMom:7:2:2:679
+ at machine1:HiMom:abcdeACXX:7:2:2:679 :N:0:CATGCTTA
 CATGCTTA
 +
 5?@??8<@
- at HiMom:7:2:3:1775
+ at machine1:HiMom:abcdeACXX:7:2:3:1775 :Y:0:CATGCTTA
 CATGCTTA
 +
 ;<39<;@@
- at HiMom:7:2:3:584
+ at machine1:HiMom:abcdeACXX:7:2:3:584 :Y:0:CATGCTTA
 CATGCTTA
 +
 >A??<CCC
- at HiMom:7:2:3:932
+ at machine1:HiMom:abcdeACXX:7:2:3:932 :Y:0:CATGCTTA
 CATGCTTA
 +
 =C at AACCB
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTAGCACATCT.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTAGCACATCT.1.fastq
index 41b2e2d..eea26aa 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTAGCACATCT.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTAGCACATCT.1.fastq
@@ -1,20 +1,20 @@
- at HiMom:9:1:3:1525
+ at machine1:HiMom:abcdeACXX:9:1:3:1525 :Y:0:CATGCTTAGCACATCT
 AGAAAATATCTGCATAGATGTGTTGAAGTC
 +
 BBBBBBAA@@?<3<:B=?B@@A at BAAA@=A
- at HiMom:9:2:2:679
+ at machine1:HiMom:abcdeACXX:9:2:2:679 :N:0:CATGCTTAGCACATCT
 NCTCTGTCTCAAAAAATAAAAATAAAAATA
 +
 ##############################
- at HiMom:9:2:3:1775
+ at machine1:HiMom:abcdeACXX:9:2:3:1775 :Y:0:CATGCTTAGCACATCT
 NAATCCGACAATTATGTGTCTTGGAGTTGC
 +
 %.22301499988866456250*.424955
- at HiMom:9:2:3:584
+ at machine1:HiMom:abcdeACXX:9:2:3:584 :Y:0:CATGCTTAGCACATCT
 AAAGTCCTGGGATTACAGGCATGAGCCACT
 +
 ABC2<@=>8;6=>?>3>-3<>B9@/=9A;<
- at HiMom:9:2:3:932
+ at machine1:HiMom:abcdeACXX:9:2:3:932 :Y:0:CATGCTTAGCACATCT
 AGAAAGACAGACAGACAAACTGACTCTCAG
 +
 @>@C at 4A=?2 at B@.>ABABBBB>=A:;>@#
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTAGCACATCT.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTAGCACATCT.barcode_1.fastq
index 78ddf07..c325e36 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTAGCACATCT.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTAGCACATCT.barcode_1.fastq
@@ -1,20 +1,20 @@
- at HiMom:9:1:3:1525
+ at machine1:HiMom:abcdeACXX:9:1:3:1525 :Y:0:CATGCTTAGCACATCT
 CATGCTTA
 +
 BBB;BBBB
- at HiMom:9:2:2:679
+ at machine1:HiMom:abcdeACXX:9:2:2:679 :N:0:CATGCTTAGCACATCT
 CATGCTTA
 +
 5?@??8<@
- at HiMom:9:2:3:1775
+ at machine1:HiMom:abcdeACXX:9:2:3:1775 :Y:0:CATGCTTAGCACATCT
 CATGCTTA
 +
 ;<39<;@@
- at HiMom:9:2:3:584
+ at machine1:HiMom:abcdeACXX:9:2:3:584 :Y:0:CATGCTTAGCACATCT
 CATGCTTA
 +
 >A??<CCC
- at HiMom:9:2:3:932
+ at machine1:HiMom:abcdeACXX:9:2:3:932 :Y:0:CATGCTTAGCACATCT
 CATGCTTA
 +
 =C at AACCB
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTAGCACATCT.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTAGCACATCT.barcode_2.fastq
index 02a6c4e..b7db855 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTAGCACATCT.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CATGCTTAGCACATCT.barcode_2.fastq
@@ -1,20 +1,20 @@
- at HiMom:9:1:3:1525
+ at machine1:HiMom:abcdeACXX:9:1:3:1525 :Y:0:CATGCTTAGCACATCT
 GCACATCT
 +
 BBB;BBBB
- at HiMom:9:2:2:679
+ at machine1:HiMom:abcdeACXX:9:2:2:679 :N:0:CATGCTTAGCACATCT
 GCACATCT
 +
 5?@??8<@
- at HiMom:9:2:3:1775
+ at machine1:HiMom:abcdeACXX:9:2:3:1775 :Y:0:CATGCTTAGCACATCT
 GCACATCT
 +
 ;<39<;@@
- at HiMom:9:2:3:584
+ at machine1:HiMom:abcdeACXX:9:2:3:584 :Y:0:CATGCTTAGCACATCT
 GCACATCT
 +
 >A??<CCC
- at HiMom:9:2:3:932
+ at machine1:HiMom:abcdeACXX:9:2:3:932 :Y:0:CATGCTTAGCACATCT
 GCACATCT
 +
 =C at AACCB
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAG.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAG.1.fastq
index 800a1c6..36ae850 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAG.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAG.1.fastq
@@ -1,44 +1,44 @@
- at HiMom:7:1:3:1688
+ at machine1:HiMom:abcdeACXX:7:1:3:1688 :Y:0:CCAGTTAG
 NCCTTCTTTACACACTGAGGAACTTAACCT
 +
 %..99999:9:7753564-357708:9777
- at HiMom:7:1:3:583
+ at machine1:HiMom:abcdeACXX:7:1:3:583 :Y:0:CCAGTTAG
 GGCTTACACAGTCAAACTGGAGAGAAGTAG
 +
 (56=CCCC=B8BABBBC@:=BBAAA?, at A<
- at HiMom:7:1:3:996
+ at machine1:HiMom:abcdeACXX:7:1:3:996 :Y:0:CCAGTTAG
 AAGGGAATTCTTGGACTTGATTAAATTGGT
 +
 =C9?6?BBB?6;6>;>A?BA?@2<@BB:##
- at HiMom:7:2:2:1671
+ at machine1:HiMom:abcdeACXX:7:2:2:1671 :N:0:CCAGTTAG
 NGGGAATTACATGGAAAATGATCAAAGGAA
 +
 ##############################
- at HiMom:7:2:2:1723
+ at machine1:HiMom:abcdeACXX:7:2:2:1723 :N:0:CCAGTTAG
 NGAAGCTGACATTACAGGTTTCAGACACCA
 +
 ##############################
- at HiMom:7:2:2:255
+ at machine1:HiMom:abcdeACXX:7:2:2:255 :Y:0:CCAGTTAG
 NGGGTCCAAATAAGAGAAGGAGAAAAACAG
 +
 %00412036893057554167465;98977
- at HiMom:7:2:3:112
+ at machine1:HiMom:abcdeACXX:7:2:3:112 :Y:0:CCAGTTAG
 NATGGAGTCTTGCTCTATTGCCCAGGCTGG
 +
 ##############################
- at HiMom:7:2:3:1179
+ at machine1:HiMom:abcdeACXX:7:2:3:1179 :N:0:CCAGTTAG
 ATTTAATAAATAAAGCAACCTGACAACTGA
 +
 @15;'88?A at 1/3='106/9A7.*:/08##
- at HiMom:7:2:3:1387
+ at machine1:HiMom:abcdeACXX:7:2:3:1387 :N:0:CCAGTTAG
 NCGATTATGACTCTGAGAGAAAGTAGGGCA
 +
 ##############################
- at HiMom:7:2:3:1484
+ at machine1:HiMom:abcdeACXX:7:2:3:1484 :Y:0:CCAGTTAG
 CATCAACCTGTCACAAAATGACAAAACCTA
 +
 =A at 5@CB?B5@?B@@BBBB?ABCCBC at ABB
- at HiMom:7:2:3:1576
+ at machine1:HiMom:abcdeACXX:7:2:3:1576 :N:0:CCAGTTAG
 NGAAACCACGTGCCCATTTTCAGTTCTGGT
 +
 %*/%.55663117868788787/765####
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAG.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAG.barcode_1.fastq
index e543f51..9de336b 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAG.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAG.barcode_1.fastq
@@ -1,44 +1,44 @@
- at HiMom:7:1:3:1688
+ at machine1:HiMom:abcdeACXX:7:1:3:1688 :Y:0:CCAGTTAG
 CCAGTTAG
 +
 >@==;CA=
- at HiMom:7:1:3:583
+ at machine1:HiMom:abcdeACXX:7:1:3:583 :Y:0:CCAGTTAG
 CCAGTTAG
 +
 =>93;CA>
- at HiMom:7:1:3:996
+ at machine1:HiMom:abcdeACXX:7:1:3:996 :Y:0:CCAGTTAG
 CCAGTTAG
 +
 A at 5=>C<#
- at HiMom:7:2:2:1671
+ at machine1:HiMom:abcdeACXX:7:2:2:1671 :N:0:CCAGTTAG
 CCAGTTAG
 +
 @>>B;BA9
- at HiMom:7:2:2:1723
+ at machine1:HiMom:abcdeACXX:7:2:2:1723 :N:0:CCAGTTAG
 CCAATTAG
 +
 @A######
- at HiMom:7:2:2:255
+ at machine1:HiMom:abcdeACXX:7:2:2:255 :Y:0:CCAGTTAG
 CCAGTTAG
 +
 A<?CAA@;
- at HiMom:7:2:3:112
+ at machine1:HiMom:abcdeACXX:7:2:3:112 :Y:0:CCAGTTAG
 CCAGTTAG
 +
 B@<CAC at 6
- at HiMom:7:2:3:1179
+ at machine1:HiMom:abcdeACXX:7:2:3:1179 :N:0:CCAGTTAG
 CCAGTTAG
 +
 );;9@@;#
- at HiMom:7:2:3:1387
+ at machine1:HiMom:abcdeACXX:7:2:3:1387 :N:0:CCAGTTAG
 CCAGTTAG
 +
 ;+B,232A
- at HiMom:7:2:3:1484
+ at machine1:HiMom:abcdeACXX:7:2:3:1484 :Y:0:CCAGTTAG
 CCAGTTAG
 +
 >BAAAC@<
- at HiMom:7:2:3:1576
+ at machine1:HiMom:abcdeACXX:7:2:3:1576 :N:0:CCAGTTAG
 CCAGTTAG
 +
 :B?=CACA
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAGGCACACGA.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAGGCACACGA.1.fastq
index d9ab5d4..8bb1096 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAGGCACACGA.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAGGCACACGA.1.fastq
@@ -1,44 +1,44 @@
- at HiMom:9:1:3:1688
+ at machine1:HiMom:abcdeACXX:9:1:3:1688 :Y:0:CCAGTTAGGCACACGA
 NCCTTCTTTACACACTGAGGAACTTAACCT
 +
 %..99999:9:7753564-357708:9777
- at HiMom:9:1:3:583
+ at machine1:HiMom:abcdeACXX:9:1:3:583 :Y:0:CCAGTTAGGCACACGA
 GGCTTACACAGTCAAACTGGAGAGAAGTAG
 +
 (56=CCCC=B8BABBBC@:=BBAAA?, at A<
- at HiMom:9:1:3:996
+ at machine1:HiMom:abcdeACXX:9:1:3:996 :Y:0:CCAGTTAGGCACACGA
 AAGGGAATTCTTGGACTTGATTAAATTGGT
 +
 =C9?6?BBB?6;6>;>A?BA?@2<@BB:##
- at HiMom:9:2:2:1671
+ at machine1:HiMom:abcdeACXX:9:2:2:1671 :N:0:CCAGTTAGGCACACGA
 NGGGAATTACATGGAAAATGATCAAAGGAA
 +
 ##############################
- at HiMom:9:2:2:1723
+ at machine1:HiMom:abcdeACXX:9:2:2:1723 :N:0:CCAGTTAGGCACACGA
 NGAAGCTGACATTACAGGTTTCAGACACCA
 +
 ##############################
- at HiMom:9:2:2:255
+ at machine1:HiMom:abcdeACXX:9:2:2:255 :Y:0:CCAGTTAGGCACACGA
 NGGGTCCAAATAAGAGAAGGAGAAAAACAG
 +
 %00412036893057554167465;98977
- at HiMom:9:2:3:112
+ at machine1:HiMom:abcdeACXX:9:2:3:112 :Y:0:CCAGTTAGGCACACGA
 NATGGAGTCTTGCTCTATTGCCCAGGCTGG
 +
 ##############################
- at HiMom:9:2:3:1179
+ at machine1:HiMom:abcdeACXX:9:2:3:1179 :N:0:CCAGTTAGGCACACGA
 ATTTAATAAATAAAGCAACCTGACAACTGA
 +
 @15;'88?A at 1/3='106/9A7.*:/08##
- at HiMom:9:2:3:1387
+ at machine1:HiMom:abcdeACXX:9:2:3:1387 :N:0:CCAGTTAGGCACACGA
 NCGATTATGACTCTGAGAGAAAGTAGGGCA
 +
 ##############################
- at HiMom:9:2:3:1484
+ at machine1:HiMom:abcdeACXX:9:2:3:1484 :Y:0:CCAGTTAGGCACACGA
 CATCAACCTGTCACAAAATGACAAAACCTA
 +
 =A at 5@CB?B5@?B@@BBBB?ABCCBC at ABB
- at HiMom:9:2:3:1576
+ at machine1:HiMom:abcdeACXX:9:2:3:1576 :N:0:CCAGTTAGGCACACGA
 NGAAACCACGTGCCCATTTTCAGTTCTGGT
 +
 %*/%.55663117868788787/765####
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAGGCACACGA.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAGGCACACGA.barcode_1.fastq
index 21cba4b..9891cd6 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAGGCACACGA.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAGGCACACGA.barcode_1.fastq
@@ -1,44 +1,44 @@
- at HiMom:9:1:3:1688
+ at machine1:HiMom:abcdeACXX:9:1:3:1688 :Y:0:CCAGTTAGGCACACGA
 CCAGTTAG
 +
 >@==;CA=
- at HiMom:9:1:3:583
+ at machine1:HiMom:abcdeACXX:9:1:3:583 :Y:0:CCAGTTAGGCACACGA
 CCAGTTAG
 +
 =>93;CA>
- at HiMom:9:1:3:996
+ at machine1:HiMom:abcdeACXX:9:1:3:996 :Y:0:CCAGTTAGGCACACGA
 CCAGTTAG
 +
 A at 5=>C<#
- at HiMom:9:2:2:1671
+ at machine1:HiMom:abcdeACXX:9:2:2:1671 :N:0:CCAGTTAGGCACACGA
 CCAGTTAG
 +
 @>>B;BA9
- at HiMom:9:2:2:1723
+ at machine1:HiMom:abcdeACXX:9:2:2:1723 :N:0:CCAGTTAGGCACACGA
 CCAATTAG
 +
 @A######
- at HiMom:9:2:2:255
+ at machine1:HiMom:abcdeACXX:9:2:2:255 :Y:0:CCAGTTAGGCACACGA
 CCAGTTAG
 +
 A<?CAA@;
- at HiMom:9:2:3:112
+ at machine1:HiMom:abcdeACXX:9:2:3:112 :Y:0:CCAGTTAGGCACACGA
 CCAGTTAG
 +
 B@<CAC at 6
- at HiMom:9:2:3:1179
+ at machine1:HiMom:abcdeACXX:9:2:3:1179 :N:0:CCAGTTAGGCACACGA
 CCAGTTAG
 +
 );;9@@;#
- at HiMom:9:2:3:1387
+ at machine1:HiMom:abcdeACXX:9:2:3:1387 :N:0:CCAGTTAGGCACACGA
 CCAGTTAG
 +
 ;+B,232A
- at HiMom:9:2:3:1484
+ at machine1:HiMom:abcdeACXX:9:2:3:1484 :Y:0:CCAGTTAGGCACACGA
 CCAGTTAG
 +
 >BAAAC@<
- at HiMom:9:2:3:1576
+ at machine1:HiMom:abcdeACXX:9:2:3:1576 :N:0:CCAGTTAGGCACACGA
 CCAGTTAG
 +
 :B?=CACA
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAGGCACACGA.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAGGCACACGA.barcode_2.fastq
index c416d9f..62a5fcb 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAGGCACACGA.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCAGTTAGGCACACGA.barcode_2.fastq
@@ -1,44 +1,44 @@
- at HiMom:9:1:3:1688
+ at machine1:HiMom:abcdeACXX:9:1:3:1688 :Y:0:CCAGTTAGGCACACGA
 GCACACGA
 +
 >@==;CA=
- at HiMom:9:1:3:583
+ at machine1:HiMom:abcdeACXX:9:1:3:583 :Y:0:CCAGTTAGGCACACGA
 GCACACGA
 +
 =>93;CA>
- at HiMom:9:1:3:996
+ at machine1:HiMom:abcdeACXX:9:1:3:996 :Y:0:CCAGTTAGGCACACGA
 GCACACGA
 +
 A at 5=>C<#
- at HiMom:9:2:2:1671
+ at machine1:HiMom:abcdeACXX:9:2:2:1671 :N:0:CCAGTTAGGCACACGA
 GCACACGA
 +
 @>>B;BA9
- at HiMom:9:2:2:1723
+ at machine1:HiMom:abcdeACXX:9:2:2:1723 :N:0:CCAGTTAGGCACACGA
 GCACACGA
 +
 @A######
- at HiMom:9:2:2:255
+ at machine1:HiMom:abcdeACXX:9:2:2:255 :Y:0:CCAGTTAGGCACACGA
 GCACACGA
 +
 A<?CAA@;
- at HiMom:9:2:3:112
+ at machine1:HiMom:abcdeACXX:9:2:3:112 :Y:0:CCAGTTAGGCACACGA
 GCACACGA
 +
 B@<CAC at 6
- at HiMom:9:2:3:1179
+ at machine1:HiMom:abcdeACXX:9:2:3:1179 :N:0:CCAGTTAGGCACACGA
 GCACACGA
 +
 );;9@@;#
- at HiMom:9:2:3:1387
+ at machine1:HiMom:abcdeACXX:9:2:3:1387 :N:0:CCAGTTAGGCACACGA
 GCACACGA
 +
 ;+B,232A
- at HiMom:9:2:3:1484
+ at machine1:HiMom:abcdeACXX:9:2:3:1484 :Y:0:CCAGTTAGGCACACGA
 GCACACGA
 +
 >BAAAC@<
- at HiMom:9:2:3:1576
+ at machine1:HiMom:abcdeACXX:9:2:3:1576 :N:0:CCAGTTAGGCACACGA
 GCACACGA
 +
 :B?=CACA
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCAT.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCAT.1.fastq
index 1c0467c..b2a2949 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCAT.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCAT.1.fastq
@@ -1,8 +1,8 @@
- at HiMom:7:1:2:636
+ at machine1:HiMom:abcdeACXX:7:1:2:636 :N:0:CCTACCAT
 NGATCATTTACTGTTGTCAACTACCAAAAT
 +
 %/72'+769621513-1-563202356557
- at HiMom:7:2:3:875
+ at machine1:HiMom:abcdeACXX:7:2:3:875 :N:0:CCTACCAT
 AGGCAGTAGTCTAATCCCGAGGATCCCAAG
 +
 :,73=@?<.=@;??@::3?8)5<=9%:?>7
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCAT.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCAT.barcode_1.fastq
index c95dfcc..194905a 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCAT.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCAT.barcode_1.fastq
@@ -1,8 +1,8 @@
- at HiMom:7:1:2:636
+ at machine1:HiMom:abcdeACXX:7:1:2:636 :N:0:CCTACCAT
 CCTACCAT
 +
 63<@A?B=
- at HiMom:7:2:3:875
+ at machine1:HiMom:abcdeACXX:7:2:3:875 :N:0:CCTACCAT
 CCTACCAT
 +
 ;=@@@8 at B
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCATCTACCAGG.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCATCTACCAGG.1.fastq
index 0274ef2..96084b9 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCATCTACCAGG.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCATCTACCAGG.1.fastq
@@ -1,8 +1,8 @@
- at HiMom:9:1:2:636
+ at machine1:HiMom:abcdeACXX:9:1:2:636 :N:0:CCTACCATCTACCAGG
 NGATCATTTACTGTTGTCAACTACCAAAAT
 +
 %/72'+769621513-1-563202356557
- at HiMom:9:2:3:875
+ at machine1:HiMom:abcdeACXX:9:2:3:875 :N:0:CCTACCATCTACCAGG
 AGGCAGTAGTCTAATCCCGAGGATCCCAAG
 +
 :,73=@?<.=@;??@::3?8)5<=9%:?>7
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCATCTACCAGG.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCATCTACCAGG.barcode_1.fastq
index 5f58846..b2ac984 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCATCTACCAGG.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCATCTACCAGG.barcode_1.fastq
@@ -1,8 +1,8 @@
- at HiMom:9:1:2:636
+ at machine1:HiMom:abcdeACXX:9:1:2:636 :N:0:CCTACCATCTACCAGG
 CCTACCAT
 +
 63<@A?B=
- at HiMom:9:2:3:875
+ at machine1:HiMom:abcdeACXX:9:2:3:875 :N:0:CCTACCATCTACCAGG
 CCTACCAT
 +
 ;=@@@8 at B
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCATCTACCAGG.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCATCTACCAGG.barcode_2.fastq
index 424b9c2..626028b 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCATCTACCAGG.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CCTACCATCTACCAGG.barcode_2.fastq
@@ -1,8 +1,8 @@
- at HiMom:9:1:2:636
+ at machine1:HiMom:abcdeACXX:9:1:2:636 :N:0:CCTACCATCTACCAGG
 CTACCAGG
 +
 63<@A?B=
- at HiMom:9:2:3:875
+ at machine1:HiMom:abcdeACXX:9:2:3:875 :N:0:CCTACCATCTACCAGG
 CTACCAGG
 +
 ;=@@@8 at B
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGG.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGG.1.fastq
index 399f535..b45415d 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGG.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGG.1.fastq
@@ -1,24 +1,24 @@
- at HiMom:7:1:2:1995
+ at machine1:HiMom:abcdeACXX:7:1:2:1995 :Y:0:CTACCAGG
 NATTTCCTGAACACAGCACAGGGAAGAGGA
 +
 %/78777738777:8877786776858225
- at HiMom:7:1:3:1358
+ at machine1:HiMom:abcdeACXX:7:1:3:1358 :N:0:CTACCAGG
 NTCCTTCCTCAAGGGGACCCCGCCTCCCCT
 +
 ##############################
- at HiMom:7:1:3:176
+ at machine1:HiMom:abcdeACXX:7:1:3:176 :Y:0:CTACCAGG
 ATATTTCATGAAAGACATAAATTTACAGTT
 +
 BBBCCB at BBBABBBB?ABBBBBBBBABB at B
- at HiMom:7:1:3:198
+ at machine1:HiMom:abcdeACXX:7:1:3:198 :Y:0:CTACCAGG
 TATAATTTAATGGTTTTTATATATTCAGAG
 +
 BBC=BBCCA=@=8<BCBCBBABBCB=BB<9
- at HiMom:7:1:3:900
+ at machine1:HiMom:abcdeACXX:7:1:3:900 :N:0:CTACCAGG
 TGAATCTTTGTTCAACACAGATTATTCCAG
 +
 )>@+5*<B1':(5,23A>5)@:)(/>:=##
- at HiMom:7:2:3:1970
+ at machine1:HiMom:abcdeACXX:7:2:3:1970 :Y:0:CTACCAGG
 NTAATACTCTTTGAGAAAGGACTGAGGGAA
 +
 %.:77558:68862.3;8455:0057535;
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGG.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGG.barcode_1.fastq
index 075f3e3..95d94ae 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGG.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGG.barcode_1.fastq
@@ -1,24 +1,24 @@
- at HiMom:7:1:2:1995
+ at machine1:HiMom:abcdeACXX:7:1:2:1995 :Y:0:CTACCAGG
 CTACCAGG
 +
 B=AA?BBA
- at HiMom:7:1:3:1358
+ at machine1:HiMom:abcdeACXX:7:1:3:1358 :N:0:CTACCAGG
 CTACAAGG
 +
 62BB####
- at HiMom:7:1:3:176
+ at machine1:HiMom:abcdeACXX:7:1:3:176 :Y:0:CTACCAGG
 CTACCAGG
 +
 ABBB?ABB
- at HiMom:7:1:3:198
+ at machine1:HiMom:abcdeACXX:7:1:3:198 :Y:0:CTACCAGG
 CTACCAGG
 +
 ABBBAA?@
- at HiMom:7:1:3:900
+ at machine1:HiMom:abcdeACXX:7:1:3:900 :N:0:CTACCAGG
 CTCCCAGG
 +
 (((.A at 85
- at HiMom:7:2:3:1970
+ at machine1:HiMom:abcdeACXX:7:2:3:1970 :Y:0:CTACCAGG
 CTACCAGG
 +
 BABBBAB@
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGGCCTACCAT.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGGCCTACCAT.1.fastq
index d9cba2e..23d3451 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGGCCTACCAT.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGGCCTACCAT.1.fastq
@@ -1,24 +1,24 @@
- at HiMom:9:1:2:1995
+ at machine1:HiMom:abcdeACXX:9:1:2:1995 :Y:0:CTACCAGGCCTACCAT
 NATTTCCTGAACACAGCACAGGGAAGAGGA
 +
 %/78777738777:8877786776858225
- at HiMom:9:1:3:1358
+ at machine1:HiMom:abcdeACXX:9:1:3:1358 :N:0:CTACCAGGCCTACCAT
 NTCCTTCCTCAAGGGGACCCCGCCTCCCCT
 +
 ##############################
- at HiMom:9:1:3:176
+ at machine1:HiMom:abcdeACXX:9:1:3:176 :Y:0:CTACCAGGCCTACCAT
 ATATTTCATGAAAGACATAAATTTACAGTT
 +
 BBBCCB at BBBABBBB?ABBBBBBBBABB at B
- at HiMom:9:1:3:198
+ at machine1:HiMom:abcdeACXX:9:1:3:198 :Y:0:CTACCAGGCCTACCAT
 TATAATTTAATGGTTTTTATATATTCAGAG
 +
 BBC=BBCCA=@=8<BCBCBBABBCB=BB<9
- at HiMom:9:1:3:900
+ at machine1:HiMom:abcdeACXX:9:1:3:900 :N:0:CTACCAGGCCTACCAT
 TGAATCTTTGTTCAACACAGATTATTCCAG
 +
 )>@+5*<B1':(5,23A>5)@:)(/>:=##
- at HiMom:9:2:3:1970
+ at machine1:HiMom:abcdeACXX:9:2:3:1970 :Y:0:CTACCAGGCCTACCAT
 NTAATACTCTTTGAGAAAGGACTGAGGGAA
 +
 %.:77558:68862.3;8455:0057535;
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGGCCTACCAT.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGGCCTACCAT.barcode_1.fastq
index a0d64d5..fc9c0d0 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGGCCTACCAT.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGGCCTACCAT.barcode_1.fastq
@@ -1,24 +1,24 @@
- at HiMom:9:1:2:1995
+ at machine1:HiMom:abcdeACXX:9:1:2:1995 :Y:0:CTACCAGGCCTACCAT
 CTACCAGG
 +
 B=AA?BBA
- at HiMom:9:1:3:1358
+ at machine1:HiMom:abcdeACXX:9:1:3:1358 :N:0:CTACCAGGCCTACCAT
 CTACAAGG
 +
 62BB####
- at HiMom:9:1:3:176
+ at machine1:HiMom:abcdeACXX:9:1:3:176 :Y:0:CTACCAGGCCTACCAT
 CTACCAGG
 +
 ABBB?ABB
- at HiMom:9:1:3:198
+ at machine1:HiMom:abcdeACXX:9:1:3:198 :Y:0:CTACCAGGCCTACCAT
 CTACCAGG
 +
 ABBBAA?@
- at HiMom:9:1:3:900
+ at machine1:HiMom:abcdeACXX:9:1:3:900 :N:0:CTACCAGGCCTACCAT
 CTCCCAGG
 +
 (((.A at 85
- at HiMom:9:2:3:1970
+ at machine1:HiMom:abcdeACXX:9:2:3:1970 :Y:0:CTACCAGGCCTACCAT
 CTACCAGG
 +
 BABBBAB@
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGGCCTACCAT.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGGCCTACCAT.barcode_2.fastq
index 715cf8c..20a2a23 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGGCCTACCAT.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/CTACCAGGCCTACCAT.barcode_2.fastq
@@ -1,24 +1,24 @@
- at HiMom:9:1:2:1995
+ at machine1:HiMom:abcdeACXX:9:1:2:1995 :Y:0:CTACCAGGCCTACCAT
 CCTACCAT
 +
 B=AA?BBA
- at HiMom:9:1:3:1358
+ at machine1:HiMom:abcdeACXX:9:1:3:1358 :N:0:CTACCAGGCCTACCAT
 CCTACCAT
 +
 62BB####
- at HiMom:9:1:3:176
+ at machine1:HiMom:abcdeACXX:9:1:3:176 :Y:0:CTACCAGGCCTACCAT
 CCTACCAT
 +
 ABBB?ABB
- at HiMom:9:1:3:198
+ at machine1:HiMom:abcdeACXX:9:1:3:198 :Y:0:CTACCAGGCCTACCAT
 CCTACCAT
 +
 ABBBAA?@
- at HiMom:9:1:3:900
+ at machine1:HiMom:abcdeACXX:9:1:3:900 :N:0:CTACCAGGCCTACCAT
 CCTACCAT
 +
 (((.A at 85
- at HiMom:9:2:3:1970
+ at machine1:HiMom:abcdeACXX:9:2:3:1970 :Y:0:CTACCAGGCCTACCAT
 CCTACCAT
 +
 BABBBAB@
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGA.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGA.1.fastq
index 121cb84..591d507 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGA.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGA.1.fastq
@@ -1,36 +1,36 @@
- at HiMom:7:1:3:1311
+ at machine1:HiMom:abcdeACXX:7:1:3:1311 :Y:0:GCACACGA
 AGACATAAAACCAGAGAGAAGATAGTGGGT
 +
 @@@BBBBCBA;>B>ABBBBBBBBA?;9:3>
- at HiMom:7:1:3:1544
+ at machine1:HiMom:abcdeACXX:7:1:3:1544 :N:0:GCACACGA
 CGTGGATGGTTTTGATGAGTCCCACTGCAC
 +
 =@=<)*@22375A9@?36(768@:'897<#
- at HiMom:7:1:3:301
+ at machine1:HiMom:abcdeACXX:7:1:3:301 :N:0:GCACACGA
 NTACGTGTGTGGCTGGATAGTCTGGACCAT
 +
 ##############################
- at HiMom:7:1:3:959
+ at machine1:HiMom:abcdeACXX:7:1:3:959 :Y:0:GCACACGA
 NAAAGTTTCCTGTGAGAAGGCGCATGGCAT
 +
 %.52-487848866757#############
- at HiMom:7:2:2:184
+ at machine1:HiMom:abcdeACXX:7:2:2:184 :N:0:GCACACGA
 NGAAACGTTTTTCGGTTGAGGAAACTTTTT
 +
 ##############################
- at HiMom:7:2:3:1025
+ at machine1:HiMom:abcdeACXX:7:2:3:1025 :Y:0:GCACACGA
 NAATGGAAAGGAGTCCAATGGAAGGGAATC
 +
 %/4626885-+3-3777:532570313837
- at HiMom:7:2:3:1290
+ at machine1:HiMom:abcdeACXX:7:2:3:1290 :N:0:GCACACGA
 NTCACCTGAATCCACGTTAGCTGGGGAAGA
 +
 ##############################
- at HiMom:7:2:3:1917
+ at machine1:HiMom:abcdeACXX:7:2:3:1917 :N:0:GCACACGA
 NTCCACAAAAAAAAAAAAAATTAGTTGGGT
 +
 %*6<737<4756##################
- at HiMom:7:2:3:495
+ at machine1:HiMom:abcdeACXX:7:2:3:495 :N:0:GCACACGA
 NTCCGTTTTTATAACTGTAAATTTATCACT
 +
 ##############################
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGA.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGA.barcode_1.fastq
index 7b04eec..97f5863 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGA.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGA.barcode_1.fastq
@@ -1,36 +1,36 @@
- at HiMom:7:1:3:1311
+ at machine1:HiMom:abcdeACXX:7:1:3:1311 :Y:0:GCACACGA
 GCACACGA
 +
 <?BAA at AB
- at HiMom:7:1:3:1544
+ at machine1:HiMom:abcdeACXX:7:1:3:1544 :N:0:GCACACGA
 GCACACGA
 +
 ((<.;;1;
- at HiMom:7:1:3:301
+ at machine1:HiMom:abcdeACXX:7:1:3:301 :N:0:GCACACGA
 GCACACGA
 +
 ########
- at HiMom:7:1:3:959
+ at machine1:HiMom:abcdeACXX:7:1:3:959 :Y:0:GCACACGA
 GCACACGA
 +
 3?;AB?=<
- at HiMom:7:2:2:184
+ at machine1:HiMom:abcdeACXX:7:2:2:184 :N:0:GCACACGA
 GCACACGA
 +
 >;<@A@@3
- at HiMom:7:2:3:1025
+ at machine1:HiMom:abcdeACXX:7:2:3:1025 :Y:0:GCACACGA
 GCACACGA
 +
 @=ABA@@@
- at HiMom:7:2:3:1290
+ at machine1:HiMom:abcdeACXX:7:2:3:1290 :N:0:GCACACGA
 GCACACGA
 +
 )5;=@<(;
- at HiMom:7:2:3:1917
+ at machine1:HiMom:abcdeACXX:7:2:3:1917 :N:0:GCACACGA
 GCACACGA
 +
 /5;@=;B9
- at HiMom:7:2:3:495
+ at machine1:HiMom:abcdeACXX:7:2:3:495 :N:0:GCACACGA
 GCACACGA
 +
 5;5<A@=;
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGACCAGTTAG.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGACCAGTTAG.1.fastq
index 41e7d43..967a3bb 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGACCAGTTAG.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGACCAGTTAG.1.fastq
@@ -1,36 +1,36 @@
- at HiMom:9:1:3:1311
+ at machine1:HiMom:abcdeACXX:9:1:3:1311 :Y:0:GCACACGACCAGTTAG
 AGACATAAAACCAGAGAGAAGATAGTGGGT
 +
 @@@BBBBCBA;>B>ABBBBBBBBA?;9:3>
- at HiMom:9:1:3:1544
+ at machine1:HiMom:abcdeACXX:9:1:3:1544 :N:0:GCACACGACCAGTTAG
 CGTGGATGGTTTTGATGAGTCCCACTGCAC
 +
 =@=<)*@22375A9@?36(768@:'897<#
- at HiMom:9:1:3:301
+ at machine1:HiMom:abcdeACXX:9:1:3:301 :N:0:GCACACGACCAGTTAG
 NTACGTGTGTGGCTGGATAGTCTGGACCAT
 +
 ##############################
- at HiMom:9:1:3:959
+ at machine1:HiMom:abcdeACXX:9:1:3:959 :Y:0:GCACACGACCAGTTAG
 NAAAGTTTCCTGTGAGAAGGCGCATGGCAT
 +
 %.52-487848866757#############
- at HiMom:9:2:2:184
+ at machine1:HiMom:abcdeACXX:9:2:2:184 :N:0:GCACACGACCAGTTAG
 NGAAACGTTTTTCGGTTGAGGAAACTTTTT
 +
 ##############################
- at HiMom:9:2:3:1025
+ at machine1:HiMom:abcdeACXX:9:2:3:1025 :Y:0:GCACACGACCAGTTAG
 NAATGGAAAGGAGTCCAATGGAAGGGAATC
 +
 %/4626885-+3-3777:532570313837
- at HiMom:9:2:3:1290
+ at machine1:HiMom:abcdeACXX:9:2:3:1290 :N:0:GCACACGACCAGTTAG
 NTCACCTGAATCCACGTTAGCTGGGGAAGA
 +
 ##############################
- at HiMom:9:2:3:1917
+ at machine1:HiMom:abcdeACXX:9:2:3:1917 :N:0:GCACACGACCAGTTAG
 NTCCACAAAAAAAAAAAAAATTAGTTGGGT
 +
 %*6<737<4756##################
- at HiMom:9:2:3:495
+ at machine1:HiMom:abcdeACXX:9:2:3:495 :N:0:GCACACGACCAGTTAG
 NTCCGTTTTTATAACTGTAAATTTATCACT
 +
 ##############################
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGACCAGTTAG.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGACCAGTTAG.barcode_1.fastq
index c999499..6c2aa56 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGACCAGTTAG.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGACCAGTTAG.barcode_1.fastq
@@ -1,36 +1,36 @@
- at HiMom:9:1:3:1311
+ at machine1:HiMom:abcdeACXX:9:1:3:1311 :Y:0:GCACACGACCAGTTAG
 GCACACGA
 +
 <?BAA at AB
- at HiMom:9:1:3:1544
+ at machine1:HiMom:abcdeACXX:9:1:3:1544 :N:0:GCACACGACCAGTTAG
 GCACACGA
 +
 ((<.;;1;
- at HiMom:9:1:3:301
+ at machine1:HiMom:abcdeACXX:9:1:3:301 :N:0:GCACACGACCAGTTAG
 GCACACGA
 +
 ########
- at HiMom:9:1:3:959
+ at machine1:HiMom:abcdeACXX:9:1:3:959 :Y:0:GCACACGACCAGTTAG
 GCACACGA
 +
 3?;AB?=<
- at HiMom:9:2:2:184
+ at machine1:HiMom:abcdeACXX:9:2:2:184 :N:0:GCACACGACCAGTTAG
 GCACACGA
 +
 >;<@A@@3
- at HiMom:9:2:3:1025
+ at machine1:HiMom:abcdeACXX:9:2:3:1025 :Y:0:GCACACGACCAGTTAG
 GCACACGA
 +
 @=ABA@@@
- at HiMom:9:2:3:1290
+ at machine1:HiMom:abcdeACXX:9:2:3:1290 :N:0:GCACACGACCAGTTAG
 GCACACGA
 +
 )5;=@<(;
- at HiMom:9:2:3:1917
+ at machine1:HiMom:abcdeACXX:9:2:3:1917 :N:0:GCACACGACCAGTTAG
 GCACACGA
 +
 /5;@=;B9
- at HiMom:9:2:3:495
+ at machine1:HiMom:abcdeACXX:9:2:3:495 :N:0:GCACACGACCAGTTAG
 GCACACGA
 +
 5;5<A@=;
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGACCAGTTAG.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGACCAGTTAG.barcode_2.fastq
index f40a686..c77a493 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGACCAGTTAG.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACACGACCAGTTAG.barcode_2.fastq
@@ -1,36 +1,36 @@
- at HiMom:9:1:3:1311
+ at machine1:HiMom:abcdeACXX:9:1:3:1311 :Y:0:GCACACGACCAGTTAG
 CCAGTTAG
 +
 <?BAA at AB
- at HiMom:9:1:3:1544
+ at machine1:HiMom:abcdeACXX:9:1:3:1544 :N:0:GCACACGACCAGTTAG
 CCAGTTAG
 +
 ((<.;;1;
- at HiMom:9:1:3:301
+ at machine1:HiMom:abcdeACXX:9:1:3:301 :N:0:GCACACGACCAGTTAG
 CCAGTTAG
 +
 ########
- at HiMom:9:1:3:959
+ at machine1:HiMom:abcdeACXX:9:1:3:959 :Y:0:GCACACGACCAGTTAG
 CCAGTTAG
 +
 3?;AB?=<
- at HiMom:9:2:2:184
+ at machine1:HiMom:abcdeACXX:9:2:2:184 :N:0:GCACACGACCAGTTAG
 CCAGTTAG
 +
 >;<@A@@3
- at HiMom:9:2:3:1025
+ at machine1:HiMom:abcdeACXX:9:2:3:1025 :Y:0:GCACACGACCAGTTAG
 CCAGTTAG
 +
 @=ABA@@@
- at HiMom:9:2:3:1290
+ at machine1:HiMom:abcdeACXX:9:2:3:1290 :N:0:GCACACGACCAGTTAG
 CCAGTTAG
 +
 )5;=@<(;
- at HiMom:9:2:3:1917
+ at machine1:HiMom:abcdeACXX:9:2:3:1917 :N:0:GCACACGACCAGTTAG
 CCAGTTAG
 +
 /5;@=;B9
- at HiMom:9:2:3:495
+ at machine1:HiMom:abcdeACXX:9:2:3:495 :N:0:GCACACGACCAGTTAG
 CCAGTTAG
 +
 5;5<A@=;
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCT.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCT.1.fastq
index 2fbc19f..3b95cbd 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCT.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCT.1.fastq
@@ -1,12 +1,12 @@
- at HiMom:7:1:3:389
+ at machine1:HiMom:abcdeACXX:7:1:3:389 :N:0:GCACATCT
 NGATGTTCAAACATGCATAACTCTAAGTAT
 +
 ##############################
- at HiMom:7:2:2:1567
+ at machine1:HiMom:abcdeACXX:7:2:2:1567 :Y:0:GCACATCT
 NAGACAGCAGTAACCTCTGCAGACTTAAAC
 +
 %,67:720544;4667:62-5667::6877
- at HiMom:7:2:3:1053
+ at machine1:HiMom:abcdeACXX:7:2:3:1053 :N:0:GCACATCT
 NTTTGATCATGATTCCATTCGAGACCATTC
 +
 %.;;##########################
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCT.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCT.barcode_1.fastq
index b5fc06d..ac9d40b 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCT.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCT.barcode_1.fastq
@@ -1,12 +1,12 @@
- at HiMom:7:1:3:389
+ at machine1:HiMom:abcdeACXX:7:1:3:389 :N:0:GCACATCT
 GCACATCT
 +
 <:@@@56;
- at HiMom:7:2:2:1567
+ at machine1:HiMom:abcdeACXX:7:2:2:1567 :Y:0:GCACATCT
 GCACATCT
 +
 @B=;@B?@
- at HiMom:7:2:3:1053
+ at machine1:HiMom:abcdeACXX:7:2:3:1053 :N:0:GCACATCT
 GCACATCT
 +
 6<?B?C at 4
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCTCATGCTTA.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCTCATGCTTA.1.fastq
index 53dec96..1c0c245 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCTCATGCTTA.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCTCATGCTTA.1.fastq
@@ -1,12 +1,12 @@
- at HiMom:9:1:3:389
+ at machine1:HiMom:abcdeACXX:9:1:3:389 :N:0:GCACATCTCATGCTTA
 NGATGTTCAAACATGCATAACTCTAAGTAT
 +
 ##############################
- at HiMom:9:2:2:1567
+ at machine1:HiMom:abcdeACXX:9:2:2:1567 :Y:0:GCACATCTCATGCTTA
 NAGACAGCAGTAACCTCTGCAGACTTAAAC
 +
 %,67:720544;4667:62-5667::6877
- at HiMom:9:2:3:1053
+ at machine1:HiMom:abcdeACXX:9:2:3:1053 :N:0:GCACATCTCATGCTTA
 NTTTGATCATGATTCCATTCGAGACCATTC
 +
 %.;;##########################
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCTCATGCTTA.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCTCATGCTTA.barcode_1.fastq
index 64ab42f..8d9ec57 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCTCATGCTTA.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCTCATGCTTA.barcode_1.fastq
@@ -1,12 +1,12 @@
- at HiMom:9:1:3:389
+ at machine1:HiMom:abcdeACXX:9:1:3:389 :N:0:GCACATCTCATGCTTA
 GCACATCT
 +
 <:@@@56;
- at HiMom:9:2:2:1567
+ at machine1:HiMom:abcdeACXX:9:2:2:1567 :Y:0:GCACATCTCATGCTTA
 GCACATCT
 +
 @B=;@B?@
- at HiMom:9:2:3:1053
+ at machine1:HiMom:abcdeACXX:9:2:3:1053 :N:0:GCACATCTCATGCTTA
 GCACATCT
 +
 6<?B?C at 4
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCTCATGCTTA.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCTCATGCTTA.barcode_2.fastq
index 36b26fb..cb34b4b 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCTCATGCTTA.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GCACATCTCATGCTTA.barcode_2.fastq
@@ -1,12 +1,12 @@
- at HiMom:9:1:3:389
+ at machine1:HiMom:abcdeACXX:9:1:3:389 :N:0:GCACATCTCATGCTTA
 CATGCTTA
 +
 <:@@@56;
- at HiMom:9:2:2:1567
+ at machine1:HiMom:abcdeACXX:9:2:2:1567 :Y:0:GCACATCTCATGCTTA
 CATGCTTA
 +
 @B=;@B?@
- at HiMom:9:2:3:1053
+ at machine1:HiMom:abcdeACXX:9:2:3:1053 :N:0:GCACATCTCATGCTTA
 CATGCTTA
 +
 6<?B?C at 4
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGA.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGA.1.fastq
index 05dd585..edba24c 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGA.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGA.1.fastq
@@ -1,28 +1,28 @@
- at HiMom:7:1:3:33
+ at machine1:HiMom:abcdeACXX:7:1:3:33 :N:0:GGTCCAGA
 CGGGCGCGGTGGATTCCGCCTTTAATCCTA
 +
 71@=>3?BA#####################
- at HiMom:7:1:3:471
+ at machine1:HiMom:abcdeACXX:7:1:3:471 :Y:0:GGTCCAGA
 AGAAAAAGACAAGCAGGCCTCTCACAGAGC
 +
 @=B>CB@?8BBBA<B<@ABBAAA=<@>>3<
- at HiMom:7:1:3:676
+ at machine1:HiMom:abcdeACXX:7:1:3:676 :N:0:GGTCCAGA
 ATAAGAAAATGCCAACCCATTTACAGTTTT
 +
 ?':7%68>?<(.9A7(=:68>A=2>(9@??
- at HiMom:7:2:2:1038
+ at machine1:HiMom:abcdeACXX:7:2:2:1038 :N:0:GGTCCAGA
 NATGGAATCAACCTGAGTGGAATGAAATGG
 +
 ##############################
- at HiMom:7:2:3:1352
+ at machine1:HiMom:abcdeACXX:7:2:3:1352 :Y:0:GGTCCAGA
 AAAGTGGCCCTTTCTGCATAATTCTTCTTG
 +
 @B@>2:@@:>B at AAA:AA>?B?>:=<1=<#
- at HiMom:7:2:3:1733
+ at machine1:HiMom:abcdeACXX:7:2:3:1733 :Y:0:GGTCCAGA
 NTTAAATGAGTGTAAATATTCAATTATGCA
 +
 %,:6::2/5;393<<9:<;919<97#####
- at HiMom:7:2:3:386
+ at machine1:HiMom:abcdeACXX:7:2:3:386 :N:0:GGTCCAGA
 NTGAATAAATAAATATCTGTATTATTCCTA
 +
 %156;99:999:5773,4-57973851.48
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGA.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGA.barcode_1.fastq
index 324ac2c..55d0c05 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGA.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGA.barcode_1.fastq
@@ -1,28 +1,28 @@
- at HiMom:7:1:3:33
+ at machine1:HiMom:abcdeACXX:7:1:3:33 :N:0:GGTCCAGA
 GGTCCAGA
 +
 17=;,'@@
- at HiMom:7:1:3:471
+ at machine1:HiMom:abcdeACXX:7:1:3:471 :Y:0:GGTCCAGA
 GGTCCAGA
 +
 <A=@B=?@
- at HiMom:7:1:3:676
+ at machine1:HiMom:abcdeACXX:7:1:3:676 :N:0:GGTCCAGA
 GATCCAGA
 +
 :(.<((:@
- at HiMom:7:2:2:1038
+ at machine1:HiMom:abcdeACXX:7:2:2:1038 :N:0:GGTCCAGA
 GGTCCAGA
 +
 =7=??B@@
- at HiMom:7:2:3:1352
+ at machine1:HiMom:abcdeACXX:7:2:3:1352 :Y:0:GGTCCAGA
 GGTCCAGA
 +
 0)<0;@@@
- at HiMom:7:2:3:1733
+ at machine1:HiMom:abcdeACXX:7:2:3:1733 :Y:0:GGTCCAGA
 GGTCCAGA
 +
 />BBBAA=
- at HiMom:7:2:3:386
+ at machine1:HiMom:abcdeACXX:7:2:3:386 :N:0:GGTCCAGA
 GGTCCAGA
 +
 9@@99@@9
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGACATAGCGA.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGACATAGCGA.1.fastq
index 6dde699..6223ca0 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGACATAGCGA.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGACATAGCGA.1.fastq
@@ -1,28 +1,28 @@
- at HiMom:9:1:3:33
+ at machine1:HiMom:abcdeACXX:9:1:3:33 :N:0:GGTCCAGACATAGCGA
 CGGGCGCGGTGGATTCCGCCTTTAATCCTA
 +
 71@=>3?BA#####################
- at HiMom:9:1:3:471
+ at machine1:HiMom:abcdeACXX:9:1:3:471 :Y:0:GGTCCAGACATAGCGA
 AGAAAAAGACAAGCAGGCCTCTCACAGAGC
 +
 @=B>CB@?8BBBA<B<@ABBAAA=<@>>3<
- at HiMom:9:1:3:676
+ at machine1:HiMom:abcdeACXX:9:1:3:676 :N:0:GGTCCAGACATAGCGA
 ATAAGAAAATGCCAACCCATTTACAGTTTT
 +
 ?':7%68>?<(.9A7(=:68>A=2>(9@??
- at HiMom:9:2:2:1038
+ at machine1:HiMom:abcdeACXX:9:2:2:1038 :N:0:GGTCCAGACATAGCGA
 NATGGAATCAACCTGAGTGGAATGAAATGG
 +
 ##############################
- at HiMom:9:2:3:1352
+ at machine1:HiMom:abcdeACXX:9:2:3:1352 :Y:0:GGTCCAGACATAGCGA
 AAAGTGGCCCTTTCTGCATAATTCTTCTTG
 +
 @B@>2:@@:>B at AAA:AA>?B?>:=<1=<#
- at HiMom:9:2:3:1733
+ at machine1:HiMom:abcdeACXX:9:2:3:1733 :Y:0:GGTCCAGACATAGCGA
 NTTAAATGAGTGTAAATATTCAATTATGCA
 +
 %,:6::2/5;393<<9:<;919<97#####
- at HiMom:9:2:3:386
+ at machine1:HiMom:abcdeACXX:9:2:3:386 :N:0:GGTCCAGACATAGCGA
 NTGAATAAATAAATATCTGTATTATTCCTA
 +
 %156;99:999:5773,4-57973851.48
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGACATAGCGA.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGACATAGCGA.barcode_1.fastq
index 8b62c2b..4a21eb6 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGACATAGCGA.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGACATAGCGA.barcode_1.fastq
@@ -1,28 +1,28 @@
- at HiMom:9:1:3:33
+ at machine1:HiMom:abcdeACXX:9:1:3:33 :N:0:GGTCCAGACATAGCGA
 GGTCCAGA
 +
 17=;,'@@
- at HiMom:9:1:3:471
+ at machine1:HiMom:abcdeACXX:9:1:3:471 :Y:0:GGTCCAGACATAGCGA
 GGTCCAGA
 +
 <A=@B=?@
- at HiMom:9:1:3:676
+ at machine1:HiMom:abcdeACXX:9:1:3:676 :N:0:GGTCCAGACATAGCGA
 GATCCAGA
 +
 :(.<((:@
- at HiMom:9:2:2:1038
+ at machine1:HiMom:abcdeACXX:9:2:2:1038 :N:0:GGTCCAGACATAGCGA
 GGTCCAGA
 +
 =7=??B@@
- at HiMom:9:2:3:1352
+ at machine1:HiMom:abcdeACXX:9:2:3:1352 :Y:0:GGTCCAGACATAGCGA
 GGTCCAGA
 +
 0)<0;@@@
- at HiMom:9:2:3:1733
+ at machine1:HiMom:abcdeACXX:9:2:3:1733 :Y:0:GGTCCAGACATAGCGA
 GGTCCAGA
 +
 />BBBAA=
- at HiMom:9:2:3:386
+ at machine1:HiMom:abcdeACXX:9:2:3:386 :N:0:GGTCCAGACATAGCGA
 GGTCCAGA
 +
 9@@99@@9
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGACATAGCGA.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGACATAGCGA.barcode_2.fastq
index 9b84f0e..c6b3f2d 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGACATAGCGA.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GGTCCAGACATAGCGA.barcode_2.fastq
@@ -1,28 +1,28 @@
- at HiMom:9:1:3:33
+ at machine1:HiMom:abcdeACXX:9:1:3:33 :N:0:GGTCCAGACATAGCGA
 CATAGCGA
 +
 17=;,'@@
- at HiMom:9:1:3:471
+ at machine1:HiMom:abcdeACXX:9:1:3:471 :Y:0:GGTCCAGACATAGCGA
 CATAGCGA
 +
 <A=@B=?@
- at HiMom:9:1:3:676
+ at machine1:HiMom:abcdeACXX:9:1:3:676 :N:0:GGTCCAGACATAGCGA
 CATAGCGA
 +
 :(.<((:@
- at HiMom:9:2:2:1038
+ at machine1:HiMom:abcdeACXX:9:2:2:1038 :N:0:GGTCCAGACATAGCGA
 CATAGCGA
 +
 =7=??B@@
- at HiMom:9:2:3:1352
+ at machine1:HiMom:abcdeACXX:9:2:3:1352 :Y:0:GGTCCAGACATAGCGA
 CATAGCGA
 +
 0)<0;@@@
- at HiMom:9:2:3:1733
+ at machine1:HiMom:abcdeACXX:9:2:3:1733 :Y:0:GGTCCAGACATAGCGA
 CATAGCGA
 +
 />BBBAA=
- at HiMom:9:2:3:386
+ at machine1:HiMom:abcdeACXX:9:2:3:386 :N:0:GGTCCAGACATAGCGA
 CATAGCGA
 +
 9@@99@@9
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACA.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACA.1.fastq
index a435a39..c1ae9f8 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACA.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACA.1.fastq
@@ -1,40 +1,40 @@
- at HiMom:7:1:2:11
+ at machine1:HiMom:abcdeACXX:7:1:2:11 :N:0:GTATAACA
 NAAATGAAAAAAGAAATGCATTGTCAGGTG
 +
 ##############################
- at HiMom:7:1:2:455
+ at machine1:HiMom:abcdeACXX:7:1:2:455 :N:0:GTATAACA
 NGCTTGAACTCAGGATTCACAATTTCAACC
 +
 ##############################
- at HiMom:7:1:3:1188
+ at machine1:HiMom:abcdeACXX:7:1:3:1188 :Y:0:GTATAACA
 GCGAATGCCATTATTTCATTCCTTTTCATG
 +
 =@CACA?AABCCCCCCCCAB??CBCBCCBB
- at HiMom:7:1:3:131
+ at machine1:HiMom:abcdeACXX:7:1:3:131 :Y:0:GTATAACA
 TAAAATAAAGTAAAAAGAAAGCAAGGTCCT
 +
 BBBBCCCBBA<CCCCA<<CBC>BBC=AC=C
- at HiMom:7:1:3:1488
+ at machine1:HiMom:abcdeACXX:7:1:3:1488 :Y:0:GTATAACA
 NATTCTGAGTAGCATGCTGGATCCCACCCC
 +
 %-445014,42/1666423###########
- at HiMom:7:1:3:1973
+ at machine1:HiMom:abcdeACXX:7:1:3:1973 :Y:0:GTATAACA
 NCTTTTATTGAATTAGCTTCTGTGGAAACC
 +
 %.<774<<145;105<<:6<7<:88;####
- at HiMom:7:1:3:289
+ at machine1:HiMom:abcdeACXX:7:1:3:289 :Y:0:GTATAACA
 ATAGTGCTACAATAAACATGGGAGTGCAGA
 +
 BB=;>AABB at BBBBBB@ACBA>>BA;9@?A
- at HiMom:7:2:2:1662
+ at machine1:HiMom:abcdeACXX:7:2:2:1662 :N:0:GTATAACA
 NACTAAAGACCTTATTCATGTAGCCAAATA
 +
 %.2556331)%079799::9:71855<88:
- at HiMom:7:2:2:61
+ at machine1:HiMom:abcdeACXX:7:2:2:61 :Y:0:GTATAACA
 NTTTCGATGGTGTTTCCATTTGATTCATTC
 +
 %0;:9:;799:8:97779:<679<977;::
- at HiMom:7:2:3:1581
+ at machine1:HiMom:abcdeACXX:7:2:3:1581 :N:0:GTATAACA
 NATAGGCAGGGAGCAAACCTCAATAAAAAG
 +
 ##############################
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACA.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACA.barcode_1.fastq
index 5b03a50..250d81c 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACA.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACA.barcode_1.fastq
@@ -1,40 +1,40 @@
- at HiMom:7:1:2:11
+ at machine1:HiMom:abcdeACXX:7:1:2:11 :N:0:GTATAACA
 GTATAAGA
 +
 @7==@7##
- at HiMom:7:1:2:455
+ at machine1:HiMom:abcdeACXX:7:1:2:455 :N:0:GTATAACA
 GTATAACT
 +
 ,@######
- at HiMom:7:1:3:1188
+ at machine1:HiMom:abcdeACXX:7:1:3:1188 :Y:0:GTATAACA
 GTATAACA
 +
 BBBCBCCB
- at HiMom:7:1:3:131
+ at machine1:HiMom:abcdeACXX:7:1:3:131 :Y:0:GTATAACA
 GTATAACA
 +
 48CCACAC
- at HiMom:7:1:3:1488
+ at machine1:HiMom:abcdeACXX:7:1:3:1488 :Y:0:GTATAACA
 GTATAACA
 +
 )7<9BBBB
- at HiMom:7:1:3:1973
+ at machine1:HiMom:abcdeACXX:7:1:3:1973 :Y:0:GTATAACA
 GTATAACA
 +
 7;CACCBC
- at HiMom:7:1:3:289
+ at machine1:HiMom:abcdeACXX:7:1:3:289 :Y:0:GTATAACA
 GTATAACA
 +
 >BCCCCB>
- at HiMom:7:2:2:1662
+ at machine1:HiMom:abcdeACXX:7:2:2:1662 :N:0:GTATAACA
 GTATAACA
 +
 82BA at AAB
- at HiMom:7:2:2:61
+ at machine1:HiMom:abcdeACXX:7:2:2:61 :Y:0:GTATAACA
 GTATAACA
 +
 <ABCBB9B
- at HiMom:7:2:3:1581
+ at machine1:HiMom:abcdeACXX:7:2:3:1581 :N:0:GTATAACA
 GTATAACA
 +
 :4<BAAAC
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACACAGGAGCC.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACACAGGAGCC.1.fastq
index 3353c03..c3a3023 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACACAGGAGCC.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACACAGGAGCC.1.fastq
@@ -1,40 +1,40 @@
- at HiMom:9:1:2:11
+ at machine1:HiMom:abcdeACXX:9:1:2:11 :N:0:GTATAACACAGGAGCC
 NAAATGAAAAAAGAAATGCATTGTCAGGTG
 +
 ##############################
- at HiMom:9:1:2:455
+ at machine1:HiMom:abcdeACXX:9:1:2:455 :N:0:GTATAACACAGGAGCC
 NGCTTGAACTCAGGATTCACAATTTCAACC
 +
 ##############################
- at HiMom:9:1:3:1188
+ at machine1:HiMom:abcdeACXX:9:1:3:1188 :Y:0:GTATAACACAGGAGCC
 GCGAATGCCATTATTTCATTCCTTTTCATG
 +
 =@CACA?AABCCCCCCCCAB??CBCBCCBB
- at HiMom:9:1:3:131
+ at machine1:HiMom:abcdeACXX:9:1:3:131 :Y:0:GTATAACACAGGAGCC
 TAAAATAAAGTAAAAAGAAAGCAAGGTCCT
 +
 BBBBCCCBBA<CCCCA<<CBC>BBC=AC=C
- at HiMom:9:1:3:1488
+ at machine1:HiMom:abcdeACXX:9:1:3:1488 :Y:0:GTATAACACAGGAGCC
 NATTCTGAGTAGCATGCTGGATCCCACCCC
 +
 %-445014,42/1666423###########
- at HiMom:9:1:3:1973
+ at machine1:HiMom:abcdeACXX:9:1:3:1973 :Y:0:GTATAACACAGGAGCC
 NCTTTTATTGAATTAGCTTCTGTGGAAACC
 +
 %.<774<<145;105<<:6<7<:88;####
- at HiMom:9:1:3:289
+ at machine1:HiMom:abcdeACXX:9:1:3:289 :Y:0:GTATAACACAGGAGCC
 ATAGTGCTACAATAAACATGGGAGTGCAGA
 +
 BB=;>AABB at BBBBBB@ACBA>>BA;9@?A
- at HiMom:9:2:2:1662
+ at machine1:HiMom:abcdeACXX:9:2:2:1662 :N:0:GTATAACACAGGAGCC
 NACTAAAGACCTTATTCATGTAGCCAAATA
 +
 %.2556331)%079799::9:71855<88:
- at HiMom:9:2:2:61
+ at machine1:HiMom:abcdeACXX:9:2:2:61 :Y:0:GTATAACACAGGAGCC
 NTTTCGATGGTGTTTCCATTTGATTCATTC
 +
 %0;:9:;799:8:97779:<679<977;::
- at HiMom:9:2:3:1581
+ at machine1:HiMom:abcdeACXX:9:2:3:1581 :N:0:GTATAACACAGGAGCC
 NATAGGCAGGGAGCAAACCTCAATAAAAAG
 +
 ##############################
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACACAGGAGCC.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACACAGGAGCC.barcode_1.fastq
index ab807c8..9ab10a3 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACACAGGAGCC.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACACAGGAGCC.barcode_1.fastq
@@ -1,40 +1,40 @@
- at HiMom:9:1:2:11
+ at machine1:HiMom:abcdeACXX:9:1:2:11 :N:0:GTATAACACAGGAGCC
 GTATAAGA
 +
 @7==@7##
- at HiMom:9:1:2:455
+ at machine1:HiMom:abcdeACXX:9:1:2:455 :N:0:GTATAACACAGGAGCC
 GTATAACT
 +
 ,@######
- at HiMom:9:1:3:1188
+ at machine1:HiMom:abcdeACXX:9:1:3:1188 :Y:0:GTATAACACAGGAGCC
 GTATAACA
 +
 BBBCBCCB
- at HiMom:9:1:3:131
+ at machine1:HiMom:abcdeACXX:9:1:3:131 :Y:0:GTATAACACAGGAGCC
 GTATAACA
 +
 48CCACAC
- at HiMom:9:1:3:1488
+ at machine1:HiMom:abcdeACXX:9:1:3:1488 :Y:0:GTATAACACAGGAGCC
 GTATAACA
 +
 )7<9BBBB
- at HiMom:9:1:3:1973
+ at machine1:HiMom:abcdeACXX:9:1:3:1973 :Y:0:GTATAACACAGGAGCC
 GTATAACA
 +
 7;CACCBC
- at HiMom:9:1:3:289
+ at machine1:HiMom:abcdeACXX:9:1:3:289 :Y:0:GTATAACACAGGAGCC
 GTATAACA
 +
 >BCCCCB>
- at HiMom:9:2:2:1662
+ at machine1:HiMom:abcdeACXX:9:2:2:1662 :N:0:GTATAACACAGGAGCC
 GTATAACA
 +
 82BA at AAB
- at HiMom:9:2:2:61
+ at machine1:HiMom:abcdeACXX:9:2:2:61 :Y:0:GTATAACACAGGAGCC
 GTATAACA
 +
 <ABCBB9B
- at HiMom:9:2:3:1581
+ at machine1:HiMom:abcdeACXX:9:2:3:1581 :N:0:GTATAACACAGGAGCC
 GTATAACA
 +
 :4<BAAAC
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACACAGGAGCC.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACACAGGAGCC.barcode_2.fastq
index 07a5b88..ade5931 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACACAGGAGCC.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/GTATAACACAGGAGCC.barcode_2.fastq
@@ -1,40 +1,40 @@
- at HiMom:9:1:2:11
+ at machine1:HiMom:abcdeACXX:9:1:2:11 :N:0:GTATAACACAGGAGCC
 CAGGAGCC
 +
 @7==@7##
- at HiMom:9:1:2:455
+ at machine1:HiMom:abcdeACXX:9:1:2:455 :N:0:GTATAACACAGGAGCC
 CAGGAGCC
 +
 ,@######
- at HiMom:9:1:3:1188
+ at machine1:HiMom:abcdeACXX:9:1:3:1188 :Y:0:GTATAACACAGGAGCC
 CAGGAGCC
 +
 BBBCBCCB
- at HiMom:9:1:3:131
+ at machine1:HiMom:abcdeACXX:9:1:3:131 :Y:0:GTATAACACAGGAGCC
 CAGGAGCC
 +
 48CCACAC
- at HiMom:9:1:3:1488
+ at machine1:HiMom:abcdeACXX:9:1:3:1488 :Y:0:GTATAACACAGGAGCC
 CAGGAGCC
 +
 )7<9BBBB
- at HiMom:9:1:3:1973
+ at machine1:HiMom:abcdeACXX:9:1:3:1973 :Y:0:GTATAACACAGGAGCC
 CAGGAGCC
 +
 7;CACCBC
- at HiMom:9:1:3:289
+ at machine1:HiMom:abcdeACXX:9:1:3:289 :Y:0:GTATAACACAGGAGCC
 CAGGAGCC
 +
 >BCCCCB>
- at HiMom:9:2:2:1662
+ at machine1:HiMom:abcdeACXX:9:2:2:1662 :N:0:GTATAACACAGGAGCC
 CAGGAGCC
 +
 82BA at AAB
- at HiMom:9:2:2:61
+ at machine1:HiMom:abcdeACXX:9:2:2:61 :Y:0:GTATAACACAGGAGCC
 CAGGAGCC
 +
 <ABCBB9B
- at HiMom:9:2:3:1581
+ at machine1:HiMom:abcdeACXX:9:2:3:1581 :N:0:GTATAACACAGGAGCC
 CAGGAGCC
 +
 :4<BAAAC
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/N.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/N.1.fastq
index a107b32..0d031e7 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/N.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/N.1.fastq
@@ -1,892 +1,892 @@
- at HiMom:7:1:0:1038
+ at machine1:HiMom:abcdeACXX:7:1:0:1038 :N:0:
 NNNNNCNNCANNNCNNNCNCCNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:0:1093
+ at machine1:HiMom:abcdeACXX:7:1:0:1093 :N:0:
 NNNNNCNNGTNNNANNNGNAANNNANNNNN
 +
 ##############################
- at HiMom:7:1:0:113
+ at machine1:HiMom:abcdeACXX:7:1:0:113 :N:0:
 NNNNNNNNGNNNNNNNNNNNANNNNNNNNN
 +
 ##############################
- at HiMom:7:1:0:1193
+ at machine1:HiMom:abcdeACXX:7:1:0:1193 :N:0:
 NNNNNNNNTNNNNTNNNTNNTNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:0:1291
+ at machine1:HiMom:abcdeACXX:7:1:0:1291 :N:0:
 NNNNNNNNANNNNNNNNANNTNNNNNNNNN
 +
 ##############################
- at HiMom:7:1:0:1307
+ at machine1:HiMom:abcdeACXX:7:1:0:1307 :N:0:
 NNNNNNNNCNNNNANNNTNNTNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:0:1434
+ at machine1:HiMom:abcdeACXX:7:1:0:1434 :N:0:
 NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
 +
 ##############################
- at HiMom:7:1:0:1475
+ at machine1:HiMom:abcdeACXX:7:1:0:1475 :N:0:
 NNNNNGNNANNNNANNNANNANNNANNNNN
 +
 ##############################
- at HiMom:7:1:0:1690
+ at machine1:HiMom:abcdeACXX:7:1:0:1690 :N:0:
 NNNNNNNNANNNNNNNNGNNCNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:0:1703
+ at machine1:HiMom:abcdeACXX:7:1:0:1703 :N:0:
 NNNNNNNNANNNNNNNNNNNANNNNNNNNN
 +
 ##############################
- at HiMom:7:1:0:1940
+ at machine1:HiMom:abcdeACXX:7:1:0:1940 :N:0:
 NNNNNNNNCNNNNNNNNTNNTNNNNNNNNN
 +
 ##############################
- at HiMom:7:1:0:2001
+ at machine1:HiMom:abcdeACXX:7:1:0:2001 :N:0:
 NNNNNANNTGNNNGNNNANGCNNNANNNNN
 +
 ##############################
- at HiMom:7:1:0:205
+ at machine1:HiMom:abcdeACXX:7:1:0:205 :N:0:
 NNNNNNNNANNNNNNNNANNTNNNANNNNN
 +
 ##############################
- at HiMom:7:1:0:275
+ at machine1:HiMom:abcdeACXX:7:1:0:275 :N:0:
 NNNNNANNCANNNTNNNGNCCNNNANNNNN
 +
 ##############################
- at HiMom:7:1:0:324
+ at machine1:HiMom:abcdeACXX:7:1:0:324 :N:0:
 NNNNNNNNTNNNNNNNNTNNANNNANNNNN
 +
 ##############################
- at HiMom:7:1:0:37
+ at machine1:HiMom:abcdeACXX:7:1:0:37 :N:0:
 NNNNNNNNANNNNNNNNCNNTNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:0:464
+ at machine1:HiMom:abcdeACXX:7:1:0:464 :N:0:
 NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
 +
 ##############################
- at HiMom:7:1:0:586
+ at machine1:HiMom:abcdeACXX:7:1:0:586 :N:0:
 NNNNNNNNCNNNNNNNNCNNCNNNANNNNN
 +
 ##############################
- at HiMom:7:1:0:841
+ at machine1:HiMom:abcdeACXX:7:1:0:841 :N:0:
 NNNNNNNNCNNNNNNNNNNNTNNNNNNNNN
 +
 ##############################
- at HiMom:7:1:0:879
+ at machine1:HiMom:abcdeACXX:7:1:0:879 :N:0:
 NNNNNNNNTNNNNNNNNNNNTNNNNNNNNN
 +
 ##############################
- at HiMom:7:1:1:1013
+ at machine1:HiMom:abcdeACXX:7:1:1:1013 :N:0:
 NNCNNTNCAGNNNCNNNANGTNNNGNNNNN
 +
 ##############################
- at HiMom:7:1:1:111
+ at machine1:HiMom:abcdeACXX:7:1:1:111 :N:0:
 NNCNNTNGCGNNNTNNNANCTNNNTNNNNN
 +
 ##############################
- at HiMom:7:1:1:1153
+ at machine1:HiMom:abcdeACXX:7:1:1:1153 :N:0:
 NNTNNTNTGGNNNTNNNCNTCNNNTNNNNN
 +
 ##############################
- at HiMom:7:1:1:1184
+ at machine1:HiMom:abcdeACXX:7:1:1:1184 :N:0:
 NNANNGNTCGNNNANNNTNCANNNTNNNNN
 +
 ##############################
- at HiMom:7:1:1:1241
+ at machine1:HiMom:abcdeACXX:7:1:1:1241 :N:0:
 NNANNGNTGGNNNTNNNCNTGNNNANNNNN
 +
 ##############################
- at HiMom:7:1:1:1243
+ at machine1:HiMom:abcdeACXX:7:1:1:1243 :N:0:
 NNANNANGGANNNANNNCNTANNNTNNNNN
 +
 ##############################
- at HiMom:7:1:1:1247
+ at machine1:HiMom:abcdeACXX:7:1:1:1247 :N:0:
 NCCAGCNTTTNNNTNNNTNCTNNNGNNNNN
 +
 ##############################
- at HiMom:7:1:1:1282
+ at machine1:HiMom:abcdeACXX:7:1:1:1282 :N:0:
 NNANNANGGGNNNTNNNGNAGNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:1:132
+ at machine1:HiMom:abcdeACXX:7:1:1:132 :N:0:
 NNANNGNGGGNNNGNNNGNGGNNNGNNNNN
 +
 ##############################
- at HiMom:7:1:1:1320
+ at machine1:HiMom:abcdeACXX:7:1:1:1320 :N:0:
 NNANNTNAGTNNNGNNNGNTANNNCNNNNN
 +
 ##############################
- at HiMom:7:1:1:1372
+ at machine1:HiMom:abcdeACXX:7:1:1:1372 :N:0:
 NACATTTTTTAGNTNANTTGTTNACNANNN
 +
 ##############################
- at HiMom:7:1:1:1379
+ at machine1:HiMom:abcdeACXX:7:1:1:1379 :N:0:
 NAATATAATTNNNTNNNTTAGANTTNNNNN
 +
 ##############################
- at HiMom:7:1:1:1391
+ at machine1:HiMom:abcdeACXX:7:1:1:1391 :N:0:
 NNGNNTNTAANNNANNNTNATNNNTNNNNN
 +
 ##############################
- at HiMom:7:1:1:140
+ at machine1:HiMom:abcdeACXX:7:1:1:140 :N:0:
 NNANNTNTAANNNGNNNCNTTNNNTNNNNN
 +
 ##############################
- at HiMom:7:1:1:1513
+ at machine1:HiMom:abcdeACXX:7:1:1:1513 :N:0:
 NNNNNANNTTNNNANNNANAANNNCNNNNN
 +
 ##############################
- at HiMom:7:1:1:1521
+ at machine1:HiMom:abcdeACXX:7:1:1:1521 :N:0:
 NAACAANATTNNNTNNNANTANNTANNNNN
 +
 ##############################
- at HiMom:7:1:1:155
+ at machine1:HiMom:abcdeACXX:7:1:1:155 :N:0:
 NNGNNCNAGTNNNCNNNANTTNNNGNNNNN
 +
 ##############################
- at HiMom:7:1:1:1555
+ at machine1:HiMom:abcdeACXX:7:1:1:1555 :N:0:
 NNTNNGNAGANNNANNNCNTANNNANNNNN
 +
 ##############################
- at HiMom:7:1:1:164
+ at machine1:HiMom:abcdeACXX:7:1:1:164 :N:0:
 NNANNANTAANNNTNNNTNATNNNTNNNNN
 +
 ##############################
- at HiMom:7:1:1:1684
+ at machine1:HiMom:abcdeACXX:7:1:1:1684 :N:0:
 NNGNNANGGTNNNGNNNTNTCNNNTNNNNN
 +
 ##############################
- at HiMom:7:1:1:1696
+ at machine1:HiMom:abcdeACXX:7:1:1:1696 :N:0:
 NNANNGNNGCNNNGNNNANACNNNTNNNNN
 +
 ##############################
- at HiMom:7:1:1:170
+ at machine1:HiMom:abcdeACXX:7:1:1:170 :N:0:
 NNTNNCNCACNNNGNNNGNTCNNNGNNNNN
 +
 ##############################
- at HiMom:7:1:1:173
+ at machine1:HiMom:abcdeACXX:7:1:1:173 :N:0:
 NNNNNANNATNNNTNNNCNTTNNNTNNNNN
 +
 ##############################
- at HiMom:7:1:1:1733
+ at machine1:HiMom:abcdeACXX:7:1:1:1733 :N:0:
 NNANNGNGTCNNNTNNNTNAGNNNANNNNN
 +
 ##############################
- at HiMom:7:1:1:1770
+ at machine1:HiMom:abcdeACXX:7:1:1:1770 :N:0:
 NNCNNTNCTGNNNGNNNGNCANNNANNNNN
 +
 ##############################
- at HiMom:7:1:1:18
+ at machine1:HiMom:abcdeACXX:7:1:1:18 :N:0:
 NATCAGNCTGNNNANNNTNGTNNAANNNNN
 +
 ##############################
- at HiMom:7:1:1:1815
+ at machine1:HiMom:abcdeACXX:7:1:1:1815 :N:0:
 NATGAAAATANNNTNNNTAAATNATNNNNN
 +
 ##############################
- at HiMom:7:1:1:1836
+ at machine1:HiMom:abcdeACXX:7:1:1:1836 :N:0:
 NNNNNGNNTANNNGNNNTNCTNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:1:184
+ at machine1:HiMom:abcdeACXX:7:1:1:184 :N:0:
 NNCNNTNTAANNNANNNTNATNNNGNNNNN
 +
 ##############################
- at HiMom:7:1:1:1886
+ at machine1:HiMom:abcdeACXX:7:1:1:1886 :Y:0:
 NACATATGCATACATATATAATAGATANNN
 +
 %.9:;<217;:999;<;;<<<;;#######
- at HiMom:7:1:1:1906
+ at machine1:HiMom:abcdeACXX:7:1:1:1906 :N:0:
 NNTNNCNATANNNCNNNTNCTNNNGNNNNN
 +
 ##############################
- at HiMom:7:1:1:1917
+ at machine1:HiMom:abcdeACXX:7:1:1:1917 :N:0:
 NNNNNTNNGANNNCNNNANAANNNANNNNN
 +
 ##############################
- at HiMom:7:1:1:195
+ at machine1:HiMom:abcdeACXX:7:1:1:195 :N:0:
 NNANNGNGTGNNNGNNNCNATNNNANNNNN
 +
 ##############################
- at HiMom:7:1:1:1954
+ at machine1:HiMom:abcdeACXX:7:1:1:1954 :N:0:
 NAGANTNCTTNNNGNNNGNAGNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:1:2
+ at machine1:HiMom:abcdeACXX:7:1:1:2 :N:0:
 NNANNGNGAANNNCNNNNNNNNNNNNNNNN
 +
 ##############################
- at HiMom:7:1:1:2011
+ at machine1:HiMom:abcdeACXX:7:1:1:2011 :N:0:
 NACAGCTGGCANNTNNNAGAGCNAGNANNN
 +
 ##############################
- at HiMom:7:1:1:240
+ at machine1:HiMom:abcdeACXX:7:1:1:240 :N:0:
 NNGNNANGTANNNTNNNTNCCNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:1:262
+ at machine1:HiMom:abcdeACXX:7:1:1:262 :N:0:
 NNCNNGNCATNNNANNNCNTGNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:1:264
+ at machine1:HiMom:abcdeACXX:7:1:1:264 :N:0:
 NAACTGNAATNNNCNNNANCANNCTNNNNN
 +
 ##############################
- at HiMom:7:1:1:299
+ at machine1:HiMom:abcdeACXX:7:1:1:299 :N:0:
 NNCNNTNGCANNNANNNCNAANNNTNNNNN
 +
 ##############################
- at HiMom:7:1:1:30
+ at machine1:HiMom:abcdeACXX:7:1:1:30 :N:0:
 NNANNANTTTNNNTNNNGNTCNNNTNNNNN
 +
 ##############################
- at HiMom:7:1:1:353
+ at machine1:HiMom:abcdeACXX:7:1:1:353 :N:0:
 NNANNTNTAGNNNANNNTNATNNNANNNNN
 +
 ##############################
- at HiMom:7:1:1:367
+ at machine1:HiMom:abcdeACXX:7:1:1:367 :N:0:
 NNANNTNAGCNNNGNNNANGTNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:1:41
+ at machine1:HiMom:abcdeACXX:7:1:1:41 :N:0:
 NNANNCNAAANNNGNNNTNCANNNCNNNNN
 +
 ##############################
- at HiMom:7:1:1:416
+ at machine1:HiMom:abcdeACXX:7:1:1:416 :N:0:
 NNANNCNAATNNNGNNNGNACNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:1:483
+ at machine1:HiMom:abcdeACXX:7:1:1:483 :N:0:
 NNGNNGNGGGNNNGNNNGNTTNNNTNNNNN
 +
 ##############################
- at HiMom:7:1:1:486
+ at machine1:HiMom:abcdeACXX:7:1:1:486 :N:0:
 NNANNANTTTNNNANNNANAGNNNTNNNNN
 +
 ##############################
- at HiMom:7:1:1:495
+ at machine1:HiMom:abcdeACXX:7:1:1:495 :N:0:
 NNCNNANCGTNNNTNNNTNAANNNCNNNNN
 +
 ##############################
- at HiMom:7:1:1:508
+ at machine1:HiMom:abcdeACXX:7:1:1:508 :N:0:
 NNGNNCNCAGNNNTNNNCNCTNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:1:517
+ at machine1:HiMom:abcdeACXX:7:1:1:517 :N:0:
 NTCATAAAACATCANTATTGGAAAGGANNN
 +
 %.75:<999578##################
- at HiMom:7:1:1:535
+ at machine1:HiMom:abcdeACXX:7:1:1:535 :N:0:
 NGCCCAAGTATTGANTATGTGCTCTAANNN
 +
 %.599:7187:940%0::52599#######
- at HiMom:7:1:1:55
+ at machine1:HiMom:abcdeACXX:7:1:1:55 :N:0:
 NTTTATGTCCTTNANAACTTAGNAGTTNNN
 +
 %/9<<83599####################
- at HiMom:7:1:1:554
+ at machine1:HiMom:abcdeACXX:7:1:1:554 :N:0:
 NNANNGNAGANNNGNNNTNTCNNNANNNNN
 +
 ##############################
- at HiMom:7:1:1:567
+ at machine1:HiMom:abcdeACXX:7:1:1:567 :N:0:
 NNCNNCNGTTNNNCNNNGNACNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:1:59
+ at machine1:HiMom:abcdeACXX:7:1:1:59 :N:0:
 NNANNGNTGCNNNTNNNTNACNNNANNNNN
 +
 ##############################
- at HiMom:7:1:1:613
+ at machine1:HiMom:abcdeACXX:7:1:1:613 :N:0:
 NNGNNANTATNNNCNNNGNATNNNANNNNN
 +
 ##############################
- at HiMom:7:1:1:622
+ at machine1:HiMom:abcdeACXX:7:1:1:622 :N:0:
 NNTNNCNAGTNNNCNNNANCTNNNTNNNNN
 +
 ##############################
- at HiMom:7:1:1:627
+ at machine1:HiMom:abcdeACXX:7:1:1:627 :N:0:
 NNANNTNGACNNNTNNNANGCNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:1:684
+ at machine1:HiMom:abcdeACXX:7:1:1:684 :N:0:
 NNTNNTNAGANNNCNNNANAGNNNANNNNN
 +
 ##############################
- at HiMom:7:1:1:72
+ at machine1:HiMom:abcdeACXX:7:1:1:72 :N:0:
 NACACACATATCACNCACATCATACACNNN
 +
 %..48696;5:6;.%)49;;;9########
- at HiMom:7:1:1:812
+ at machine1:HiMom:abcdeACXX:7:1:1:812 :N:0:
 NNANNCNAAGNNNTNNNANTCNNNANNNNN
 +
 ##############################
- at HiMom:7:1:1:874
+ at machine1:HiMom:abcdeACXX:7:1:1:874 :N:0:
 NNANNANGCCNNNGNNNTNTANNNTNNNNN
 +
 ##############################
- at HiMom:7:1:1:931
+ at machine1:HiMom:abcdeACXX:7:1:1:931 :N:0:
 NNTNNGNGATNNNGNNNCNTTNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:1:965
+ at machine1:HiMom:abcdeACXX:7:1:1:965 :N:0:
 NACTAATCTTCCGCNCATATCCCCAAANNN
 +
 ##############################
- at HiMom:7:1:1:994
+ at machine1:HiMom:abcdeACXX:7:1:1:994 :N:0:
 NNANNTNGATNNNTNNNGNTTNNNCNNNNN
 +
 ##############################
- at HiMom:7:1:2:1158
+ at machine1:HiMom:abcdeACXX:7:1:2:1158 :Y:0:
 NGGGTCCTTCATAGTTTTTTTCTACTTTCC
 +
 %0777646;099:::95;;;688::99###
- at HiMom:7:1:2:1238
+ at machine1:HiMom:abcdeACXX:7:1:2:1238 :N:0:
 NTCCTTATATTCAATTATTAATATTTTTAC
 +
 ##############################
- at HiMom:7:1:2:1275
+ at machine1:HiMom:abcdeACXX:7:1:2:1275 :Y:0:
 NAGTGAAATAAGCCAGACACAGAAAGACAN
 +
 %/5204:99971773,44755-39717###
- at HiMom:7:1:2:1301
+ at machine1:HiMom:abcdeACXX:7:1:2:1301 :N:0:
 NAGTAGACTGCATTAATTAATTGGAAGAGN
 +
 %0370)024263144:48;;##########
- at HiMom:7:1:2:1453
+ at machine1:HiMom:abcdeACXX:7:1:2:1453 :Y:0:
 NATATCTTATTTTCTTTTCTTTCAGGCTCT
 +
 %.:7,,395255##################
- at HiMom:7:1:2:150
+ at machine1:HiMom:abcdeACXX:7:1:2:150 :N:0:
 NAAGACTTGATTATATCCCTTGTATGANNN
 +
 ##############################
- at HiMom:7:1:2:1592
+ at machine1:HiMom:abcdeACXX:7:1:2:1592 :Y:0:
 NGAAAACTGGCACAAGACAAGGATGCCCTC
 +
 %,67786861,3466(8485868648583#
- at HiMom:7:1:2:1706
+ at machine1:HiMom:abcdeACXX:7:1:2:1706 :Y:0:
 NGATATGTGGATACAGCTCACAAAGAGNNN
 +
 %,99:6/566999/7###############
- at HiMom:7:1:2:1722
+ at machine1:HiMom:abcdeACXX:7:1:2:1722 :N:0:
 NAAAGAAAATTAAAGAAAAATATACACGTN
 +
 ##############################
- at HiMom:7:1:2:1727
+ at machine1:HiMom:abcdeACXX:7:1:2:1727 :N:0:
 NTATTGAAGGACTTTTGTATCCTCCTTATN
 +
 ##############################
- at HiMom:7:1:2:1753
+ at machine1:HiMom:abcdeACXX:7:1:2:1753 :N:0:
 NGTTCACACAAGGATAATATTTTTGATTAT
 +
 ##############################
- at HiMom:7:1:2:1782
+ at machine1:HiMom:abcdeACXX:7:1:2:1782 :Y:0:
 NACCAAGTGTTTGGAGTATGCTGCCTANNN
 +
 %0:::668885-5335/85###########
- at HiMom:7:1:2:1827
+ at machine1:HiMom:abcdeACXX:7:1:2:1827 :Y:0:
 NAACCGAGGATGTACACTGTCCCTGTGAAA
 +
 ##############################
- at HiMom:7:1:2:1932
+ at machine1:HiMom:abcdeACXX:7:1:2:1932 :Y:0:
 NAGCGATCCTCCCGCCTCTGCCTCCCANNN
 +
 %,1545541455##################
- at HiMom:7:1:2:1946
+ at machine1:HiMom:abcdeACXX:7:1:2:1946 :N:0:
 NATCTTCTGGAATTTCTAACAGCTTGGAAN
 +
 %0515.,.35<997################
- at HiMom:7:1:2:209
+ at machine1:HiMom:abcdeACXX:7:1:2:209 :N:0:
 NGACTCAACTCCTGGGCTCCCTACGACCAT
 +
 ##############################
- at HiMom:7:1:2:246
+ at machine1:HiMom:abcdeACXX:7:1:2:246 :N:0:
 NGGAGGTTTCATTTAGCCGATATTGTGNNN
 +
 ##############################
- at HiMom:7:1:2:25
+ at machine1:HiMom:abcdeACXX:7:1:2:25 :N:0:
 NGCTTTGGCAAGACAAATCTCCCGTCTGGN
 +
 ##############################
- at HiMom:7:1:2:307
+ at machine1:HiMom:abcdeACXX:7:1:2:307 :N:0:
 NGGATGAACAGAAACTAAAATAACACANNN
 +
 ##############################
- at HiMom:7:1:2:363
+ at machine1:HiMom:abcdeACXX:7:1:2:363 :N:0:
 NATATTCTTTTTTTTTATTTATCAGATNNN
 +
 ##############################
- at HiMom:7:1:2:449
+ at machine1:HiMom:abcdeACXX:7:1:2:449 :N:0:
 NATTCTAATTCTAGGAAATTAACAATCNNN
 +
 %.9315<936970%0###############
- at HiMom:7:1:2:546
+ at machine1:HiMom:abcdeACXX:7:1:2:546 :N:0:
 NGGTTGTGTCTCTCTCAGCCTTTGGGATCN
 +
 %,46888444685-35##############
- at HiMom:7:1:2:605
+ at machine1:HiMom:abcdeACXX:7:1:2:605 :Y:0:
 NGCATTGAGCAGACGTGGCATCCAGATNNN
 +
 %)085222/55453################
- at HiMom:7:1:2:69
+ at machine1:HiMom:abcdeACXX:7:1:2:69 :N:0:
 NTCAGTCTGCTGTTTTAAAAAAATACTGTG
 +
 ##############################
- at HiMom:7:1:2:747
+ at machine1:HiMom:abcdeACXX:7:1:2:747 :N:0:
 NAACAACAGCGGAAAATAATAAAAAAAAAN
 +
 ##############################
- at HiMom:7:1:2:786
+ at machine1:HiMom:abcdeACXX:7:1:2:786 :Y:0:
 NTAAACAATAATCTGATGATTTATAATCCN
 +
 %09<<<<;<;<8<9;<9<;<::<<::####
- at HiMom:7:1:2:858
+ at machine1:HiMom:abcdeACXX:7:1:2:858 :Y:0:
 NAAACGTTGCTGATCTTCTGTTTTAAACTA
 +
 %/;7-222265366-6977035:::;626;
- at HiMom:7:1:2:943
+ at machine1:HiMom:abcdeACXX:7:1:2:943 :Y:0:
 NAATACCAATAAACCTAGAATGTCTCATAC
 +
 %08<9646<6378744774:1005799<4#
- at HiMom:7:1:2:974
+ at machine1:HiMom:abcdeACXX:7:1:2:974 :Y:0:
 NGATCAATGATCACATCTTTGGATATGTAT
 +
 %/9979<99:999::9;;:7511<<<77<<
- at HiMom:7:1:2:988
+ at machine1:HiMom:abcdeACXX:7:1:2:988 :Y:0:
 NAAAGGAATGTTCAGCTCTGTGAGTTGAAC
 +
 %/92/04:2-2785-3875/404362-162
- at HiMom:7:1:3:1233
+ at machine1:HiMom:abcdeACXX:7:1:3:1233 :N:0:
 NAACCAATTTCTTTACATACCAAATACGCC
 +
 ##############################
- at HiMom:7:1:3:1294
+ at machine1:HiMom:abcdeACXX:7:1:3:1294 :N:0:
 TGTAACTTTACTTTAGTTGCTTATTTGTAG
 +
 BA############################
- at HiMom:7:1:3:405
+ at machine1:HiMom:abcdeACXX:7:1:3:405 :N:0:
 AAAAAACATAGAACGGGGTCAATATTTTAT
 +
 (?A>8(7B?<(:')?@)8(:(*:<8:0>'>
- at HiMom:7:1:3:579
+ at machine1:HiMom:abcdeACXX:7:1:3:579 :N:0:
 NGAAAAATGACCACACTTGCCTCCTGAGAA
 +
 ##############################
- at HiMom:7:1:3:673
+ at machine1:HiMom:abcdeACXX:7:1:3:673 :N:0:
 TCCTCAAAAACAAGATAAAACGGTTGAAAT
 +
 >()>)''85BBC?#################
- at HiMom:7:1:3:890
+ at machine1:HiMom:abcdeACXX:7:1:3:890 :N:0:
 TGCTTCTGTTTCCGTTAGCTAGATAAAGTT
 +
 ##############################
- at HiMom:7:1:3:905
+ at machine1:HiMom:abcdeACXX:7:1:3:905 :N:0:
 TGTTATGTTTAATTTTCTTTAGCACCCTTC
 +
 >7>?A:-<BA at 0>@:@8=A;5%7;9?=:9@
- at HiMom:7:1:3:918
+ at machine1:HiMom:abcdeACXX:7:1:3:918 :N:0:
 TTTTCATTCCTAGTCATCCACCCCATCAGA
 +
 0()@A=:2>3:>(/((<22A>:0(20:@)@
- at HiMom:7:2:0:1073
+ at machine1:HiMom:abcdeACXX:7:2:0:1073 :N:0:
 NNNNNANCACNNNCNNNCNCANNNCNNNNN
 +
 ##############################
- at HiMom:7:2:0:1135
+ at machine1:HiMom:abcdeACXX:7:2:0:1135 :N:0:
 NNNNNGNNGTNNNANNNTNTANNNGNNNNN
 +
 ##############################
- at HiMom:7:2:0:1198
+ at machine1:HiMom:abcdeACXX:7:2:0:1198 :N:0:
 NNNNNTNCTANNNTNNNCNCANNNANNNNN
 +
 ##############################
- at HiMom:7:2:0:1278
+ at machine1:HiMom:abcdeACXX:7:2:0:1278 :N:0:
 NNNNNNNNTANNNTNNNCNNANNNGNNNNN
 +
 ##############################
- at HiMom:7:2:0:135
+ at machine1:HiMom:abcdeACXX:7:2:0:135 :N:0:
 NNNNNNNNANNNNNNNNNNNGNNNNNNNNN
 +
 ##############################
- at HiMom:7:2:0:1547
+ at machine1:HiMom:abcdeACXX:7:2:0:1547 :N:0:
 NNNNNNNNCNNNNNNNNNNNGNNNANNNNN
 +
 ##############################
- at HiMom:7:2:0:1598
+ at machine1:HiMom:abcdeACXX:7:2:0:1598 :N:0:
 NNNNNNNNATNNNTNNNANNGNNNCNNNNN
 +
 ##############################
- at HiMom:7:2:0:1620
+ at machine1:HiMom:abcdeACXX:7:2:0:1620 :N:0:
 NNNNNNNNCANNNNNNNANNCNNNCNNNNN
 +
 ##############################
- at HiMom:7:2:0:1668
+ at machine1:HiMom:abcdeACXX:7:2:0:1668 :N:0:
 NNNNNANATANNNANNNGNTGNNNTNNNNN
 +
 ##############################
- at HiMom:7:2:0:186
+ at machine1:HiMom:abcdeACXX:7:2:0:186 :N:0:
 NNNNNNNNCCNNNANNNTNNTNNNTNNNNN
 +
 ##############################
- at HiMom:7:2:0:205
+ at machine1:HiMom:abcdeACXX:7:2:0:205 :N:0:
 NNNNNNNNANNNNNNNNTNNCNNNTNNNNN
 +
 ##############################
- at HiMom:7:2:0:287
+ at machine1:HiMom:abcdeACXX:7:2:0:287 :N:0:
 NNNNNNNNCCNNNCNNNTNNANNNANNNNN
 +
 ##############################
- at HiMom:7:2:0:382
+ at machine1:HiMom:abcdeACXX:7:2:0:382 :N:0:
 NNNNNNNNCANNNTNNNTNNANNNANNNNN
 +
 ##############################
- at HiMom:7:2:0:441
+ at machine1:HiMom:abcdeACXX:7:2:0:441 :N:0:
 NNNNNNNNTTNNNANNNANNTNNNTNNNNN
 +
 ##############################
- at HiMom:7:2:0:50
+ at machine1:HiMom:abcdeACXX:7:2:0:50 :N:0:
 NNNNNNNNTNNNNNNNNTNNGNNNGNNNNN
 +
 ##############################
- at HiMom:7:2:0:501
+ at machine1:HiMom:abcdeACXX:7:2:0:501 :N:0:
 NNNNNGNNAGNNNANNNCNCTNNNCNNNNN
 +
 ##############################
- at HiMom:7:2:0:73
+ at machine1:HiMom:abcdeACXX:7:2:0:73 :N:0:
 NNNNNANCATNNNGNNNANACNNNGNNNNN
 +
 ##############################
- at HiMom:7:2:0:740
+ at machine1:HiMom:abcdeACXX:7:2:0:740 :N:0:
 NNNNNNNNTTNNNANNNTNNANNNANNNNN
 +
 ##############################
- at HiMom:7:2:0:766
+ at machine1:HiMom:abcdeACXX:7:2:0:766 :N:0:
 NNNNNNNNTGNNNANNNANNTNNNTNNNNN
 +
 ##############################
- at HiMom:7:2:0:87
+ at machine1:HiMom:abcdeACXX:7:2:0:87 :N:0:
 NNNNNNNNGNNNNNNNNANNTNNNTNNNNN
 +
 ##############################
- at HiMom:7:2:1:1004
+ at machine1:HiMom:abcdeACXX:7:2:1:1004 :N:0:
 NATTTATCACTANANATCCGCAAACCCTCC
 +
 ##############################
- at HiMom:7:2:1:1034
+ at machine1:HiMom:abcdeACXX:7:2:1:1034 :N:0:
 NATCATTTTCATNCNTTTCACTGATACATT
 +
 %.737:887471%-%1:8555545;696::
- at HiMom:7:2:1:1159
+ at machine1:HiMom:abcdeACXX:7:2:1:1159 :N:0:
 NNACTTNTAGNNNGNNNAAATNNCCNANNN
 +
 ##############################
- at HiMom:7:2:1:1168
+ at machine1:HiMom:abcdeACXX:7:2:1:1168 :N:0:
 NNTCTANCTTNNNTNNNATTGNNTTNTNNN
 +
 ##############################
- at HiMom:7:2:1:1180
+ at machine1:HiMom:abcdeACXX:7:2:1:1180 :N:0:
 NNATGGNCTTNNNCNNNAGAANNTCNANNN
 +
 ##############################
- at HiMom:7:2:1:1214
+ at machine1:HiMom:abcdeACXX:7:2:1:1214 :N:0:
 NAAAAAAAAAAANANTATAAGAAAGAATCA
 +
 %035:#########################
- at HiMom:7:2:1:1221
+ at machine1:HiMom:abcdeACXX:7:2:1:1221 :N:0:
 NGGTCACACTCACATAGTGTTCAGAGCACT
 +
 ##############################
- at HiMom:7:2:1:1306
+ at machine1:HiMom:abcdeACXX:7:2:1:1306 :N:0:
 NNACATNAAANNNTNNNAACANNGTNANNN
 +
 ##############################
- at HiMom:7:2:1:1351
+ at machine1:HiMom:abcdeACXX:7:2:1:1351 :N:0:
 NNNNNCNATANNNTNNNANAANNNTNNNNN
 +
 ##############################
- at HiMom:7:2:1:1424
+ at machine1:HiMom:abcdeACXX:7:2:1:1424 :N:0:
 NNTCATNTAGNNNCNNNATGGNNGTNCNNN
 +
 ##############################
- at HiMom:7:2:1:1452
+ at machine1:HiMom:abcdeACXX:7:2:1:1452 :N:0:
 NGAAATTTGTAAAANCACCTGCAGAATACT
 +
 ##############################
- at HiMom:7:2:1:1515
+ at machine1:HiMom:abcdeACXX:7:2:1:1515 :N:0:
 NATTAAATATNANANNGTAATAATAATANN
 +
 %/9###########################
- at HiMom:7:2:1:1521
+ at machine1:HiMom:abcdeACXX:7:2:1:1521 :N:0:
 NNACACNAAANNNGNNNATCTNNTTNCNNN
 +
 ##############################
- at HiMom:7:2:1:1536
+ at machine1:HiMom:abcdeACXX:7:2:1:1536 :N:0:
 NAGCAAAGACTTNGNACCAACCCAAATGTT
 +
 ##############################
- at HiMom:7:2:1:1543
+ at machine1:HiMom:abcdeACXX:7:2:1:1543 :N:0:
 NNTTGANATCNNNANNNAATANNTANCNNN
 +
 ##############################
- at HiMom:7:2:1:1617
+ at machine1:HiMom:abcdeACXX:7:2:1:1617 :N:0:
 NNCCATNATCNNNGNNNCCAGNNGTNTNNN
 +
 ##############################
- at HiMom:7:2:1:1627
+ at machine1:HiMom:abcdeACXX:7:2:1:1627 :N:0:
 NNTGGTNAGANNNCNNNAAAANNCANTNNN
 +
 ##############################
- at HiMom:7:2:1:1646
+ at machine1:HiMom:abcdeACXX:7:2:1:1646 :N:0:
 NTTAATTATANNNANNTAAACATTCTAANN
 +
 ##############################
- at HiMom:7:2:1:1653
+ at machine1:HiMom:abcdeACXX:7:2:1:1653 :N:0:
 NNAATTNAAANNNTNNNATCTNNAGNANNN
 +
 ##############################
- at HiMom:7:2:1:1682
+ at machine1:HiMom:abcdeACXX:7:2:1:1682 :N:0:
 NNTCTTNTTTNNNGNNNAAAANNAANTNNN
 +
 ##############################
- at HiMom:7:2:1:170
+ at machine1:HiMom:abcdeACXX:7:2:1:170 :Y:0:
 NAGAAGAAATGGGATCCTGCTGTGGCCAGT
 +
 %/888865284168866767663(6874/5
- at HiMom:7:2:1:1731
+ at machine1:HiMom:abcdeACXX:7:2:1:1731 :N:0:
 NNTATANGAANNNTNNNTGCTNNAGNTNNN
 +
 ##############################
- at HiMom:7:2:1:1755
+ at machine1:HiMom:abcdeACXX:7:2:1:1755 :N:0:
 NNGTNANTCTNNNCNNNCNTGNNNGNANNN
 +
 ##############################
- at HiMom:7:2:1:1812
+ at machine1:HiMom:abcdeACXX:7:2:1:1812 :N:0:
 NNTTGCNCACNNNCNNNCCATNNAANGNNN
 +
 ##############################
- at HiMom:7:2:1:1853
+ at machine1:HiMom:abcdeACXX:7:2:1:1853 :N:0:
 NNATCTNTTCNNNANNNAGTGNNATNCNNN
 +
 ##############################
- at HiMom:7:2:1:1919
+ at machine1:HiMom:abcdeACXX:7:2:1:1919 :N:0:
 NNAATTNAAANNNANNNAGAANNAGNANNN
 +
 ##############################
- at HiMom:7:2:1:1924
+ at machine1:HiMom:abcdeACXX:7:2:1:1924 :N:0:
 NATATTCTGAAGNANNCCAATGAACCAAAN
 +
 %116<9579<7###################
- at HiMom:7:2:1:1933
+ at machine1:HiMom:abcdeACXX:7:2:1:1933 :N:0:
 NAGGGTACATNTNCNNAATGTGCGGGTTNN
 +
 ##############################
- at HiMom:7:2:1:1938
+ at machine1:HiMom:abcdeACXX:7:2:1:1938 :Y:0:
 NAGTCCAGTGTCTCTGCTTCCGCAGGGACA
 +
 %/818865/058858644866457646668
- at HiMom:7:2:1:1950
+ at machine1:HiMom:abcdeACXX:7:2:1:1950 :N:0:
 NNTTNANAAANNNCNNNTNCANNNTNCNNN
 +
 ##############################
- at HiMom:7:2:1:1959
+ at machine1:HiMom:abcdeACXX:7:2:1:1959 :N:0:
 NGACACATTCCTACNACAGAGAAAAATTTA
 +
 %*77;;<;<<:<;,%.::;:6:9::<4488
- at HiMom:7:2:1:1987
+ at machine1:HiMom:abcdeACXX:7:2:1:1987 :N:0:
 NNATNGNACANNNCNNNTNGTNNNTNNNNN
 +
 ##############################
- at HiMom:7:2:1:2006
+ at machine1:HiMom:abcdeACXX:7:2:1:2006 :N:0:
 NNGTATNTGANNNGNNNCCTTNNAGNANNN
 +
 ##############################
- at HiMom:7:2:1:211
+ at machine1:HiMom:abcdeACXX:7:2:1:211 :N:0:
 NNCTGANACANNNGNNNTGCANNACNCNNN
 +
 ##############################
- at HiMom:7:2:1:234
+ at machine1:HiMom:abcdeACXX:7:2:1:234 :N:0:
 NAAGCCTGTGGGNANNCCCAGTGGGAGCGN
 +
 ##############################
- at HiMom:7:2:1:242
+ at machine1:HiMom:abcdeACXX:7:2:1:242 :N:0:
 NNGCTCNAGCNNNANNNATATNNTTNGNNN
 +
 ##############################
- at HiMom:7:2:1:262
+ at machine1:HiMom:abcdeACXX:7:2:1:262 :N:0:
 NNATTGNAATNNNCNNNTTCCNNATNTNNN
 +
 ##############################
- at HiMom:7:2:1:298
+ at machine1:HiMom:abcdeACXX:7:2:1:298 :N:0:
 NNTCAANTTGNNNTNNNCTGCNNTTNTNNN
 +
 ##############################
- at HiMom:7:2:1:312
+ at machine1:HiMom:abcdeACXX:7:2:1:312 :N:0:
 NNTTGCNAGANNNANNNAACTNNTGNANNN
 +
 ##############################
- at HiMom:7:2:1:363
+ at machine1:HiMom:abcdeACXX:7:2:1:363 :Y:0:
 NGAAAGGTTTTGCAGCATGTGCAAACTCAC
 +
 %-5565678:8177656503512/377856
- at HiMom:7:2:1:37
+ at machine1:HiMom:abcdeACXX:7:2:1:37 :N:0:
 NTGTAAACGANNNCNNTTCCTGTTCAGCNN
 +
 ##############################
- at HiMom:7:2:1:370
+ at machine1:HiMom:abcdeACXX:7:2:1:370 :N:0:
 NNCTGGNAGCNNNTNNNCATANNAANCNNN
 +
 ##############################
- at HiMom:7:2:1:377
+ at machine1:HiMom:abcdeACXX:7:2:1:377 :N:0:
 NNAGAANGTGNNNTNNNAAATNNAANANNN
 +
 ##############################
- at HiMom:7:2:1:414
+ at machine1:HiMom:abcdeACXX:7:2:1:414 :N:0:
 NNTAGANAGCNNNANNNTCAGNNACNGNNN
 +
 ##############################
- at HiMom:7:2:1:421
+ at machine1:HiMom:abcdeACXX:7:2:1:421 :N:0:
 NNGTTANTTCNNNANNNCGTGNNATNCNNN
 +
 ##############################
- at HiMom:7:2:1:428
+ at machine1:HiMom:abcdeACXX:7:2:1:428 :N:0:
 NATGTGAATANTNANNTAGTTGGGATTCAN
 +
 ##############################
- at HiMom:7:2:1:44
+ at machine1:HiMom:abcdeACXX:7:2:1:44 :N:0:
 NACTACCTCANGNANNAAGCAGGTTCTAAN
 +
 ##############################
- at HiMom:7:2:1:466
+ at machine1:HiMom:abcdeACXX:7:2:1:466 :N:0:
 NACACTCACANCNANNTGTTTGGAATGANN
 +
 ##############################
- at HiMom:7:2:1:555
+ at machine1:HiMom:abcdeACXX:7:2:1:555 :N:0:
 NNCAATNTCTNNNGNNNTACANNCTNCNNN
 +
 ##############################
- at HiMom:7:2:1:558
+ at machine1:HiMom:abcdeACXX:7:2:1:558 :N:0:
 NAAAATATCANTNANNAATAAATAATCANN
 +
 ##############################
- at HiMom:7:2:1:56
+ at machine1:HiMom:abcdeACXX:7:2:1:56 :N:0:
 NNGCCANGGTNNNANNNTCACNNGGNCNNN
 +
 ##############################
- at HiMom:7:2:1:569
+ at machine1:HiMom:abcdeACXX:7:2:1:569 :N:0:
 NNAGGCNAGTNNNGNNNGTCCNNGTNANNN
 +
 ##############################
- at HiMom:7:2:1:604
+ at machine1:HiMom:abcdeACXX:7:2:1:604 :N:0:
 NATGATGAAACTCTNTCTCTACTAAAAATA
 +
 ##############################
- at HiMom:7:2:1:628
+ at machine1:HiMom:abcdeACXX:7:2:1:628 :N:0:
 NAGTATGCCCNCNCNNACCACTCCTATTNN
 +
 ##############################
- at HiMom:7:2:1:64
+ at machine1:HiMom:abcdeACXX:7:2:1:64 :N:0:
 NATTAATCTTNNNTNNGCACAATTCATTNN
 +
 ##############################
- at HiMom:7:2:1:684
+ at machine1:HiMom:abcdeACXX:7:2:1:684 :N:0:
 NAAAAATCAAATGANCATAATTTTATAAAA
 +
 ##############################
- at HiMom:7:2:1:699
+ at machine1:HiMom:abcdeACXX:7:2:1:699 :N:0:
 NNAATTNTTGNNNTNNNATTTNNGANTNNN
 +
 ##############################
- at HiMom:7:2:1:714
+ at machine1:HiMom:abcdeACXX:7:2:1:714 :N:0:
 NATTAACTTANANTNNACCACAACCTAANN
 +
 %.:###########################
- at HiMom:7:2:1:722
+ at machine1:HiMom:abcdeACXX:7:2:1:722 :N:0:
 NNCCTCNCTGNNNCNNNCTGTNNTGNCNNN
 +
 ##############################
- at HiMom:7:2:1:749
+ at machine1:HiMom:abcdeACXX:7:2:1:749 :N:0:
 NNAGTGNTACNNNTNNNCTTGNNCTNTNNN
 +
 ##############################
- at HiMom:7:2:1:760
+ at machine1:HiMom:abcdeACXX:7:2:1:760 :N:0:
 NGTCTGTTTTATGTNAAATATTTTGTTTAA
 +
 ##############################
- at HiMom:7:2:1:8
+ at machine1:HiMom:abcdeACXX:7:2:1:8 :N:0:
 NNTGCGNTGGNNNCNNNAGGCNNTTNTNNN
 +
 ##############################
- at HiMom:7:2:1:833
+ at machine1:HiMom:abcdeACXX:7:2:1:833 :N:0:
 NNGAGCNCCTNNNANNNCTCCNNGANGNNN
 +
 ##############################
- at HiMom:7:2:1:848
+ at machine1:HiMom:abcdeACXX:7:2:1:848 :N:0:
 NNTACTNAGTNNNGNNNTGTTNNGCNTNNN
 +
 ##############################
- at HiMom:7:2:1:893
+ at machine1:HiMom:abcdeACXX:7:2:1:893 :N:0:
 NGAGACAGAGTCTCNCTCTGTTCCCTAGCC
 +
 ##############################
- at HiMom:7:2:1:998
+ at machine1:HiMom:abcdeACXX:7:2:1:998 :N:0:
 NNATGTNTGCNNNANNNTATANNGGNANNN
 +
 ##############################
- at HiMom:7:2:2:0
+ at machine1:HiMom:abcdeACXX:7:2:2:0 :N:0:
 NATTCCTTNANNNNNNNNNNNNNNNNNNNN
 +
 ##############################
- at HiMom:7:2:2:131
+ at machine1:HiMom:abcdeACXX:7:2:2:131 :Y:0:
 NATATATTGACAGCAGTCATGTTGTTGAAG
 +
 %0<<<:<959874492:96999969:7784
- at HiMom:7:2:2:1636
+ at machine1:HiMom:abcdeACXX:7:2:2:1636 :N:0:
 NGTGTAAAAGTAGGGAAATACTATAGCAAG
 +
 ##############################
- at HiMom:7:2:2:1974
+ at machine1:HiMom:abcdeACXX:7:2:2:1974 :N:0:
 NACGCCAATACAAAAATGTTGAAGCTAGCT
 +
 ##############################
- at HiMom:7:2:2:351
+ at machine1:HiMom:abcdeACXX:7:2:2:351 :N:0:
 NGGGGTTGAGGTGTAAATAGAACATTTGTA
 +
 ##############################
- at HiMom:7:2:2:646
+ at machine1:HiMom:abcdeACXX:7:2:2:646 :N:0:
 NGAATCTAAGAAGACACAAAACTAAGGAAA
 +
 ##############################
- at HiMom:7:2:2:828
+ at machine1:HiMom:abcdeACXX:7:2:2:828 :N:0:
 NTCAAGTCAATTTGGGACTTGAAACAGCTC
 +
 ##############################
- at HiMom:7:2:3:1529
+ at machine1:HiMom:abcdeACXX:7:2:3:1529 :N:0:
 NTTATATGAATAGATAAATAAATAATCAAT
 +
 ##############################
- at HiMom:7:2:3:179
+ at machine1:HiMom:abcdeACXX:7:2:3:179 :N:0:
 CATTATTGTTAGACTGATTTTTTATAATCT
 +
 B@)104..*0-A(@@(<A9A<(+9)-=6(B
- at HiMom:7:2:3:198
+ at machine1:HiMom:abcdeACXX:7:2:3:198 :N:0:
 TGTCATTTTCTTTGCCTTAATTGTTCTTCT
 +
 5 at CBB7-*<=####################
- at HiMom:7:2:3:2030
+ at machine1:HiMom:abcdeACXX:7:2:3:2030 :N:0:
 CGAGATAATTTTTTAAAAAAAGTCCAAAAA
 +
 ((@;()@==*7<(5A@<C>###########
- at HiMom:7:2:3:247
+ at machine1:HiMom:abcdeACXX:7:2:3:247 :N:0:
 TGTACATGACCAGGTAATTTGGTTATGTGA
 +
 <@596353;)>@A7=:,A0'6>########
- at HiMom:7:2:3:4
+ at machine1:HiMom:abcdeACXX:7:2:3:4 :N:0:
 AGAGGCAATAAGTTTTAANNNNNNNNNNNN
 +
 A>BA at 9BAB3AA##################
- at HiMom:7:2:3:862
+ at machine1:HiMom:abcdeACXX:7:2:3:862 :N:0:
 NCTTTAAGAAATCATTCATTCTGCAAACAC
 +
 ##############################
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/N.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/N.barcode_1.fastq
index f6e41a7..37130a3 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/N.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/N.barcode_1.fastq
@@ -1,892 +1,892 @@
- at HiMom:7:1:0:1038
+ at machine1:HiMom:abcdeACXX:7:1:0:1038 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:7:1:0:1093
+ at machine1:HiMom:abcdeACXX:7:1:0:1093 :N:0:
 NNNNNTGN
 +
 ########
- at HiMom:7:1:0:113
+ at machine1:HiMom:abcdeACXX:7:1:0:113 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:7:1:0:1193
+ at machine1:HiMom:abcdeACXX:7:1:0:1193 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:7:1:0:1291
+ at machine1:HiMom:abcdeACXX:7:1:0:1291 :N:0:
 NNNNNGNN
 +
 ########
- at HiMom:7:1:0:1307
+ at machine1:HiMom:abcdeACXX:7:1:0:1307 :N:0:
 NNNNNTAN
 +
 ########
- at HiMom:7:1:0:1434
+ at machine1:HiMom:abcdeACXX:7:1:0:1434 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:7:1:0:1475
+ at machine1:HiMom:abcdeACXX:7:1:0:1475 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:7:1:0:1690
+ at machine1:HiMom:abcdeACXX:7:1:0:1690 :N:0:
 NNNNNANN
 +
 ########
- at HiMom:7:1:0:1703
+ at machine1:HiMom:abcdeACXX:7:1:0:1703 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:7:1:0:1940
+ at machine1:HiMom:abcdeACXX:7:1:0:1940 :N:0:
 NNNNNCNN
 +
 ########
- at HiMom:7:1:0:2001
+ at machine1:HiMom:abcdeACXX:7:1:0:2001 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:7:1:0:205
+ at machine1:HiMom:abcdeACXX:7:1:0:205 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:7:1:0:275
+ at machine1:HiMom:abcdeACXX:7:1:0:275 :N:0:
 NNNNNATN
 +
 ########
- at HiMom:7:1:0:324
+ at machine1:HiMom:abcdeACXX:7:1:0:324 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:7:1:0:37
+ at machine1:HiMom:abcdeACXX:7:1:0:37 :N:0:
 NNNNNGNN
 +
 ########
- at HiMom:7:1:0:464
+ at machine1:HiMom:abcdeACXX:7:1:0:464 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:7:1:0:586
+ at machine1:HiMom:abcdeACXX:7:1:0:586 :N:0:
 NNNNNCNN
 +
 ########
- at HiMom:7:1:0:841
+ at machine1:HiMom:abcdeACXX:7:1:0:841 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:7:1:0:879
+ at machine1:HiMom:abcdeACXX:7:1:0:879 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:7:1:1:1013
+ at machine1:HiMom:abcdeACXX:7:1:1:1013 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:7:1:1:111
+ at machine1:HiMom:abcdeACXX:7:1:1:111 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:7:1:1:1153
+ at machine1:HiMom:abcdeACXX:7:1:1:1153 :N:0:
 NNNNNCTN
 +
 ########
- at HiMom:7:1:1:1184
+ at machine1:HiMom:abcdeACXX:7:1:1:1184 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:7:1:1:1241
+ at machine1:HiMom:abcdeACXX:7:1:1:1241 :N:0:
 NNNNNCTN
 +
 ########
- at HiMom:7:1:1:1243
+ at machine1:HiMom:abcdeACXX:7:1:1:1243 :N:0:
 NNNNNTGN
 +
 ########
- at HiMom:7:1:1:1247
+ at machine1:HiMom:abcdeACXX:7:1:1:1247 :N:0:
 NNNNNACN
 +
 ########
- at HiMom:7:1:1:1282
+ at machine1:HiMom:abcdeACXX:7:1:1:1282 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:7:1:1:132
+ at machine1:HiMom:abcdeACXX:7:1:1:132 :N:0:
 NNNNNTGN
 +
 ########
- at HiMom:7:1:1:1320
+ at machine1:HiMom:abcdeACXX:7:1:1:1320 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:7:1:1:1372
+ at machine1:HiMom:abcdeACXX:7:1:1:1372 :N:0:
 NNNGNTTA
 +
 ########
- at HiMom:7:1:1:1379
+ at machine1:HiMom:abcdeACXX:7:1:1:1379 :N:0:
 NNNCNGAT
 +
 ########
- at HiMom:7:1:1:1391
+ at machine1:HiMom:abcdeACXX:7:1:1:1391 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:7:1:1:140
+ at machine1:HiMom:abcdeACXX:7:1:1:140 :N:0:
 NNNNNCAN
 +
 ########
- at HiMom:7:1:1:1513
+ at machine1:HiMom:abcdeACXX:7:1:1:1513 :N:0:
 NNNNNCTN
 +
 ########
- at HiMom:7:1:1:1521
+ at machine1:HiMom:abcdeACXX:7:1:1:1521 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:7:1:1:155
+ at machine1:HiMom:abcdeACXX:7:1:1:155 :N:0:
 NNNNNCAN
 +
 ########
- at HiMom:7:1:1:1555
+ at machine1:HiMom:abcdeACXX:7:1:1:1555 :N:0:
 NNNNNCAN
 +
 ########
- at HiMom:7:1:1:164
+ at machine1:HiMom:abcdeACXX:7:1:1:164 :N:0:
 NNNNNTTN
 +
 ########
- at HiMom:7:1:1:1684
+ at machine1:HiMom:abcdeACXX:7:1:1:1684 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:7:1:1:1696
+ at machine1:HiMom:abcdeACXX:7:1:1:1696 :N:0:
 NNNNNCTN
 +
 ########
- at HiMom:7:1:1:170
+ at machine1:HiMom:abcdeACXX:7:1:1:170 :N:0:
 NNNNNACN
 +
 ########
- at HiMom:7:1:1:173
+ at machine1:HiMom:abcdeACXX:7:1:1:173 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:7:1:1:1733
+ at machine1:HiMom:abcdeACXX:7:1:1:1733 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:7:1:1:1770
+ at machine1:HiMom:abcdeACXX:7:1:1:1770 :N:0:
 NNNNNTCN
 +
 ########
- at HiMom:7:1:1:18
+ at machine1:HiMom:abcdeACXX:7:1:1:18 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:7:1:1:1815
+ at machine1:HiMom:abcdeACXX:7:1:1:1815 :N:0:
 NNNTNGAC
 +
 ########
- at HiMom:7:1:1:1836
+ at machine1:HiMom:abcdeACXX:7:1:1:1836 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:7:1:1:184
+ at machine1:HiMom:abcdeACXX:7:1:1:184 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:7:1:1:1886
+ at machine1:HiMom:abcdeACXX:7:1:1:1886 :Y:0:
 NNNGNGCC
 +
 ########
- at HiMom:7:1:1:1906
+ at machine1:HiMom:abcdeACXX:7:1:1:1906 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:7:1:1:1917
+ at machine1:HiMom:abcdeACXX:7:1:1:1917 :N:0:
 NNNNNACN
 +
 ########
- at HiMom:7:1:1:195
+ at machine1:HiMom:abcdeACXX:7:1:1:195 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:7:1:1:1954
+ at machine1:HiMom:abcdeACXX:7:1:1:1954 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:7:1:1:2
+ at machine1:HiMom:abcdeACXX:7:1:1:2 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:7:1:1:2011
+ at machine1:HiMom:abcdeACXX:7:1:1:2011 :N:0:
 NNNGNTAG
 +
 ########
- at HiMom:7:1:1:240
+ at machine1:HiMom:abcdeACXX:7:1:1:240 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:7:1:1:262
+ at machine1:HiMom:abcdeACXX:7:1:1:262 :N:0:
 NNNNNCAN
 +
 ########
- at HiMom:7:1:1:264
+ at machine1:HiMom:abcdeACXX:7:1:1:264 :N:0:
 NNNNNCGA
 +
 ########
- at HiMom:7:1:1:299
+ at machine1:HiMom:abcdeACXX:7:1:1:299 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:7:1:1:30
+ at machine1:HiMom:abcdeACXX:7:1:1:30 :N:0:
 NNNNNACN
 +
 ########
- at HiMom:7:1:1:353
+ at machine1:HiMom:abcdeACXX:7:1:1:353 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:7:1:1:367
+ at machine1:HiMom:abcdeACXX:7:1:1:367 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:7:1:1:41
+ at machine1:HiMom:abcdeACXX:7:1:1:41 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:7:1:1:416
+ at machine1:HiMom:abcdeACXX:7:1:1:416 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:7:1:1:483
+ at machine1:HiMom:abcdeACXX:7:1:1:483 :N:0:
 NNNNNTAN
 +
 ########
- at HiMom:7:1:1:486
+ at machine1:HiMom:abcdeACXX:7:1:1:486 :N:0:
 NNNNNTGN
 +
 ########
- at HiMom:7:1:1:495
+ at machine1:HiMom:abcdeACXX:7:1:1:495 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:7:1:1:508
+ at machine1:HiMom:abcdeACXX:7:1:1:508 :N:0:
 NNNNNCTN
 +
 ########
- at HiMom:7:1:1:517
+ at machine1:HiMom:abcdeACXX:7:1:1:517 :N:0:
 NNNCNAGA
 +
 ########
- at HiMom:7:1:1:535
+ at machine1:HiMom:abcdeACXX:7:1:1:535 :N:0:
 NNNCNCGA
 +
 ########
- at HiMom:7:1:1:55
+ at machine1:HiMom:abcdeACXX:7:1:1:55 :N:0:
 NNNGNTTA
 +
 ########
- at HiMom:7:1:1:554
+ at machine1:HiMom:abcdeACXX:7:1:1:554 :N:0:
 NNNNNTAN
 +
 ########
- at HiMom:7:1:1:567
+ at machine1:HiMom:abcdeACXX:7:1:1:567 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:7:1:1:59
+ at machine1:HiMom:abcdeACXX:7:1:1:59 :N:0:
 NNNNNACN
 +
 ########
- at HiMom:7:1:1:613
+ at machine1:HiMom:abcdeACXX:7:1:1:613 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:7:1:1:622
+ at machine1:HiMom:abcdeACXX:7:1:1:622 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:7:1:1:627
+ at machine1:HiMom:abcdeACXX:7:1:1:627 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:7:1:1:684
+ at machine1:HiMom:abcdeACXX:7:1:1:684 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:7:1:1:72
+ at machine1:HiMom:abcdeACXX:7:1:1:72 :N:0:
 NNNTNGAC
 +
 ########
- at HiMom:7:1:1:812
+ at machine1:HiMom:abcdeACXX:7:1:1:812 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:7:1:1:874
+ at machine1:HiMom:abcdeACXX:7:1:1:874 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:7:1:1:931
+ at machine1:HiMom:abcdeACXX:7:1:1:931 :N:0:
 NNNNNCAN
 +
 ########
- at HiMom:7:1:1:965
+ at machine1:HiMom:abcdeACXX:7:1:1:965 :N:0:
 NNNTNTAA
 +
 ########
- at HiMom:7:1:1:994
+ at machine1:HiMom:abcdeACXX:7:1:1:994 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:7:1:2:1158
+ at machine1:HiMom:abcdeACXX:7:1:2:1158 :Y:0:
 NNCTTAGC
 +
 ########
- at HiMom:7:1:2:1238
+ at machine1:HiMom:abcdeACXX:7:1:2:1238 :N:0:
 NNCTAAGC
 +
 ########
- at HiMom:7:1:2:1275
+ at machine1:HiMom:abcdeACXX:7:1:2:1275 :Y:0:
 NNNANCTG
 +
 ########
- at HiMom:7:1:2:1301
+ at machine1:HiMom:abcdeACXX:7:1:2:1301 :N:0:
 NNNTAACA
 +
 ########
- at HiMom:7:1:2:1453
+ at machine1:HiMom:abcdeACXX:7:1:2:1453 :Y:0:
 NNACCAGG
 +
 ########
- at HiMom:7:1:2:150
+ at machine1:HiMom:abcdeACXX:7:1:2:150 :N:0:
 NNNANCCT
 +
 ########
- at HiMom:7:1:2:1592
+ at machine1:HiMom:abcdeACXX:7:1:2:1592 :Y:0:
 NNNGAGCC
 +
 ########
- at HiMom:7:1:2:1706
+ at machine1:HiMom:abcdeACXX:7:1:2:1706 :Y:0:
 NNNCNGAT
 +
 ########
- at HiMom:7:1:2:1722
+ at machine1:HiMom:abcdeACXX:7:1:2:1722 :N:0:
 NNNTCGAC
 +
 ########
- at HiMom:7:1:2:1727
+ at machine1:HiMom:abcdeACXX:7:1:2:1727 :N:0:
 NNNTNCTT
 +
 ########
- at HiMom:7:1:2:1753
+ at machine1:HiMom:abcdeACXX:7:1:2:1753 :N:0:
 NNTGCTTA
 +
 ########
- at HiMom:7:1:2:1782
+ at machine1:HiMom:abcdeACXX:7:1:2:1782 :Y:0:
 NNNTNAGC
 +
 ########
- at HiMom:7:1:2:1827
+ at machine1:HiMom:abcdeACXX:7:1:2:1827 :Y:0:
 NNCAACTG
 +
 ########
- at HiMom:7:1:2:1932
+ at machine1:HiMom:abcdeACXX:7:1:2:1932 :Y:0:
 NNNCNAGA
 +
 ########
- at HiMom:7:1:2:1946
+ at machine1:HiMom:abcdeACXX:7:1:2:1946 :N:0:
 NNNTNGAC
 +
 ########
- at HiMom:7:1:2:209
+ at machine1:HiMom:abcdeACXX:7:1:2:209 :N:0:
 NNCATTTC
 +
 ########
- at HiMom:7:1:2:246
+ at machine1:HiMom:abcdeACXX:7:1:2:246 :N:0:
 NNNANTTC
 +
 ########
- at HiMom:7:1:2:25
+ at machine1:HiMom:abcdeACXX:7:1:2:25 :N:0:
 NNNGATGA
 +
 ########
- at HiMom:7:1:2:307
+ at machine1:HiMom:abcdeACXX:7:1:2:307 :N:0:
 NNNTNGAC
 +
 ########
- at HiMom:7:1:2:363
+ at machine1:HiMom:abcdeACXX:7:1:2:363 :N:0:
 NNNTNCTT
 +
 ########
- at HiMom:7:1:2:449
+ at machine1:HiMom:abcdeACXX:7:1:2:449 :N:0:
 NNNGNTGT
 +
 ########
- at HiMom:7:1:2:546
+ at machine1:HiMom:abcdeACXX:7:1:2:546 :N:0:
 NNNANGTT
 +
 ########
- at HiMom:7:1:2:605
+ at machine1:HiMom:abcdeACXX:7:1:2:605 :Y:0:
 NNNTNGAC
 +
 ########
- at HiMom:7:1:2:69
+ at machine1:HiMom:abcdeACXX:7:1:2:69 :N:0:
 NNGGAGCC
 +
 ########
- at HiMom:7:1:2:747
+ at machine1:HiMom:abcdeACXX:7:1:2:747 :N:0:
 NNNCCAGG
 +
 ########
- at HiMom:7:1:2:786
+ at machine1:HiMom:abcdeACXX:7:1:2:786 :Y:0:
 NNNGATGT
 +
 ########
- at HiMom:7:1:2:858
+ at machine1:HiMom:abcdeACXX:7:1:2:858 :Y:0:
 NNACATCT
 +
 %%/57799
- at HiMom:7:1:2:943
+ at machine1:HiMom:abcdeACXX:7:1:2:943 :Y:0:
 NNACCAGG
 +
 ########
- at HiMom:7:1:2:974
+ at machine1:HiMom:abcdeACXX:7:1:2:974 :Y:0:
 NNTATGTT
 +
 %%0::::<
- at HiMom:7:1:2:988
+ at machine1:HiMom:abcdeACXX:7:1:2:988 :Y:0:
 NNTGGCGA
 +
 ########
- at HiMom:7:1:3:1233
+ at machine1:HiMom:abcdeACXX:7:1:3:1233 :N:0:
 CCAACAGG
 +
 ########
- at HiMom:7:1:3:1294
+ at machine1:HiMom:abcdeACXX:7:1:3:1294 :N:0:
 TCACAATG
 +
 *37<<@5<
- at HiMom:7:1:3:405
+ at machine1:HiMom:abcdeACXX:7:1:3:405 :N:0:
 ACACAAGA
 +
 0(><=###
- at HiMom:7:1:3:579
+ at machine1:HiMom:abcdeACXX:7:1:3:579 :N:0:
 AATCATGT
 +
 73######
- at HiMom:7:1:3:673
+ at machine1:HiMom:abcdeACXX:7:1:3:673 :N:0:
 TGCCCAAA
 +
 (<######
- at HiMom:7:1:3:890
+ at machine1:HiMom:abcdeACXX:7:1:3:890 :N:0:
 GTCACCAT
 +
 ########
- at HiMom:7:1:3:905
+ at machine1:HiMom:abcdeACXX:7:1:3:905 :N:0:
 ACATCCTA
 +
 AA78/<:#
- at HiMom:7:1:3:918
+ at machine1:HiMom:abcdeACXX:7:1:3:918 :N:0:
 ACTACCTT
 +
 )?4B>###
- at HiMom:7:2:0:1073
+ at machine1:HiMom:abcdeACXX:7:2:0:1073 :N:0:
 NNNNNCAN
 +
 ########
- at HiMom:7:2:0:1135
+ at machine1:HiMom:abcdeACXX:7:2:0:1135 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:7:2:0:1198
+ at machine1:HiMom:abcdeACXX:7:2:0:1198 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:7:2:0:1278
+ at machine1:HiMom:abcdeACXX:7:2:0:1278 :N:0:
 NNNNNTAN
 +
 ########
- at HiMom:7:2:0:135
+ at machine1:HiMom:abcdeACXX:7:2:0:135 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:7:2:0:1547
+ at machine1:HiMom:abcdeACXX:7:2:0:1547 :N:0:
 NNNNNCAN
 +
 ########
- at HiMom:7:2:0:1598
+ at machine1:HiMom:abcdeACXX:7:2:0:1598 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:7:2:0:1620
+ at machine1:HiMom:abcdeACXX:7:2:0:1620 :N:0:
 NNNNNTGN
 +
 ########
- at HiMom:7:2:0:1668
+ at machine1:HiMom:abcdeACXX:7:2:0:1668 :N:0:
 NNNNNCTN
 +
 ########
- at HiMom:7:2:0:186
+ at machine1:HiMom:abcdeACXX:7:2:0:186 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:7:2:0:205
+ at machine1:HiMom:abcdeACXX:7:2:0:205 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:7:2:0:287
+ at machine1:HiMom:abcdeACXX:7:2:0:287 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:7:2:0:382
+ at machine1:HiMom:abcdeACXX:7:2:0:382 :N:0:
 NNNNNTAN
 +
 ########
- at HiMom:7:2:0:441
+ at machine1:HiMom:abcdeACXX:7:2:0:441 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:7:2:0:50
+ at machine1:HiMom:abcdeACXX:7:2:0:50 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:7:2:0:501
+ at machine1:HiMom:abcdeACXX:7:2:0:501 :N:0:
 NNNNNTAN
 +
 ########
- at HiMom:7:2:0:73
+ at machine1:HiMom:abcdeACXX:7:2:0:73 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:7:2:0:740
+ at machine1:HiMom:abcdeACXX:7:2:0:740 :N:0:
 NNNNNGGN
 +
 ########
- at HiMom:7:2:0:766
+ at machine1:HiMom:abcdeACXX:7:2:0:766 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:7:2:0:87
+ at machine1:HiMom:abcdeACXX:7:2:0:87 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:7:2:1:1004
+ at machine1:HiMom:abcdeACXX:7:2:1:1004 :N:0:
 NNNGCCGA
 +
 ########
- at HiMom:7:2:1:1034
+ at machine1:HiMom:abcdeACXX:7:2:1:1034 :N:0:
 NNNAGCCT
 +
 ########
- at HiMom:7:2:1:1159
+ at machine1:HiMom:abcdeACXX:7:2:1:1159 :N:0:
 NNNTNGAC
 +
 ########
- at HiMom:7:2:1:1168
+ at machine1:HiMom:abcdeACXX:7:2:1:1168 :N:0:
 NNNGNTAG
 +
 ########
- at HiMom:7:2:1:1180
+ at machine1:HiMom:abcdeACXX:7:2:1:1180 :N:0:
 NNNTNAGC
 +
 ########
- at HiMom:7:2:1:1214
+ at machine1:HiMom:abcdeACXX:7:2:1:1214 :N:0:
 NNNCATGA
 +
 ########
- at HiMom:7:2:1:1221
+ at machine1:HiMom:abcdeACXX:7:2:1:1221 :N:0:
 NNGGATGT
 +
 ########
- at HiMom:7:2:1:1306
+ at machine1:HiMom:abcdeACXX:7:2:1:1306 :N:0:
 NNNANCTG
 +
 ########
- at HiMom:7:2:1:1351
+ at machine1:HiMom:abcdeACXX:7:2:1:1351 :N:0:
 NNNNNTTN
 +
 ########
- at HiMom:7:2:1:1424
+ at machine1:HiMom:abcdeACXX:7:2:1:1424 :N:0:
 NNNCNTCT
 +
 ########
- at HiMom:7:2:1:1452
+ at machine1:HiMom:abcdeACXX:7:2:1:1452 :N:0:
 NNAGATCC
 +
 ########
- at HiMom:7:2:1:1515
+ at machine1:HiMom:abcdeACXX:7:2:1:1515 :N:0:
 NNNGNATG
 +
 ########
- at HiMom:7:2:1:1521
+ at machine1:HiMom:abcdeACXX:7:2:1:1521 :N:0:
 NNNCNAGG
 +
 ########
- at HiMom:7:2:1:1536
+ at machine1:HiMom:abcdeACXX:7:2:1:1536 :N:0:
 NNACATCT
 +
 ########
- at HiMom:7:2:1:1543
+ at machine1:HiMom:abcdeACXX:7:2:1:1543 :N:0:
 NNNANTTC
 +
 ########
- at HiMom:7:2:1:1617
+ at machine1:HiMom:abcdeACXX:7:2:1:1617 :N:0:
 NNNCNAGG
 +
 ########
- at HiMom:7:2:1:1627
+ at machine1:HiMom:abcdeACXX:7:2:1:1627 :N:0:
 NNNANCTG
 +
 ########
- at HiMom:7:2:1:1646
+ at machine1:HiMom:abcdeACXX:7:2:1:1646 :N:0:
 NNNTNGAC
 +
 ########
- at HiMom:7:2:1:1653
+ at machine1:HiMom:abcdeACXX:7:2:1:1653 :N:0:
 NNNGNTGT
 +
 ########
- at HiMom:7:2:1:1682
+ at machine1:HiMom:abcdeACXX:7:2:1:1682 :N:0:
 NNNGNGCC
 +
 ########
- at HiMom:7:2:1:170
+ at machine1:HiMom:abcdeACXX:7:2:1:170 :Y:0:
 NNGAGCCT
 +
 ########
- at HiMom:7:2:1:1731
+ at machine1:HiMom:abcdeACXX:7:2:1:1731 :N:0:
 NNNTNAGC
 +
 ########
- at HiMom:7:2:1:1755
+ at machine1:HiMom:abcdeACXX:7:2:1:1755 :N:0:
 NNNNNCAN
 +
 ########
- at HiMom:7:2:1:1812
+ at machine1:HiMom:abcdeACXX:7:2:1:1812 :N:0:
 NNNCNTAT
 +
 ########
- at HiMom:7:2:1:1853
+ at machine1:HiMom:abcdeACXX:7:2:1:1853 :N:0:
 NNNCNCGA
 +
 ########
- at HiMom:7:2:1:1919
+ at machine1:HiMom:abcdeACXX:7:2:1:1919 :N:0:
 NNNANCTG
 +
 ########
- at HiMom:7:2:1:1924
+ at machine1:HiMom:abcdeACXX:7:2:1:1924 :N:0:
 NNNAACTG
 +
 ########
- at HiMom:7:2:1:1933
+ at machine1:HiMom:abcdeACXX:7:2:1:1933 :N:0:
 NNNTTAGC
 +
 ########
- at HiMom:7:2:1:1938
+ at machine1:HiMom:abcdeACXX:7:2:1:1938 :Y:0:
 NNCTCGAC
 +
 ########
- at HiMom:7:2:1:1950
+ at machine1:HiMom:abcdeACXX:7:2:1:1950 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:7:2:1:1959
+ at machine1:HiMom:abcdeACXX:7:2:1:1959 :N:0:
 NNTGCTTA
 +
 ########
- at HiMom:7:2:1:1987
+ at machine1:HiMom:abcdeACXX:7:2:1:1987 :N:0:
 NNNNNTAN
 +
 ########
- at HiMom:7:2:1:2006
+ at machine1:HiMom:abcdeACXX:7:2:1:2006 :N:0:
 NNNGNGCC
 +
 ########
- at HiMom:7:2:1:211
+ at machine1:HiMom:abcdeACXX:7:2:1:211 :N:0:
 NNNGNTGT
 +
 ########
- at HiMom:7:2:1:234
+ at machine1:HiMom:abcdeACXX:7:2:1:234 :N:0:
 NNNGCTTA
 +
 ########
- at HiMom:7:2:1:242
+ at machine1:HiMom:abcdeACXX:7:2:1:242 :N:0:
 NNNCNCGC
 +
 ########
- at HiMom:7:2:1:262
+ at machine1:HiMom:abcdeACXX:7:2:1:262 :N:0:
 NNNCNAGG
 +
 ########
- at HiMom:7:2:1:298
+ at machine1:HiMom:abcdeACXX:7:2:1:298 :N:0:
 NNNGNTAG
 +
 ########
- at HiMom:7:2:1:312
+ at machine1:HiMom:abcdeACXX:7:2:1:312 :N:0:
 NNNANGTT
 +
 ########
- at HiMom:7:2:1:363
+ at machine1:HiMom:abcdeACXX:7:2:1:363 :Y:0:
 NNTATGTT
 +
 %%.99999
- at HiMom:7:2:1:37
+ at machine1:HiMom:abcdeACXX:7:2:1:37 :N:0:
 NNNGNCGA
 +
 ########
- at HiMom:7:2:1:370
+ at machine1:HiMom:abcdeACXX:7:2:1:370 :N:0:
 NNNANCAT
 +
 ########
- at HiMom:7:2:1:377
+ at machine1:HiMom:abcdeACXX:7:2:1:377 :N:0:
 NNNCNTCT
 +
 ########
- at HiMom:7:2:1:414
+ at machine1:HiMom:abcdeACXX:7:2:1:414 :N:0:
 NNNGNTTA
 +
 ########
- at HiMom:7:2:1:421
+ at machine1:HiMom:abcdeACXX:7:2:1:421 :N:0:
 NNNANCCT
 +
 ########
- at HiMom:7:2:1:428
+ at machine1:HiMom:abcdeACXX:7:2:1:428 :N:0:
 NNNATGTT
 +
 ########
- at HiMom:7:2:1:44
+ at machine1:HiMom:abcdeACXX:7:2:1:44 :N:0:
 NNNAGCGA
 +
 ########
- at HiMom:7:2:1:466
+ at machine1:HiMom:abcdeACXX:7:2:1:466 :N:0:
 NNNTNACA
 +
 ########
- at HiMom:7:2:1:555
+ at machine1:HiMom:abcdeACXX:7:2:1:555 :N:0:
 NNNCNGAT
 +
 ########
- at HiMom:7:2:1:558
+ at machine1:HiMom:abcdeACXX:7:2:1:558 :N:0:
 NNNANCGA
 +
 ########
- at HiMom:7:2:1:56
+ at machine1:HiMom:abcdeACXX:7:2:1:56 :N:0:
 NNNTNAGC
 +
 ########
- at HiMom:7:2:1:569
+ at machine1:HiMom:abcdeACXX:7:2:1:569 :N:0:
 NNNANCTG
 +
 ########
- at HiMom:7:2:1:604
+ at machine1:HiMom:abcdeACXX:7:2:1:604 :N:0:
 NNCAACTG
 +
 ########
- at HiMom:7:2:1:628
+ at machine1:HiMom:abcdeACXX:7:2:1:628 :N:0:
 NNNTAACA
 +
 ########
- at HiMom:7:2:1:64
+ at machine1:HiMom:abcdeACXX:7:2:1:64 :N:0:
 NNNANGTT
 +
 ########
- at HiMom:7:2:1:684
+ at machine1:HiMom:abcdeACXX:7:2:1:684 :N:0:
 NNAAACGA
 +
 ########
- at HiMom:7:2:1:699
+ at machine1:HiMom:abcdeACXX:7:2:1:699 :N:0:
 NNNCNCGA
 +
 ########
- at HiMom:7:2:1:714
+ at machine1:HiMom:abcdeACXX:7:2:1:714 :N:0:
 NNNAGCGA
 +
 ########
- at HiMom:7:2:1:722
+ at machine1:HiMom:abcdeACXX:7:2:1:722 :N:0:
 NNNCNAGG
 +
 ########
- at HiMom:7:2:1:749
+ at machine1:HiMom:abcdeACXX:7:2:1:749 :N:0:
 NNNTNGAC
 +
 ########
- at HiMom:7:2:1:760
+ at machine1:HiMom:abcdeACXX:7:2:1:760 :N:0:
 NNACAACA
 +
 ########
- at HiMom:7:2:1:8
+ at machine1:HiMom:abcdeACXX:7:2:1:8 :N:0:
 NNNANNNN
 +
 ########
- at HiMom:7:2:1:833
+ at machine1:HiMom:abcdeACXX:7:2:1:833 :N:0:
 NNNANCCT
 +
 ########
- at HiMom:7:2:1:848
+ at machine1:HiMom:abcdeACXX:7:2:1:848 :N:0:
 NNNANCGA
 +
 ########
- at HiMom:7:2:1:893
+ at machine1:HiMom:abcdeACXX:7:2:1:893 :N:0:
 NNCAATTC
 +
 ########
- at HiMom:7:2:1:998
+ at machine1:HiMom:abcdeACXX:7:2:1:998 :N:0:
 NNNANGTT
 +
 ########
- at HiMom:7:2:2:0
+ at machine1:HiMom:abcdeACXX:7:2:2:0 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:7:2:2:131
+ at machine1:HiMom:abcdeACXX:7:2:2:131 :Y:0:
 CACAATCC
 +
 AACCBCA@
- at HiMom:7:2:2:1636
+ at machine1:HiMom:abcdeACXX:7:2:2:1636 :N:0:
 ATCAACCC
 +
 368?####
- at HiMom:7:2:2:1974
+ at machine1:HiMom:abcdeACXX:7:2:2:1974 :N:0:
 AGCAATCT
 +
 >#######
- at HiMom:7:2:2:351
+ at machine1:HiMom:abcdeACXX:7:2:2:351 :N:0:
 TGATAGAA
 +
 ########
- at HiMom:7:2:2:646
+ at machine1:HiMom:abcdeACXX:7:2:2:646 :N:0:
 ATCAATTA
 +
 ((>4/406
- at HiMom:7:2:2:828
+ at machine1:HiMom:abcdeACXX:7:2:2:828 :N:0:
 TATATCGA
 +
 ########
- at HiMom:7:2:3:1529
+ at machine1:HiMom:abcdeACXX:7:2:3:1529 :N:0:
 TAGAACCT
 +
 9)@73?B=
- at HiMom:7:2:3:179
+ at machine1:HiMom:abcdeACXX:7:2:3:179 :N:0:
 GTTTATTA
 +
 ########
- at HiMom:7:2:3:198
+ at machine1:HiMom:abcdeACXX:7:2:3:198 :N:0:
 CAGGATCT
 +
 5)0*@782
- at HiMom:7:2:3:2030
+ at machine1:HiMom:abcdeACXX:7:2:3:2030 :N:0:
 GATCAAGA
 +
 (((>(<@<
- at HiMom:7:2:3:247
+ at machine1:HiMom:abcdeACXX:7:2:3:247 :N:0:
 CGGTAGCT
 +
 ########
- at HiMom:7:2:3:4
+ at machine1:HiMom:abcdeACXX:7:2:3:4 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:7:2:3:862
+ at machine1:HiMom:abcdeACXX:7:2:3:862 :N:0:
 TAACAAGA
 +
 4)=69)=@
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/NN.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/NN.1.fastq
index b602901..9603643 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/NN.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/NN.1.fastq
@@ -1,892 +1,892 @@
- at HiMom:9:1:0:1038
+ at machine1:HiMom:abcdeACXX:9:1:0:1038 :N:0:
 NNNNNCNNCANNNCNNNCNCCNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:0:1093
+ at machine1:HiMom:abcdeACXX:9:1:0:1093 :N:0:
 NNNNNCNNGTNNNANNNGNAANNNANNNNN
 +
 ##############################
- at HiMom:9:1:0:113
+ at machine1:HiMom:abcdeACXX:9:1:0:113 :N:0:
 NNNNNNNNGNNNNNNNNNNNANNNNNNNNN
 +
 ##############################
- at HiMom:9:1:0:1193
+ at machine1:HiMom:abcdeACXX:9:1:0:1193 :N:0:
 NNNNNNNNTNNNNTNNNTNNTNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:0:1291
+ at machine1:HiMom:abcdeACXX:9:1:0:1291 :N:0:
 NNNNNNNNANNNNNNNNANNTNNNNNNNNN
 +
 ##############################
- at HiMom:9:1:0:1307
+ at machine1:HiMom:abcdeACXX:9:1:0:1307 :N:0:
 NNNNNNNNCNNNNANNNTNNTNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:0:1434
+ at machine1:HiMom:abcdeACXX:9:1:0:1434 :N:0:
 NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
 +
 ##############################
- at HiMom:9:1:0:1475
+ at machine1:HiMom:abcdeACXX:9:1:0:1475 :N:0:
 NNNNNGNNANNNNANNNANNANNNANNNNN
 +
 ##############################
- at HiMom:9:1:0:1690
+ at machine1:HiMom:abcdeACXX:9:1:0:1690 :N:0:
 NNNNNNNNANNNNNNNNGNNCNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:0:1703
+ at machine1:HiMom:abcdeACXX:9:1:0:1703 :N:0:
 NNNNNNNNANNNNNNNNNNNANNNNNNNNN
 +
 ##############################
- at HiMom:9:1:0:1940
+ at machine1:HiMom:abcdeACXX:9:1:0:1940 :N:0:
 NNNNNNNNCNNNNNNNNTNNTNNNNNNNNN
 +
 ##############################
- at HiMom:9:1:0:2001
+ at machine1:HiMom:abcdeACXX:9:1:0:2001 :N:0:
 NNNNNANNTGNNNGNNNANGCNNNANNNNN
 +
 ##############################
- at HiMom:9:1:0:205
+ at machine1:HiMom:abcdeACXX:9:1:0:205 :N:0:
 NNNNNNNNANNNNNNNNANNTNNNANNNNN
 +
 ##############################
- at HiMom:9:1:0:275
+ at machine1:HiMom:abcdeACXX:9:1:0:275 :N:0:
 NNNNNANNCANNNTNNNGNCCNNNANNNNN
 +
 ##############################
- at HiMom:9:1:0:324
+ at machine1:HiMom:abcdeACXX:9:1:0:324 :N:0:
 NNNNNNNNTNNNNNNNNTNNANNNANNNNN
 +
 ##############################
- at HiMom:9:1:0:37
+ at machine1:HiMom:abcdeACXX:9:1:0:37 :N:0:
 NNNNNNNNANNNNNNNNCNNTNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:0:464
+ at machine1:HiMom:abcdeACXX:9:1:0:464 :N:0:
 NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
 +
 ##############################
- at HiMom:9:1:0:586
+ at machine1:HiMom:abcdeACXX:9:1:0:586 :N:0:
 NNNNNNNNCNNNNNNNNCNNCNNNANNNNN
 +
 ##############################
- at HiMom:9:1:0:841
+ at machine1:HiMom:abcdeACXX:9:1:0:841 :N:0:
 NNNNNNNNCNNNNNNNNNNNTNNNNNNNNN
 +
 ##############################
- at HiMom:9:1:0:879
+ at machine1:HiMom:abcdeACXX:9:1:0:879 :N:0:
 NNNNNNNNTNNNNNNNNNNNTNNNNNNNNN
 +
 ##############################
- at HiMom:9:1:1:1013
+ at machine1:HiMom:abcdeACXX:9:1:1:1013 :N:0:
 NNCNNTNCAGNNNCNNNANGTNNNGNNNNN
 +
 ##############################
- at HiMom:9:1:1:111
+ at machine1:HiMom:abcdeACXX:9:1:1:111 :N:0:
 NNCNNTNGCGNNNTNNNANCTNNNTNNNNN
 +
 ##############################
- at HiMom:9:1:1:1153
+ at machine1:HiMom:abcdeACXX:9:1:1:1153 :N:0:
 NNTNNTNTGGNNNTNNNCNTCNNNTNNNNN
 +
 ##############################
- at HiMom:9:1:1:1184
+ at machine1:HiMom:abcdeACXX:9:1:1:1184 :N:0:
 NNANNGNTCGNNNANNNTNCANNNTNNNNN
 +
 ##############################
- at HiMom:9:1:1:1241
+ at machine1:HiMom:abcdeACXX:9:1:1:1241 :N:0:
 NNANNGNTGGNNNTNNNCNTGNNNANNNNN
 +
 ##############################
- at HiMom:9:1:1:1243
+ at machine1:HiMom:abcdeACXX:9:1:1:1243 :N:0:
 NNANNANGGANNNANNNCNTANNNTNNNNN
 +
 ##############################
- at HiMom:9:1:1:1247
+ at machine1:HiMom:abcdeACXX:9:1:1:1247 :N:0:
 NCCAGCNTTTNNNTNNNTNCTNNNGNNNNN
 +
 ##############################
- at HiMom:9:1:1:1282
+ at machine1:HiMom:abcdeACXX:9:1:1:1282 :N:0:
 NNANNANGGGNNNTNNNGNAGNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:1:132
+ at machine1:HiMom:abcdeACXX:9:1:1:132 :N:0:
 NNANNGNGGGNNNGNNNGNGGNNNGNNNNN
 +
 ##############################
- at HiMom:9:1:1:1320
+ at machine1:HiMom:abcdeACXX:9:1:1:1320 :N:0:
 NNANNTNAGTNNNGNNNGNTANNNCNNNNN
 +
 ##############################
- at HiMom:9:1:1:1372
+ at machine1:HiMom:abcdeACXX:9:1:1:1372 :N:0:
 NACATTTTTTAGNTNANTTGTTNACNANNN
 +
 ##############################
- at HiMom:9:1:1:1379
+ at machine1:HiMom:abcdeACXX:9:1:1:1379 :N:0:
 NAATATAATTNNNTNNNTTAGANTTNNNNN
 +
 ##############################
- at HiMom:9:1:1:1391
+ at machine1:HiMom:abcdeACXX:9:1:1:1391 :N:0:
 NNGNNTNTAANNNANNNTNATNNNTNNNNN
 +
 ##############################
- at HiMom:9:1:1:140
+ at machine1:HiMom:abcdeACXX:9:1:1:140 :N:0:
 NNANNTNTAANNNGNNNCNTTNNNTNNNNN
 +
 ##############################
- at HiMom:9:1:1:1513
+ at machine1:HiMom:abcdeACXX:9:1:1:1513 :N:0:
 NNNNNANNTTNNNANNNANAANNNCNNNNN
 +
 ##############################
- at HiMom:9:1:1:1521
+ at machine1:HiMom:abcdeACXX:9:1:1:1521 :N:0:
 NAACAANATTNNNTNNNANTANNTANNNNN
 +
 ##############################
- at HiMom:9:1:1:155
+ at machine1:HiMom:abcdeACXX:9:1:1:155 :N:0:
 NNGNNCNAGTNNNCNNNANTTNNNGNNNNN
 +
 ##############################
- at HiMom:9:1:1:1555
+ at machine1:HiMom:abcdeACXX:9:1:1:1555 :N:0:
 NNTNNGNAGANNNANNNCNTANNNANNNNN
 +
 ##############################
- at HiMom:9:1:1:164
+ at machine1:HiMom:abcdeACXX:9:1:1:164 :N:0:
 NNANNANTAANNNTNNNTNATNNNTNNNNN
 +
 ##############################
- at HiMom:9:1:1:1684
+ at machine1:HiMom:abcdeACXX:9:1:1:1684 :N:0:
 NNGNNANGGTNNNGNNNTNTCNNNTNNNNN
 +
 ##############################
- at HiMom:9:1:1:1696
+ at machine1:HiMom:abcdeACXX:9:1:1:1696 :N:0:
 NNANNGNNGCNNNGNNNANACNNNTNNNNN
 +
 ##############################
- at HiMom:9:1:1:170
+ at machine1:HiMom:abcdeACXX:9:1:1:170 :N:0:
 NNTNNCNCACNNNGNNNGNTCNNNGNNNNN
 +
 ##############################
- at HiMom:9:1:1:173
+ at machine1:HiMom:abcdeACXX:9:1:1:173 :N:0:
 NNNNNANNATNNNTNNNCNTTNNNTNNNNN
 +
 ##############################
- at HiMom:9:1:1:1733
+ at machine1:HiMom:abcdeACXX:9:1:1:1733 :N:0:
 NNANNGNGTCNNNTNNNTNAGNNNANNNNN
 +
 ##############################
- at HiMom:9:1:1:1770
+ at machine1:HiMom:abcdeACXX:9:1:1:1770 :N:0:
 NNCNNTNCTGNNNGNNNGNCANNNANNNNN
 +
 ##############################
- at HiMom:9:1:1:18
+ at machine1:HiMom:abcdeACXX:9:1:1:18 :N:0:
 NATCAGNCTGNNNANNNTNGTNNAANNNNN
 +
 ##############################
- at HiMom:9:1:1:1815
+ at machine1:HiMom:abcdeACXX:9:1:1:1815 :N:0:
 NATGAAAATANNNTNNNTAAATNATNNNNN
 +
 ##############################
- at HiMom:9:1:1:1836
+ at machine1:HiMom:abcdeACXX:9:1:1:1836 :N:0:
 NNNNNGNNTANNNGNNNTNCTNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:1:184
+ at machine1:HiMom:abcdeACXX:9:1:1:184 :N:0:
 NNCNNTNTAANNNANNNTNATNNNGNNNNN
 +
 ##############################
- at HiMom:9:1:1:1886
+ at machine1:HiMom:abcdeACXX:9:1:1:1886 :Y:0:
 NACATATGCATACATATATAATAGATANNN
 +
 %.9:;<217;:999;<;;<<<;;#######
- at HiMom:9:1:1:1906
+ at machine1:HiMom:abcdeACXX:9:1:1:1906 :N:0:
 NNTNNCNATANNNCNNNTNCTNNNGNNNNN
 +
 ##############################
- at HiMom:9:1:1:1917
+ at machine1:HiMom:abcdeACXX:9:1:1:1917 :N:0:
 NNNNNTNNGANNNCNNNANAANNNANNNNN
 +
 ##############################
- at HiMom:9:1:1:195
+ at machine1:HiMom:abcdeACXX:9:1:1:195 :N:0:
 NNANNGNGTGNNNGNNNCNATNNNANNNNN
 +
 ##############################
- at HiMom:9:1:1:1954
+ at machine1:HiMom:abcdeACXX:9:1:1:1954 :N:0:
 NAGANTNCTTNNNGNNNGNAGNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:1:2
+ at machine1:HiMom:abcdeACXX:9:1:1:2 :N:0:
 NNANNGNGAANNNCNNNNNNNNNNNNNNNN
 +
 ##############################
- at HiMom:9:1:1:2011
+ at machine1:HiMom:abcdeACXX:9:1:1:2011 :N:0:
 NACAGCTGGCANNTNNNAGAGCNAGNANNN
 +
 ##############################
- at HiMom:9:1:1:240
+ at machine1:HiMom:abcdeACXX:9:1:1:240 :N:0:
 NNGNNANGTANNNTNNNTNCCNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:1:262
+ at machine1:HiMom:abcdeACXX:9:1:1:262 :N:0:
 NNCNNGNCATNNNANNNCNTGNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:1:264
+ at machine1:HiMom:abcdeACXX:9:1:1:264 :N:0:
 NAACTGNAATNNNCNNNANCANNCTNNNNN
 +
 ##############################
- at HiMom:9:1:1:299
+ at machine1:HiMom:abcdeACXX:9:1:1:299 :N:0:
 NNCNNTNGCANNNANNNCNAANNNTNNNNN
 +
 ##############################
- at HiMom:9:1:1:30
+ at machine1:HiMom:abcdeACXX:9:1:1:30 :N:0:
 NNANNANTTTNNNTNNNGNTCNNNTNNNNN
 +
 ##############################
- at HiMom:9:1:1:353
+ at machine1:HiMom:abcdeACXX:9:1:1:353 :N:0:
 NNANNTNTAGNNNANNNTNATNNNANNNNN
 +
 ##############################
- at HiMom:9:1:1:367
+ at machine1:HiMom:abcdeACXX:9:1:1:367 :N:0:
 NNANNTNAGCNNNGNNNANGTNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:1:41
+ at machine1:HiMom:abcdeACXX:9:1:1:41 :N:0:
 NNANNCNAAANNNGNNNTNCANNNCNNNNN
 +
 ##############################
- at HiMom:9:1:1:416
+ at machine1:HiMom:abcdeACXX:9:1:1:416 :N:0:
 NNANNCNAATNNNGNNNGNACNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:1:483
+ at machine1:HiMom:abcdeACXX:9:1:1:483 :N:0:
 NNGNNGNGGGNNNGNNNGNTTNNNTNNNNN
 +
 ##############################
- at HiMom:9:1:1:486
+ at machine1:HiMom:abcdeACXX:9:1:1:486 :N:0:
 NNANNANTTTNNNANNNANAGNNNTNNNNN
 +
 ##############################
- at HiMom:9:1:1:495
+ at machine1:HiMom:abcdeACXX:9:1:1:495 :N:0:
 NNCNNANCGTNNNTNNNTNAANNNCNNNNN
 +
 ##############################
- at HiMom:9:1:1:508
+ at machine1:HiMom:abcdeACXX:9:1:1:508 :N:0:
 NNGNNCNCAGNNNTNNNCNCTNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:1:517
+ at machine1:HiMom:abcdeACXX:9:1:1:517 :N:0:
 NTCATAAAACATCANTATTGGAAAGGANNN
 +
 %.75:<999578##################
- at HiMom:9:1:1:535
+ at machine1:HiMom:abcdeACXX:9:1:1:535 :N:0:
 NGCCCAAGTATTGANTATGTGCTCTAANNN
 +
 %.599:7187:940%0::52599#######
- at HiMom:9:1:1:55
+ at machine1:HiMom:abcdeACXX:9:1:1:55 :N:0:
 NTTTATGTCCTTNANAACTTAGNAGTTNNN
 +
 %/9<<83599####################
- at HiMom:9:1:1:554
+ at machine1:HiMom:abcdeACXX:9:1:1:554 :N:0:
 NNANNGNAGANNNGNNNTNTCNNNANNNNN
 +
 ##############################
- at HiMom:9:1:1:567
+ at machine1:HiMom:abcdeACXX:9:1:1:567 :N:0:
 NNCNNCNGTTNNNCNNNGNACNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:1:59
+ at machine1:HiMom:abcdeACXX:9:1:1:59 :N:0:
 NNANNGNTGCNNNTNNNTNACNNNANNNNN
 +
 ##############################
- at HiMom:9:1:1:613
+ at machine1:HiMom:abcdeACXX:9:1:1:613 :N:0:
 NNGNNANTATNNNCNNNGNATNNNANNNNN
 +
 ##############################
- at HiMom:9:1:1:622
+ at machine1:HiMom:abcdeACXX:9:1:1:622 :N:0:
 NNTNNCNAGTNNNCNNNANCTNNNTNNNNN
 +
 ##############################
- at HiMom:9:1:1:627
+ at machine1:HiMom:abcdeACXX:9:1:1:627 :N:0:
 NNANNTNGACNNNTNNNANGCNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:1:684
+ at machine1:HiMom:abcdeACXX:9:1:1:684 :N:0:
 NNTNNTNAGANNNCNNNANAGNNNANNNNN
 +
 ##############################
- at HiMom:9:1:1:72
+ at machine1:HiMom:abcdeACXX:9:1:1:72 :N:0:
 NACACACATATCACNCACATCATACACNNN
 +
 %..48696;5:6;.%)49;;;9########
- at HiMom:9:1:1:812
+ at machine1:HiMom:abcdeACXX:9:1:1:812 :N:0:
 NNANNCNAAGNNNTNNNANTCNNNANNNNN
 +
 ##############################
- at HiMom:9:1:1:874
+ at machine1:HiMom:abcdeACXX:9:1:1:874 :N:0:
 NNANNANGCCNNNGNNNTNTANNNTNNNNN
 +
 ##############################
- at HiMom:9:1:1:931
+ at machine1:HiMom:abcdeACXX:9:1:1:931 :N:0:
 NNTNNGNGATNNNGNNNCNTTNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:1:965
+ at machine1:HiMom:abcdeACXX:9:1:1:965 :N:0:
 NACTAATCTTCCGCNCATATCCCCAAANNN
 +
 ##############################
- at HiMom:9:1:1:994
+ at machine1:HiMom:abcdeACXX:9:1:1:994 :N:0:
 NNANNTNGATNNNTNNNGNTTNNNCNNNNN
 +
 ##############################
- at HiMom:9:1:2:1158
+ at machine1:HiMom:abcdeACXX:9:1:2:1158 :Y:0:
 NGGGTCCTTCATAGTTTTTTTCTACTTTCC
 +
 %0777646;099:::95;;;688::99###
- at HiMom:9:1:2:1238
+ at machine1:HiMom:abcdeACXX:9:1:2:1238 :N:0:
 NTCCTTATATTCAATTATTAATATTTTTAC
 +
 ##############################
- at HiMom:9:1:2:1275
+ at machine1:HiMom:abcdeACXX:9:1:2:1275 :Y:0:
 NAGTGAAATAAGCCAGACACAGAAAGACAN
 +
 %/5204:99971773,44755-39717###
- at HiMom:9:1:2:1301
+ at machine1:HiMom:abcdeACXX:9:1:2:1301 :N:0:
 NAGTAGACTGCATTAATTAATTGGAAGAGN
 +
 %0370)024263144:48;;##########
- at HiMom:9:1:2:1453
+ at machine1:HiMom:abcdeACXX:9:1:2:1453 :Y:0:
 NATATCTTATTTTCTTTTCTTTCAGGCTCT
 +
 %.:7,,395255##################
- at HiMom:9:1:2:150
+ at machine1:HiMom:abcdeACXX:9:1:2:150 :N:0:
 NAAGACTTGATTATATCCCTTGTATGANNN
 +
 ##############################
- at HiMom:9:1:2:1592
+ at machine1:HiMom:abcdeACXX:9:1:2:1592 :Y:0:
 NGAAAACTGGCACAAGACAAGGATGCCCTC
 +
 %,67786861,3466(8485868648583#
- at HiMom:9:1:2:1706
+ at machine1:HiMom:abcdeACXX:9:1:2:1706 :Y:0:
 NGATATGTGGATACAGCTCACAAAGAGNNN
 +
 %,99:6/566999/7###############
- at HiMom:9:1:2:1722
+ at machine1:HiMom:abcdeACXX:9:1:2:1722 :N:0:
 NAAAGAAAATTAAAGAAAAATATACACGTN
 +
 ##############################
- at HiMom:9:1:2:1727
+ at machine1:HiMom:abcdeACXX:9:1:2:1727 :N:0:
 NTATTGAAGGACTTTTGTATCCTCCTTATN
 +
 ##############################
- at HiMom:9:1:2:1753
+ at machine1:HiMom:abcdeACXX:9:1:2:1753 :N:0:
 NGTTCACACAAGGATAATATTTTTGATTAT
 +
 ##############################
- at HiMom:9:1:2:1782
+ at machine1:HiMom:abcdeACXX:9:1:2:1782 :Y:0:
 NACCAAGTGTTTGGAGTATGCTGCCTANNN
 +
 %0:::668885-5335/85###########
- at HiMom:9:1:2:1827
+ at machine1:HiMom:abcdeACXX:9:1:2:1827 :Y:0:
 NAACCGAGGATGTACACTGTCCCTGTGAAA
 +
 ##############################
- at HiMom:9:1:2:1932
+ at machine1:HiMom:abcdeACXX:9:1:2:1932 :Y:0:
 NAGCGATCCTCCCGCCTCTGCCTCCCANNN
 +
 %,1545541455##################
- at HiMom:9:1:2:1946
+ at machine1:HiMom:abcdeACXX:9:1:2:1946 :N:0:
 NATCTTCTGGAATTTCTAACAGCTTGGAAN
 +
 %0515.,.35<997################
- at HiMom:9:1:2:209
+ at machine1:HiMom:abcdeACXX:9:1:2:209 :N:0:
 NGACTCAACTCCTGGGCTCCCTACGACCAT
 +
 ##############################
- at HiMom:9:1:2:246
+ at machine1:HiMom:abcdeACXX:9:1:2:246 :N:0:
 NGGAGGTTTCATTTAGCCGATATTGTGNNN
 +
 ##############################
- at HiMom:9:1:2:25
+ at machine1:HiMom:abcdeACXX:9:1:2:25 :N:0:
 NGCTTTGGCAAGACAAATCTCCCGTCTGGN
 +
 ##############################
- at HiMom:9:1:2:307
+ at machine1:HiMom:abcdeACXX:9:1:2:307 :N:0:
 NGGATGAACAGAAACTAAAATAACACANNN
 +
 ##############################
- at HiMom:9:1:2:363
+ at machine1:HiMom:abcdeACXX:9:1:2:363 :N:0:
 NATATTCTTTTTTTTTATTTATCAGATNNN
 +
 ##############################
- at HiMom:9:1:2:449
+ at machine1:HiMom:abcdeACXX:9:1:2:449 :N:0:
 NATTCTAATTCTAGGAAATTAACAATCNNN
 +
 %.9315<936970%0###############
- at HiMom:9:1:2:546
+ at machine1:HiMom:abcdeACXX:9:1:2:546 :N:0:
 NGGTTGTGTCTCTCTCAGCCTTTGGGATCN
 +
 %,46888444685-35##############
- at HiMom:9:1:2:605
+ at machine1:HiMom:abcdeACXX:9:1:2:605 :Y:0:
 NGCATTGAGCAGACGTGGCATCCAGATNNN
 +
 %)085222/55453################
- at HiMom:9:1:2:69
+ at machine1:HiMom:abcdeACXX:9:1:2:69 :N:0:
 NTCAGTCTGCTGTTTTAAAAAAATACTGTG
 +
 ##############################
- at HiMom:9:1:2:747
+ at machine1:HiMom:abcdeACXX:9:1:2:747 :N:0:
 NAACAACAGCGGAAAATAATAAAAAAAAAN
 +
 ##############################
- at HiMom:9:1:2:786
+ at machine1:HiMom:abcdeACXX:9:1:2:786 :Y:0:
 NTAAACAATAATCTGATGATTTATAATCCN
 +
 %09<<<<;<;<8<9;<9<;<::<<::####
- at HiMom:9:1:2:858
+ at machine1:HiMom:abcdeACXX:9:1:2:858 :Y:0:
 NAAACGTTGCTGATCTTCTGTTTTAAACTA
 +
 %/;7-222265366-6977035:::;626;
- at HiMom:9:1:2:943
+ at machine1:HiMom:abcdeACXX:9:1:2:943 :Y:0:
 NAATACCAATAAACCTAGAATGTCTCATAC
 +
 %08<9646<6378744774:1005799<4#
- at HiMom:9:1:2:974
+ at machine1:HiMom:abcdeACXX:9:1:2:974 :Y:0:
 NGATCAATGATCACATCTTTGGATATGTAT
 +
 %/9979<99:999::9;;:7511<<<77<<
- at HiMom:9:1:2:988
+ at machine1:HiMom:abcdeACXX:9:1:2:988 :Y:0:
 NAAAGGAATGTTCAGCTCTGTGAGTTGAAC
 +
 %/92/04:2-2785-3875/404362-162
- at HiMom:9:1:3:1233
+ at machine1:HiMom:abcdeACXX:9:1:3:1233 :N:0:
 NAACCAATTTCTTTACATACCAAATACGCC
 +
 ##############################
- at HiMom:9:1:3:1294
+ at machine1:HiMom:abcdeACXX:9:1:3:1294 :N:0:
 TGTAACTTTACTTTAGTTGCTTATTTGTAG
 +
 BA############################
- at HiMom:9:1:3:405
+ at machine1:HiMom:abcdeACXX:9:1:3:405 :N:0:
 AAAAAACATAGAACGGGGTCAATATTTTAT
 +
 (?A>8(7B?<(:')?@)8(:(*:<8:0>'>
- at HiMom:9:1:3:579
+ at machine1:HiMom:abcdeACXX:9:1:3:579 :N:0:
 NGAAAAATGACCACACTTGCCTCCTGAGAA
 +
 ##############################
- at HiMom:9:1:3:673
+ at machine1:HiMom:abcdeACXX:9:1:3:673 :N:0:
 TCCTCAAAAACAAGATAAAACGGTTGAAAT
 +
 >()>)''85BBC?#################
- at HiMom:9:1:3:890
+ at machine1:HiMom:abcdeACXX:9:1:3:890 :N:0:
 TGCTTCTGTTTCCGTTAGCTAGATAAAGTT
 +
 ##############################
- at HiMom:9:1:3:905
+ at machine1:HiMom:abcdeACXX:9:1:3:905 :N:0:
 TGTTATGTTTAATTTTCTTTAGCACCCTTC
 +
 >7>?A:-<BA at 0>@:@8=A;5%7;9?=:9@
- at HiMom:9:1:3:918
+ at machine1:HiMom:abcdeACXX:9:1:3:918 :N:0:
 TTTTCATTCCTAGTCATCCACCCCATCAGA
 +
 0()@A=:2>3:>(/((<22A>:0(20:@)@
- at HiMom:9:2:0:1073
+ at machine1:HiMom:abcdeACXX:9:2:0:1073 :N:0:
 NNNNNANCACNNNCNNNCNCANNNCNNNNN
 +
 ##############################
- at HiMom:9:2:0:1135
+ at machine1:HiMom:abcdeACXX:9:2:0:1135 :N:0:
 NNNNNGNNGTNNNANNNTNTANNNGNNNNN
 +
 ##############################
- at HiMom:9:2:0:1198
+ at machine1:HiMom:abcdeACXX:9:2:0:1198 :N:0:
 NNNNNTNCTANNNTNNNCNCANNNANNNNN
 +
 ##############################
- at HiMom:9:2:0:1278
+ at machine1:HiMom:abcdeACXX:9:2:0:1278 :N:0:
 NNNNNNNNTANNNTNNNCNNANNNGNNNNN
 +
 ##############################
- at HiMom:9:2:0:135
+ at machine1:HiMom:abcdeACXX:9:2:0:135 :N:0:
 NNNNNNNNANNNNNNNNNNNGNNNNNNNNN
 +
 ##############################
- at HiMom:9:2:0:1547
+ at machine1:HiMom:abcdeACXX:9:2:0:1547 :N:0:
 NNNNNNNNCNNNNNNNNNNNGNNNANNNNN
 +
 ##############################
- at HiMom:9:2:0:1598
+ at machine1:HiMom:abcdeACXX:9:2:0:1598 :N:0:
 NNNNNNNNATNNNTNNNANNGNNNCNNNNN
 +
 ##############################
- at HiMom:9:2:0:1620
+ at machine1:HiMom:abcdeACXX:9:2:0:1620 :N:0:
 NNNNNNNNCANNNNNNNANNCNNNCNNNNN
 +
 ##############################
- at HiMom:9:2:0:1668
+ at machine1:HiMom:abcdeACXX:9:2:0:1668 :N:0:
 NNNNNANATANNNANNNGNTGNNNTNNNNN
 +
 ##############################
- at HiMom:9:2:0:186
+ at machine1:HiMom:abcdeACXX:9:2:0:186 :N:0:
 NNNNNNNNCCNNNANNNTNNTNNNTNNNNN
 +
 ##############################
- at HiMom:9:2:0:205
+ at machine1:HiMom:abcdeACXX:9:2:0:205 :N:0:
 NNNNNNNNANNNNNNNNTNNCNNNTNNNNN
 +
 ##############################
- at HiMom:9:2:0:287
+ at machine1:HiMom:abcdeACXX:9:2:0:287 :N:0:
 NNNNNNNNCCNNNCNNNTNNANNNANNNNN
 +
 ##############################
- at HiMom:9:2:0:382
+ at machine1:HiMom:abcdeACXX:9:2:0:382 :N:0:
 NNNNNNNNCANNNTNNNTNNANNNANNNNN
 +
 ##############################
- at HiMom:9:2:0:441
+ at machine1:HiMom:abcdeACXX:9:2:0:441 :N:0:
 NNNNNNNNTTNNNANNNANNTNNNTNNNNN
 +
 ##############################
- at HiMom:9:2:0:50
+ at machine1:HiMom:abcdeACXX:9:2:0:50 :N:0:
 NNNNNNNNTNNNNNNNNTNNGNNNGNNNNN
 +
 ##############################
- at HiMom:9:2:0:501
+ at machine1:HiMom:abcdeACXX:9:2:0:501 :N:0:
 NNNNNGNNAGNNNANNNCNCTNNNCNNNNN
 +
 ##############################
- at HiMom:9:2:0:73
+ at machine1:HiMom:abcdeACXX:9:2:0:73 :N:0:
 NNNNNANCATNNNGNNNANACNNNGNNNNN
 +
 ##############################
- at HiMom:9:2:0:740
+ at machine1:HiMom:abcdeACXX:9:2:0:740 :N:0:
 NNNNNNNNTTNNNANNNTNNANNNANNNNN
 +
 ##############################
- at HiMom:9:2:0:766
+ at machine1:HiMom:abcdeACXX:9:2:0:766 :N:0:
 NNNNNNNNTGNNNANNNANNTNNNTNNNNN
 +
 ##############################
- at HiMom:9:2:0:87
+ at machine1:HiMom:abcdeACXX:9:2:0:87 :N:0:
 NNNNNNNNGNNNNNNNNANNTNNNTNNNNN
 +
 ##############################
- at HiMom:9:2:1:1004
+ at machine1:HiMom:abcdeACXX:9:2:1:1004 :N:0:
 NATTTATCACTANANATCCGCAAACCCTCC
 +
 ##############################
- at HiMom:9:2:1:1034
+ at machine1:HiMom:abcdeACXX:9:2:1:1034 :N:0:
 NATCATTTTCATNCNTTTCACTGATACATT
 +
 %.737:887471%-%1:8555545;696::
- at HiMom:9:2:1:1159
+ at machine1:HiMom:abcdeACXX:9:2:1:1159 :N:0:
 NNACTTNTAGNNNGNNNAAATNNCCNANNN
 +
 ##############################
- at HiMom:9:2:1:1168
+ at machine1:HiMom:abcdeACXX:9:2:1:1168 :N:0:
 NNTCTANCTTNNNTNNNATTGNNTTNTNNN
 +
 ##############################
- at HiMom:9:2:1:1180
+ at machine1:HiMom:abcdeACXX:9:2:1:1180 :N:0:
 NNATGGNCTTNNNCNNNAGAANNTCNANNN
 +
 ##############################
- at HiMom:9:2:1:1214
+ at machine1:HiMom:abcdeACXX:9:2:1:1214 :N:0:
 NAAAAAAAAAAANANTATAAGAAAGAATCA
 +
 %035:#########################
- at HiMom:9:2:1:1221
+ at machine1:HiMom:abcdeACXX:9:2:1:1221 :N:0:
 NGGTCACACTCACATAGTGTTCAGAGCACT
 +
 ##############################
- at HiMom:9:2:1:1306
+ at machine1:HiMom:abcdeACXX:9:2:1:1306 :N:0:
 NNACATNAAANNNTNNNAACANNGTNANNN
 +
 ##############################
- at HiMom:9:2:1:1351
+ at machine1:HiMom:abcdeACXX:9:2:1:1351 :N:0:
 NNNNNCNATANNNTNNNANAANNNTNNNNN
 +
 ##############################
- at HiMom:9:2:1:1424
+ at machine1:HiMom:abcdeACXX:9:2:1:1424 :N:0:
 NNTCATNTAGNNNCNNNATGGNNGTNCNNN
 +
 ##############################
- at HiMom:9:2:1:1452
+ at machine1:HiMom:abcdeACXX:9:2:1:1452 :N:0:
 NGAAATTTGTAAAANCACCTGCAGAATACT
 +
 ##############################
- at HiMom:9:2:1:1515
+ at machine1:HiMom:abcdeACXX:9:2:1:1515 :N:0:
 NATTAAATATNANANNGTAATAATAATANN
 +
 %/9###########################
- at HiMom:9:2:1:1521
+ at machine1:HiMom:abcdeACXX:9:2:1:1521 :N:0:
 NNACACNAAANNNGNNNATCTNNTTNCNNN
 +
 ##############################
- at HiMom:9:2:1:1536
+ at machine1:HiMom:abcdeACXX:9:2:1:1536 :N:0:
 NAGCAAAGACTTNGNACCAACCCAAATGTT
 +
 ##############################
- at HiMom:9:2:1:1543
+ at machine1:HiMom:abcdeACXX:9:2:1:1543 :N:0:
 NNTTGANATCNNNANNNAATANNTANCNNN
 +
 ##############################
- at HiMom:9:2:1:1617
+ at machine1:HiMom:abcdeACXX:9:2:1:1617 :N:0:
 NNCCATNATCNNNGNNNCCAGNNGTNTNNN
 +
 ##############################
- at HiMom:9:2:1:1627
+ at machine1:HiMom:abcdeACXX:9:2:1:1627 :N:0:
 NNTGGTNAGANNNCNNNAAAANNCANTNNN
 +
 ##############################
- at HiMom:9:2:1:1646
+ at machine1:HiMom:abcdeACXX:9:2:1:1646 :N:0:
 NTTAATTATANNNANNTAAACATTCTAANN
 +
 ##############################
- at HiMom:9:2:1:1653
+ at machine1:HiMom:abcdeACXX:9:2:1:1653 :N:0:
 NNAATTNAAANNNTNNNATCTNNAGNANNN
 +
 ##############################
- at HiMom:9:2:1:1682
+ at machine1:HiMom:abcdeACXX:9:2:1:1682 :N:0:
 NNTCTTNTTTNNNGNNNAAAANNAANTNNN
 +
 ##############################
- at HiMom:9:2:1:170
+ at machine1:HiMom:abcdeACXX:9:2:1:170 :Y:0:
 NAGAAGAAATGGGATCCTGCTGTGGCCAGT
 +
 %/888865284168866767663(6874/5
- at HiMom:9:2:1:1731
+ at machine1:HiMom:abcdeACXX:9:2:1:1731 :N:0:
 NNTATANGAANNNTNNNTGCTNNAGNTNNN
 +
 ##############################
- at HiMom:9:2:1:1755
+ at machine1:HiMom:abcdeACXX:9:2:1:1755 :N:0:
 NNGTNANTCTNNNCNNNCNTGNNNGNANNN
 +
 ##############################
- at HiMom:9:2:1:1812
+ at machine1:HiMom:abcdeACXX:9:2:1:1812 :N:0:
 NNTTGCNCACNNNCNNNCCATNNAANGNNN
 +
 ##############################
- at HiMom:9:2:1:1853
+ at machine1:HiMom:abcdeACXX:9:2:1:1853 :N:0:
 NNATCTNTTCNNNANNNAGTGNNATNCNNN
 +
 ##############################
- at HiMom:9:2:1:1919
+ at machine1:HiMom:abcdeACXX:9:2:1:1919 :N:0:
 NNAATTNAAANNNANNNAGAANNAGNANNN
 +
 ##############################
- at HiMom:9:2:1:1924
+ at machine1:HiMom:abcdeACXX:9:2:1:1924 :N:0:
 NATATTCTGAAGNANNCCAATGAACCAAAN
 +
 %116<9579<7###################
- at HiMom:9:2:1:1933
+ at machine1:HiMom:abcdeACXX:9:2:1:1933 :N:0:
 NAGGGTACATNTNCNNAATGTGCGGGTTNN
 +
 ##############################
- at HiMom:9:2:1:1938
+ at machine1:HiMom:abcdeACXX:9:2:1:1938 :Y:0:
 NAGTCCAGTGTCTCTGCTTCCGCAGGGACA
 +
 %/818865/058858644866457646668
- at HiMom:9:2:1:1950
+ at machine1:HiMom:abcdeACXX:9:2:1:1950 :N:0:
 NNTTNANAAANNNCNNNTNCANNNTNCNNN
 +
 ##############################
- at HiMom:9:2:1:1959
+ at machine1:HiMom:abcdeACXX:9:2:1:1959 :N:0:
 NGACACATTCCTACNACAGAGAAAAATTTA
 +
 %*77;;<;<<:<;,%.::;:6:9::<4488
- at HiMom:9:2:1:1987
+ at machine1:HiMom:abcdeACXX:9:2:1:1987 :N:0:
 NNATNGNACANNNCNNNTNGTNNNTNNNNN
 +
 ##############################
- at HiMom:9:2:1:2006
+ at machine1:HiMom:abcdeACXX:9:2:1:2006 :N:0:
 NNGTATNTGANNNGNNNCCTTNNAGNANNN
 +
 ##############################
- at HiMom:9:2:1:211
+ at machine1:HiMom:abcdeACXX:9:2:1:211 :N:0:
 NNCTGANACANNNGNNNTGCANNACNCNNN
 +
 ##############################
- at HiMom:9:2:1:234
+ at machine1:HiMom:abcdeACXX:9:2:1:234 :N:0:
 NAAGCCTGTGGGNANNCCCAGTGGGAGCGN
 +
 ##############################
- at HiMom:9:2:1:242
+ at machine1:HiMom:abcdeACXX:9:2:1:242 :N:0:
 NNGCTCNAGCNNNANNNATATNNTTNGNNN
 +
 ##############################
- at HiMom:9:2:1:262
+ at machine1:HiMom:abcdeACXX:9:2:1:262 :N:0:
 NNATTGNAATNNNCNNNTTCCNNATNTNNN
 +
 ##############################
- at HiMom:9:2:1:298
+ at machine1:HiMom:abcdeACXX:9:2:1:298 :N:0:
 NNTCAANTTGNNNTNNNCTGCNNTTNTNNN
 +
 ##############################
- at HiMom:9:2:1:312
+ at machine1:HiMom:abcdeACXX:9:2:1:312 :N:0:
 NNTTGCNAGANNNANNNAACTNNTGNANNN
 +
 ##############################
- at HiMom:9:2:1:363
+ at machine1:HiMom:abcdeACXX:9:2:1:363 :Y:0:
 NGAAAGGTTTTGCAGCATGTGCAAACTCAC
 +
 %-5565678:8177656503512/377856
- at HiMom:9:2:1:37
+ at machine1:HiMom:abcdeACXX:9:2:1:37 :N:0:
 NTGTAAACGANNNCNNTTCCTGTTCAGCNN
 +
 ##############################
- at HiMom:9:2:1:370
+ at machine1:HiMom:abcdeACXX:9:2:1:370 :N:0:
 NNCTGGNAGCNNNTNNNCATANNAANCNNN
 +
 ##############################
- at HiMom:9:2:1:377
+ at machine1:HiMom:abcdeACXX:9:2:1:377 :N:0:
 NNAGAANGTGNNNTNNNAAATNNAANANNN
 +
 ##############################
- at HiMom:9:2:1:414
+ at machine1:HiMom:abcdeACXX:9:2:1:414 :N:0:
 NNTAGANAGCNNNANNNTCAGNNACNGNNN
 +
 ##############################
- at HiMom:9:2:1:421
+ at machine1:HiMom:abcdeACXX:9:2:1:421 :N:0:
 NNGTTANTTCNNNANNNCGTGNNATNCNNN
 +
 ##############################
- at HiMom:9:2:1:428
+ at machine1:HiMom:abcdeACXX:9:2:1:428 :N:0:
 NATGTGAATANTNANNTAGTTGGGATTCAN
 +
 ##############################
- at HiMom:9:2:1:44
+ at machine1:HiMom:abcdeACXX:9:2:1:44 :N:0:
 NACTACCTCANGNANNAAGCAGGTTCTAAN
 +
 ##############################
- at HiMom:9:2:1:466
+ at machine1:HiMom:abcdeACXX:9:2:1:466 :N:0:
 NACACTCACANCNANNTGTTTGGAATGANN
 +
 ##############################
- at HiMom:9:2:1:555
+ at machine1:HiMom:abcdeACXX:9:2:1:555 :N:0:
 NNCAATNTCTNNNGNNNTACANNCTNCNNN
 +
 ##############################
- at HiMom:9:2:1:558
+ at machine1:HiMom:abcdeACXX:9:2:1:558 :N:0:
 NAAAATATCANTNANNAATAAATAATCANN
 +
 ##############################
- at HiMom:9:2:1:56
+ at machine1:HiMom:abcdeACXX:9:2:1:56 :N:0:
 NNGCCANGGTNNNANNNTCACNNGGNCNNN
 +
 ##############################
- at HiMom:9:2:1:569
+ at machine1:HiMom:abcdeACXX:9:2:1:569 :N:0:
 NNAGGCNAGTNNNGNNNGTCCNNGTNANNN
 +
 ##############################
- at HiMom:9:2:1:604
+ at machine1:HiMom:abcdeACXX:9:2:1:604 :N:0:
 NATGATGAAACTCTNTCTCTACTAAAAATA
 +
 ##############################
- at HiMom:9:2:1:628
+ at machine1:HiMom:abcdeACXX:9:2:1:628 :N:0:
 NAGTATGCCCNCNCNNACCACTCCTATTNN
 +
 ##############################
- at HiMom:9:2:1:64
+ at machine1:HiMom:abcdeACXX:9:2:1:64 :N:0:
 NATTAATCTTNNNTNNGCACAATTCATTNN
 +
 ##############################
- at HiMom:9:2:1:684
+ at machine1:HiMom:abcdeACXX:9:2:1:684 :N:0:
 NAAAAATCAAATGANCATAATTTTATAAAA
 +
 ##############################
- at HiMom:9:2:1:699
+ at machine1:HiMom:abcdeACXX:9:2:1:699 :N:0:
 NNAATTNTTGNNNTNNNATTTNNGANTNNN
 +
 ##############################
- at HiMom:9:2:1:714
+ at machine1:HiMom:abcdeACXX:9:2:1:714 :N:0:
 NATTAACTTANANTNNACCACAACCTAANN
 +
 %.:###########################
- at HiMom:9:2:1:722
+ at machine1:HiMom:abcdeACXX:9:2:1:722 :N:0:
 NNCCTCNCTGNNNCNNNCTGTNNTGNCNNN
 +
 ##############################
- at HiMom:9:2:1:749
+ at machine1:HiMom:abcdeACXX:9:2:1:749 :N:0:
 NNAGTGNTACNNNTNNNCTTGNNCTNTNNN
 +
 ##############################
- at HiMom:9:2:1:760
+ at machine1:HiMom:abcdeACXX:9:2:1:760 :N:0:
 NGTCTGTTTTATGTNAAATATTTTGTTTAA
 +
 ##############################
- at HiMom:9:2:1:8
+ at machine1:HiMom:abcdeACXX:9:2:1:8 :N:0:
 NNTGCGNTGGNNNCNNNAGGCNNTTNTNNN
 +
 ##############################
- at HiMom:9:2:1:833
+ at machine1:HiMom:abcdeACXX:9:2:1:833 :N:0:
 NNGAGCNCCTNNNANNNCTCCNNGANGNNN
 +
 ##############################
- at HiMom:9:2:1:848
+ at machine1:HiMom:abcdeACXX:9:2:1:848 :N:0:
 NNTACTNAGTNNNGNNNTGTTNNGCNTNNN
 +
 ##############################
- at HiMom:9:2:1:893
+ at machine1:HiMom:abcdeACXX:9:2:1:893 :N:0:
 NGAGACAGAGTCTCNCTCTGTTCCCTAGCC
 +
 ##############################
- at HiMom:9:2:1:998
+ at machine1:HiMom:abcdeACXX:9:2:1:998 :N:0:
 NNATGTNTGCNNNANNNTATANNGGNANNN
 +
 ##############################
- at HiMom:9:2:2:0
+ at machine1:HiMom:abcdeACXX:9:2:2:0 :N:0:
 NATTCCTTNANNNNNNNNNNNNNNNNNNNN
 +
 ##############################
- at HiMom:9:2:2:131
+ at machine1:HiMom:abcdeACXX:9:2:2:131 :Y:0:
 NATATATTGACAGCAGTCATGTTGTTGAAG
 +
 %0<<<:<959874492:96999969:7784
- at HiMom:9:2:2:1636
+ at machine1:HiMom:abcdeACXX:9:2:2:1636 :N:0:
 NGTGTAAAAGTAGGGAAATACTATAGCAAG
 +
 ##############################
- at HiMom:9:2:2:1974
+ at machine1:HiMom:abcdeACXX:9:2:2:1974 :N:0:
 NACGCCAATACAAAAATGTTGAAGCTAGCT
 +
 ##############################
- at HiMom:9:2:2:351
+ at machine1:HiMom:abcdeACXX:9:2:2:351 :N:0:
 NGGGGTTGAGGTGTAAATAGAACATTTGTA
 +
 ##############################
- at HiMom:9:2:2:646
+ at machine1:HiMom:abcdeACXX:9:2:2:646 :N:0:
 NGAATCTAAGAAGACACAAAACTAAGGAAA
 +
 ##############################
- at HiMom:9:2:2:828
+ at machine1:HiMom:abcdeACXX:9:2:2:828 :N:0:
 NTCAAGTCAATTTGGGACTTGAAACAGCTC
 +
 ##############################
- at HiMom:9:2:3:1529
+ at machine1:HiMom:abcdeACXX:9:2:3:1529 :N:0:
 NTTATATGAATAGATAAATAAATAATCAAT
 +
 ##############################
- at HiMom:9:2:3:179
+ at machine1:HiMom:abcdeACXX:9:2:3:179 :N:0:
 CATTATTGTTAGACTGATTTTTTATAATCT
 +
 B@)104..*0-A(@@(<A9A<(+9)-=6(B
- at HiMom:9:2:3:198
+ at machine1:HiMom:abcdeACXX:9:2:3:198 :N:0:
 TGTCATTTTCTTTGCCTTAATTGTTCTTCT
 +
 5 at CBB7-*<=####################
- at HiMom:9:2:3:2030
+ at machine1:HiMom:abcdeACXX:9:2:3:2030 :N:0:
 CGAGATAATTTTTTAAAAAAAGTCCAAAAA
 +
 ((@;()@==*7<(5A@<C>###########
- at HiMom:9:2:3:247
+ at machine1:HiMom:abcdeACXX:9:2:3:247 :N:0:
 TGTACATGACCAGGTAATTTGGTTATGTGA
 +
 <@596353;)>@A7=:,A0'6>########
- at HiMom:9:2:3:4
+ at machine1:HiMom:abcdeACXX:9:2:3:4 :N:0:
 AGAGGCAATAAGTTTTAANNNNNNNNNNNN
 +
 A>BA at 9BAB3AA##################
- at HiMom:9:2:3:862
+ at machine1:HiMom:abcdeACXX:9:2:3:862 :N:0:
 NCTTTAAGAAATCATTCATTCTGCAAACAC
 +
 ##############################
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/NN.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/NN.barcode_1.fastq
index ab4d092..d03e8d4 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/NN.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/NN.barcode_1.fastq
@@ -1,892 +1,892 @@
- at HiMom:9:1:0:1038
+ at machine1:HiMom:abcdeACXX:9:1:0:1038 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:9:1:0:1093
+ at machine1:HiMom:abcdeACXX:9:1:0:1093 :N:0:
 NNNNNTGN
 +
 ########
- at HiMom:9:1:0:113
+ at machine1:HiMom:abcdeACXX:9:1:0:113 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:1193
+ at machine1:HiMom:abcdeACXX:9:1:0:1193 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:9:1:0:1291
+ at machine1:HiMom:abcdeACXX:9:1:0:1291 :N:0:
 NNNNNGNN
 +
 ########
- at HiMom:9:1:0:1307
+ at machine1:HiMom:abcdeACXX:9:1:0:1307 :N:0:
 NNNNNTAN
 +
 ########
- at HiMom:9:1:0:1434
+ at machine1:HiMom:abcdeACXX:9:1:0:1434 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:1475
+ at machine1:HiMom:abcdeACXX:9:1:0:1475 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:9:1:0:1690
+ at machine1:HiMom:abcdeACXX:9:1:0:1690 :N:0:
 NNNNNANN
 +
 ########
- at HiMom:9:1:0:1703
+ at machine1:HiMom:abcdeACXX:9:1:0:1703 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:1940
+ at machine1:HiMom:abcdeACXX:9:1:0:1940 :N:0:
 NNNNNCNN
 +
 ########
- at HiMom:9:1:0:2001
+ at machine1:HiMom:abcdeACXX:9:1:0:2001 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:1:0:205
+ at machine1:HiMom:abcdeACXX:9:1:0:205 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:9:1:0:275
+ at machine1:HiMom:abcdeACXX:9:1:0:275 :N:0:
 NNNNNATN
 +
 ########
- at HiMom:9:1:0:324
+ at machine1:HiMom:abcdeACXX:9:1:0:324 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:9:1:0:37
+ at machine1:HiMom:abcdeACXX:9:1:0:37 :N:0:
 NNNNNGNN
 +
 ########
- at HiMom:9:1:0:464
+ at machine1:HiMom:abcdeACXX:9:1:0:464 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:586
+ at machine1:HiMom:abcdeACXX:9:1:0:586 :N:0:
 NNNNNCNN
 +
 ########
- at HiMom:9:1:0:841
+ at machine1:HiMom:abcdeACXX:9:1:0:841 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:879
+ at machine1:HiMom:abcdeACXX:9:1:0:879 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:1013
+ at machine1:HiMom:abcdeACXX:9:1:1:1013 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:1:1:111
+ at machine1:HiMom:abcdeACXX:9:1:1:111 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:9:1:1:1153
+ at machine1:HiMom:abcdeACXX:9:1:1:1153 :N:0:
 NNNNNCTN
 +
 ########
- at HiMom:9:1:1:1184
+ at machine1:HiMom:abcdeACXX:9:1:1:1184 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:9:1:1:1241
+ at machine1:HiMom:abcdeACXX:9:1:1:1241 :N:0:
 NNNNNCTN
 +
 ########
- at HiMom:9:1:1:1243
+ at machine1:HiMom:abcdeACXX:9:1:1:1243 :N:0:
 NNNNNTGN
 +
 ########
- at HiMom:9:1:1:1247
+ at machine1:HiMom:abcdeACXX:9:1:1:1247 :N:0:
 NNNNNACN
 +
 ########
- at HiMom:9:1:1:1282
+ at machine1:HiMom:abcdeACXX:9:1:1:1282 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:9:1:1:132
+ at machine1:HiMom:abcdeACXX:9:1:1:132 :N:0:
 NNNNNTGN
 +
 ########
- at HiMom:9:1:1:1320
+ at machine1:HiMom:abcdeACXX:9:1:1:1320 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:9:1:1:1372
+ at machine1:HiMom:abcdeACXX:9:1:1:1372 :N:0:
 NNNGNTTA
 +
 ########
- at HiMom:9:1:1:1379
+ at machine1:HiMom:abcdeACXX:9:1:1:1379 :N:0:
 NNNCNGAT
 +
 ########
- at HiMom:9:1:1:1391
+ at machine1:HiMom:abcdeACXX:9:1:1:1391 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:9:1:1:140
+ at machine1:HiMom:abcdeACXX:9:1:1:140 :N:0:
 NNNNNCAN
 +
 ########
- at HiMom:9:1:1:1513
+ at machine1:HiMom:abcdeACXX:9:1:1:1513 :N:0:
 NNNNNCTN
 +
 ########
- at HiMom:9:1:1:1521
+ at machine1:HiMom:abcdeACXX:9:1:1:1521 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:9:1:1:155
+ at machine1:HiMom:abcdeACXX:9:1:1:155 :N:0:
 NNNNNCAN
 +
 ########
- at HiMom:9:1:1:1555
+ at machine1:HiMom:abcdeACXX:9:1:1:1555 :N:0:
 NNNNNCAN
 +
 ########
- at HiMom:9:1:1:164
+ at machine1:HiMom:abcdeACXX:9:1:1:164 :N:0:
 NNNNNTTN
 +
 ########
- at HiMom:9:1:1:1684
+ at machine1:HiMom:abcdeACXX:9:1:1:1684 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:9:1:1:1696
+ at machine1:HiMom:abcdeACXX:9:1:1:1696 :N:0:
 NNNNNCTN
 +
 ########
- at HiMom:9:1:1:170
+ at machine1:HiMom:abcdeACXX:9:1:1:170 :N:0:
 NNNNNACN
 +
 ########
- at HiMom:9:1:1:173
+ at machine1:HiMom:abcdeACXX:9:1:1:173 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:9:1:1:1733
+ at machine1:HiMom:abcdeACXX:9:1:1:1733 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:1:1:1770
+ at machine1:HiMom:abcdeACXX:9:1:1:1770 :N:0:
 NNNNNTCN
 +
 ########
- at HiMom:9:1:1:18
+ at machine1:HiMom:abcdeACXX:9:1:1:18 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:9:1:1:1815
+ at machine1:HiMom:abcdeACXX:9:1:1:1815 :N:0:
 NNNTNGAC
 +
 ########
- at HiMom:9:1:1:1836
+ at machine1:HiMom:abcdeACXX:9:1:1:1836 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:9:1:1:184
+ at machine1:HiMom:abcdeACXX:9:1:1:184 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:9:1:1:1886
+ at machine1:HiMom:abcdeACXX:9:1:1:1886 :Y:0:
 NNNGNGCC
 +
 ########
- at HiMom:9:1:1:1906
+ at machine1:HiMom:abcdeACXX:9:1:1:1906 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:9:1:1:1917
+ at machine1:HiMom:abcdeACXX:9:1:1:1917 :N:0:
 NNNNNACN
 +
 ########
- at HiMom:9:1:1:195
+ at machine1:HiMom:abcdeACXX:9:1:1:195 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:9:1:1:1954
+ at machine1:HiMom:abcdeACXX:9:1:1:1954 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:9:1:1:2
+ at machine1:HiMom:abcdeACXX:9:1:1:2 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:2011
+ at machine1:HiMom:abcdeACXX:9:1:1:2011 :N:0:
 NNNGNTAG
 +
 ########
- at HiMom:9:1:1:240
+ at machine1:HiMom:abcdeACXX:9:1:1:240 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:1:1:262
+ at machine1:HiMom:abcdeACXX:9:1:1:262 :N:0:
 NNNNNCAN
 +
 ########
- at HiMom:9:1:1:264
+ at machine1:HiMom:abcdeACXX:9:1:1:264 :N:0:
 NNNNNCGA
 +
 ########
- at HiMom:9:1:1:299
+ at machine1:HiMom:abcdeACXX:9:1:1:299 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:9:1:1:30
+ at machine1:HiMom:abcdeACXX:9:1:1:30 :N:0:
 NNNNNACN
 +
 ########
- at HiMom:9:1:1:353
+ at machine1:HiMom:abcdeACXX:9:1:1:353 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:9:1:1:367
+ at machine1:HiMom:abcdeACXX:9:1:1:367 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:9:1:1:41
+ at machine1:HiMom:abcdeACXX:9:1:1:41 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:1:1:416
+ at machine1:HiMom:abcdeACXX:9:1:1:416 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:1:1:483
+ at machine1:HiMom:abcdeACXX:9:1:1:483 :N:0:
 NNNNNTAN
 +
 ########
- at HiMom:9:1:1:486
+ at machine1:HiMom:abcdeACXX:9:1:1:486 :N:0:
 NNNNNTGN
 +
 ########
- at HiMom:9:1:1:495
+ at machine1:HiMom:abcdeACXX:9:1:1:495 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:1:1:508
+ at machine1:HiMom:abcdeACXX:9:1:1:508 :N:0:
 NNNNNCTN
 +
 ########
- at HiMom:9:1:1:517
+ at machine1:HiMom:abcdeACXX:9:1:1:517 :N:0:
 NNNCNAGA
 +
 ########
- at HiMom:9:1:1:535
+ at machine1:HiMom:abcdeACXX:9:1:1:535 :N:0:
 NNNCNCGA
 +
 ########
- at HiMom:9:1:1:55
+ at machine1:HiMom:abcdeACXX:9:1:1:55 :N:0:
 NNNGNTTA
 +
 ########
- at HiMom:9:1:1:554
+ at machine1:HiMom:abcdeACXX:9:1:1:554 :N:0:
 NNNNNTAN
 +
 ########
- at HiMom:9:1:1:567
+ at machine1:HiMom:abcdeACXX:9:1:1:567 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:9:1:1:59
+ at machine1:HiMom:abcdeACXX:9:1:1:59 :N:0:
 NNNNNACN
 +
 ########
- at HiMom:9:1:1:613
+ at machine1:HiMom:abcdeACXX:9:1:1:613 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:9:1:1:622
+ at machine1:HiMom:abcdeACXX:9:1:1:622 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:9:1:1:627
+ at machine1:HiMom:abcdeACXX:9:1:1:627 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:1:1:684
+ at machine1:HiMom:abcdeACXX:9:1:1:684 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:1:1:72
+ at machine1:HiMom:abcdeACXX:9:1:1:72 :N:0:
 NNNTNGAC
 +
 ########
- at HiMom:9:1:1:812
+ at machine1:HiMom:abcdeACXX:9:1:1:812 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:1:1:874
+ at machine1:HiMom:abcdeACXX:9:1:1:874 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:9:1:1:931
+ at machine1:HiMom:abcdeACXX:9:1:1:931 :N:0:
 NNNNNCAN
 +
 ########
- at HiMom:9:1:1:965
+ at machine1:HiMom:abcdeACXX:9:1:1:965 :N:0:
 NNNTNTAA
 +
 ########
- at HiMom:9:1:1:994
+ at machine1:HiMom:abcdeACXX:9:1:1:994 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:9:1:2:1158
+ at machine1:HiMom:abcdeACXX:9:1:2:1158 :Y:0:
 NNCTTAGC
 +
 ########
- at HiMom:9:1:2:1238
+ at machine1:HiMom:abcdeACXX:9:1:2:1238 :N:0:
 NNCTAAGC
 +
 ########
- at HiMom:9:1:2:1275
+ at machine1:HiMom:abcdeACXX:9:1:2:1275 :Y:0:
 NNNANCTG
 +
 ########
- at HiMom:9:1:2:1301
+ at machine1:HiMom:abcdeACXX:9:1:2:1301 :N:0:
 NNNTAACA
 +
 ########
- at HiMom:9:1:2:1453
+ at machine1:HiMom:abcdeACXX:9:1:2:1453 :Y:0:
 NNACCAGG
 +
 ########
- at HiMom:9:1:2:150
+ at machine1:HiMom:abcdeACXX:9:1:2:150 :N:0:
 NNNANCCT
 +
 ########
- at HiMom:9:1:2:1592
+ at machine1:HiMom:abcdeACXX:9:1:2:1592 :Y:0:
 NNNGAGCC
 +
 ########
- at HiMom:9:1:2:1706
+ at machine1:HiMom:abcdeACXX:9:1:2:1706 :Y:0:
 NNNCNGAT
 +
 ########
- at HiMom:9:1:2:1722
+ at machine1:HiMom:abcdeACXX:9:1:2:1722 :N:0:
 NNNTCGAC
 +
 ########
- at HiMom:9:1:2:1727
+ at machine1:HiMom:abcdeACXX:9:1:2:1727 :N:0:
 NNNTNCTT
 +
 ########
- at HiMom:9:1:2:1753
+ at machine1:HiMom:abcdeACXX:9:1:2:1753 :N:0:
 NNTGCTTA
 +
 ########
- at HiMom:9:1:2:1782
+ at machine1:HiMom:abcdeACXX:9:1:2:1782 :Y:0:
 NNNTNAGC
 +
 ########
- at HiMom:9:1:2:1827
+ at machine1:HiMom:abcdeACXX:9:1:2:1827 :Y:0:
 NNCAACTG
 +
 ########
- at HiMom:9:1:2:1932
+ at machine1:HiMom:abcdeACXX:9:1:2:1932 :Y:0:
 NNNCNAGA
 +
 ########
- at HiMom:9:1:2:1946
+ at machine1:HiMom:abcdeACXX:9:1:2:1946 :N:0:
 NNNTNGAC
 +
 ########
- at HiMom:9:1:2:209
+ at machine1:HiMom:abcdeACXX:9:1:2:209 :N:0:
 NNCATTTC
 +
 ########
- at HiMom:9:1:2:246
+ at machine1:HiMom:abcdeACXX:9:1:2:246 :N:0:
 NNNANTTC
 +
 ########
- at HiMom:9:1:2:25
+ at machine1:HiMom:abcdeACXX:9:1:2:25 :N:0:
 NNNGATGA
 +
 ########
- at HiMom:9:1:2:307
+ at machine1:HiMom:abcdeACXX:9:1:2:307 :N:0:
 NNNTNGAC
 +
 ########
- at HiMom:9:1:2:363
+ at machine1:HiMom:abcdeACXX:9:1:2:363 :N:0:
 NNNTNCTT
 +
 ########
- at HiMom:9:1:2:449
+ at machine1:HiMom:abcdeACXX:9:1:2:449 :N:0:
 NNNGNTGT
 +
 ########
- at HiMom:9:1:2:546
+ at machine1:HiMom:abcdeACXX:9:1:2:546 :N:0:
 NNNANGTT
 +
 ########
- at HiMom:9:1:2:605
+ at machine1:HiMom:abcdeACXX:9:1:2:605 :Y:0:
 NNNTNGAC
 +
 ########
- at HiMom:9:1:2:69
+ at machine1:HiMom:abcdeACXX:9:1:2:69 :N:0:
 NNGGAGCC
 +
 ########
- at HiMom:9:1:2:747
+ at machine1:HiMom:abcdeACXX:9:1:2:747 :N:0:
 NNNCCAGG
 +
 ########
- at HiMom:9:1:2:786
+ at machine1:HiMom:abcdeACXX:9:1:2:786 :Y:0:
 NNNGATGT
 +
 ########
- at HiMom:9:1:2:858
+ at machine1:HiMom:abcdeACXX:9:1:2:858 :Y:0:
 NNACATCT
 +
 %%/57799
- at HiMom:9:1:2:943
+ at machine1:HiMom:abcdeACXX:9:1:2:943 :Y:0:
 NNACCAGG
 +
 ########
- at HiMom:9:1:2:974
+ at machine1:HiMom:abcdeACXX:9:1:2:974 :Y:0:
 NNTATGTT
 +
 %%0::::<
- at HiMom:9:1:2:988
+ at machine1:HiMom:abcdeACXX:9:1:2:988 :Y:0:
 NNTGGCGA
 +
 ########
- at HiMom:9:1:3:1233
+ at machine1:HiMom:abcdeACXX:9:1:3:1233 :N:0:
 CCAACAGG
 +
 ########
- at HiMom:9:1:3:1294
+ at machine1:HiMom:abcdeACXX:9:1:3:1294 :N:0:
 TCACAATG
 +
 *37<<@5<
- at HiMom:9:1:3:405
+ at machine1:HiMom:abcdeACXX:9:1:3:405 :N:0:
 ACACAAGA
 +
 0(><=###
- at HiMom:9:1:3:579
+ at machine1:HiMom:abcdeACXX:9:1:3:579 :N:0:
 AATCATGT
 +
 73######
- at HiMom:9:1:3:673
+ at machine1:HiMom:abcdeACXX:9:1:3:673 :N:0:
 TGCCCAAA
 +
 (<######
- at HiMom:9:1:3:890
+ at machine1:HiMom:abcdeACXX:9:1:3:890 :N:0:
 GTCACCAT
 +
 ########
- at HiMom:9:1:3:905
+ at machine1:HiMom:abcdeACXX:9:1:3:905 :N:0:
 ACATCCTA
 +
 AA78/<:#
- at HiMom:9:1:3:918
+ at machine1:HiMom:abcdeACXX:9:1:3:918 :N:0:
 ACTACCTT
 +
 )?4B>###
- at HiMom:9:2:0:1073
+ at machine1:HiMom:abcdeACXX:9:2:0:1073 :N:0:
 NNNNNCAN
 +
 ########
- at HiMom:9:2:0:1135
+ at machine1:HiMom:abcdeACXX:9:2:0:1135 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:9:2:0:1198
+ at machine1:HiMom:abcdeACXX:9:2:0:1198 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:9:2:0:1278
+ at machine1:HiMom:abcdeACXX:9:2:0:1278 :N:0:
 NNNNNTAN
 +
 ########
- at HiMom:9:2:0:135
+ at machine1:HiMom:abcdeACXX:9:2:0:135 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:9:2:0:1547
+ at machine1:HiMom:abcdeACXX:9:2:0:1547 :N:0:
 NNNNNCAN
 +
 ########
- at HiMom:9:2:0:1598
+ at machine1:HiMom:abcdeACXX:9:2:0:1598 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:9:2:0:1620
+ at machine1:HiMom:abcdeACXX:9:2:0:1620 :N:0:
 NNNNNTGN
 +
 ########
- at HiMom:9:2:0:1668
+ at machine1:HiMom:abcdeACXX:9:2:0:1668 :N:0:
 NNNNNCTN
 +
 ########
- at HiMom:9:2:0:186
+ at machine1:HiMom:abcdeACXX:9:2:0:186 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:9:2:0:205
+ at machine1:HiMom:abcdeACXX:9:2:0:205 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:9:2:0:287
+ at machine1:HiMom:abcdeACXX:9:2:0:287 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:2:0:382
+ at machine1:HiMom:abcdeACXX:9:2:0:382 :N:0:
 NNNNNTAN
 +
 ########
- at HiMom:9:2:0:441
+ at machine1:HiMom:abcdeACXX:9:2:0:441 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:9:2:0:50
+ at machine1:HiMom:abcdeACXX:9:2:0:50 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:2:0:501
+ at machine1:HiMom:abcdeACXX:9:2:0:501 :N:0:
 NNNNNTAN
 +
 ########
- at HiMom:9:2:0:73
+ at machine1:HiMom:abcdeACXX:9:2:0:73 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:9:2:0:740
+ at machine1:HiMom:abcdeACXX:9:2:0:740 :N:0:
 NNNNNGGN
 +
 ########
- at HiMom:9:2:0:766
+ at machine1:HiMom:abcdeACXX:9:2:0:766 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:9:2:0:87
+ at machine1:HiMom:abcdeACXX:9:2:0:87 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:9:2:1:1004
+ at machine1:HiMom:abcdeACXX:9:2:1:1004 :N:0:
 NNNGCCGA
 +
 ########
- at HiMom:9:2:1:1034
+ at machine1:HiMom:abcdeACXX:9:2:1:1034 :N:0:
 NNNAGCCT
 +
 ########
- at HiMom:9:2:1:1159
+ at machine1:HiMom:abcdeACXX:9:2:1:1159 :N:0:
 NNNTNGAC
 +
 ########
- at HiMom:9:2:1:1168
+ at machine1:HiMom:abcdeACXX:9:2:1:1168 :N:0:
 NNNGNTAG
 +
 ########
- at HiMom:9:2:1:1180
+ at machine1:HiMom:abcdeACXX:9:2:1:1180 :N:0:
 NNNTNAGC
 +
 ########
- at HiMom:9:2:1:1214
+ at machine1:HiMom:abcdeACXX:9:2:1:1214 :N:0:
 NNNCATGA
 +
 ########
- at HiMom:9:2:1:1221
+ at machine1:HiMom:abcdeACXX:9:2:1:1221 :N:0:
 NNGGATGT
 +
 ########
- at HiMom:9:2:1:1306
+ at machine1:HiMom:abcdeACXX:9:2:1:1306 :N:0:
 NNNANCTG
 +
 ########
- at HiMom:9:2:1:1351
+ at machine1:HiMom:abcdeACXX:9:2:1:1351 :N:0:
 NNNNNTTN
 +
 ########
- at HiMom:9:2:1:1424
+ at machine1:HiMom:abcdeACXX:9:2:1:1424 :N:0:
 NNNCNTCT
 +
 ########
- at HiMom:9:2:1:1452
+ at machine1:HiMom:abcdeACXX:9:2:1:1452 :N:0:
 NNAGATCC
 +
 ########
- at HiMom:9:2:1:1515
+ at machine1:HiMom:abcdeACXX:9:2:1:1515 :N:0:
 NNNGNATG
 +
 ########
- at HiMom:9:2:1:1521
+ at machine1:HiMom:abcdeACXX:9:2:1:1521 :N:0:
 NNNCNAGG
 +
 ########
- at HiMom:9:2:1:1536
+ at machine1:HiMom:abcdeACXX:9:2:1:1536 :N:0:
 NNACATCT
 +
 ########
- at HiMom:9:2:1:1543
+ at machine1:HiMom:abcdeACXX:9:2:1:1543 :N:0:
 NNNANTTC
 +
 ########
- at HiMom:9:2:1:1617
+ at machine1:HiMom:abcdeACXX:9:2:1:1617 :N:0:
 NNNCNAGG
 +
 ########
- at HiMom:9:2:1:1627
+ at machine1:HiMom:abcdeACXX:9:2:1:1627 :N:0:
 NNNANCTG
 +
 ########
- at HiMom:9:2:1:1646
+ at machine1:HiMom:abcdeACXX:9:2:1:1646 :N:0:
 NNNTNGAC
 +
 ########
- at HiMom:9:2:1:1653
+ at machine1:HiMom:abcdeACXX:9:2:1:1653 :N:0:
 NNNGNTGT
 +
 ########
- at HiMom:9:2:1:1682
+ at machine1:HiMom:abcdeACXX:9:2:1:1682 :N:0:
 NNNGNGCC
 +
 ########
- at HiMom:9:2:1:170
+ at machine1:HiMom:abcdeACXX:9:2:1:170 :Y:0:
 NNGAGCCT
 +
 ########
- at HiMom:9:2:1:1731
+ at machine1:HiMom:abcdeACXX:9:2:1:1731 :N:0:
 NNNTNAGC
 +
 ########
- at HiMom:9:2:1:1755
+ at machine1:HiMom:abcdeACXX:9:2:1:1755 :N:0:
 NNNNNCAN
 +
 ########
- at HiMom:9:2:1:1812
+ at machine1:HiMom:abcdeACXX:9:2:1:1812 :N:0:
 NNNCNTAT
 +
 ########
- at HiMom:9:2:1:1853
+ at machine1:HiMom:abcdeACXX:9:2:1:1853 :N:0:
 NNNCNCGA
 +
 ########
- at HiMom:9:2:1:1919
+ at machine1:HiMom:abcdeACXX:9:2:1:1919 :N:0:
 NNNANCTG
 +
 ########
- at HiMom:9:2:1:1924
+ at machine1:HiMom:abcdeACXX:9:2:1:1924 :N:0:
 NNNAACTG
 +
 ########
- at HiMom:9:2:1:1933
+ at machine1:HiMom:abcdeACXX:9:2:1:1933 :N:0:
 NNNTTAGC
 +
 ########
- at HiMom:9:2:1:1938
+ at machine1:HiMom:abcdeACXX:9:2:1:1938 :Y:0:
 NNCTCGAC
 +
 ########
- at HiMom:9:2:1:1950
+ at machine1:HiMom:abcdeACXX:9:2:1:1950 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:9:2:1:1959
+ at machine1:HiMom:abcdeACXX:9:2:1:1959 :N:0:
 NNTGCTTA
 +
 ########
- at HiMom:9:2:1:1987
+ at machine1:HiMom:abcdeACXX:9:2:1:1987 :N:0:
 NNNNNTAN
 +
 ########
- at HiMom:9:2:1:2006
+ at machine1:HiMom:abcdeACXX:9:2:1:2006 :N:0:
 NNNGNGCC
 +
 ########
- at HiMom:9:2:1:211
+ at machine1:HiMom:abcdeACXX:9:2:1:211 :N:0:
 NNNGNTGT
 +
 ########
- at HiMom:9:2:1:234
+ at machine1:HiMom:abcdeACXX:9:2:1:234 :N:0:
 NNNGCTTA
 +
 ########
- at HiMom:9:2:1:242
+ at machine1:HiMom:abcdeACXX:9:2:1:242 :N:0:
 NNNCNCGC
 +
 ########
- at HiMom:9:2:1:262
+ at machine1:HiMom:abcdeACXX:9:2:1:262 :N:0:
 NNNCNAGG
 +
 ########
- at HiMom:9:2:1:298
+ at machine1:HiMom:abcdeACXX:9:2:1:298 :N:0:
 NNNGNTAG
 +
 ########
- at HiMom:9:2:1:312
+ at machine1:HiMom:abcdeACXX:9:2:1:312 :N:0:
 NNNANGTT
 +
 ########
- at HiMom:9:2:1:363
+ at machine1:HiMom:abcdeACXX:9:2:1:363 :Y:0:
 NNTATGTT
 +
 %%.99999
- at HiMom:9:2:1:37
+ at machine1:HiMom:abcdeACXX:9:2:1:37 :N:0:
 NNNGNCGA
 +
 ########
- at HiMom:9:2:1:370
+ at machine1:HiMom:abcdeACXX:9:2:1:370 :N:0:
 NNNANCAT
 +
 ########
- at HiMom:9:2:1:377
+ at machine1:HiMom:abcdeACXX:9:2:1:377 :N:0:
 NNNCNTCT
 +
 ########
- at HiMom:9:2:1:414
+ at machine1:HiMom:abcdeACXX:9:2:1:414 :N:0:
 NNNGNTTA
 +
 ########
- at HiMom:9:2:1:421
+ at machine1:HiMom:abcdeACXX:9:2:1:421 :N:0:
 NNNANCCT
 +
 ########
- at HiMom:9:2:1:428
+ at machine1:HiMom:abcdeACXX:9:2:1:428 :N:0:
 NNNATGTT
 +
 ########
- at HiMom:9:2:1:44
+ at machine1:HiMom:abcdeACXX:9:2:1:44 :N:0:
 NNNAGCGA
 +
 ########
- at HiMom:9:2:1:466
+ at machine1:HiMom:abcdeACXX:9:2:1:466 :N:0:
 NNNTNACA
 +
 ########
- at HiMom:9:2:1:555
+ at machine1:HiMom:abcdeACXX:9:2:1:555 :N:0:
 NNNCNGAT
 +
 ########
- at HiMom:9:2:1:558
+ at machine1:HiMom:abcdeACXX:9:2:1:558 :N:0:
 NNNANCGA
 +
 ########
- at HiMom:9:2:1:56
+ at machine1:HiMom:abcdeACXX:9:2:1:56 :N:0:
 NNNTNAGC
 +
 ########
- at HiMom:9:2:1:569
+ at machine1:HiMom:abcdeACXX:9:2:1:569 :N:0:
 NNNANCTG
 +
 ########
- at HiMom:9:2:1:604
+ at machine1:HiMom:abcdeACXX:9:2:1:604 :N:0:
 NNCAACTG
 +
 ########
- at HiMom:9:2:1:628
+ at machine1:HiMom:abcdeACXX:9:2:1:628 :N:0:
 NNNTAACA
 +
 ########
- at HiMom:9:2:1:64
+ at machine1:HiMom:abcdeACXX:9:2:1:64 :N:0:
 NNNANGTT
 +
 ########
- at HiMom:9:2:1:684
+ at machine1:HiMom:abcdeACXX:9:2:1:684 :N:0:
 NNAAACGA
 +
 ########
- at HiMom:9:2:1:699
+ at machine1:HiMom:abcdeACXX:9:2:1:699 :N:0:
 NNNCNCGA
 +
 ########
- at HiMom:9:2:1:714
+ at machine1:HiMom:abcdeACXX:9:2:1:714 :N:0:
 NNNAGCGA
 +
 ########
- at HiMom:9:2:1:722
+ at machine1:HiMom:abcdeACXX:9:2:1:722 :N:0:
 NNNCNAGG
 +
 ########
- at HiMom:9:2:1:749
+ at machine1:HiMom:abcdeACXX:9:2:1:749 :N:0:
 NNNTNGAC
 +
 ########
- at HiMom:9:2:1:760
+ at machine1:HiMom:abcdeACXX:9:2:1:760 :N:0:
 NNACAACA
 +
 ########
- at HiMom:9:2:1:8
+ at machine1:HiMom:abcdeACXX:9:2:1:8 :N:0:
 NNNANNNN
 +
 ########
- at HiMom:9:2:1:833
+ at machine1:HiMom:abcdeACXX:9:2:1:833 :N:0:
 NNNANCCT
 +
 ########
- at HiMom:9:2:1:848
+ at machine1:HiMom:abcdeACXX:9:2:1:848 :N:0:
 NNNANCGA
 +
 ########
- at HiMom:9:2:1:893
+ at machine1:HiMom:abcdeACXX:9:2:1:893 :N:0:
 NNCAATTC
 +
 ########
- at HiMom:9:2:1:998
+ at machine1:HiMom:abcdeACXX:9:2:1:998 :N:0:
 NNNANGTT
 +
 ########
- at HiMom:9:2:2:0
+ at machine1:HiMom:abcdeACXX:9:2:2:0 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:2:131
+ at machine1:HiMom:abcdeACXX:9:2:2:131 :Y:0:
 CACAATCC
 +
 AACCBCA@
- at HiMom:9:2:2:1636
+ at machine1:HiMom:abcdeACXX:9:2:2:1636 :N:0:
 ATCAACCC
 +
 368?####
- at HiMom:9:2:2:1974
+ at machine1:HiMom:abcdeACXX:9:2:2:1974 :N:0:
 AGCAATCT
 +
 >#######
- at HiMom:9:2:2:351
+ at machine1:HiMom:abcdeACXX:9:2:2:351 :N:0:
 TGATAGAA
 +
 ########
- at HiMom:9:2:2:646
+ at machine1:HiMom:abcdeACXX:9:2:2:646 :N:0:
 ATCAATTA
 +
 ((>4/406
- at HiMom:9:2:2:828
+ at machine1:HiMom:abcdeACXX:9:2:2:828 :N:0:
 TATATCGA
 +
 ########
- at HiMom:9:2:3:1529
+ at machine1:HiMom:abcdeACXX:9:2:3:1529 :N:0:
 TAGAACCT
 +
 9)@73?B=
- at HiMom:9:2:3:179
+ at machine1:HiMom:abcdeACXX:9:2:3:179 :N:0:
 GTTTATTA
 +
 ########
- at HiMom:9:2:3:198
+ at machine1:HiMom:abcdeACXX:9:2:3:198 :N:0:
 CAGGATCT
 +
 5)0*@782
- at HiMom:9:2:3:2030
+ at machine1:HiMom:abcdeACXX:9:2:3:2030 :N:0:
 GATCAAGA
 +
 (((>(<@<
- at HiMom:9:2:3:247
+ at machine1:HiMom:abcdeACXX:9:2:3:247 :N:0:
 CGGTAGCT
 +
 ########
- at HiMom:9:2:3:4
+ at machine1:HiMom:abcdeACXX:9:2:3:4 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:3:862
+ at machine1:HiMom:abcdeACXX:9:2:3:862 :N:0:
 TAACAAGA
 +
 4)=69)=@
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/NN.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/NN.barcode_2.fastq
index 1929789..70b0ee2 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/NN.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/NN.barcode_2.fastq
@@ -1,892 +1,892 @@
- at HiMom:9:1:0:1038
+ at machine1:HiMom:abcdeACXX:9:1:0:1038 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:1093
+ at machine1:HiMom:abcdeACXX:9:1:0:1093 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:113
+ at machine1:HiMom:abcdeACXX:9:1:0:113 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:1193
+ at machine1:HiMom:abcdeACXX:9:1:0:1193 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:9:1:0:1291
+ at machine1:HiMom:abcdeACXX:9:1:0:1291 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:1307
+ at machine1:HiMom:abcdeACXX:9:1:0:1307 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:1434
+ at machine1:HiMom:abcdeACXX:9:1:0:1434 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:1475
+ at machine1:HiMom:abcdeACXX:9:1:0:1475 :N:0:
 NNNNNCNN
 +
 ########
- at HiMom:9:1:0:1690
+ at machine1:HiMom:abcdeACXX:9:1:0:1690 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:1703
+ at machine1:HiMom:abcdeACXX:9:1:0:1703 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:1940
+ at machine1:HiMom:abcdeACXX:9:1:0:1940 :N:0:
 NNNNNCNN
 +
 ########
- at HiMom:9:1:0:2001
+ at machine1:HiMom:abcdeACXX:9:1:0:2001 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:205
+ at machine1:HiMom:abcdeACXX:9:1:0:205 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:275
+ at machine1:HiMom:abcdeACXX:9:1:0:275 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:324
+ at machine1:HiMom:abcdeACXX:9:1:0:324 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:37
+ at machine1:HiMom:abcdeACXX:9:1:0:37 :N:0:
 NNNNNGNN
 +
 ########
- at HiMom:9:1:0:464
+ at machine1:HiMom:abcdeACXX:9:1:0:464 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:586
+ at machine1:HiMom:abcdeACXX:9:1:0:586 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:841
+ at machine1:HiMom:abcdeACXX:9:1:0:841 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:0:879
+ at machine1:HiMom:abcdeACXX:9:1:0:879 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:1013
+ at machine1:HiMom:abcdeACXX:9:1:1:1013 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:111
+ at machine1:HiMom:abcdeACXX:9:1:1:111 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:1153
+ at machine1:HiMom:abcdeACXX:9:1:1:1153 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:1184
+ at machine1:HiMom:abcdeACXX:9:1:1:1184 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:1241
+ at machine1:HiMom:abcdeACXX:9:1:1:1241 :N:0:
 NNNNNCNN
 +
 ########
- at HiMom:9:1:1:1243
+ at machine1:HiMom:abcdeACXX:9:1:1:1243 :N:0:
 NNNNNTGN
 +
 ########
- at HiMom:9:1:1:1247
+ at machine1:HiMom:abcdeACXX:9:1:1:1247 :N:0:
 NNNNNANN
 +
 ########
- at HiMom:9:1:1:1282
+ at machine1:HiMom:abcdeACXX:9:1:1:1282 :N:0:
 NNNNNCNN
 +
 ########
- at HiMom:9:1:1:132
+ at machine1:HiMom:abcdeACXX:9:1:1:132 :N:0:
 NNNNNTNN
 +
 ########
- at HiMom:9:1:1:1320
+ at machine1:HiMom:abcdeACXX:9:1:1:1320 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:1372
+ at machine1:HiMom:abcdeACXX:9:1:1:1372 :N:0:
 NNNGNNNN
 +
 ########
- at HiMom:9:1:1:1379
+ at machine1:HiMom:abcdeACXX:9:1:1:1379 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:1391
+ at machine1:HiMom:abcdeACXX:9:1:1:1391 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:140
+ at machine1:HiMom:abcdeACXX:9:1:1:140 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:1513
+ at machine1:HiMom:abcdeACXX:9:1:1:1513 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:1521
+ at machine1:HiMom:abcdeACXX:9:1:1:1521 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:9:1:1:155
+ at machine1:HiMom:abcdeACXX:9:1:1:155 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:1555
+ at machine1:HiMom:abcdeACXX:9:1:1:1555 :N:0:
 NNNNNCNN
 +
 ########
- at HiMom:9:1:1:164
+ at machine1:HiMom:abcdeACXX:9:1:1:164 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:1684
+ at machine1:HiMom:abcdeACXX:9:1:1:1684 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:1696
+ at machine1:HiMom:abcdeACXX:9:1:1:1696 :N:0:
 NNNNNCTN
 +
 ########
- at HiMom:9:1:1:170
+ at machine1:HiMom:abcdeACXX:9:1:1:170 :N:0:
 NNNNNACN
 +
 ########
- at HiMom:9:1:1:173
+ at machine1:HiMom:abcdeACXX:9:1:1:173 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:1733
+ at machine1:HiMom:abcdeACXX:9:1:1:1733 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:1:1:1770
+ at machine1:HiMom:abcdeACXX:9:1:1:1770 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:18
+ at machine1:HiMom:abcdeACXX:9:1:1:18 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:1815
+ at machine1:HiMom:abcdeACXX:9:1:1:1815 :N:0:
 NNNTNNNN
 +
 ########
- at HiMom:9:1:1:1836
+ at machine1:HiMom:abcdeACXX:9:1:1:1836 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:9:1:1:184
+ at machine1:HiMom:abcdeACXX:9:1:1:184 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:9:1:1:1886
+ at machine1:HiMom:abcdeACXX:9:1:1:1886 :Y:0:
 NNNGNNNN
 +
 ########
- at HiMom:9:1:1:1906
+ at machine1:HiMom:abcdeACXX:9:1:1:1906 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:1917
+ at machine1:HiMom:abcdeACXX:9:1:1:1917 :N:0:
 NNNNNACN
 +
 ########
- at HiMom:9:1:1:195
+ at machine1:HiMom:abcdeACXX:9:1:1:195 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:1954
+ at machine1:HiMom:abcdeACXX:9:1:1:1954 :N:0:
 NNNNNCNN
 +
 ########
- at HiMom:9:1:1:2
+ at machine1:HiMom:abcdeACXX:9:1:1:2 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:2011
+ at machine1:HiMom:abcdeACXX:9:1:1:2011 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:240
+ at machine1:HiMom:abcdeACXX:9:1:1:240 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:262
+ at machine1:HiMom:abcdeACXX:9:1:1:262 :N:0:
 NNNNNCNN
 +
 ########
- at HiMom:9:1:1:264
+ at machine1:HiMom:abcdeACXX:9:1:1:264 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:299
+ at machine1:HiMom:abcdeACXX:9:1:1:299 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:9:1:1:30
+ at machine1:HiMom:abcdeACXX:9:1:1:30 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:353
+ at machine1:HiMom:abcdeACXX:9:1:1:353 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:367
+ at machine1:HiMom:abcdeACXX:9:1:1:367 :N:0:
 NNNNNANN
 +
 ########
- at HiMom:9:1:1:41
+ at machine1:HiMom:abcdeACXX:9:1:1:41 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:416
+ at machine1:HiMom:abcdeACXX:9:1:1:416 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:483
+ at machine1:HiMom:abcdeACXX:9:1:1:483 :N:0:
 NNNNNTAN
 +
 ########
- at HiMom:9:1:1:486
+ at machine1:HiMom:abcdeACXX:9:1:1:486 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:495
+ at machine1:HiMom:abcdeACXX:9:1:1:495 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:508
+ at machine1:HiMom:abcdeACXX:9:1:1:508 :N:0:
 NNNNNCNN
 +
 ########
- at HiMom:9:1:1:517
+ at machine1:HiMom:abcdeACXX:9:1:1:517 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:9:1:1:535
+ at machine1:HiMom:abcdeACXX:9:1:1:535 :N:0:
 NNNCNNNN
 +
 ########
- at HiMom:9:1:1:55
+ at machine1:HiMom:abcdeACXX:9:1:1:55 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:554
+ at machine1:HiMom:abcdeACXX:9:1:1:554 :N:0:
 NNNNNTAN
 +
 ########
- at HiMom:9:1:1:567
+ at machine1:HiMom:abcdeACXX:9:1:1:567 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:59
+ at machine1:HiMom:abcdeACXX:9:1:1:59 :N:0:
 NNNNNANN
 +
 ########
- at HiMom:9:1:1:613
+ at machine1:HiMom:abcdeACXX:9:1:1:613 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:622
+ at machine1:HiMom:abcdeACXX:9:1:1:622 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:627
+ at machine1:HiMom:abcdeACXX:9:1:1:627 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:1:1:684
+ at machine1:HiMom:abcdeACXX:9:1:1:684 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:1:1:72
+ at machine1:HiMom:abcdeACXX:9:1:1:72 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:812
+ at machine1:HiMom:abcdeACXX:9:1:1:812 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:1:1:874
+ at machine1:HiMom:abcdeACXX:9:1:1:874 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:1:931
+ at machine1:HiMom:abcdeACXX:9:1:1:931 :N:0:
 NNNNNCNN
 +
 ########
- at HiMom:9:1:1:965
+ at machine1:HiMom:abcdeACXX:9:1:1:965 :N:0:
 NNNTNNNN
 +
 ########
- at HiMom:9:1:1:994
+ at machine1:HiMom:abcdeACXX:9:1:1:994 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:2:1158
+ at machine1:HiMom:abcdeACXX:9:1:2:1158 :Y:0:
 NNNNTANN
 +
 ########
- at HiMom:9:1:2:1238
+ at machine1:HiMom:abcdeACXX:9:1:2:1238 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:9:1:2:1275
+ at machine1:HiMom:abcdeACXX:9:1:2:1275 :Y:0:
 NNNANNNN
 +
 ########
- at HiMom:9:1:2:1301
+ at machine1:HiMom:abcdeACXX:9:1:2:1301 :N:0:
 NNNTANNN
 +
 ########
- at HiMom:9:1:2:1453
+ at machine1:HiMom:abcdeACXX:9:1:2:1453 :Y:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:2:150
+ at machine1:HiMom:abcdeACXX:9:1:2:150 :N:0:
 NNNANNNN
 +
 ########
- at HiMom:9:1:2:1592
+ at machine1:HiMom:abcdeACXX:9:1:2:1592 :Y:0:
 NNNGANNN
 +
 ########
- at HiMom:9:1:2:1706
+ at machine1:HiMom:abcdeACXX:9:1:2:1706 :Y:0:
 NNNCNNNN
 +
 ########
- at HiMom:9:1:2:1722
+ at machine1:HiMom:abcdeACXX:9:1:2:1722 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:2:1727
+ at machine1:HiMom:abcdeACXX:9:1:2:1727 :N:0:
 NNNTNNNN
 +
 ########
- at HiMom:9:1:2:1753
+ at machine1:HiMom:abcdeACXX:9:1:2:1753 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:2:1782
+ at machine1:HiMom:abcdeACXX:9:1:2:1782 :Y:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:2:1827
+ at machine1:HiMom:abcdeACXX:9:1:2:1827 :Y:0:
 NNNNACNN
 +
 ########
- at HiMom:9:1:2:1932
+ at machine1:HiMom:abcdeACXX:9:1:2:1932 :Y:0:
 NNNCNNNN
 +
 ########
- at HiMom:9:1:2:1946
+ at machine1:HiMom:abcdeACXX:9:1:2:1946 :N:0:
 NNNNNGNN
 +
 ########
- at HiMom:9:1:2:209
+ at machine1:HiMom:abcdeACXX:9:1:2:209 :N:0:
 NNNATNNN
 +
 ########
- at HiMom:9:1:2:246
+ at machine1:HiMom:abcdeACXX:9:1:2:246 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:2:25
+ at machine1:HiMom:abcdeACXX:9:1:2:25 :N:0:
 NNNGNNNN
 +
 ########
- at HiMom:9:1:2:307
+ at machine1:HiMom:abcdeACXX:9:1:2:307 :N:0:
 NNNTNNNN
 +
 ########
- at HiMom:9:1:2:363
+ at machine1:HiMom:abcdeACXX:9:1:2:363 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:2:449
+ at machine1:HiMom:abcdeACXX:9:1:2:449 :N:0:
 NNNGNNNN
 +
 ########
- at HiMom:9:1:2:546
+ at machine1:HiMom:abcdeACXX:9:1:2:546 :N:0:
 NNNNNGNN
 +
 ########
- at HiMom:9:1:2:605
+ at machine1:HiMom:abcdeACXX:9:1:2:605 :Y:0:
 NNNTNNNN
 +
 ########
- at HiMom:9:1:2:69
+ at machine1:HiMom:abcdeACXX:9:1:2:69 :N:0:
 NNNNAGNN
 +
 ########
- at HiMom:9:1:2:747
+ at machine1:HiMom:abcdeACXX:9:1:2:747 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:1:2:786
+ at machine1:HiMom:abcdeACXX:9:1:2:786 :Y:0:
 NNNGNNNN
 +
 ########
- at HiMom:9:1:2:858
+ at machine1:HiMom:abcdeACXX:9:1:2:858 :Y:0:
 NNNNATNN
 +
 %%/57799
- at HiMom:9:1:2:943
+ at machine1:HiMom:abcdeACXX:9:1:2:943 :Y:0:
 NNNCCNNN
 +
 ########
- at HiMom:9:1:2:974
+ at machine1:HiMom:abcdeACXX:9:1:2:974 :Y:0:
 NNNATNNN
 +
 %%0::::<
- at HiMom:9:1:2:988
+ at machine1:HiMom:abcdeACXX:9:1:2:988 :Y:0:
 NNNGGNNN
 +
 ########
- at HiMom:9:1:3:1233
+ at machine1:HiMom:abcdeACXX:9:1:3:1233 :N:0:
 NNNACNNN
 +
 ########
- at HiMom:9:1:3:1294
+ at machine1:HiMom:abcdeACXX:9:1:3:1294 :N:0:
 TCNNNNNN
 +
 *37<<@5<
- at HiMom:9:1:3:405
+ at machine1:HiMom:abcdeACXX:9:1:3:405 :N:0:
 NNNNNAGN
 +
 0(><=###
- at HiMom:9:1:3:579
+ at machine1:HiMom:abcdeACXX:9:1:3:579 :N:0:
 NNNNATNN
 +
 73######
- at HiMom:9:1:3:673
+ at machine1:HiMom:abcdeACXX:9:1:3:673 :N:0:
 NNNCCNNN
 +
 (<######
- at HiMom:9:1:3:890
+ at machine1:HiMom:abcdeACXX:9:1:3:890 :N:0:
 NNCANNNN
 +
 ########
- at HiMom:9:1:3:905
+ at machine1:HiMom:abcdeACXX:9:1:3:905 :N:0:
 ACNNNNNN
 +
 AA78/<:#
- at HiMom:9:1:3:918
+ at machine1:HiMom:abcdeACXX:9:1:3:918 :N:0:
 NNNNNCTN
 +
 )?4B>###
- at HiMom:9:2:0:1073
+ at machine1:HiMom:abcdeACXX:9:2:0:1073 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:0:1135
+ at machine1:HiMom:abcdeACXX:9:2:0:1135 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:0:1198
+ at machine1:HiMom:abcdeACXX:9:2:0:1198 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:9:2:0:1278
+ at machine1:HiMom:abcdeACXX:9:2:0:1278 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:0:135
+ at machine1:HiMom:abcdeACXX:9:2:0:135 :N:0:
 NNNNNCNN
 +
 ########
- at HiMom:9:2:0:1547
+ at machine1:HiMom:abcdeACXX:9:2:0:1547 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:0:1598
+ at machine1:HiMom:abcdeACXX:9:2:0:1598 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:0:1620
+ at machine1:HiMom:abcdeACXX:9:2:0:1620 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:0:1668
+ at machine1:HiMom:abcdeACXX:9:2:0:1668 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:0:186
+ at machine1:HiMom:abcdeACXX:9:2:0:186 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:0:205
+ at machine1:HiMom:abcdeACXX:9:2:0:205 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:0:287
+ at machine1:HiMom:abcdeACXX:9:2:0:287 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:0:382
+ at machine1:HiMom:abcdeACXX:9:2:0:382 :N:0:
 NNNNNTNN
 +
 ########
- at HiMom:9:2:0:441
+ at machine1:HiMom:abcdeACXX:9:2:0:441 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:9:2:0:50
+ at machine1:HiMom:abcdeACXX:9:2:0:50 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:0:501
+ at machine1:HiMom:abcdeACXX:9:2:0:501 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:0:73
+ at machine1:HiMom:abcdeACXX:9:2:0:73 :N:0:
 NNNNNCNN
 +
 ########
- at HiMom:9:2:0:740
+ at machine1:HiMom:abcdeACXX:9:2:0:740 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:0:766
+ at machine1:HiMom:abcdeACXX:9:2:0:766 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:9:2:0:87
+ at machine1:HiMom:abcdeACXX:9:2:0:87 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:1004
+ at machine1:HiMom:abcdeACXX:9:2:1:1004 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:9:2:1:1034
+ at machine1:HiMom:abcdeACXX:9:2:1:1034 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:1159
+ at machine1:HiMom:abcdeACXX:9:2:1:1159 :N:0:
 NNNTNNNN
 +
 ########
- at HiMom:9:2:1:1168
+ at machine1:HiMom:abcdeACXX:9:2:1:1168 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:1180
+ at machine1:HiMom:abcdeACXX:9:2:1:1180 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:9:2:1:1214
+ at machine1:HiMom:abcdeACXX:9:2:1:1214 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:1221
+ at machine1:HiMom:abcdeACXX:9:2:1:1221 :N:0:
 NNNNNTGN
 +
 ########
- at HiMom:9:2:1:1306
+ at machine1:HiMom:abcdeACXX:9:2:1:1306 :N:0:
 NNNNNCNN
 +
 ########
- at HiMom:9:2:1:1351
+ at machine1:HiMom:abcdeACXX:9:2:1:1351 :N:0:
 NNNNNTNN
 +
 ########
- at HiMom:9:2:1:1424
+ at machine1:HiMom:abcdeACXX:9:2:1:1424 :N:0:
 NNNCNNNN
 +
 ########
- at HiMom:9:2:1:1452
+ at machine1:HiMom:abcdeACXX:9:2:1:1452 :N:0:
 NNNNATNN
 +
 ########
- at HiMom:9:2:1:1515
+ at machine1:HiMom:abcdeACXX:9:2:1:1515 :N:0:
 NNNNNANN
 +
 ########
- at HiMom:9:2:1:1521
+ at machine1:HiMom:abcdeACXX:9:2:1:1521 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:1536
+ at machine1:HiMom:abcdeACXX:9:2:1:1536 :N:0:
 NNANNNNN
 +
 ########
- at HiMom:9:2:1:1543
+ at machine1:HiMom:abcdeACXX:9:2:1:1543 :N:0:
 NNNANNNN
 +
 ########
- at HiMom:9:2:1:1617
+ at machine1:HiMom:abcdeACXX:9:2:1:1617 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:1627
+ at machine1:HiMom:abcdeACXX:9:2:1:1627 :N:0:
 NNNANNNN
 +
 ########
- at HiMom:9:2:1:1646
+ at machine1:HiMom:abcdeACXX:9:2:1:1646 :N:0:
 NNNTNNNN
 +
 ########
- at HiMom:9:2:1:1653
+ at machine1:HiMom:abcdeACXX:9:2:1:1653 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:1682
+ at machine1:HiMom:abcdeACXX:9:2:1:1682 :N:0:
 NNNNNGNN
 +
 ########
- at HiMom:9:2:1:170
+ at machine1:HiMom:abcdeACXX:9:2:1:170 :Y:0:
 NNNAGNNN
 +
 ########
- at HiMom:9:2:1:1731
+ at machine1:HiMom:abcdeACXX:9:2:1:1731 :N:0:
 NNNNNAGN
 +
 ########
- at HiMom:9:2:1:1755
+ at machine1:HiMom:abcdeACXX:9:2:1:1755 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:1812
+ at machine1:HiMom:abcdeACXX:9:2:1:1812 :N:0:
 NNNCNNNN
 +
 ########
- at HiMom:9:2:1:1853
+ at machine1:HiMom:abcdeACXX:9:2:1:1853 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:1919
+ at machine1:HiMom:abcdeACXX:9:2:1:1919 :N:0:
 NNNANNNN
 +
 ########
- at HiMom:9:2:1:1924
+ at machine1:HiMom:abcdeACXX:9:2:1:1924 :N:0:
 NNNAANNN
 +
 ########
- at HiMom:9:2:1:1933
+ at machine1:HiMom:abcdeACXX:9:2:1:1933 :N:0:
 NNNTNNNN
 +
 ########
- at HiMom:9:2:1:1938
+ at machine1:HiMom:abcdeACXX:9:2:1:1938 :Y:0:
 NNCTNNNN
 +
 ########
- at HiMom:9:2:1:1950
+ at machine1:HiMom:abcdeACXX:9:2:1:1950 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:1959
+ at machine1:HiMom:abcdeACXX:9:2:1:1959 :N:0:
 NNNNCTNN
 +
 ########
- at HiMom:9:2:1:1987
+ at machine1:HiMom:abcdeACXX:9:2:1:1987 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:2006
+ at machine1:HiMom:abcdeACXX:9:2:1:2006 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:211
+ at machine1:HiMom:abcdeACXX:9:2:1:211 :N:0:
 NNNNNTGN
 +
 ########
- at HiMom:9:2:1:234
+ at machine1:HiMom:abcdeACXX:9:2:1:234 :N:0:
 NNNNCTNN
 +
 ########
- at HiMom:9:2:1:242
+ at machine1:HiMom:abcdeACXX:9:2:1:242 :N:0:
 NNNCNNNN
 +
 ########
- at HiMom:9:2:1:262
+ at machine1:HiMom:abcdeACXX:9:2:1:262 :N:0:
 NNNCNNNN
 +
 ########
- at HiMom:9:2:1:298
+ at machine1:HiMom:abcdeACXX:9:2:1:298 :N:0:
 NNNGNNNN
 +
 ########
- at HiMom:9:2:1:312
+ at machine1:HiMom:abcdeACXX:9:2:1:312 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:363
+ at machine1:HiMom:abcdeACXX:9:2:1:363 :Y:0:
 NNTNNNNN
 +
 %%.99999
- at HiMom:9:2:1:37
+ at machine1:HiMom:abcdeACXX:9:2:1:37 :N:0:
 NNNGNNNN
 +
 ########
- at HiMom:9:2:1:370
+ at machine1:HiMom:abcdeACXX:9:2:1:370 :N:0:
 NNNANNNN
 +
 ########
- at HiMom:9:2:1:377
+ at machine1:HiMom:abcdeACXX:9:2:1:377 :N:0:
 NNNNNTNN
 +
 ########
- at HiMom:9:2:1:414
+ at machine1:HiMom:abcdeACXX:9:2:1:414 :N:0:
 NNNGNNNN
 +
 ########
- at HiMom:9:2:1:421
+ at machine1:HiMom:abcdeACXX:9:2:1:421 :N:0:
 NNNANNNN
 +
 ########
- at HiMom:9:2:1:428
+ at machine1:HiMom:abcdeACXX:9:2:1:428 :N:0:
 NNNANNNN
 +
 ########
- at HiMom:9:2:1:44
+ at machine1:HiMom:abcdeACXX:9:2:1:44 :N:0:
 NNNAGNNN
 +
 ########
- at HiMom:9:2:1:466
+ at machine1:HiMom:abcdeACXX:9:2:1:466 :N:0:
 NNNTNNNN
 +
 ########
- at HiMom:9:2:1:555
+ at machine1:HiMom:abcdeACXX:9:2:1:555 :N:0:
 NNNCNNNN
 +
 ########
- at HiMom:9:2:1:558
+ at machine1:HiMom:abcdeACXX:9:2:1:558 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:56
+ at machine1:HiMom:abcdeACXX:9:2:1:56 :N:0:
 NNNNNANN
 +
 ########
- at HiMom:9:2:1:569
+ at machine1:HiMom:abcdeACXX:9:2:1:569 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:604
+ at machine1:HiMom:abcdeACXX:9:2:1:604 :N:0:
 NNCNNNNN
 +
 ########
- at HiMom:9:2:1:628
+ at machine1:HiMom:abcdeACXX:9:2:1:628 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:64
+ at machine1:HiMom:abcdeACXX:9:2:1:64 :N:0:
 NNNNNGTN
 +
 ########
- at HiMom:9:2:1:684
+ at machine1:HiMom:abcdeACXX:9:2:1:684 :N:0:
 NNAANNNN
 +
 ########
- at HiMom:9:2:1:699
+ at machine1:HiMom:abcdeACXX:9:2:1:699 :N:0:
 NNNCNNNN
 +
 ########
- at HiMom:9:2:1:714
+ at machine1:HiMom:abcdeACXX:9:2:1:714 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:722
+ at machine1:HiMom:abcdeACXX:9:2:1:722 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:749
+ at machine1:HiMom:abcdeACXX:9:2:1:749 :N:0:
 NNNNNGNN
 +
 ########
- at HiMom:9:2:1:760
+ at machine1:HiMom:abcdeACXX:9:2:1:760 :N:0:
 NNNNAANN
 +
 ########
- at HiMom:9:2:1:8
+ at machine1:HiMom:abcdeACXX:9:2:1:8 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:1:833
+ at machine1:HiMom:abcdeACXX:9:2:1:833 :N:0:
 NNNNNCCN
 +
 ########
- at HiMom:9:2:1:848
+ at machine1:HiMom:abcdeACXX:9:2:1:848 :N:0:
 NNNANNNN
 +
 ########
- at HiMom:9:2:1:893
+ at machine1:HiMom:abcdeACXX:9:2:1:893 :N:0:
 NNNAANNN
 +
 ########
- at HiMom:9:2:1:998
+ at machine1:HiMom:abcdeACXX:9:2:1:998 :N:0:
 NNNNNGNN
 +
 ########
- at HiMom:9:2:2:0
+ at machine1:HiMom:abcdeACXX:9:2:2:0 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:2:131
+ at machine1:HiMom:abcdeACXX:9:2:2:131 :Y:0:
 NNNAANNN
 +
 AACCBCA@
- at HiMom:9:2:2:1636
+ at machine1:HiMom:abcdeACXX:9:2:2:1636 :N:0:
 NNNAANNN
 +
 368?####
- at HiMom:9:2:2:1974
+ at machine1:HiMom:abcdeACXX:9:2:2:1974 :N:0:
 NGCNNNNN
 +
 >#######
- at HiMom:9:2:2:351
+ at machine1:HiMom:abcdeACXX:9:2:2:351 :N:0:
 NNNNNGAN
 +
 ########
- at HiMom:9:2:2:646
+ at machine1:HiMom:abcdeACXX:9:2:2:646 :N:0:
 NTCNNNNN
 +
 ((>4/406
- at HiMom:9:2:2:828
+ at machine1:HiMom:abcdeACXX:9:2:2:828 :N:0:
 NNNNNCGN
 +
 ########
- at HiMom:9:2:3:1529
+ at machine1:HiMom:abcdeACXX:9:2:3:1529 :N:0:
 NAGNNNNN
 +
 9)@73?B=
- at HiMom:9:2:3:179
+ at machine1:HiMom:abcdeACXX:9:2:3:179 :N:0:
 NNNTANNN
 +
 ########
- at HiMom:9:2:3:198
+ at machine1:HiMom:abcdeACXX:9:2:3:198 :N:0:
 NNNNNTCN
 +
 5)0*@782
- at HiMom:9:2:3:2030
+ at machine1:HiMom:abcdeACXX:9:2:3:2030 :N:0:
 NNNCANNN
 +
 (((>(<@<
- at HiMom:9:2:3:247
+ at machine1:HiMom:abcdeACXX:9:2:3:247 :N:0:
 CGNNNNNN
 +
 ########
- at HiMom:9:2:3:4
+ at machine1:HiMom:abcdeACXX:9:2:3:4 :N:0:
 NNNNNNNN
 +
 ########
- at HiMom:9:2:3:862
+ at machine1:HiMom:abcdeACXX:9:2:3:862 :N:0:
 TANNNNNN
 +
 4)=69)=@
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGC.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGC.1.fastq
index 5e65408..e93c230 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGC.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGC.1.fastq
@@ -1,32 +1,32 @@
- at HiMom:7:1:2:737
+ at machine1:HiMom:abcdeACXX:7:1:2:737 :N:0:TACTTAGC
 NAAAACAATTAAAATAAATGCTTAAAATCA
 +
 ##############################
- at HiMom:7:1:2:85
+ at machine1:HiMom:abcdeACXX:7:1:2:85 :N:0:TACTTAGC
 NGATAAAGTACAATGCTAATCACTTAAGAT
 +
 %.52353046874+'01999975;:9255;
- at HiMom:7:1:3:1574
+ at machine1:HiMom:abcdeACXX:7:1:3:1574 :Y:0:TACTTAGC
 NTTATTCCTTAGGAAATTTTAAATTCTGTA
 +
 %0955357999999:99::99102::9:3:
- at HiMom:7:2:2:101
+ at machine1:HiMom:abcdeACXX:7:2:2:101 :Y:0:TACTTAGC
 NGTTAATTTAGGGAAATTTGTTTGTATTTT
 +
 %,3:969;<52718;<<<768;::9;999;
- at HiMom:7:2:2:12
+ at machine1:HiMom:abcdeACXX:7:2:2:12 :N:0:TACTTAGC
 NATGCATTGTAATTTAATAGAGTGAAATGG
 +
 ##############################
- at HiMom:7:2:3:1844
+ at machine1:HiMom:abcdeACXX:7:2:3:1844 :N:0:TACTTAGC
 NGGACTACAAGCGCACGCCACATGCTCAGC
 +
 ##############################
- at HiMom:7:2:3:728
+ at machine1:HiMom:abcdeACXX:7:2:3:728 :N:0:TACTTAGC
 TGCCTCCTTGGAGAGGGCCGCAAAGCCAGG
 +
 =>=7?A?7'50>/996:;<+>AA at 7+8B67
- at HiMom:7:2:3:80
+ at machine1:HiMom:abcdeACXX:7:2:3:80 :Y:0:TACTTAGC
 AGGCAGGATGAAATTTTGTCTATTTATTCA
 +
 @9:B at B@?B at ABABBBB??7AABBBBBB?A
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGC.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGC.barcode_1.fastq
index 4bc5a8b..6fd2760 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGC.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGC.barcode_1.fastq
@@ -1,32 +1,32 @@
- at HiMom:7:1:2:737
+ at machine1:HiMom:abcdeACXX:7:1:2:737 :N:0:TACTTAGC
 TACTTAGC
 +
 BCCCBCBB
- at HiMom:7:1:2:85
+ at machine1:HiMom:abcdeACXX:7:1:2:85 :N:0:TACTTAGC
 TACTTAGC
 +
 B>(>B=B2
- at HiMom:7:1:3:1574
+ at machine1:HiMom:abcdeACXX:7:1:3:1574 :Y:0:TACTTAGC
 TACTTAGC
 +
 @ACBBC at A
- at HiMom:7:2:2:101
+ at machine1:HiMom:abcdeACXX:7:2:2:101 :Y:0:TACTTAGC
 TACTTAGC
 +
 BB=CCCC?
- at HiMom:7:2:2:12
+ at machine1:HiMom:abcdeACXX:7:2:2:12 :N:0:TACTTAGC
 TACTTAGC
 +
 A8%9<=##
- at HiMom:7:2:3:1844
+ at machine1:HiMom:abcdeACXX:7:2:3:1844 :N:0:TACTTAGC
 TACTTAGC
 +
 B?BC>:@@
- at HiMom:7:2:3:728
+ at machine1:HiMom:abcdeACXX:7:2:3:728 :N:0:TACTTAGC
 TACTTAGC
 +
 BBCA>B7#
- at HiMom:7:2:3:80
+ at machine1:HiMom:abcdeACXX:7:2:3:80 :Y:0:TACTTAGC
 TACTTAGC
 +
 B at 9ABA@8
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGCCACATCCT.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGCCACATCCT.1.fastq
index 7461810..9536869 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGCCACATCCT.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGCCACATCCT.1.fastq
@@ -1,32 +1,32 @@
- at HiMom:9:1:2:737
+ at machine1:HiMom:abcdeACXX:9:1:2:737 :N:0:TACTTAGCCACATCCT
 NAAAACAATTAAAATAAATGCTTAAAATCA
 +
 ##############################
- at HiMom:9:1:2:85
+ at machine1:HiMom:abcdeACXX:9:1:2:85 :N:0:TACTTAGCCACATCCT
 NGATAAAGTACAATGCTAATCACTTAAGAT
 +
 %.52353046874+'01999975;:9255;
- at HiMom:9:1:3:1574
+ at machine1:HiMom:abcdeACXX:9:1:3:1574 :Y:0:TACTTAGCCACATCCT
 NTTATTCCTTAGGAAATTTTAAATTCTGTA
 +
 %0955357999999:99::99102::9:3:
- at HiMom:9:2:2:101
+ at machine1:HiMom:abcdeACXX:9:2:2:101 :Y:0:TACTTAGCCACATCCT
 NGTTAATTTAGGGAAATTTGTTTGTATTTT
 +
 %,3:969;<52718;<<<768;::9;999;
- at HiMom:9:2:2:12
+ at machine1:HiMom:abcdeACXX:9:2:2:12 :N:0:TACTTAGCCACATCCT
 NATGCATTGTAATTTAATAGAGTGAAATGG
 +
 ##############################
- at HiMom:9:2:3:1844
+ at machine1:HiMom:abcdeACXX:9:2:3:1844 :N:0:TACTTAGCCACATCCT
 NGGACTACAAGCGCACGCCACATGCTCAGC
 +
 ##############################
- at HiMom:9:2:3:728
+ at machine1:HiMom:abcdeACXX:9:2:3:728 :N:0:TACTTAGCCACATCCT
 TGCCTCCTTGGAGAGGGCCGCAAAGCCAGG
 +
 =>=7?A?7'50>/996:;<+>AA at 7+8B67
- at HiMom:9:2:3:80
+ at machine1:HiMom:abcdeACXX:9:2:3:80 :Y:0:TACTTAGCCACATCCT
 AGGCAGGATGAAATTTTGTCTATTTATTCA
 +
 @9:B at B@?B at ABABBBB??7AABBBBBB?A
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGCCACATCCT.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGCCACATCCT.barcode_1.fastq
index 96d4dbe..431c08a 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGCCACATCCT.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGCCACATCCT.barcode_1.fastq
@@ -1,32 +1,32 @@
- at HiMom:9:1:2:737
+ at machine1:HiMom:abcdeACXX:9:1:2:737 :N:0:TACTTAGCCACATCCT
 TACTTAGC
 +
 BCCCBCBB
- at HiMom:9:1:2:85
+ at machine1:HiMom:abcdeACXX:9:1:2:85 :N:0:TACTTAGCCACATCCT
 TACTTAGC
 +
 B>(>B=B2
- at HiMom:9:1:3:1574
+ at machine1:HiMom:abcdeACXX:9:1:3:1574 :Y:0:TACTTAGCCACATCCT
 TACTTAGC
 +
 @ACBBC at A
- at HiMom:9:2:2:101
+ at machine1:HiMom:abcdeACXX:9:2:2:101 :Y:0:TACTTAGCCACATCCT
 TACTTAGC
 +
 BB=CCCC?
- at HiMom:9:2:2:12
+ at machine1:HiMom:abcdeACXX:9:2:2:12 :N:0:TACTTAGCCACATCCT
 TACTTAGC
 +
 A8%9<=##
- at HiMom:9:2:3:1844
+ at machine1:HiMom:abcdeACXX:9:2:3:1844 :N:0:TACTTAGCCACATCCT
 TACTTAGC
 +
 B?BC>:@@
- at HiMom:9:2:3:728
+ at machine1:HiMom:abcdeACXX:9:2:3:728 :N:0:TACTTAGCCACATCCT
 TACTTAGC
 +
 BBCA>B7#
- at HiMom:9:2:3:80
+ at machine1:HiMom:abcdeACXX:9:2:3:80 :Y:0:TACTTAGCCACATCCT
 TACTTAGC
 +
 B at 9ABA@8
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGCCACATCCT.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGCCACATCCT.barcode_2.fastq
index cb349a6..35c71fa 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGCCACATCCT.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TACTTAGCCACATCCT.barcode_2.fastq
@@ -1,32 +1,32 @@
- at HiMom:9:1:2:737
+ at machine1:HiMom:abcdeACXX:9:1:2:737 :N:0:TACTTAGCCACATCCT
 CACATCCT
 +
 BCCCBCBB
- at HiMom:9:1:2:85
+ at machine1:HiMom:abcdeACXX:9:1:2:85 :N:0:TACTTAGCCACATCCT
 CACATCCT
 +
 B>(>B=B2
- at HiMom:9:1:3:1574
+ at machine1:HiMom:abcdeACXX:9:1:3:1574 :Y:0:TACTTAGCCACATCCT
 CACATCCT
 +
 @ACBBC at A
- at HiMom:9:2:2:101
+ at machine1:HiMom:abcdeACXX:9:2:2:101 :Y:0:TACTTAGCCACATCCT
 CACATCCT
 +
 BB=CCCC?
- at HiMom:9:2:2:12
+ at machine1:HiMom:abcdeACXX:9:2:2:12 :N:0:TACTTAGCCACATCCT
 CACATCCT
 +
 A8%9<=##
- at HiMom:9:2:3:1844
+ at machine1:HiMom:abcdeACXX:9:2:3:1844 :N:0:TACTTAGCCACATCCT
 CACATCCT
 +
 B?BC>:@@
- at HiMom:9:2:3:728
+ at machine1:HiMom:abcdeACXX:9:2:3:728 :N:0:TACTTAGCCACATCCT
 CACATCCT
 +
 BBCA>B7#
- at HiMom:9:2:3:80
+ at machine1:HiMom:abcdeACXX:9:2:3:80 :Y:0:TACTTAGCCACATCCT
 CACATCCT
 +
 B at 9ABA@8
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATG.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATG.1.fastq
index 4ce046c..a6de675 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATG.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATG.1.fastq
@@ -1,28 +1,28 @@
- at HiMom:7:1:3:1328
+ at machine1:HiMom:abcdeACXX:7:1:3:1328 :N:0:TCGGAATG
 GCTACCAACCCCACTCCTAGATGAAAGACC
 +
 068,=@)=AA82 at C@8;;@3;8/<<#####
- at HiMom:7:1:3:2037
+ at machine1:HiMom:abcdeACXX:7:1:3:2037 :N:0:TCGGAATG
 CATCCTGTAACAAAGTGTTTATAGTTTTCA
 +
 :@9 at B6<?A>(>AB@<*)=<CBA:>51:7A
- at HiMom:7:1:3:695
+ at machine1:HiMom:abcdeACXX:7:1:3:695 :Y:0:TCGGAATG
 TGATACTGCCTTTGCAAAAATTATAACAGT
 +
 ;>ABBCC<?ACCBBBCCCCBBACBAABB<A
- at HiMom:7:2:2:220
+ at machine1:HiMom:abcdeACXX:7:2:2:220 :Y:0:TCGGAATG
 NAATAAACCTCTTTCTTTGATAAATTACCC
 +
 %.5:78335567:525<736:9868;8###
- at HiMom:7:2:3:567
+ at machine1:HiMom:abcdeACXX:7:2:3:567 :Y:0:TCGGAATG
 TATCTTCACATAAAAACTACACAAAGCATT
 +
 BCB<ACBB at BCCBBCB<BB<@;?BB>=BBB
- at HiMom:7:2:3:663
+ at machine1:HiMom:abcdeACXX:7:2:3:663 :N:0:TCGGAATG
 AAAAGCATGTTGCTCAGTAAAAGCAAATAG
 +
 ##############################
- at HiMom:7:2:3:922
+ at machine1:HiMom:abcdeACXX:7:2:3:922 :Y:0:TCGGAATG
 ATTTCTGTCTGACTTTTCCAAATGTGCTAT
 +
 AABB@>>>@>9@>AAAA>;@BB@@53;BBB
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATG.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATG.barcode_1.fastq
index 5641882..a0c3335 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATG.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATG.barcode_1.fastq
@@ -1,28 +1,28 @@
- at HiMom:7:1:3:1328
+ at machine1:HiMom:abcdeACXX:7:1:3:1328 :N:0:TCGGAATG
 TCGGAATG
 +
 A@@2=?83
- at HiMom:7:1:3:2037
+ at machine1:HiMom:abcdeACXX:7:1:3:2037 :N:0:TCGGAATG
 TCGGAATG
 +
 ?<):=@=@
- at HiMom:7:1:3:695
+ at machine1:HiMom:abcdeACXX:7:1:3:695 :Y:0:TCGGAATG
 TCGGAATG
 +
 B?;BBB=?
- at HiMom:7:2:2:220
+ at machine1:HiMom:abcdeACXX:7:2:2:220 :Y:0:TCGGAATG
 TCGGAATG
 +
 BA==@@?;
- at HiMom:7:2:3:567
+ at machine1:HiMom:abcdeACXX:7:2:3:567 :Y:0:TCGGAATG
 TCGGAATG
 +
 @?@?AB@<
- at HiMom:7:2:3:663
+ at machine1:HiMom:abcdeACXX:7:2:3:663 :N:0:TCGGAATG
 TCGGAATG
 +
 =<23<C=8
- at HiMom:7:2:3:922
+ at machine1:HiMom:abcdeACXX:7:2:3:922 :Y:0:TCGGAATG
 TCGGAATG
 +
 BA<ABC?;
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATGATTATGTT.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATGATTATGTT.1.fastq
index f8fb381..89321f1 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATGATTATGTT.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATGATTATGTT.1.fastq
@@ -1,28 +1,28 @@
- at HiMom:9:1:3:1328
+ at machine1:HiMom:abcdeACXX:9:1:3:1328 :N:0:TCGGAATGATTATGTT
 GCTACCAACCCCACTCCTAGATGAAAGACC
 +
 068,=@)=AA82 at C@8;;@3;8/<<#####
- at HiMom:9:1:3:2037
+ at machine1:HiMom:abcdeACXX:9:1:3:2037 :N:0:TCGGAATGATTATGTT
 CATCCTGTAACAAAGTGTTTATAGTTTTCA
 +
 :@9 at B6<?A>(>AB@<*)=<CBA:>51:7A
- at HiMom:9:1:3:695
+ at machine1:HiMom:abcdeACXX:9:1:3:695 :Y:0:TCGGAATGATTATGTT
 TGATACTGCCTTTGCAAAAATTATAACAGT
 +
 ;>ABBCC<?ACCBBBCCCCBBACBAABB<A
- at HiMom:9:2:2:220
+ at machine1:HiMom:abcdeACXX:9:2:2:220 :Y:0:TCGGAATGATTATGTT
 NAATAAACCTCTTTCTTTGATAAATTACCC
 +
 %.5:78335567:525<736:9868;8###
- at HiMom:9:2:3:567
+ at machine1:HiMom:abcdeACXX:9:2:3:567 :Y:0:TCGGAATGATTATGTT
 TATCTTCACATAAAAACTACACAAAGCATT
 +
 BCB<ACBB at BCCBBCB<BB<@;?BB>=BBB
- at HiMom:9:2:3:663
+ at machine1:HiMom:abcdeACXX:9:2:3:663 :N:0:TCGGAATGATTATGTT
 AAAAGCATGTTGCTCAGTAAAAGCAAATAG
 +
 ##############################
- at HiMom:9:2:3:922
+ at machine1:HiMom:abcdeACXX:9:2:3:922 :Y:0:TCGGAATGATTATGTT
 ATTTCTGTCTGACTTTTCCAAATGTGCTAT
 +
 AABB@>>>@>9@>AAAA>;@BB@@53;BBB
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATGATTATGTT.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATGATTATGTT.barcode_1.fastq
index 31d5dca..90a3a06 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATGATTATGTT.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATGATTATGTT.barcode_1.fastq
@@ -1,28 +1,28 @@
- at HiMom:9:1:3:1328
+ at machine1:HiMom:abcdeACXX:9:1:3:1328 :N:0:TCGGAATGATTATGTT
 TCGGAATG
 +
 A@@2=?83
- at HiMom:9:1:3:2037
+ at machine1:HiMom:abcdeACXX:9:1:3:2037 :N:0:TCGGAATGATTATGTT
 TCGGAATG
 +
 ?<):=@=@
- at HiMom:9:1:3:695
+ at machine1:HiMom:abcdeACXX:9:1:3:695 :Y:0:TCGGAATGATTATGTT
 TCGGAATG
 +
 B?;BBB=?
- at HiMom:9:2:2:220
+ at machine1:HiMom:abcdeACXX:9:2:2:220 :Y:0:TCGGAATGATTATGTT
 TCGGAATG
 +
 BA==@@?;
- at HiMom:9:2:3:567
+ at machine1:HiMom:abcdeACXX:9:2:3:567 :Y:0:TCGGAATGATTATGTT
 TCGGAATG
 +
 @?@?AB@<
- at HiMom:9:2:3:663
+ at machine1:HiMom:abcdeACXX:9:2:3:663 :N:0:TCGGAATGATTATGTT
 TCGGAATG
 +
 =<23<C=8
- at HiMom:9:2:3:922
+ at machine1:HiMom:abcdeACXX:9:2:3:922 :Y:0:TCGGAATGATTATGTT
 TCGGAATG
 +
 BA<ABC?;
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATGATTATGTT.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATGATTATGTT.barcode_2.fastq
index bc60db3..08a7f9f 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATGATTATGTT.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCGGAATGATTATGTT.barcode_2.fastq
@@ -1,28 +1,28 @@
- at HiMom:9:1:3:1328
+ at machine1:HiMom:abcdeACXX:9:1:3:1328 :N:0:TCGGAATGATTATGTT
 ATTATGTT
 +
 A@@2=?83
- at HiMom:9:1:3:2037
+ at machine1:HiMom:abcdeACXX:9:1:3:2037 :N:0:TCGGAATGATTATGTT
 ATTATGTT
 +
 ?<):=@=@
- at HiMom:9:1:3:695
+ at machine1:HiMom:abcdeACXX:9:1:3:695 :Y:0:TCGGAATGATTATGTT
 ATTATGTT
 +
 B?;BBB=?
- at HiMom:9:2:2:220
+ at machine1:HiMom:abcdeACXX:9:2:2:220 :Y:0:TCGGAATGATTATGTT
 ATTATGTT
 +
 BA==@@?;
- at HiMom:9:2:3:567
+ at machine1:HiMom:abcdeACXX:9:2:3:567 :Y:0:TCGGAATGATTATGTT
 ATTATGTT
 +
 @?@?AB@<
- at HiMom:9:2:3:663
+ at machine1:HiMom:abcdeACXX:9:2:3:663 :N:0:TCGGAATGATTATGTT
 ATTATGTT
 +
 =<23<C=8
- at HiMom:9:2:3:922
+ at machine1:HiMom:abcdeACXX:9:2:3:922 :Y:0:TCGGAATGATTATGTT
 ATTATGTT
 +
 BA<ABC?;
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGA.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGA.1.fastq
index 41eb3d7..9af8df3 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGA.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGA.1.fastq
@@ -1,20 +1,20 @@
- at HiMom:7:1:3:1406
+ at machine1:HiMom:abcdeACXX:7:1:3:1406 :N:0:TCTGGCGA
 NAAAATGCCAGATAAATTTTATGTAAAACC
 +
 %1<<97227467::77(7;;;503<9:972
- at HiMom:7:1:3:1717
+ at machine1:HiMom:abcdeACXX:7:1:3:1717 :Y:0:TCTGGCGA
 NAAACAGACTTGTTTCTTGTAATAATTATG
 +
 %/;;89689:999<76:8399:9:::::##
- at HiMom:7:2:3:2004
+ at machine1:HiMom:abcdeACXX:7:2:3:2004 :N:0:TCTGGCGA
 NAAGACTACCTTGCTGAAATAGGGCATTTA
 +
 %.:875459;4-743(29;;5139266###
- at HiMom:7:2:3:695
+ at machine1:HiMom:abcdeACXX:7:2:3:695 :Y:0:TCTGGCGA
 NCAACTCCAAGACACATAATTGTCAGATTC
 +
 %/:::95578589969:::;6559748;82
- at HiMom:7:2:3:987
+ at machine1:HiMom:abcdeACXX:7:2:3:987 :N:0:TCTGGCGA
 AAGAGCAATATTTTCTTTCACTATATTATT
 +
 *@<@@?A at 0)7448)?C@)@4)9:@#####
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGA.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGA.barcode_1.fastq
index ec30d59..f2ad3a3 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGA.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGA.barcode_1.fastq
@@ -1,20 +1,20 @@
- at HiMom:7:1:3:1406
+ at machine1:HiMom:abcdeACXX:7:1:3:1406 :N:0:TCTGGCGA
 TCTGGCGA
 +
 AA=;5@=@
- at HiMom:7:1:3:1717
+ at machine1:HiMom:abcdeACXX:7:1:3:1717 :Y:0:TCTGGCGA
 TCTGGCGA
 +
 AB=11;A@
- at HiMom:7:2:3:2004
+ at machine1:HiMom:abcdeACXX:7:2:3:2004 :N:0:TCTGGCGA
 TCTGGCGA
 +
 @?>/>BBB
- at HiMom:7:2:3:695
+ at machine1:HiMom:abcdeACXX:7:2:3:695 :Y:0:TCTGGCGA
 TCTGGCGA
 +
 AA?>9=@A
- at HiMom:7:2:3:987
+ at machine1:HiMom:abcdeACXX:7:2:3:987 :N:0:TCTGGCGA
 TCTCGCGA
 +
 0<(.(;1@
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGAAGTTGCTT.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGAAGTTGCTT.1.fastq
index 4dc8df5..83ca136 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGAAGTTGCTT.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGAAGTTGCTT.1.fastq
@@ -1,20 +1,20 @@
- at HiMom:9:1:3:1406
+ at machine1:HiMom:abcdeACXX:9:1:3:1406 :N:0:TCTGGCGAAGTTGCTT
 NAAAATGCCAGATAAATTTTATGTAAAACC
 +
 %1<<97227467::77(7;;;503<9:972
- at HiMom:9:1:3:1717
+ at machine1:HiMom:abcdeACXX:9:1:3:1717 :Y:0:TCTGGCGAAGTTGCTT
 NAAACAGACTTGTTTCTTGTAATAATTATG
 +
 %/;;89689:999<76:8399:9:::::##
- at HiMom:9:2:3:2004
+ at machine1:HiMom:abcdeACXX:9:2:3:2004 :N:0:TCTGGCGAAGTTGCTT
 NAAGACTACCTTGCTGAAATAGGGCATTTA
 +
 %.:875459;4-743(29;;5139266###
- at HiMom:9:2:3:695
+ at machine1:HiMom:abcdeACXX:9:2:3:695 :Y:0:TCTGGCGAAGTTGCTT
 NCAACTCCAAGACACATAATTGTCAGATTC
 +
 %/:::95578589969:::;6559748;82
- at HiMom:9:2:3:987
+ at machine1:HiMom:abcdeACXX:9:2:3:987 :N:0:TCTGGCGAAGTTGCTT
 AAGAGCAATATTTTCTTTCACTATATTATT
 +
 *@<@@?A at 0)7448)?C@)@4)9:@#####
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGAAGTTGCTT.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGAAGTTGCTT.barcode_1.fastq
index d61d604..80e639a 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGAAGTTGCTT.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGAAGTTGCTT.barcode_1.fastq
@@ -1,20 +1,20 @@
- at HiMom:9:1:3:1406
+ at machine1:HiMom:abcdeACXX:9:1:3:1406 :N:0:TCTGGCGAAGTTGCTT
 TCTGGCGA
 +
 AA=;5@=@
- at HiMom:9:1:3:1717
+ at machine1:HiMom:abcdeACXX:9:1:3:1717 :Y:0:TCTGGCGAAGTTGCTT
 TCTGGCGA
 +
 AB=11;A@
- at HiMom:9:2:3:2004
+ at machine1:HiMom:abcdeACXX:9:2:3:2004 :N:0:TCTGGCGAAGTTGCTT
 TCTGGCGA
 +
 @?>/>BBB
- at HiMom:9:2:3:695
+ at machine1:HiMom:abcdeACXX:9:2:3:695 :Y:0:TCTGGCGAAGTTGCTT
 TCTGGCGA
 +
 AA?>9=@A
- at HiMom:9:2:3:987
+ at machine1:HiMom:abcdeACXX:9:2:3:987 :N:0:TCTGGCGAAGTTGCTT
 TCTCGCGA
 +
 0<(.(;1@
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGAAGTTGCTT.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGAAGTTGCTT.barcode_2.fastq
index 6feb177..deecd6b 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGAAGTTGCTT.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TCTGGCGAAGTTGCTT.barcode_2.fastq
@@ -1,20 +1,20 @@
- at HiMom:9:1:3:1406
+ at machine1:HiMom:abcdeACXX:9:1:3:1406 :N:0:TCTGGCGAAGTTGCTT
 AGTTGCTT
 +
 AA=;5@=@
- at HiMom:9:1:3:1717
+ at machine1:HiMom:abcdeACXX:9:1:3:1717 :Y:0:TCTGGCGAAGTTGCTT
 AGTTGCTT
 +
 AB=11;A@
- at HiMom:9:2:3:2004
+ at machine1:HiMom:abcdeACXX:9:2:3:2004 :N:0:TCTGGCGAAGTTGCTT
 AGTTGCTT
 +
 @?>/>BBB
- at HiMom:9:2:3:695
+ at machine1:HiMom:abcdeACXX:9:2:3:695 :Y:0:TCTGGCGAAGTTGCTT
 AGTTGCTT
 +
 AA?>9=@A
- at HiMom:9:2:3:987
+ at machine1:HiMom:abcdeACXX:9:2:3:987 :N:0:TCTGGCGAAGTTGCTT
 AGTTGCTT
 +
 0<(.(;1@
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGAC.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGAC.1.fastq
index e9f86b6..9037a85 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGAC.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGAC.1.fastq
@@ -1,20 +1,20 @@
- at HiMom:7:1:2:52
+ at machine1:HiMom:abcdeACXX:7:1:2:52 :N:0:TGCTCGAC
 NAAGTATAATGTAGAGACGCTTGTATTGTC
 +
 ##############################
- at HiMom:7:1:3:1348
+ at machine1:HiMom:abcdeACXX:7:1:3:1348 :Y:0:TGCTCGAC
 NATATTGATTCTTCCTACCCATGAGTATGG
 +
 %1;;78.+389999888;;89118;7;8##
- at HiMom:7:1:3:1981
+ at machine1:HiMom:abcdeACXX:7:1:3:1981 :Y:0:TGCTCGAC
 AGCCTGTCTGTAGAAAAAATACAAAAATTA
 +
 @3;=;8/@=:8B8=BBBBB:B?BBABB?:B
- at HiMom:7:2:2:115
+ at machine1:HiMom:abcdeACXX:7:2:2:115 :N:0:TGCTCGAC
 NGATGTGCTACACACTTTCAAACAAACAGA
 +
 %0:500&/99;69727::995313374484
- at HiMom:7:2:3:317
+ at machine1:HiMom:abcdeACXX:7:2:3:317 :Y:0:TGCTCGAC
 AGAGAGAAATGTGGCATATGAGTATCACCT
 +
 @4>BBB?ABCAB@>>ACBB?B<AABBCBBB
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGAC.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGAC.barcode_1.fastq
index 6b9259f..70798ff 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGAC.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGAC.barcode_1.fastq
@@ -1,20 +1,20 @@
- at HiMom:7:1:2:52
+ at machine1:HiMom:abcdeACXX:7:1:2:52 :N:0:TGCTCGAC
 TGCTCGAC
 +
 :;;;:;=;
- at HiMom:7:1:3:1348
+ at machine1:HiMom:abcdeACXX:7:1:3:1348 :Y:0:TGCTCGAC
 TGCTCGAC
 +
 B9??@7 at 5
- at HiMom:7:1:3:1981
+ at machine1:HiMom:abcdeACXX:7:1:3:1981 :Y:0:TGCTCGAC
 TGCTCGAC
 +
 =*@1;@BB
- at HiMom:7:2:2:115
+ at machine1:HiMom:abcdeACXX:7:2:2:115 :N:0:TGCTCGAC
 TGCTCGAC
 +
 BA=>=@@=
- at HiMom:7:2:3:317
+ at machine1:HiMom:abcdeACXX:7:2:3:317 :Y:0:TGCTCGAC
 TGCTCGAC
 +
 BAABBA<=
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGACAGCAATTC.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGACAGCAATTC.1.fastq
index b832e3d..2710293 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGACAGCAATTC.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGACAGCAATTC.1.fastq
@@ -1,20 +1,20 @@
- at HiMom:9:1:2:52
+ at machine1:HiMom:abcdeACXX:9:1:2:52 :N:0:TGCTCGACAGCAATTC
 NAAGTATAATGTAGAGACGCTTGTATTGTC
 +
 ##############################
- at HiMom:9:1:3:1348
+ at machine1:HiMom:abcdeACXX:9:1:3:1348 :Y:0:TGCTCGACAGCAATTC
 NATATTGATTCTTCCTACCCATGAGTATGG
 +
 %1;;78.+389999888;;89118;7;8##
- at HiMom:9:1:3:1981
+ at machine1:HiMom:abcdeACXX:9:1:3:1981 :Y:0:TGCTCGACAGCAATTC
 AGCCTGTCTGTAGAAAAAATACAAAAATTA
 +
 @3;=;8/@=:8B8=BBBBB:B?BBABB?:B
- at HiMom:9:2:2:115
+ at machine1:HiMom:abcdeACXX:9:2:2:115 :N:0:TGCTCGACAGCAATTC
 NGATGTGCTACACACTTTCAAACAAACAGA
 +
 %0:500&/99;69727::995313374484
- at HiMom:9:2:3:317
+ at machine1:HiMom:abcdeACXX:9:2:3:317 :Y:0:TGCTCGACAGCAATTC
 AGAGAGAAATGTGGCATATGAGTATCACCT
 +
 @4>BBB?ABCAB@>>ACBB?B<AABBCBBB
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGACAGCAATTC.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGACAGCAATTC.barcode_1.fastq
index 44c1b02..62cf80e 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGACAGCAATTC.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGACAGCAATTC.barcode_1.fastq
@@ -1,20 +1,20 @@
- at HiMom:9:1:2:52
+ at machine1:HiMom:abcdeACXX:9:1:2:52 :N:0:TGCTCGACAGCAATTC
 TGCTCGAC
 +
 :;;;:;=;
- at HiMom:9:1:3:1348
+ at machine1:HiMom:abcdeACXX:9:1:3:1348 :Y:0:TGCTCGACAGCAATTC
 TGCTCGAC
 +
 B9??@7 at 5
- at HiMom:9:1:3:1981
+ at machine1:HiMom:abcdeACXX:9:1:3:1981 :Y:0:TGCTCGACAGCAATTC
 TGCTCGAC
 +
 =*@1;@BB
- at HiMom:9:2:2:115
+ at machine1:HiMom:abcdeACXX:9:2:2:115 :N:0:TGCTCGACAGCAATTC
 TGCTCGAC
 +
 BA=>=@@=
- at HiMom:9:2:3:317
+ at machine1:HiMom:abcdeACXX:9:2:3:317 :Y:0:TGCTCGACAGCAATTC
 TGCTCGAC
 +
 BAABBA<=
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGACAGCAATTC.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGACAGCAATTC.barcode_2.fastq
index efe4857..bf38ef7 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGACAGCAATTC.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGCTCGACAGCAATTC.barcode_2.fastq
@@ -1,20 +1,20 @@
- at HiMom:9:1:2:52
+ at machine1:HiMom:abcdeACXX:9:1:2:52 :N:0:TGCTCGACAGCAATTC
 AGCAATTC
 +
 :;;;:;=;
- at HiMom:9:1:3:1348
+ at machine1:HiMom:abcdeACXX:9:1:3:1348 :Y:0:TGCTCGACAGCAATTC
 AGCAATTC
 +
 B9??@7 at 5
- at HiMom:9:1:3:1981
+ at machine1:HiMom:abcdeACXX:9:1:3:1981 :Y:0:TGCTCGACAGCAATTC
 AGCAATTC
 +
 =*@1;@BB
- at HiMom:9:2:2:115
+ at machine1:HiMom:abcdeACXX:9:2:2:115 :N:0:TGCTCGACAGCAATTC
 AGCAATTC
 +
 BA=>=@@=
- at HiMom:9:2:3:317
+ at machine1:HiMom:abcdeACXX:9:2:3:317 :Y:0:TGCTCGACAGCAATTC
 AGCAATTC
 +
 BAABBA<=
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGAT.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGAT.1.fastq
index 297c7d0..610e71c 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGAT.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGAT.1.fastq
@@ -1,16 +1,16 @@
- at HiMom:7:1:2:950
+ at machine1:HiMom:abcdeACXX:7:1:2:950 :Y:0:TGTCGGAT
 NGTGTGTGTTTTTAGAGATGCCTTTTAGAA
 +
 %-7463817999<999998876999;6579
- at HiMom:7:2:3:1389
+ at machine1:HiMom:abcdeACXX:7:2:3:1389 :Y:0:TGTCGGAT
 TATCGATCTCCTGACCTCGTGATCCACCCA
 +
 ACBCBCB?CBB at 6ABCB@)B>CBBCC at 4;5
- at HiMom:7:2:3:143
+ at machine1:HiMom:abcdeACXX:7:2:3:143 :Y:0:TGTCGGAT
 AAAATCAATTCTGAAATGATTACATATTTT
 +
 BBBACBBACB=B?BBBBCBBCBBBBBBCBB
- at HiMom:7:2:3:898
+ at machine1:HiMom:abcdeACXX:7:2:3:898 :Y:0:TGTCGGAT
 TAACATTCCCACAGTGCTTGCCACAGAGCC
 +
 ACCCCCC at C@@B@);>;BBCC=@BC?B@;>
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGAT.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGAT.barcode_1.fastq
index 506485e..8c96032 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGAT.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGAT.barcode_1.fastq
@@ -1,16 +1,16 @@
- at HiMom:7:1:2:950
+ at machine1:HiMom:abcdeACXX:7:1:2:950 :Y:0:TGTCGGAT
 TGTCGGAT
 +
 @@=A:AAA
- at HiMom:7:2:3:1389
+ at machine1:HiMom:abcdeACXX:7:2:3:1389 :Y:0:TGTCGGAT
 TGTCGGAT
 +
 ?2ACA at B<
- at HiMom:7:2:3:143
+ at machine1:HiMom:abcdeACXX:7:2:3:143 :Y:0:TGTCGGAT
 TGTCGGAT
 +
 A>AB??=B
- at HiMom:7:2:3:898
+ at machine1:HiMom:abcdeACXX:7:2:3:898 :Y:0:TGTCGGAT
 TGTCGGAT
 +
 >8>A@=<@
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGATACCAACTG.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGATACCAACTG.1.fastq
index c23aaab..97566b5 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGATACCAACTG.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGATACCAACTG.1.fastq
@@ -1,16 +1,16 @@
- at HiMom:9:1:2:950
+ at machine1:HiMom:abcdeACXX:9:1:2:950 :Y:0:TGTCGGATACCAACTG
 NGTGTGTGTTTTTAGAGATGCCTTTTAGAA
 +
 %-7463817999<999998876999;6579
- at HiMom:9:2:3:1389
+ at machine1:HiMom:abcdeACXX:9:2:3:1389 :Y:0:TGTCGGATACCAACTG
 TATCGATCTCCTGACCTCGTGATCCACCCA
 +
 ACBCBCB?CBB at 6ABCB@)B>CBBCC at 4;5
- at HiMom:9:2:3:143
+ at machine1:HiMom:abcdeACXX:9:2:3:143 :Y:0:TGTCGGATACCAACTG
 AAAATCAATTCTGAAATGATTACATATTTT
 +
 BBBACBBACB=B?BBBBCBBCBBBBBBCBB
- at HiMom:9:2:3:898
+ at machine1:HiMom:abcdeACXX:9:2:3:898 :Y:0:TGTCGGATACCAACTG
 TAACATTCCCACAGTGCTTGCCACAGAGCC
 +
 ACCCCCC at C@@B@);>;BBCC=@BC?B@;>
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGATACCAACTG.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGATACCAACTG.barcode_1.fastq
index 7815673..780d300 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGATACCAACTG.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGATACCAACTG.barcode_1.fastq
@@ -1,16 +1,16 @@
- at HiMom:9:1:2:950
+ at machine1:HiMom:abcdeACXX:9:1:2:950 :Y:0:TGTCGGATACCAACTG
 TGTCGGAT
 +
 @@=A:AAA
- at HiMom:9:2:3:1389
+ at machine1:HiMom:abcdeACXX:9:2:3:1389 :Y:0:TGTCGGATACCAACTG
 TGTCGGAT
 +
 ?2ACA at B<
- at HiMom:9:2:3:143
+ at machine1:HiMom:abcdeACXX:9:2:3:143 :Y:0:TGTCGGATACCAACTG
 TGTCGGAT
 +
 A>AB??=B
- at HiMom:9:2:3:898
+ at machine1:HiMom:abcdeACXX:9:2:3:898 :Y:0:TGTCGGATACCAACTG
 TGTCGGAT
 +
 >8>A@=<@
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGATACCAACTG.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGATACCAACTG.barcode_2.fastq
index d120dc2..1a9029a 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGATACCAACTG.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TGTCGGATACCAACTG.barcode_2.fastq
@@ -1,16 +1,16 @@
- at HiMom:9:1:2:950
+ at machine1:HiMom:abcdeACXX:9:1:2:950 :Y:0:TGTCGGATACCAACTG
 ACCAACTG
 +
 @@=A:AAA
- at HiMom:9:2:3:1389
+ at machine1:HiMom:abcdeACXX:9:2:3:1389 :Y:0:TGTCGGATACCAACTG
 ACCAACTG
 +
 ?2ACA at B<
- at HiMom:9:2:3:143
+ at machine1:HiMom:abcdeACXX:9:2:3:143 :Y:0:TGTCGGATACCAACTG
 ACCAACTG
 +
 A>AB??=B
- at HiMom:9:2:3:898
+ at machine1:HiMom:abcdeACXX:9:2:3:898 :Y:0:TGTCGGATACCAACTG
 ACCAACTG
 +
 >8>A@=<@
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGA.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGA.1.fastq
index 1dcdad0..d696f12 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGA.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGA.1.fastq
@@ -1,20 +1,20 @@
- at HiMom:7:1:2:309
+ at machine1:HiMom:abcdeACXX:7:1:2:309 :Y:0:TTCGCTGA
 NAATGGCCATGCTGCCCAAAGTATTTTATA
 +
 %.705699:5-227759996717:::9:9:
- at HiMom:7:1:2:63
+ at machine1:HiMom:abcdeACXX:7:1:2:63 :Y:0:TTCGCTGA
 NGAGTGGAATGGAATGGAGTGGAATGGCTT
 +
 %,/66818682811553536525875686#
- at HiMom:7:1:3:880
+ at machine1:HiMom:abcdeACXX:7:1:3:880 :N:0:TTCGCTGA
 ATGAGTGAGAAATAGAAGTCCTAAGTAGAT
 +
 B@=;/75>)>?B@=3>@=<.2=B at 2@>49B
- at HiMom:7:2:2:669
+ at machine1:HiMom:abcdeACXX:7:2:2:669 :N:0:TTCGCTGA
 NGGCTGAAGCAGGAGGGTCACTTGAGCCAA
 +
 ##############################
- at HiMom:7:2:2:775
+ at machine1:HiMom:abcdeACXX:7:2:2:775 :Y:0:TTCGCTGA
 NGTTTATAATTGTGAGTTAAAAATCTAAAA
 +
 %,-78:8:968:45524<<636;<:<<<<<
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGA.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGA.barcode_1.fastq
index dd6c8f1..6a7b76c 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGA.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGA.barcode_1.fastq
@@ -1,20 +1,20 @@
- at HiMom:7:1:2:309
+ at machine1:HiMom:abcdeACXX:7:1:2:309 :Y:0:TTCGCTGA
 NTCGCTGA
 +
 ########
- at HiMom:7:1:2:63
+ at machine1:HiMom:abcdeACXX:7:1:2:63 :Y:0:TTCGCTGA
 TTCGCTGA
 +
 7@=B<C@#
- at HiMom:7:1:3:880
+ at machine1:HiMom:abcdeACXX:7:1:3:880 :N:0:TTCGCTGA
 TTCGCTGA
 +
 >@62;A==
- at HiMom:7:2:2:669
+ at machine1:HiMom:abcdeACXX:7:2:2:669 :N:0:TTCGCTGA
 TTCGCTGA
 +
 B>BB at BB9
- at HiMom:7:2:2:775
+ at machine1:HiMom:abcdeACXX:7:2:2:775 :Y:0:TTCGCTGA
 TTCGCTGA
 +
 BCC6ABBC
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGAAAGGATGT.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGAAAGGATGT.1.fastq
index 479d31e..68353f1 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGAAAGGATGT.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGAAAGGATGT.1.fastq
@@ -1,20 +1,20 @@
- at HiMom:9:1:2:309
+ at machine1:HiMom:abcdeACXX:9:1:2:309 :Y:0:TTCGCTGAAAGGATGT
 NAATGGCCATGCTGCCCAAAGTATTTTATA
 +
 %.705699:5-227759996717:::9:9:
- at HiMom:9:1:2:63
+ at machine1:HiMom:abcdeACXX:9:1:2:63 :Y:0:TTCGCTGAAAGGATGT
 NGAGTGGAATGGAATGGAGTGGAATGGCTT
 +
 %,/66818682811553536525875686#
- at HiMom:9:1:3:880
+ at machine1:HiMom:abcdeACXX:9:1:3:880 :N:0:TTCGCTGAAAGGATGT
 ATGAGTGAGAAATAGAAGTCCTAAGTAGAT
 +
 B@=;/75>)>?B@=3>@=<.2=B at 2@>49B
- at HiMom:9:2:2:669
+ at machine1:HiMom:abcdeACXX:9:2:2:669 :N:0:TTCGCTGAAAGGATGT
 NGGCTGAAGCAGGAGGGTCACTTGAGCCAA
 +
 ##############################
- at HiMom:9:2:2:775
+ at machine1:HiMom:abcdeACXX:9:2:2:775 :Y:0:TTCGCTGAAAGGATGT
 NGTTTATAATTGTGAGTTAAAAATCTAAAA
 +
 %,-78:8:968:45524<<636;<:<<<<<
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGAAAGGATGT.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGAAAGGATGT.barcode_1.fastq
index 93688bf..233f520 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGAAAGGATGT.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGAAAGGATGT.barcode_1.fastq
@@ -1,20 +1,20 @@
- at HiMom:9:1:2:309
+ at machine1:HiMom:abcdeACXX:9:1:2:309 :Y:0:TTCGCTGAAAGGATGT
 NTCGCTGA
 +
 ########
- at HiMom:9:1:2:63
+ at machine1:HiMom:abcdeACXX:9:1:2:63 :Y:0:TTCGCTGAAAGGATGT
 TTCGCTGA
 +
 7@=B<C@#
- at HiMom:9:1:3:880
+ at machine1:HiMom:abcdeACXX:9:1:3:880 :N:0:TTCGCTGAAAGGATGT
 TTCGCTGA
 +
 >@62;A==
- at HiMom:9:2:2:669
+ at machine1:HiMom:abcdeACXX:9:2:2:669 :N:0:TTCGCTGAAAGGATGT
 TTCGCTGA
 +
 B>BB at BB9
- at HiMom:9:2:2:775
+ at machine1:HiMom:abcdeACXX:9:2:2:775 :Y:0:TTCGCTGAAAGGATGT
 TTCGCTGA
 +
 BCC6ABBC
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGAAAGGATGT.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGAAAGGATGT.barcode_2.fastq
index cf196c5..491006d 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGAAAGGATGT.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTCGCTGAAAGGATGT.barcode_2.fastq
@@ -1,20 +1,20 @@
- at HiMom:9:1:2:309
+ at machine1:HiMom:abcdeACXX:9:1:2:309 :Y:0:TTCGCTGAAAGGATGT
 AAGGATGT
 +
 ########
- at HiMom:9:1:2:63
+ at machine1:HiMom:abcdeACXX:9:1:2:63 :Y:0:TTCGCTGAAAGGATGT
 AAGGATGT
 +
 7@=B<C@#
- at HiMom:9:1:3:880
+ at machine1:HiMom:abcdeACXX:9:1:3:880 :N:0:TTCGCTGAAAGGATGT
 AAGGATGT
 +
 >@62;A==
- at HiMom:9:2:2:669
+ at machine1:HiMom:abcdeACXX:9:2:2:669 :N:0:TTCGCTGAAAGGATGT
 AAGGATGT
 +
 B>BB at BB9
- at HiMom:9:2:2:775
+ at machine1:HiMom:abcdeACXX:9:2:2:775 :Y:0:TTCGCTGAAAGGATGT
 AAGGATGT
 +
 BCC6ABBC
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCT.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCT.1.fastq
index 999312d..644b059 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCT.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCT.1.fastq
@@ -1,24 +1,24 @@
- at HiMom:7:1:3:1155
+ at machine1:HiMom:abcdeACXX:7:1:3:1155 :N:0:TTGAGCCT
 NCAGCGAAAGAAGTACCAGGGTATGGGAAG
 +
 ##############################
- at HiMom:7:2:2:1559
+ at machine1:HiMom:abcdeACXX:7:2:2:1559 :Y:0:TTGAGCCT
 NACAGAAGGGAAAAGGTCACAGACTAAAGA
 +
 %//6;;;8849;:91,35::757:4:;:9:
- at HiMom:7:2:2:488
+ at machine1:HiMom:abcdeACXX:7:2:2:488 :Y:0:TTGAGCCT
 NTGGGAAACTAAACCCCATGAGGGCAGAGC
 +
 %/2/156666785445255551/12545/4
- at HiMom:7:2:3:1101
+ at machine1:HiMom:abcdeACXX:7:2:3:1101 :Y:0:TTGAGCCT
 AAGATTATATGAGTATAATGGAGCTATTTG
 +
 B<38>B=>>B==30ABBA886;?;AAA@@>
- at HiMom:7:2:3:1123
+ at machine1:HiMom:abcdeACXX:7:2:3:1123 :N:0:TTGAGCCT
 NCCTCTTCCACAACTTCCTTCTTCTCCTTT
 +
 %.23)7475776876486:;67348867:8
- at HiMom:7:2:3:782
+ at machine1:HiMom:abcdeACXX:7:2:3:782 :Y:0:TTGAGCCT
 AGCCATGGGCATATAGAATCACTGTAAACA
 +
 B at BBBB>7;BCBCBB at BBB?BB>:=BAB at B
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCT.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCT.barcode_1.fastq
index 895c3e6..33c23ba 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCT.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCT.barcode_1.fastq
@@ -1,24 +1,24 @@
- at HiMom:7:1:3:1155
+ at machine1:HiMom:abcdeACXX:7:1:3:1155 :N:0:TTGAGCCT
 TTGAGCCT
 +
 ########
- at HiMom:7:2:2:1559
+ at machine1:HiMom:abcdeACXX:7:2:2:1559 :Y:0:TTGAGCCT
 TTGAGCCT
 +
 A at 5@@4BC
- at HiMom:7:2:2:488
+ at machine1:HiMom:abcdeACXX:7:2:2:488 :Y:0:TTGAGCCT
 TTGAGCCT
 +
 @>=@@;@A
- at HiMom:7:2:3:1101
+ at machine1:HiMom:abcdeACXX:7:2:3:1101 :Y:0:TTGAGCCT
 TTGAGCCT
 +
 7 at 57<*5=
- at HiMom:7:2:3:1123
+ at machine1:HiMom:abcdeACXX:7:2:3:1123 :N:0:TTGAGCCT
 TTGAGCCT
 +
 B at 67(.AA
- at HiMom:7:2:3:782
+ at machine1:HiMom:abcdeACXX:7:2:3:782 :Y:0:TTGAGCCT
 TTGAGCCT
 +
 BAAA<;B?
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCTAACTTGAC.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCTAACTTGAC.1.fastq
index b160fac..0377752 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCTAACTTGAC.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCTAACTTGAC.1.fastq
@@ -1,24 +1,24 @@
- at HiMom:9:1:3:1155
+ at machine1:HiMom:abcdeACXX:9:1:3:1155 :N:0:TTGAGCCTAACTTGAC
 NCAGCGAAAGAAGTACCAGGGTATGGGAAG
 +
 ##############################
- at HiMom:9:2:2:1559
+ at machine1:HiMom:abcdeACXX:9:2:2:1559 :Y:0:TTGAGCCTAACTTGAC
 NACAGAAGGGAAAAGGTCACAGACTAAAGA
 +
 %//6;;;8849;:91,35::757:4:;:9:
- at HiMom:9:2:2:488
+ at machine1:HiMom:abcdeACXX:9:2:2:488 :Y:0:TTGAGCCTAACTTGAC
 NTGGGAAACTAAACCCCATGAGGGCAGAGC
 +
 %/2/156666785445255551/12545/4
- at HiMom:9:2:3:1101
+ at machine1:HiMom:abcdeACXX:9:2:3:1101 :Y:0:TTGAGCCTAACTTGAC
 AAGATTATATGAGTATAATGGAGCTATTTG
 +
 B<38>B=>>B==30ABBA886;?;AAA@@>
- at HiMom:9:2:3:1123
+ at machine1:HiMom:abcdeACXX:9:2:3:1123 :N:0:TTGAGCCTAACTTGAC
 NCCTCTTCCACAACTTCCTTCTTCTCCTTT
 +
 %.23)7475776876486:;67348867:8
- at HiMom:9:2:3:782
+ at machine1:HiMom:abcdeACXX:9:2:3:782 :Y:0:TTGAGCCTAACTTGAC
 AGCCATGGGCATATAGAATCACTGTAAACA
 +
 B at BBBB>7;BCBCBB at BBB?BB>:=BAB at B
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCTAACTTGAC.barcode_1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCTAACTTGAC.barcode_1.fastq
index e2d9850..2f53965 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCTAACTTGAC.barcode_1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCTAACTTGAC.barcode_1.fastq
@@ -1,24 +1,24 @@
- at HiMom:9:1:3:1155
+ at machine1:HiMom:abcdeACXX:9:1:3:1155 :N:0:TTGAGCCTAACTTGAC
 TTGAGCCT
 +
 ########
- at HiMom:9:2:2:1559
+ at machine1:HiMom:abcdeACXX:9:2:2:1559 :Y:0:TTGAGCCTAACTTGAC
 TTGAGCCT
 +
 A at 5@@4BC
- at HiMom:9:2:2:488
+ at machine1:HiMom:abcdeACXX:9:2:2:488 :Y:0:TTGAGCCTAACTTGAC
 TTGAGCCT
 +
 @>=@@;@A
- at HiMom:9:2:3:1101
+ at machine1:HiMom:abcdeACXX:9:2:3:1101 :Y:0:TTGAGCCTAACTTGAC
 TTGAGCCT
 +
 7 at 57<*5=
- at HiMom:9:2:3:1123
+ at machine1:HiMom:abcdeACXX:9:2:3:1123 :N:0:TTGAGCCTAACTTGAC
 TTGAGCCT
 +
 B at 67(.AA
- at HiMom:9:2:3:782
+ at machine1:HiMom:abcdeACXX:9:2:3:782 :Y:0:TTGAGCCTAACTTGAC
 TTGAGCCT
 +
 BAAA<;B?
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCTAACTTGAC.barcode_2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCTAACTTGAC.barcode_2.fastq
index 4e52ec9..e424db6 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCTAACTTGAC.barcode_2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/TTGAGCCTAACTTGAC.barcode_2.fastq
@@ -1,24 +1,24 @@
- at HiMom:9:1:3:1155
+ at machine1:HiMom:abcdeACXX:9:1:3:1155 :N:0:TTGAGCCTAACTTGAC
 AACTTGAC
 +
 ########
- at HiMom:9:2:2:1559
+ at machine1:HiMom:abcdeACXX:9:2:2:1559 :Y:0:TTGAGCCTAACTTGAC
 AACTTGAC
 +
 A at 5@@4BC
- at HiMom:9:2:2:488
+ at machine1:HiMom:abcdeACXX:9:2:2:488 :Y:0:TTGAGCCTAACTTGAC
 AACTTGAC
 +
 @>=@@;@A
- at HiMom:9:2:3:1101
+ at machine1:HiMom:abcdeACXX:9:2:3:1101 :Y:0:TTGAGCCTAACTTGAC
 AACTTGAC
 +
 7 at 57<*5=
- at HiMom:9:2:3:1123
+ at machine1:HiMom:abcdeACXX:9:2:3:1123 :N:0:TTGAGCCTAACTTGAC
 AACTTGAC
 +
 B at 67(.AA
- at HiMom:9:2:3:782
+ at machine1:HiMom:abcdeACXX:9:2:3:782 :Y:0:TTGAGCCTAACTTGAC
 AACTTGAC
 +
 BAAA<;B?
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/nonBarcoded.1.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/nonBarcoded.1.fastq
index 758b666..4d09170 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/nonBarcoded.1.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/nonBarcoded.1.fastq
@@ -1,240 +1,240 @@
- at HiMom:1:1:1793:1011/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1011 1:N:0:
 ANNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNN
 +
 (%%%%%%%%%%%%%%%%%%%%;%%%%%%%%%%%%%%%%%%%%%1%%%%%%%%%%%%%%%%%%%%%;%%%%%%%%%%
- at HiMom:1:1:1793:1420/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1420 1:N:0:
 GNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNTNNNNNNNNNNNNNNNNNNNNNTNNNNNNNNNN
 +
 =%%%%%%%%%%%%%%%%%%%%=%%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%
- at HiMom:1:1:1793:1441/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1441 1:N:0:
 CNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNN
 +
 (%%%%%%%%%%%%%%%%%%%%;%%%%%%%%%%%%%%%%%%%%%+%%%%%%%%%%%%%%%%%%%%%5%%%%%%%%%%
- at HiMom:1:1:1793:1483/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1483 1:N:0:
 GNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNNNNNANNNNNNNNNN
 +
 :%%%%%%%%%%%%%%%%%%%%=%%%%%%%%%%%%%%%%%%%%%/%%%%%%%%%%%%%%%%%%%%%8%%%%%%%%%%
- at HiMom:1:1:1793:1495/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1495 1:N:0:
 GNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 7%%%%%%%%%%%%%%%%%%%%.%%%%%%%%%%%%%%%%%%%%%;%%%%%%%%%%%%%%%%%%%%%;%%%%%%%%%%
- at HiMom:1:1:1793:1527/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1527 1:N:0:
 GNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNTNNNNNNNNNN
 +
 .%%%%%%%%%%%%%%%%%%%%(%%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%%%%%%%%%%%%'%%%%%%%%%%
- at HiMom:1:1:1793:1545/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1545 1:N:0:
 CNNNNNNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 )%%%%%%%%%%%%%%%%%%%%)%%%%%%%%%%%%%%%%%%%%%)%%%%%%%%%%%%%%%%%%%%%1%%%%%%%%%%
- at HiMom:1:1:1793:1583/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1583 1:N:0:
 GNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNANNNNNNNNNN
 +
 :%%%%%%%%%%%%%%%%%%%%;%%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%%%%%%%%%%%%'%%%%%%%%%%
- at HiMom:1:1:1793:1596/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1596 1:N:0:
 GNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNTNNNNNNNNNN
 +
 5%%%%%%%%%%%%%%%%%%%%;%%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%%%%%%%%%%%%5%%%%%%%%%%
- at HiMom:1:1:1793:1602/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1602 1:N:0:
 CNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNANNNNNNNNNN
 +
 <%%%%%%%%%%%%%%%%%%%%(%%%%%%%%%%%%%%%%%%%%%,%%%%%%%%%%%%%%%%%%%%%(%%%%%%%%%%
- at HiMom:1:1:1793:1658/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1658 1:N:0:
 CNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNTNNNNNNNNNNNNNNNNNNNNNANNNNNNNNNN
 +
 (%%%%%%%%%%%%%%%%%%%%=%%%%%%%%%%%%%%%%%%%%%=%%%%%%%%%%%%%%%%%%%%%'%%%%%%%%%%
- at HiMom:1:1:1793:1681/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1681 1:N:0:
 CNNNNNNNNNNNNNNNNNNNNTNNNNNNNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNNNNNANNNNNNNNNN
 +
 ?%%%%%%%%%%%%%%%%%%%%)%%%%%%%%%%%%%%%%%%%%%&%%%%%%%%%%%%%%%%%%%%%'%%%%%%%%%%
- at HiMom:1:1:1793:1718/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1718 1:N:0:
 GNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 :%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%%%%%%%%%%%%)%%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%
- at HiMom:1:1:1793:1745/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1745 1:N:0:
 CNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNANNNNNNNNNN
 +
 1%%%%%%%%%%%%%%%%%%%%;%%%%%%%%%%%%%%%%%%%%%7%%%%%%%%%%%%%%%%%%%%%1%%%%%%%%%%
- at HiMom:1:1:1793:1777/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1777 1:N:0:
 GNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNTNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 :%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%%%%%%%%%%%%:%%%%%%%%%%%%%%%%%%%%%1%%%%%%%%%%
- at HiMom:1:1:1793:1813/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1813 1:N:0:
 GNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 7%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%%%%%%%%%%%%1%%%%%%%%%%%%%%%%%%%%%.%%%%%%%%%%
- at HiMom:1:1:1793:1916/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1916 1:N:0:
 GNNNNNNNNNNNNNNNNNNNNTNNNNNNNNNNNNNNNNNNNNNTNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 <%%%%%%%%%%%%%%%%%%%%6%%%%%%%%%%%%%%%%%%%%%=%%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%
- at HiMom:1:1:1793:1959/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:1959 1:N:0:
 GNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNTNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 <%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%%%%%%%%%%%%,%%%%%%%%%%%%%%%%%%%%%.%%%%%%%%%%
- at HiMom:1:1:1793:602/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:602 1:N:0:
 TNNNNNNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNNNNNANNNNNNNNNN
 +
 <%%%%%%%%%%%%%%%%%%%%>%%%%%%%%%%%%%%%%%%%%%7%%%%%%%%%%%%%%%%%%%%%2%%%%%%%%%%
- at HiMom:1:1:1793:808/1
+ at machine1:HiMom:abcdeACXX:1:1:1793:808 1:N:0:
 TNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNTNNNNNNNNNN
 +
 :%%%%%%%%%%%%%%%%%%%%?%%%%%%%%%%%%%%%%%%%%%?%%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%
- at HiMom:1:2:1793:1117/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:1117 1:N:0:
 GNGGGNNNNNNNCNGGTCGTTAGCAAGTGATGGCTGTGTTCTGTATCTTTATTGTGGCGACACTTACATGACTGGA
 +
 3%;B7%%%%%%%=%9C*'5@?BCB><.9>?@BA)>>(B<3@)@4?B<8)5>67<6A5+5-0.(84-8637,7/7%)
- at HiMom:1:2:1793:1329/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:1329 1:N:0:
 CNTCTNNNNNNNTNGATGCAGTAACTGGAAATATAGAAGATGCTGTGACTCCATTTGAATCTATAAAAAGCGTTGT
 +
 8%805%%%%%%%3%9?*7?(1(90'80;4(:??<<+9:5+/=A85,/=?3)=')6-+*,5=/902-2-0+5-%,-0
- at HiMom:1:2:1793:1354/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:1354 1:N:0:
 TNGCTNNNNNNNGNGGCGCCGCGAAGCGCACGGCGCCGACGCAGGGGGAAGGCGGGACATACACGACCCGCGAGCG
 +
 1%;A;%%%%%%%8%(5;@B7;(;*8;(8@;@<9/81((77*<(8 at -3<'(5=;(7((<')'<.0(/*(7/.2(9>1
- at HiMom:1:2:1793:1455/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:1455 1:N:0:
 CNTTCNNNNNNNGNGACTGCAGTTGCTGTTGCCCATTAAGACCTTGAGAAAAGGCTTGCCTGCCCTTCGTCTGACT
 +
 ?%8=?%%%%%%%:%9'=?@C*@2'=B<;/(;=%?,89'80(=B9=>7145.-(7B-)38/5)'=%5-=:/57)%6%
- at HiMom:1:2:1793:1478/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:1478 1:N:0:
 TNTTTNNNNNNNCNAATTTTACCTCATAAAATTTTTTGAGGTTTGATGTATGTCTCTGTCTTATCAATAATGAGGC
 +
 =%?C?%%%%%%%*%+, at CCB>BCBBA@=778BCBCBCB?BC?BCA4AC@;@C at CBCBBACA:)=B>';64=>6=AC
- at HiMom:1:2:1793:1793/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:1793 1:N:0:
 CNCCANNNNNNNCNGGGCCCTTTGTCTAAAGTCTGAATCAGCATTTGGATTTAGCCCTAATAGAGCCTGTTCATCC
 +
 =%?%)%%%%%%%=%68>BBB9?>@:B:)2(7:A84'67>5;>/67889'385,9@?=-+(327+3@>8777</15@
- at HiMom:1:2:1793:1812/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:1812 1:N:0:
 CNCTCNNNNNNNCNGCATACTTAACAAGTCTGATCTTGCTTATAGAAATTGGATCTTACTACTTCATTCTCAGAAT
 +
 (%?B>%%%%%%%?%>B7=- at BB;=@07B at CBB5?CBBBCB?+>:B944?BB at 1@CBB9/=7B at AB=@@BB@(>(8<
- at HiMom:1:2:1793:1893/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:1893 1:N:0:
 GNTCCNNNNNNNANTCCCCGTGGATGAAAATGCTGTACATGTTCTTGTTGATAACAATGGGCAAGGTCTAGGACAG
 +
 0%;C<%%%%%%%)%9CC@(>?C at 1=A7(00=BCAB96A><A?@CAAB at AA5>7AB1'6>7>B9.9B7B5)7;5B<>
- at HiMom:1:2:1793:1909/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:1909 1:N:0:
 GNCCTNNNNNNNCNCTCACACCGCCCCCCTTCTCACCTGCCCTGCGTAACCTGTACTGACTGCCCACTCCTCACCC
 +
 (%<@8%%%%%%%*%;(8@;*>7;*.(<B>5(.5@/*>93;(2@=-:'5>)0=+1;'5:';/(;1@*>,(;';((:)
- at HiMom:1:2:1793:1931/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:1931 1:N:0:
 GNCTANNNNNNNTNCACTGTCGACACCGCACACGGGGCATACCCACATCAAAGCAGTCCCCCAAGTCCCTGCGCAG
 +
 <%8.'%%%%%%%&%.(<B**(>3*775(*(;'.6''+;'&1(9.).*(7;5/'2(64A70>0.,23@)0%'5=<*'
- at HiMom:1:2:1793:1969/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:1969 1:N:0:
 TNCGCNNNNNNNANCCCTGACTGGCAAGGCGGTGGCGGCTCCAGTGAAGGCTCCCCGTGTTCTTAAAGACTAGCGC
 +
 5%8((%%%%%%%1%;BBB>+)7BBB?-?10 at B7BBB9A@@A379'?*39BA4@>);'5:'BBAA;>2>A6+9+@*<
- at HiMom:1:2:1793:2004/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:2004 1:N:0:
 GNGTTNNNNNNNCNTACTGGCATTTACTGTTTAACATCACACACCAAGCCAGGTTATTTCACACTCCTGCTACTGG
 +
 8%13<%%%%%%%:%?CCBBB?(>CCCCCBA@*9+ at +@C at +*1?;8 at +3*@*8C4 at 4>C>7 at 8115?),CC<7@?:A
- at HiMom:1:2:1793:2031/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:2031 1:N:0:
 CNCCGNNNNNNNGNGGTGCATGGGCTCCAACGTGGTGTCCTGTGGAGCTGTTGGGCCTGGGCAGGCGGCACAGATC
 +
 :%'*:%%%%%%%:%:B;B@(<BBAB9BA3AAB9A@,B1(==A6 at A/??;=5=?A3%273<4A,;7;:=;+&&/,/3
- at HiMom:1:2:1793:2038/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:2038 1:N:0:
 GNGCGNNNNNNNGNCACCTTGGTACTGGGTGATGGGGAGGCACTGAATGGGCTTCAAGTCCTCAAACGCCTGATCT
 +
 ?%:-;%%%%%%%.%=)@CCACB=8ABCB?7@&>B?AC=?CB9C4AAA>>6==>>;%5>3%:/:%,3.;@0,9*-1;
- at HiMom:1:2:1793:310/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:310 1:N:0:
 CNGGANNNNNNNTNGAACCTTTGGCAAGGCTGCTCTTACGAGTCCTCTCGCCCTGTTCCACCTATCCCCATAGCTA
 +
 (%5;'%%%%%%%(%.*0 at 99@AB>CA5):=:A1;A<3':-''.'3';('5>BC at B=A(A<>511(6B?,''(<&-*
- at HiMom:1:2:1793:404/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:404 1:N:0:
 CNCCCNNNNNNNTNCAATGCTATGCAGTATGTCTTCTTATCTCTGTCTTCAAGAGCATCCTCTGTCAGTCCTACAT
 +
 :%)?0%%%%%%%9%*/0%,8.-->>>>9@?=975(=4/%0?74'/''39%-?8828,4412=0168;2+9A:74'5
- at HiMom:1:2:1793:475/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:475 1:N:0:
 CNGGGNNNNNNNCNCCCCCCTAGGCAATATGCTACTGCATATATATTTGGTCTAGATATATAACAAGTTACTACTG
 +
 ?%9?3%%%%%%%0%<<%5;(2*7<@?(1')6>7?,7=7@*)6)35'7:7)%%,'3(.(+2++482.:))-%0-''2
- at HiMom:1:2:1793:666/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:666 1:N:0:
 CNGAGNNNNNNNTNGGGTAGGAAACACAGCCTTGCTCCACAGCGCACTGTCAGCAAGACGCTCCTTTCTTCGGAGA
 +
 ?%9(9%%%%%%%%%7)9..<::>3>1;77<B05??)B>0=12(2A6=4:4956?/%5-%-;1;6542;/-&(26,(
- at HiMom:1:2:1793:829/1
+ at machine1:HiMom:abcdeACXX:1:2:1793:829 1:N:0:
 TNGGCNNNNNNNCNTGGGCAAGCACCTGACCAGCAACAGCCCCCGCCTGGTGCAGCACTGCCTGTGGACCCTGCGC
 +
 ;%;>*%%%%%%%<%:BAB at 0;BBBBBB@;@B at A@;*@*>BBBBBABBA?@3@@;<(5 at AAB@:>.=;,<BB;<BAB
- at HiMom:1:2:1794:490/1
+ at machine1:HiMom:abcdeACXX:1:2:1794:490 1:N:0:
 CNTCCNNNNNNNTNTATTTACTATTTTCTGATTTTTAAAATGACAGTGGCAATTACCATTTATACTGTGTTATTTG
 +
 ?%8C?%%%%%%%9%6(=?:(=@BAA@@B at A<<<<=@=;5?@9+?A@:?9 at 5&1=>A?+:6668=A9?7?9?=<9=6
- at HiMom:1:3:1793:1031/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1031 1:N:0:
 CNACTNNNNNNNGNNGCATTGGAGAAGAACCAAGCTGGCTCTCTAAGGAAGTGCACACGAGTTGGAACACATATTC
 +
 ?%<?(%%%%%%%:%%=B47?B=6?=2?/00 at 8), at BB=3,>).'50;:72))1)5=:)<19%)+(%5?:=;7.)1'
- at HiMom:1:3:1793:1143/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1143 1:N:0:
 TNGGGNNNNNNNTNCATGGTGAGGAAGAGTCGGAAGCAGGCATGCGGCTGCAGGGAATGCAACTTCTTCTCCATCG
 +
 :%(B3%%%%%%%:%=BCCC<CBBB<CCB3*@?BBBAA*=B at 9@?B?8<3;>3;A;+2:9<43:<;?9>A:8<+%<%
- at HiMom:1:3:1793:1282/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1282 1:N:0:
 GNTAGNNNNNNNCNGGACTCTGGCGTCACCTTTGGCGCTGAGCGCCCCAGGCCCGCCAGCCCGCCCGCCCACTGCC
 +
 <%;(.%%%%%%%(%.6.(;B at 55+9>*8@(>*@;(.;@75'5';;@;;*4<5<2*@;/><@5>5(16;1;7)',..
- at HiMom:1:3:1793:1301/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1301 1:N:0:
 GNAGGNNNNNNNTNCAGGGTTGAGGTATTCTTAGGTTAGCCGAGCTCTTTCCTCCTTTCCCCCCCCCTCTCCCCCA
 +
 ?%*:3%%%%%%%(%;*9)>3+-*-@=)3?CCBAA;)A8 at 2*25;A7,52=B;(=)47)=BC;+:C@)2 at 0=BA9(9
- at HiMom:1:3:1793:1311/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1311 1:N:0:
 GNTATNNNNNNNTNTTCCTTCAGTCTGCACAAAGATTAAGGTAATTTACAGTCAATCTGTGAATGAATGTTGAGAC
 +
 <%()<%%%%%%%7%<<BCBCCCABCCCC at CBB?BCCCCCBC>AACC?*@.BAB8*@CCCBC@:@?7?ABAA??B8B
- at HiMom:1:3:1793:1326/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1326 1:N:0:
 GNCCANNNNNNNCNTCTTGGGCTCCACACCATTACCAGCATCAGAGGCAGGGGAACACAATCTGCTGCCTTATAAG
 +
 ?%?@7%%%%%%%?%3C=+;.<@+@@8A?AC@@ABBB at BCB?+?;?-5- at BA92-7B<?-2/,*@A2?BB;A5?1'4
- at HiMom:1:3:1793:1389/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1389 1:N:0:
 GNGGGNNNNNNNGNCGCAGGTGGGGATGGGCACCCTCACAGCTTCCCTGGACCTTAGTTTTGTTGGGGTTCAGTCC
 +
 :%<B;%%%%%%%7%;A at 1@>.>BB@:;ABAABBBBB<+<7?@8 at BBBBA72@>2<(>5+=7906A<;5*3<2 at -(4
- at HiMom:1:3:1793:1405/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1405 1:N:0:
 GNTGGNNNNNNNTNGCTGAGATGCTCTTTAACCAAAGGAGGAAAGAGAGGAGACCAAGGGCCAGCTGGTTGGTTGT
 +
 7%1C=%%%%%%%8%8CA=2@?ABB6BABBABBC;:>BB>B at 9(;A=@?B>3?)@A?=5(7?@1>B=A;(=@@,1=3
- at HiMom:1:3:1793:141/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:141 1:N:0:
 TNCTCNNNNNNNCNCTTAGCAGTGCGCCCCCCGAGCGCGGCACAGGGGCCAGGGAGACAGAGGACACCGGGATCTC
 +
 ;%;9,%%%%%%%,%52(((3.8(+/*/B at 1<1((=.&4+9+/(::11+(&7600+.+A4'*%%%-%:/,%%,'9'B
- at HiMom:1:3:1793:1507/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1507 1:N:0:
 GNGTGNNNNNNNTNGTTGCCAGCCTGCTGCCCGCCATCCTGGTCTTCATTCTCATCTTCATGGAGACACAGATCAC
 +
 =%==8%%%%%%%?%5ABABBABCCBBCBBCCCBC at 09ACB==;CBB at 0;>ABBBACA>?'9A==>)@)?9;63?5@
- at HiMom:1:3:1793:1557/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1557 1:N:0:
 GNGGANNNNNNNCNTCGAGCCATTCCACTCCCGCCCGGGCACCAACAGCCAAACGCACGCTCATCAAAAAGGCCGA
 +
 (%;*(%%%%%%%;%5>/(4?A;=6(><1*@1*-@@>/*0 at 9)9?>2.=8'<,8<,1((%:1<?+(.08'+55B?:%
- at HiMom:1:3:1793:1570/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1570 1:N:0:
 GNTCTNNNNNNNTNTCTCCACTCTGCTGCCCTACCTCTCGGAGTCTTCTACCGCGTCTAACTAGTCATATTTACAA
 +
 6%3B6%%%%%%%,%'C@@BC>1?B at CC?C at CAB@B@?6&BACA4,?*<B@>1'13,<B;)@BB3'?%)+:A@;CB@
- at HiMom:1:3:1793:1617/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1617 1:N:0:
 CNGAANNNNNNNTNCGCCTTCTTCTTCAACTCGGAGCTGCTGAGCGCTGTGCGCTTCGCCCTGGGCAAGGGCCGCG
 +
 :%75'%%%%%%%3%;;BA><A;=B;7 at 84>'9>:90<,7<,61132%*8//3471'349+6,36+:&+462+.&.%
- at HiMom:1:3:1793:1709/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1709 1:N:0:
 GNGGGNNNNNNNTNCCATTGGTTTCTGAAAGTATTCACATCATTTGGGATACCAGATAGCTCAATACTCTCTGAGT
 +
 8%>B<%%%%%%%:%?B8BBBB?BBCAC?@6 at 1;AB@*@<>B9>?@@B?9<4BB8 at 82)<C at CA:?8B at C@C@?/='
- at HiMom:1:3:1793:1738/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1738 1:N:0:
 GNGCCNNNNNNNGNCTCTTGGGGAATATCTGAGGCTCTGTGGTCACCCACAGACCCGTTACTCCTTTAGGTGTCTG
 +
 ?%:C?%%%%%%%8%=BCABBBBC?BBCBCBBBBBC at C?A1AB.?3?A2)@880@@)0%96?9 at B;><+=>5 at 0>=@
- at HiMom:1:3:1793:1779/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1779 1:N:0:
 GNGCANNNNNNNCNTGCGTATATTTACAGATATATATACAGAATTGTTTGCTCTGAGCCATTTATAAGCACTTACT
 +
 =%5A0%%%%%%%?%)9*>'=@::>BBB:B@;7AAA at 7@=3/.*:?@8;,<*;B4=ABBC?).=4>(;BA=CA:-?;
- at HiMom:1:3:1793:1793/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1793 1:N:0:
 CNTCTNNNNNNNANNATGGGCTTTCTACAGCCTGCTTACCACTAACAGTAAGGAATCTTTCATAAACACACCTCAG
 +
 :%1 at 6%%%%%%%&%%'-;:)62(9=)=>3)0A9>@501??:=5:583466.451,9 at 952<,94.2;88+2=8;3,
- at HiMom:1:3:1793:1859/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1859 1:N:0:
 GNGAGNNNNNNNANCCAAGCATCTATCCCAGTGTGGGGGCTGAGGCTGCGAGAGGAAAGCGGGGACGGAAGACGGG
 +
 <%((;%%%%%%%<%(;=<B96<@B3?BBB=B11(A;BB/(0=-:?9)@-=,12<=2>>:@8@':%8<=.52(82(+
- at HiMom:1:3:1793:1898/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:1898 1:N:0:
 GNACANNNNNNNGNAATATGGGCTTATCCAACCCAACCAAGATGGAGAGTGAGGGGGTTGTCCCTGGGCCCAAGGC
 +
 :%/=(%%%%%%%:%*/<1=5;BBBAAACCA8ABCAACB;)@?BBB+B6?4B:A7;??16@=BA?9509B?@-+844
- at HiMom:1:3:1793:456/1
+ at machine1:HiMom:abcdeACXX:1:3:1793:456 1:N:0:
 CNTATNNNNNNNCNNCGGGTACCACAGTTGAGGACTGACATTCTGAACCCTGATGTTTCTAAAGAAACGACAGTAT
 +
 ?%6 at 8%%%%%%%?%%?@?@6AAA??6<>>@6/7?A??6><<8=@252;>@84<9>58@?7.-6;78;<4'9-<:68
diff --git a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/nonBarcoded.2.fastq b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/nonBarcoded.2.fastq
index b5499f1..8e9b24a 100644
--- a/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/nonBarcoded.2.fastq
+++ b/testdata/net/sf/picard/illumina/IlluminaBasecallsToFastqTest/nonBarcoded.2.fastq
@@ -1,240 +1,240 @@
- at HiMom:1:1:1793:1011/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1011 2:N:0:
 ANNNTNNNNNNNNNNNNNNNNTNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 3%%%%%%%%%%%%%%%%%%%%(%%%%%%%%%%%%%%%%%%%%%?%%%%%%%%%%%%%%%%%%%%%*%%%%%%%%%%
- at HiMom:1:1:1793:1420/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1420 2:N:0:
 CNNNANNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNTNNNNNNNNNN
 +
 ?%%%*%%%%%%%%%%%%%%%%,%%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%%%%%%%%%%%%.%%%%%%%%%%
- at HiMom:1:1:1793:1441/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1441 2:N:0:
 CNNNANNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNN
 +
 <%%%(%%%%%%%%%%%%%%%%'%%%%%%%%%%%%%%%%%%%%%:%%%%%%%%%%%%%%%%%%%%%&%%%%%%%%%%
- at HiMom:1:1:1793:1483/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1483 2:N:0:
 GNNNANNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNNNNNTNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 <%%%%%%%%%%%%%%%%%%%%0%%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%%%%%%%%%%%%>%%%%%%%%%%
- at HiMom:1:1:1793:1495/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1495 2:N:0:
 ANNNTNNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 )%%%*%%%%%%%%%%%%%%%%(%%%%%%%%%%%%%%%%%%%%%:%%%%%%%%%%%%%%%%%%%%%4%%%%%%%%%%
- at HiMom:1:1:1793:1527/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1527 2:N:0:
 CNNNCNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNN
 +
 :%%%*%%%%%%%%%%%%%%%%7%%%%%%%%%%%%%%%%%%%%%5%%%%%%%%%%%%%%%%%%%%%*%%%%%%%%%%
- at HiMom:1:1:1793:1545/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1545 2:N:0:
 CNNNTNNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNTNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNN
 +
 5%%%*%%%%%%%%%%%%%%%%2%%%%%%%%%%%%%%%%%%%%%,%%%%%%%%%%%%%%%%%%%%%,%%%%%%%%%%
- at HiMom:1:1:1793:1583/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1583 2:N:0:
 CNNNTNNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNN
 +
 <%%%%%%%%%%%%%%%%%%%%,%%%%%%%%%%%%%%%%%%%%%,%%%%%%%%%%%%%%%%%%%%%&%%%%%%%%%%
- at HiMom:1:1:1793:1596/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1596 2:N:0:
 CNNNCNNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 <%%%+%%%%%%%%%%%%%%%%5%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%+%%%%%%%%%%
- at HiMom:1:1:1793:1602/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1602 2:N:0:
 CNNNGNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%8%%%%%%%%%%%%%%%%%%%%%;%%%%%%%%%%
- at HiMom:1:1:1793:1658/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1658 2:N:0:
 TNNNCNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 :%%%+%%%%%%%%%%%%%%%%<%%%%%%%%%%%%%%%%%%%%%'%%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%
- at HiMom:1:1:1793:1681/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1681 2:N:0:
 ANNNANNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNN
 +
 )%%%(%%%%%%%%%%%%%%%%7%%%%%%%%%%%%%%%%%%%%%'%%%%%%%%%%%%%%%%%%%%%4%%%%%%%%%%
- at HiMom:1:1:1793:1718/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1718 2:N:0:
 ANNNANNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNN
 +
 (%%%%%%%%%%%%%%%%%%%%/%%%%%%%%%%%%%%%%%%%%%'%%%%%%%%%%%%%%%%%%%%%(%%%%%%%%%%
- at HiMom:1:1:1793:1745/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1745 2:N:0:
 ANNNTNNNNNNNNNNNNNNNNTNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNANNNNNNNNNN
 +
 (%%%%%%%%%%%%%%%%%%%%(%%%%%%%%%%%%%%%%%%%%%4%%%%%%%%%%%%%%%%%%%%%0%%%%%%%%%%
- at HiMom:1:1:1793:1777/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1777 2:N:0:
 ANNNANNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 )%%%%%%%%%%%%%%%%%%%%,%%%%%%%%%%%%%%%%%%%%%(%%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%
- at HiMom:1:1:1793:1813/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1813 2:N:0:
 CNNNCNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNTNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 <%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%%%%%%%%%%%%*%%%%%%%%%%%%%%%%%%%%%:%%%%%%%%%%
- at HiMom:1:1:1793:1916/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1916 2:N:0:
 CNNNANNNNNNNNNNNNNNNNTNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 (%%%(%%%%%%%%%%%%%%%%0%%%%%%%%%%%%%%%%%%%%%5%%%%%%%%%%%%%%%%%%%%%4%%%%%%%%%%
- at HiMom:1:1:1793:1959/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:1959 2:N:0:
 ANNNCNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNN
 +
 1%%%%%%%%%%%%%%%%%%%%'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<%%%%%%%%%%
- at HiMom:1:1:1793:602/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:602 2:N:0:
 CNNNANNNNNNNNNNNNNNNNTNNNNNNNNNNNNNNNNNNNNNTNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNN
 +
 ?%%%&%%%%%%%%%%%%%%%%;%%%%%%%%%%%%%%%%%%%%%:%%%%%%%%%%%%%%%%%%%%%6%%%%%%%%%%
- at HiMom:1:1:1793:808/2
+ at machine1:HiMom:abcdeACXX:1:1:1793:808 2:N:0:
 CNNNANNNNNNNNNNNNNNNNANNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNNNNNNNNNNNNNGNNNNNNNNNN
 +
 <%%%%%%%%%%%%%%%%%%%%.%%%%%%%%%%%%%%%%%%%%%.%%%%%%%%%%%%%%%%%%%%%,%%%%%%%%%%
- at HiMom:1:2:1793:1117/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:1117 2:N:0:
 TTCTTCAGCTGTATTGAAGTATAATTTACAATACAGTACAATTCATATATTTTAATTGTATAATTTAATGACTTTG
 +
 +4 at .:B=?<'<?@2+=38A4+;>.3:9A>(7??A09(0>((0=A::;,;+/(:+*769)..'09>.%+2-4>-'(7
- at HiMom:1:2:1793:1329/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:1329 2:N:0:
 GAGCCCCGCGTCTGTCTCAGAGAACTTTTGCATTCTTCTTGTTCTCCAGGAGAAACGGCATCATCTTCCATGTCTT
 +
 A@=*BC at -+:6B8'6 at BC@C>,;2)5BBBBB>;BCBBC at 6@@BAACCB>B;8)07*<@=':C><<9A@(68@=B59
- at HiMom:1:2:1793:1354/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:1354 2:N:0:
 CTGAACCTCAAGTCTCCACCAATCAGAATCTGGGGGAGGGCGCGCGTGCAGGGAGCCGCCTGCTCTCCACCTTCGC
 +
 A24(06/+.2(21?49?:-+(5&8&5**4?1'13..0'.'%,,98&%(60&.++1(&+A,,0..8.18(.0&+,,/
- at HiMom:1:2:1793:1455/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:1455 2:N:0:
 GGAAACCAACCCCTCACATGGTAACCCGCTCCAACCCGCACGCCCTGTTCGGCCCCTGACCCGGCCCCCCGGCGCA
 +
 >/,+'<:''',5'3(59'+.705,/8 at 94(,+'5@;'%7%%;3>86.*%04&'%17(&.5%%+%,>0624*%,*:%
- at HiMom:1:2:1793:1478/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:1478 2:N:0:
 CAGCCATTCAAATCCAGTATTTTTTAAGCCTCATTATTGATAAGACAGAGACATACATCACACCTCAACACCTTTT
 +
 A:;C?'7<>(0*8B?*:4-4;A><8+-9BB>?/;;7:<702'+:(?/9(92<+12<,5;&'.>@<?*&%*&%3865
- at HiMom:1:2:1793:1793/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:1793 2:N:0:
 GTTTATAACTTCTTCTGTGGGATCAGCGGGCACGCCTCTTCCCACCAGCACACTACACGTCTACCAGCGCGGATGG
 +
 B?A>.90)(<@CB?C at B8BA>?=?*<&:@?=%;ABB:&85&=+>A=%7&+'. at 3&9&,=2&810626B7'<5%->:
- at HiMom:1:2:1793:1812/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:1812 2:N:0:
 TCCAGCATGAAGATAATGGCTAATACCAAAGCAGCCTTTTTGCTGTGGTAGGAAGATAATGGCTAATAAAAATGAG
 +
 BCCCCB9A at ++@4?7+?CBCA@)=)''/2)8@)=?(;??AA=&=B at BB02<9.)3).%0-2<5&/+*1%(:'*,%9
- at HiMom:1:2:1793:1893/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:1893 2:N:0:
 GGGCAGGGGGCTTTTTCTCACTCTCTCTCATATCTTCTAGGGTAACTACATGAACACACGCTTCTCTCCCCTTCCG
 +
 ABBB4=BBB:)=B<AAC?C>)?C at C?CBB3;)<C at BC9(>?A3 at -@=)@6@=4'?4(425C9=B<C at CB@(07((:
- at HiMom:1:2:1793:1909/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:1909 2:N:0:
 CTCACACCCACACCCCCCCCAATCCCACCCCCGGACACCACACCCCTCCAACTTCCCCCCCCGAGCGCAGCCGGGG
 +
 B16+:&3:(%+'4+&6;/2(%,/29.'5,,--,('&.''%%,&.1+%*:%%1%%%%,((%'&(%(247-*%+11&%
- at HiMom:1:2:1793:1931/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:1931 2:N:0:
 CTGAAGCGCCACCGCCGCGGCGTGGCGGGCCCCGCGCACCACCTCTTCCCGTCCTCTACCGGCCCTGGCCACGCCC
 +
 9+&'411'41,0'1/.%'%&9(0,%,'--%%-'%%.''.,((.+,(%-3+++,/(*+&'3,+*-%%**.&%,0'*(
- at HiMom:1:2:1793:1969/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:1969 2:N:0:
 GAGAACTCTCTGTGTAGTTGTGACTTCCATCCTTCCGCAACAGTAGTAAGGACCGCGACTTCTGACCACATTGACC
 +
 :%===(,=B>=:-;7<B/?@8@=:8==>'.,=86 at B@A,,+07-(9'35>?58//?;-'+.8(50'619('''+/9
- at HiMom:1:2:1793:2004/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:2004 2:N:0:
 GAACTTGACTATCTCTTCTAATTTTATTGTTTATTTTGTGTTTACTGCCCAGCTACTTCCCACCTTCCACTTGCTT
 +
 B?4 at C@<+>=57'3B>=)?4>BBA?+=@B@>7-;@@@A=B::7?4<>?*?<8B83A?=>(>;BB1A.%-@@:8 at 5=
- at HiMom:1:2:1793:2031/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:2031 2:N:0:
 TGCCAGTAGTTTTGGGTCAAGCCCTCACCTGATTCCACGCTTCATAGCTTCAGCCGTTCCCATCATACTACTAGCT
 +
 BBBC=>==B=@@@@BB5@)-=CBA9'/B@=>16 at BB)(8'4=A54-=B:8@(;?(9'0?A7'1A.96>3/'4235-
- at HiMom:1:2:1793:2038/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:2038 2:N:0:
 CCTGTGTCTCAGTGAGCCTTCAGTGCAACATACGGGTAAGAGCAGCCTTCTCTTCACTGAGATGAGACCCCCCCAC
 +
 B>626.288?89.5'5??60,477.3'%%)+112.21.&21330/75*)55(5+./,2*%-,/1)162/2'55662
- at HiMom:1:2:1793:310/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:310 2:N:0:
 CGAAACTTGGGTCAGTAAACTGGTGAAGCTGACCTATTTGGCAAGCAGCATGATTCGGAAGCGCGGCAGGCAGAGT
 +
 ?(5 at BB*>57 at 6B@*34)?=6B@()'18%'?=@A*:@?4 at +(4>A;8<'/@=366A@;/7@(-'()7(1(8(2'''
- at HiMom:1:2:1793:404/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:404 2:N:0:
 ACATGAATCCTCTCCCACAGGAATTATTCAGCTTACCGCGAGTACGCTTCCGTGTTGGAAAGATTCAACTCACCCC
 +
 ;'7B62:2(=/8<>A at 9A=88>6<==:4?%5A8=;>@*73,.%6?<'%%5;+)%%-2'1)&%5(-937&0)%%0=B
- at HiMom:1:2:1793:475/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:475 2:N:0:
 AACTTTTTTACGCAATGTTAATATTCAACTCTTCCTTCCAATAGAAATTTTCTGCTGCTTTTCTTGCTCGTGCTAG
 +
 BCB77433)@1)@*:>A9+>401>@?:*@6=(6C8*/2@<(2A8%)6?;97 at 9+9;<'3/4)-15:34+)'8'2--
- at HiMom:1:2:1793:666/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:666 2:N:0:
 ATTTTTGCTTTCCTTGGCCCCCACCAATTTATACATCTCCATTTTCCGACCTCTGGACTAACTGCTTGCTCAGCAC
 +
 6;BAC?AB@@>@8;@>@BBBBA:@B8=?;1>6 at AA<B4AB:94<;=,0'<@<A87)7B=73@;3)'/69(<,67'%
- at HiMom:1:2:1793:829/2
+ at machine1:HiMom:abcdeACXX:1:2:1793:829 2:N:0:
 TCGCTGTTGTTGCATGTCAGGTTGGAGAGTGTGCCCGTGGCCCCGGTGCGGCCGGTGGCCGCCCCCCCCCCCCGCC
 +
 AB at BBA=AB?AA@)8@=@)>=>=A>3=0>4A3ABB at 6+<><(<'88*8%:8%:4%52(8%(55%4>2<7;*;2%7%
- at HiMom:1:2:1794:490/2
+ at machine1:HiMom:abcdeACXX:1:2:1794:490 2:N:0:
 ATAAACTTGAAAATAATTTTCTATGATACAGCTTTCAGGTAGAAAAATGAATTTTCGTCGTGTTTAACAATGTTGT
 +
 ABBCBCAAC@;5@@77BBB?CCBBB?@BCBBCAB@@3<A6>>)99?0<B at 6?>@@BB6A9>B5A<@6<%+>@<<:0
- at HiMom:1:3:1793:1031/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1031 2:N:0:
 CCCATACCAGCACAGAGCATACAGAAACACAGAAAAAATATTCCCAGTAAAACATGTGCAACTGTCCAGGCAGTCG
 +
 +5AA at 92+>4AABBA6@;'(-;<=22)B8@@@7>A@<583498 at 62-45:-8>8;:0081*956-;7.)*%.4))0
- at HiMom:1:3:1793:1143/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1143 2:N:0:
 CTGCAGAGCAGTTGTGGCACTGGGCTTTGGCCACTCAAACTCAGGCTGGTCCGGAACCTCCCCCACCCCGCCCCAC
 +
 A==B59>>A at 8/7=,19:+:'344A..366?A9=4>168?1:113;42,%7:3-&177&59=;8&,=2%(8+7%%2
- at HiMom:1:3:1793:1282/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1282 2:N:0:
 AAGCACACCAAGCTTCCCGCAGCTGCGGCGCCCCCGCTCCAAGGCCAGCAGCTGCCCCCTCTGCCCCCACCCCCTC
 +
 (*579.1(.//>B at -17+=../@9=*=(.(.;<.1'>;<:'''7=;'.':==:551938*7.7;:%7:'';@;609
- at HiMom:1:3:1793:1301/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1301 2:N:0:
 GCATTGCGTCCATCTCTTTACAGAAGAACTCAGCCCACACCCTAGAATGTACACCTTTGGAAAAAGGAGAAGTGCT
 +
 =(6;9*AA;*BCBCCCABB at CB@)??@>@BBBCCCA6 at 8?CC>9@>=?@-2)9AB;6>>;5334=3=7+6-14?=-
- at HiMom:1:3:1793:1311/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1311 2:N:0:
 CAGCAAAAGTGCCGGCTAGTCCGGTTTGTTGAAAATACAGTAGAAAAGCTGATTCTGGTTATCTCTCTCAGGACAA
 +
 B<ABBA4=A1?CCBB*B9?:>'>@)?A@<AA74;A@?B=>)'6'61<58(:/75A?7(0===@=@4*7%355/>40
- at HiMom:1:3:1793:1326/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1326 2:N:0:
 CAAGATCATACTAACACACTCCAGCCTGGGCAACAGAGTGGGACTCTGTATCCAAAAAAAATTCTCTACCAACTAC
 +
 BABB==BA?@CB??BBCCCCBB- at AC0B<,CCCCA at 4<@A;;AC+CBCA,BCA1=A:=9<=A,C?+<?B?3<B,?C
- at HiMom:1:3:1793:1389/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1389 2:N:0:
 ACCACAGGCACCACCAGCCACGGACCCACGCCTGCCACTCCCCACCCCCCCCCCCCCAGCCACGCCACCGTCCCAC
 +
 7@>*@0:3 at 2@@7BB=ABB3B=5%;B>(>0%:;<A=0@=8';&(:?A>2>7%<;%:A;3@>+.*%%.+<0/:)>-)
- at HiMom:1:3:1793:1405/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1405 2:N:0:
 GCCTTGTTTGGCCCTGATCTCTGACTTCTAGAGCCCCAGCTGCTGGCGGCTGCTGGGATATCCTCCCCGCTCGGGT
 +
 @BBBBBA@@9BBBBA11=BBBBBABBBBB9=9BBBBB9ABABB@*=B@@719.2=33%822@>'':A5%1+%77%(
- at HiMom:1:3:1793:141/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:141 2:N:0:
 CTCTCCCGCGCCTGCTACGGAGCCCGCTCGGGGGGGCCACGCCGCTCCCGAGGACGTAGCACCTCCTCCACTCACG
 +
 4:-*695*:&7(.333?9*'(@(6.((%%,;62+*..(./0(>3/&%14(,1((0-6&15%%.6>(&'%+20&+3(
- at HiMom:1:3:1793:1507/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1507 2:N:0:
 CAGAGCGCGTTGGCGTGAGTGACAGAGCGGCCAGTGGCCGCCGCCCACCCGCCCACGCCCCCGAGGGCCCCCCTGC
 +
 @11+1?4>44344=533,252.;11,->4.&7.**,-5++.,(.7*&,1*%%%.*(%...,*%*+,%%+1(&+%,.
- at HiMom:1:3:1793:1557/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1557 2:N:0:
 CGGCTTTTTTTTTATTGAGACCAGCTCCTGCCCTACCCCCGCGGCTGCGGAGCAAGGTCCCCTTCATGCGCCCCCC
 +
 5&0/(7*3>96=9)<*+%'+5,/%'&7%7+675%'%%+09*(*'2(5%%,&(.&,%%(,6%(&'7&+&,&-,+554
- at HiMom:1:3:1793:1570/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1570 2:N:0:
 CAGACACCTTTCATATCTTTATGGCAACTTAATTTTTGGCCTTTTATCACTCTGTCATACCAGCATTCTGCCGTCA
 +
 A@>;B at CB549'34=9B;?>/A@?8@@;=<(9/5++<74B;B<%..;C-(.8?@(>'9@>><6>(4;<%*.(.*=:
- at HiMom:1:3:1793:1617/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1617 2:N:0:
 GTGGTCATAACTGTTTCTGGACCCATTTGAACTTCATCTGAATATAGAAATCTCAGCAGCGCCCGGACGGCTGCGG
 +
 A<CBAB4>=, at BB@BAC at B=*A@*+>ABB94BB at B;>B?;>@@5A;B=046C@@(6A9;A2A<'90'(:-?%3:/:
- at HiMom:1:3:1793:1709/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1709 2:N:0:
 AGCCACTGTCCCGTGTATAACTTGGCATTAGAGCACCAGGTCTGTTGGATGGTGGTGGCAGGCCCAATTAATTTTT
 +
 ,?@)7 at B@6BCCC;C?@A;+ at A;BBB=;BA at 6@B6B@(>B8CAA6<B?69B?(B=-:@>-7 at 85:%.))3&73-%)
- at HiMom:1:3:1793:1738/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1738 2:N:0:
 TCCCTGACTGGATACAGGCAGCTGACCCCTTCTCCCGACACCTCAAGGAGTAACTGGGCTGTTGGTGACCCCCGAC
 +
 ABBBBA at BBBA<B7B at ABBAB;(:';BBA=A at 0@@*90@)@B<(>)>>(>(+;@9@:%;*<(54 at +.%3@(>5(%'
- at HiMom:1:3:1793:1779/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1779 2:N:0:
 CACTGAAATGTTTAGGACCATATTATAAGTAAGTACTTATCAATGTACTTTAGGACCATATTATAAGTAAGTGCTT
 +
 =:AB>(>64A=;27A@=B@)=64@@:5)@9<)=:BBB@:='?'9B*BC>)67B at AC@;=9>)0@*8?:40:<BC=<
- at HiMom:1:3:1793:1793/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1793 2:N:0:
 GCTCAAATTTGTGCTACCAATGATATCGAGTTTATAGCAAATTTTCTACGGGAAGTCTATGCGGCAATTTTCTCAT
 +
 BCA=8+3?C=A-8A@:ACB?,@;8;@+@*@;C3,8)8C?+9=;2*=+='2A?898*+0%())18)42:?A7B>?':
- at HiMom:1:3:1793:1859/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1859 2:N:0:
 CGATTTTTAAGGACCCCGTGCCTCTGGGGGCCGATGAACTCCACGATGGGACGCACCTGGAGCTCTACCATCAATA
 +
 BB55A9?@>.(7AAAB?3,A>A=A>A6@?>29(434(.'0B?2:?266<2/,91:B9.1)06451//&&78A10,2
- at HiMom:1:3:1793:1898/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:1898 2:N:0:
 CCGGCCAAGCAGGCATGTGTGAATGAACGTGGCCGCTGACTCAGAACAGAGGACATCCCAGGGCCGCAAGCGCGGA
 +
 BB>ABB3=;>&5(1%2=4=552-',37A=,41>1(1',+.37'1,&9/331(/9/'6.+''0,(%,2&(.1,//.(
- at HiMom:1:3:1793:456/2
+ at machine1:HiMom:abcdeACXX:1:3:1793:456 2:N:0:
 TCCATCCACTTCCCTGAGCCTCAGAAAAGGGCAAGGCATGGCTCACATACTCTCAGCCACGGCCTGGCCTGCTGCC
 +
 BBB<ABB at BBBBBB=@@ABB?B5 at 777=;;ABA9A;B?=><BB at 6@AA?B>B9>*>AA9A53?>(%89(.9>;<:(
diff --git a/testdata/net/sf/picard/io/5newline5.txt b/testdata/net/sf/picard/io/5newline5.txt
new file mode 100644
index 0000000..53ff652
--- /dev/null
+++ b/testdata/net/sf/picard/io/5newline5.txt
@@ -0,0 +1,2 @@
+     
+     
\ No newline at end of file
diff --git a/testdata/net/sf/picard/io/empty.txt b/testdata/net/sf/picard/io/empty.txt
new file mode 100644
index 0000000..e69de29
diff --git a/testdata/net/sf/picard/sam/CleanSam/fits_with_deletion.sam b/testdata/net/sf/picard/sam/CleanSam/fits_with_deletion.sam
new file mode 100644
index 0000000..25b7c92
--- /dev/null
+++ b/testdata/net/sf/picard/sam/CleanSam/fits_with_deletion.sam
@@ -0,0 +1,3 @@
+ at HD	VN:1.0	SO:coordinate
+ at SQ	SN:chr1	LN:102
+fits_with_deletion	0	chr1	1	47	91M2D9M	*	0	0	TTCATGCTGANGCNCTCTTACGATCGTACAGATGCAAATATTAACANNCNTTNAAGNNCANNNNNNNNNCAATACAATANTAGAGTACGTNAACACTCCA	&/,&-.1/6/&&)&).)/,&0768)&/.,/874,&.4137572)&/&&,&1-&.0/&&*,&&&&&&&&&&18775799,&16:8775-56256/69::;0
diff --git a/testdata/net/sf/picard/sam/CleanSam/long_trailing_insertion.sam b/testdata/net/sf/picard/sam/CleanSam/long_trailing_insertion.sam
new file mode 100644
index 0000000..6ad740b
--- /dev/null
+++ b/testdata/net/sf/picard/sam/CleanSam/long_trailing_insertion.sam
@@ -0,0 +1,3 @@
+ at HD	VN:1.0	SO:coordinate
+ at SQ	SN:chr1	LN:101
+long_trailing_insertion	0	chr1	3	47	90M10I	*	0	0	TTCATGCTGANGCNCTCTTACGATCGTACAGATGCAAATATTAACANNCNTTNAAGNNCANNNNNNNNNCAATACAATANTAGAGTACGTNAACACTCCA	&/,&-.1/6/&&)&).)/,&0768)&/.,/874,&.4137572)&/&&,&1-&.0/&&*,&&&&&&&&&&18775799,&16:8775-56256/69::;0
diff --git a/testdata/net/sf/picard/sam/CleanSam/overhang_with_deletion.sam b/testdata/net/sf/picard/sam/CleanSam/overhang_with_deletion.sam
new file mode 100644
index 0000000..39bc397
--- /dev/null
+++ b/testdata/net/sf/picard/sam/CleanSam/overhang_with_deletion.sam
@@ -0,0 +1,3 @@
+ at HD	VN:1.0	SO:coordinate
+ at SQ	SN:chr1	LN:101
+overhang_with_deletion	0	chr1	1	47	91M2D9M	*	0	0	TTCATGCTGANGCNCTCTTACGATCGTACAGATGCAAATATTAACANNCNTTNAAGNNCANNNNNNNNNCAATACAATANTAGAGTACGTNAACACTCCA	&/,&-.1/6/&&)&).)/,&0768)&/.,/874,&.4137572)&/&&,&1-&.0/&&*,&&&&&&&&&&18775799,&16:8775-56256/69::;0
diff --git a/testdata/net/sf/picard/sam/CleanSam/simple_fits.sam b/testdata/net/sf/picard/sam/CleanSam/simple_fits.sam
new file mode 100644
index 0000000..d5ff6cb
--- /dev/null
+++ b/testdata/net/sf/picard/sam/CleanSam/simple_fits.sam
@@ -0,0 +1,3 @@
+ at HD	VN:1.0	SO:coordinate
+ at SQ	SN:chr1	LN:101
+simple_fits	0	chr1	2	47	100M	*	0	0	TTCATGCTGANGCNCTCTTACGATCGTACAGATGCAAATATTAACANNCNTTNAAGNNCANNNNNNNNNCAATACAATANTAGAGTACGTNAACACTCCA	&/,&-.1/6/&&)&).)/,&0768)&/.,/874,&.4137572)&/&&,&1-&.0/&&*,&&&&&&&&&&18775799,&16:8775-56256/69::;0
diff --git a/testdata/net/sf/picard/sam/CleanSam/simple_overhang.sam b/testdata/net/sf/picard/sam/CleanSam/simple_overhang.sam
new file mode 100644
index 0000000..3707439
--- /dev/null
+++ b/testdata/net/sf/picard/sam/CleanSam/simple_overhang.sam
@@ -0,0 +1,3 @@
+ at HD	VN:1.0	SO:coordinate
+ at SQ	SN:chr1	LN:101
+simple_overhang	0	chr1	3	47	100M	*	0	0	TTCATGCTGANGCNCTCTTACGATCGTACAGATGCAAATATTAACANNCNTTNAAGNNCANNNNNNNNNCAATACAATANTAGAGTACGTNAACACTCCA	&/,&-.1/6/&&)&).)/,&0768)&/.,/874,&.4137572)&/&&,&1-&.0/&&*,&&&&&&&&&&18775799,&16:8775-56256/69::;0
diff --git a/testdata/net/sf/picard/sam/CleanSam/trailing_insertion.sam b/testdata/net/sf/picard/sam/CleanSam/trailing_insertion.sam
new file mode 100644
index 0000000..987cde4
--- /dev/null
+++ b/testdata/net/sf/picard/sam/CleanSam/trailing_insertion.sam
@@ -0,0 +1,3 @@
+ at HD	VN:1.0	SO:coordinate
+ at SQ	SN:chr1	LN:101
+trailing_insertion	0	chr1	3	47	99M1I	*	0	0	TTCATGCTGANGCNCTCTTACGATCGTACAGATGCAAATATTAACANNCNTTNAAGNNCANNNNNNNNNCAATACAATANTAGAGTACGTNAACACTCCA	&/,&-.1/6/&&)&).)/,&0768)&/.,/874,&.4137572)&/&&,&1-&.0/&&*,&&&&&&&&&&18775799,&16:8775-56256/69::;0
diff --git a/testdata/net/sf/picard/sam/fastq2bam/ok-paired/illumina-sanger_full_range_as_sanger-62.fastq b/testdata/net/sf/picard/sam/fastq2bam/ok-paired/illumina-sanger_full_range_as_sanger-62.fastq
new file mode 100644
index 0000000..21e8837
--- /dev/null
+++ b/testdata/net/sf/picard/sam/fastq2bam/ok-paired/illumina-sanger_full_range_as_sanger-62.fastq
@@ -0,0 +1,4 @@
+ at FAKE0001 Original version has PHRED scores from 93 to 0 inclusive (in that order)
+ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACG
++
+ at ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
\ No newline at end of file
diff --git a/testdata/net/sf/picard/sam/fastq2bam/ok-paired/pair1.txt b/testdata/net/sf/picard/sam/fastq2bam/ok-paired/pair1.txt
index 2842b77..3313312 100644
--- a/testdata/net/sf/picard/sam/fastq2bam/ok-paired/pair1.txt
+++ b/testdata/net/sf/picard/sam/fastq2bam/ok-paired/pair1.txt
@@ -17,4 +17,4 @@ AAAAAAAAAAAAA
 @record:5/1
 AAAAAAAAAAAAA
 +
-1111111111111
+1111111111111
\ No newline at end of file
diff --git a/testdata/net/sf/picard/sam/fastq2bam/ok-paired/s_1_1_sequence.txt b/testdata/net/sf/picard/sam/fastq2bam/ok-paired/s_1_1_sequence.txt
new file mode 100644
index 0000000..08bdd49
--- /dev/null
+++ b/testdata/net/sf/picard/sam/fastq2bam/ok-paired/s_1_1_sequence.txt
@@ -0,0 +1,40 @@
+ at SL-XBG:1:1:4:1663#0/1
+TGGTCTTTCTGATCACAAGAANTATGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1663#0/1
+abbaabbbbbbaaaabb\BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:661#0/1
+TAAAGAAACAATTGAGAAGTGNGATANNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:661#0/1
+Z[^b````aaabbaU^VBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:33#0/1
+GTGGGCAGTCCGTAGATGTGGNGGGGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:33#0/1
+`_aaaaaa_a`aaa`\`aBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:548#0/1
+ATAGAGAGGTAGAGTTTTTTTNGTGANNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:548#0/1
+`bbbbbabb_bbbb_bab`BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:1390#0/1
+CATGTCTGCCTCTTCTGCCAGNGGTCTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1390#0/1
+aa_`^`babaaaa^baabBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:1529#0/1
+CAGTTCAGGGCCAGGCACTCCNGGCCCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1529#0/1
+``a^`a_^TS]aaaaaaaaBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:1223#0/1
+CCTGGTGTTTGCCATTCTCTCNCCTGCNTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1223#0/1
+abbaa^b`babaaaba_bbaBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:972#0/1
+TGGAACCACTGAATGGAGTCGNTCTCANGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:972#0/1
+Tbbabbbbbbbabab_[V_bBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:1877#0/1
+GCACCTGTAATCCCAGCTACTNTGGAGNTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1877#0/1
+abbbababaabaaa^aabaaBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:2003#0/1
+GGCAGATGGACAACGCCTAATNATCACNTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:2003#0/1
+aaa_abbb_Za^abbbba[`BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
\ No newline at end of file
diff --git a/testdata/net/sf/picard/sam/fastq2bam/ok-paired/s_1_2_sequence.txt b/testdata/net/sf/picard/sam/fastq2bam/ok-paired/s_1_2_sequence.txt
new file mode 100644
index 0000000..1179d65
--- /dev/null
+++ b/testdata/net/sf/picard/sam/fastq2bam/ok-paired/s_1_2_sequence.txt
@@ -0,0 +1,41 @@
+
+ at SL-XBG:1:1:4:1663#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1663#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:661#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:661#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:33#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:33#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:548#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:548#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:1390#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1390#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:1529#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1529#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:1223#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1223#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:972#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:972#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:1877#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1877#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:2003#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:2003#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
\ No newline at end of file
diff --git a/testdata/net/sf/picard/sam/fastq2bam/ok-paired/s_1_sequence.txt b/testdata/net/sf/picard/sam/fastq2bam/ok-paired/s_1_sequence.txt
new file mode 100644
index 0000000..a29f542
--- /dev/null
+++ b/testdata/net/sf/picard/sam/fastq2bam/ok-paired/s_1_sequence.txt
@@ -0,0 +1,40 @@
+ at SL-XAP:1:1:0:1171#0/1
+NTGAGGAGGAATCAGATGAAGTGGAGGATAACGACAATGACTCTGAAATGGAGAGGCCTGTAAATAGAGGAGGCAG
++SL-XAP:1:1:0:1171#0/1
+DNUYUPUNUXXYWYSYYSVYVRNSWUUYYYYVTSYYXWPWYVYVYPSRTRNPLTQLUYSFSVXXBBBBBBBBBBBB
+ at SL-XAP:1:1:0:1477#0/1
+NCACTCGTTTATCCATCCTCTCGTTACTGGGTCATGTCATAAGACTGCAGCCATCTTGGAATCATAAGCTCTATCA
++SL-XAP:1:1:0:1477#0/1
+DMWYUSUWVWYUQRSUSUWSWYWVWSYYVVVWNRTWROQUWBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XAP:1:1:0:1733#0/1
+NAGAACGAGCAGTTTGGAAGTTGCTACCAATTTAATACTCAGACTGCTCTTTCTTGTAAAGAAGCTTATGTTTCAT
++SL-XAP:1:1:0:1733#0/1
+DOTWZVRUNUVQV[VQNVRNUTKTZZZXVVY[YTQVXXZZRJQODEOYYYYZBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XAP:1:1:0:1384#0/1
+NAAATTTATACTTTAAATTACCTTCACTGTTCCATCAAATGACCAAGAAAGCAGTCTTGAATTTTTCAATATTCTA
++SL-XAP:1:1:0:1384#0/1
+DP[[[[[[Z[[[[[YZZ[[[Z[[[Z[[XRX[[ZZ[ZXXUVOV[[XTPWUUMXXIXZYTOTQVYYYY[WBBBBBBBB
+ at SL-XAP:1:1:0:528#0/1
+NAGAAATAATATATATCCTATTTCTTAGTAAGCCACCTAGAACAGCAAGAGTGGCTAAAATGAGATGGTGTTCCTT
++SL-XAP:1:1:0:528#0/1
+DOUVXXXXYZ[[[YXY[[YXY[[[[YSLVXURXZZ[[[TBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XAP:1:1:1:408#0/1
+NGCCACTACGCCATGAAGATCCTCAACAAGCAGAAGGTGGTGAATATGAAGCATGTCTAGCACATACTTAACTAGA
++SL-XAP:1:1:1:408#0/1
+DMWYVYWUUQUYYTLSWSVYYYYWVWYWVPBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XAP:1:1:2:1424#0/1
+NTCAAGTTTCATTACTTTCTTAATTTATTTCCTAAATAGGCTGCCATGATGTCTTATGATCTTAAGAATTAACATT
++SL-XAP:1:1:2:1424#0/1
+DO[[VLV[[[[[[[[[[[[[[[[[[[[[[[Y[[ZZZZBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XAP:1:1:2:1419#0/1
+NGATCATAGGCAAGAGCCACCACATCGACCTAGCACTGCTTTNTAACCTGTGCTCTGACCTGCCCCTCCCAAGCAT
++SL-XAP:1:1:2:1419#0/1
+DMWWXWXWURWWURWUUWWWWWXVWSKSWWWWUWWWUKSWXNDPUWWWNEMPSWWUOPVWTOTXWVWBBBBBBBBB
+ at SL-XAP:1:1:2:1872#0/1
+NTATGTACGTAGTCTAGGCCATATGTGTTGGAGATTGAGACTAGTAGGGCTAGTCCCACCGCTGCTTCGCAGGCGG
++SL-XAP:1:1:2:1872#0/1
+DPWWUWXWRWTPUWWSPPTWUWVWSTNUUONUPTWBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XAP:1:1:2:472#0/1
+NATGACTTGTGGGACATCACAGTAGAAGTTGTCCAGTTCATTGGGCCCACAGAAAGGCAGCTGTATGACTAGTATG
++SL-XAP:1:1:2:472#0/1
+DNWVWYYWRVTSSVWVWYYYYVWUUUVSVTRTYWTRVYWVWUNFLTYWBBBBBBBBBBBBBBBBBBBBBBBBBBBB
\ No newline at end of file
diff --git a/testdata/net/sf/picard/sam/fastq2bam/ok-paired/pair1.txt b/testdata/net/sf/picard/sam/fastq2bam/permissive-format/pair1.txt
similarity index 97%
copy from testdata/net/sf/picard/sam/fastq2bam/ok-paired/pair1.txt
copy to testdata/net/sf/picard/sam/fastq2bam/permissive-format/pair1.txt
index 2842b77..6e11bc1 100644
--- a/testdata/net/sf/picard/sam/fastq2bam/ok-paired/pair1.txt
+++ b/testdata/net/sf/picard/sam/fastq2bam/permissive-format/pair1.txt
@@ -2,19 +2,24 @@
 AAAAAAAAAAAAA
 +
 1111111111111
+
 @record:2/1
 AAAAAAAAAAAAA
 +
 1111111111111
 @record:3/1
+
 AAAAAAAAAAAAA
 +
 1111111111111
 @record:4/1
 AAAAAAAAAAAAA
+
 +
 1111111111111
 @record:5/1
 AAAAAAAAAAAAA
 +
+
 1111111111111
+
diff --git a/testdata/net/sf/picard/sam/fastq2bam/permissive-format/pair2.txt b/testdata/net/sf/picard/sam/fastq2bam/permissive-format/pair2.txt
new file mode 100644
index 0000000..e384167
--- /dev/null
+++ b/testdata/net/sf/picard/sam/fastq2bam/permissive-format/pair2.txt
@@ -0,0 +1,28 @@
+ at record:1/2
+CCCCCCCCCCCCC
++
+2222222222222
+ at record:2/2
+CCCCCCCCCCCCC
++
+2222222222222
+
+
+
+
+ at record:3/2
+CCCCCCCCCCCCC
++
+2222222222222
+ at record:4/2
+
+
+
+
+CCCCCCCCCCCCC
++
+2222222222222
+ at record:5/2
+CCCCCCCCCCCCC
++
+2222222222222
diff --git a/testdata/net/sf/picard/sam/fastq2bam/permissive-format/s_1_1_sequence.txt b/testdata/net/sf/picard/sam/fastq2bam/permissive-format/s_1_1_sequence.txt
new file mode 100644
index 0000000..c562875
--- /dev/null
+++ b/testdata/net/sf/picard/sam/fastq2bam/permissive-format/s_1_1_sequence.txt
@@ -0,0 +1,51 @@
+ at SL-XBG:1:1:4:1663#0/1
+TGGTCTTTCTGATCACAAGAANTATGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1663#0/1
+abbaabbbbbbaaaabb\BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+
+ at SL-XBG:1:1:4:661#0/1
+TAAAGAAACAATTGAGAAGTGNGATANNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:661#0/1
+Z[^b````aaabbaU^VBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+
+ at SL-XBG:1:1:4:33#0/1
+GTGGGCAGTCCGTAGATGTGGNGGGGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:33#0/1
+`_aaaaaa_a`aaa`\`aBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+
+ at SL-XBG:1:1:4:548#0/1
+ATAGAGAGGTAGAGTTTTTTTNGTGANNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:548#0/1
+`bbbbbabb_bbbb_bab`BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+
+ at SL-XBG:1:1:4:1390#0/1
+CATGTCTGCCTCTTCTGCCAGNGGTCTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1390#0/1
+aa_`^`babaaaa^baabBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+
+ at SL-XBG:1:1:4:1529#0/1
+CAGTTCAGGGCCAGGCACTCCNGGCCCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1529#0/1
+``a^`a_^TS]aaaaaaaaBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+
+ at SL-XBG:1:1:4:1223#0/1
+CCTGGTGTTTGCCATTCTCTCNCCTGCNTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
+
++SL-XBG:1:1:4:1223#0/1
+abbaa^b`babaaaba_bbaBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:972#0/1
+
+TGGAACCACTGAATGGAGTCGNTCTCANGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:972#0/1
+Tbbabbbbbbbabab_[V_bBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:1877#0/1
+GCACCTGTAATCCCAGCTACTNTGGAGNTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
+
++SL-XBG:1:1:4:1877#0/1
+abbbababaabaaa^aabaaBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:2003#0/1
+GGCAGATGGACAACGCCTAATNATCACNTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
+
+
++SL-XBG:1:1:4:2003#0/1
+aaa_abbb_Za^abbbba[`BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
diff --git a/testdata/net/sf/picard/sam/fastq2bam/permissive-format/s_1_2_sequence.txt b/testdata/net/sf/picard/sam/fastq2bam/permissive-format/s_1_2_sequence.txt
new file mode 100644
index 0000000..a9733bb
--- /dev/null
+++ b/testdata/net/sf/picard/sam/fastq2bam/permissive-format/s_1_2_sequence.txt
@@ -0,0 +1,41 @@
+
+ at SL-XBG:1:1:4:1663#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1663#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:661#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:661#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:33#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:33#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:548#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:548#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:1390#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1390#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:1529#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1529#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:1223#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1223#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:972#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:972#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:1877#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:1877#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XBG:1:1:4:2003#0/2
+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
++SL-XBG:1:1:4:2003#0/2
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
diff --git a/testdata/net/sf/picard/sam/fastq2bam/permissive-format/s_1_sequence.txt b/testdata/net/sf/picard/sam/fastq2bam/permissive-format/s_1_sequence.txt
new file mode 100644
index 0000000..092c393
--- /dev/null
+++ b/testdata/net/sf/picard/sam/fastq2bam/permissive-format/s_1_sequence.txt
@@ -0,0 +1,62 @@
+ at SL-XAP:1:1:0:1171#0/1
+NTGAGGAGGAATCAGATGAAGTGGAGGATAACGACAATGACTCTGAAATGGAGAGGCCTGTAAATAGAGGAGGCAG
++SL-XAP:1:1:0:1171#0/1
+DNUYUPUNUXXYWYSYYSVYVRNSWUUYYYYVTSYYXWPWYVYVYPSRTRNPLTQLUYSFSVXXBBBBBBBBBBBB
+
+
+
+ at SL-XAP:1:1:0:1477#0/1
+NCACTCGTTTATCCATCCTCTCGTTACTGGGTCATGTCATAAGACTGCAGCCATCTTGGAATCATAAGCTCTATCA
++SL-XAP:1:1:0:1477#0/1
+DMWYUSUWVWYUQRSUSUWSWYWVWSYYVVVWNRTWROQUWBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+
+ at SL-XAP:1:1:0:1733#0/1
+NAGAACGAGCAGTTTGGAAGTTGCTACCAATTTAATACTCAGACTGCTCTTTCTTGTAAAGAAGCTTATGTTTCAT
++SL-XAP:1:1:0:1733#0/1
+DOTWZVRUNUVQV[VQNVRNUTKTZZZXVVY[YTQVXXZZRJQODEOYYYYZBBBBBBBBBBBBBBBBBBBBBBBB
+
+
+
+
+
+
+
+ at SL-XAP:1:1:0:1384#0/1
+NAAATTTATACTTTAAATTACCTTCACTGTTCCATCAAATGACCAAGAAAGCAGTCTTGAATTTTTCAATATTCTA
++SL-XAP:1:1:0:1384#0/1
+
+
+DP[[[[[[Z[[[[[YZZ[[[Z[[[Z[[XRX[[ZZ[ZXXUVOV[[XTPWUUMXXIXZYTOTQVYYYY[WBBBBBBBB
+ at SL-XAP:1:1:0:528#0/1
+NAGAAATAATATATATCCTATTTCTTAGTAAGCCACCTAGAACAGCAAGAGTGGCTAAAATGAGATGGTGTTCCTT
++SL-XAP:1:1:0:528#0/1
+
+
+DOUVXXXXYZ[[[YXY[[YXY[[[[YSLVXURXZZ[[[TBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XAP:1:1:1:408#0/1
+NGCCACTACGCCATGAAGATCCTCAACAAGCAGAAGGTGGTGAATATGAAGCATGTCTAGCACATACTTAACTAGA
++SL-XAP:1:1:1:408#0/1
+
+
+
+
+DMWYVYWUUQUYYTLSWSVYYYYWVWYWVPBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XAP:1:1:2:1424#0/1
+NTCAAGTTTCATTACTTTCTTAATTTATTTCCTAAATAGGCTGCCATGATGTCTTATGATCTTAAGAATTAACATT
++SL-XAP:1:1:2:1424#0/1
+DO[[VLV[[[[[[[[[[[[[[[[[[[[[[[Y[[ZZZZBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XAP:1:1:2:1419#0/1
+NGATCATAGGCAAGAGCCACCACATCGACCTAGCACTGCTTTNTAACCTGTGCTCTGACCTGCCCCTCCCAAGCAT
++SL-XAP:1:1:2:1419#0/1
+
+
+
+DMWWXWXWURWWURWUUWWWWWXVWSKSWWWWUWWWUKSWXNDPUWWWNEMPSWWUOPVWTOTXWVWBBBBBBBBB
+ at SL-XAP:1:1:2:1872#0/1
+NTATGTACGTAGTCTAGGCCATATGTGTTGGAGATTGAGACTAGTAGGGCTAGTCCCACCGCTGCTTCGCAGGCGG
++SL-XAP:1:1:2:1872#0/1
+DPWWUWXWRWTPUWWSPPTWUWVWSTNUUONUPTWBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+ at SL-XAP:1:1:2:472#0/1
+NATGACTTGTGGGACATCACAGTAGAAGTTGTCCAGTTCATTGGGCCCACAGAAAGGCAGCTGTATGACTAGTATG
++SL-XAP:1:1:2:472#0/1
+DNWVWYYWRVTSSVWVWYYYYVWUUUVSVTRTYWTRVYWVWUNFLTYWBBBBBBBBBBBBBBBBBBBBBBBBBBBB

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/picard-tools.git



More information about the debian-med-commit mailing list