Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test "test_large_positions" fails when compiled without ncurses support #1162

Closed
cljacobs opened this issue Jan 6, 2020 · 2 comments · Fixed by #1171
Closed

Test "test_large_positions" fails when compiled without ncurses support #1162

cljacobs opened this issue Jan 6, 2020 · 2 comments · Fixed by #1171

Comments

@cljacobs
Copy link

cljacobs commented Jan 6, 2020

When samtools is configured with the --without-ncurses (and similar) flags, it fails a text alignment viewer test; specifically the "test_large_positions" test. I'm not sure this test is even necessary in this configuration, given that the help docs for samtools tview explicitly spell out that it is based on the ncurses library.

Are you using the latest version of samtools and HTSlib? If not, please specify.

Yes. The error occurs during make check for the latest version.

Please describe your environment.

  • OS: Linux 3.10.0-1062.7.1.el7.x86_64
  • machine architecture: x86_64
  • compiler: gcc (GCC) 7.2.0

Please specify the steps taken to generate the issue, the command you are running and the relevant output.

Here are the steps I used to compile. You'll have to set the variable INSTALL_BASE to the desired install base directory (e.g. /usr/local) if you want to rerun as is. I already had an installation of htslib-1.10.2 in the desired location, so I used that instead of the bundled version.

./configure --build='x86_64-redhat-linux-gnu' --without-curses --without-ncurses --without-ncursesw --with-htslib="${INSTALL_BASE}/samtools-1.10.0" --prefix="${INSTALL_BASE}/samtools-1.10.0" CPPFLAGS="-I${INSTALL_BASE}/samtools-1.10.0/include" LDFLAGS="-Wl,-rpath,${INSTALL_BASE}/samtools-1.10.0/lib -L${INSTALL_BASE}/samtools-1.10.0/lib"
make 2>&1 | tee make.log
PATH="${INSTALL_BASE}/samtools-1.10.0/bin${PATH:+:${PATH}}" make --keep-going check 2>&1 | tee check.log

The error can be seen here (snippet from check.log, attached):

test_large_positions:
         /broad/rosenlab_archive/Software/tmp/samtools-1.10/samtools tview -d T -p CHROMOSOME_I:10000000000 /broad/hptmp/bpFK0_Re_K/longref.sam.gz
 
         The outputs stdout differ:
                 /broad/rosenlab_archive/Software/tmp/samtools-1.10/test/large_pos/tview.expected.out
                 /broad/rosenlab_archive/Software/tmp/samtools-1.10/test/large_pos/tview.expected.out.new
 .. failed ...

The full make check log:
check.log

The files that differ can be seen here:
tview.expected.out.txt
tview.expected.out.new.txt

@daviesrob
Copy link
Member

Thanks for the very comprehensive bug report.

I suspect this isn't due to disabling curses, but instead due tview producing a wider output than the test expected. Does COLUMNS=80 make test work correctly?

@cljacobs
Copy link
Author

cljacobs commented Jan 8, 2020

Oh, yes that works. Thanks. You can tell how much I use the tview command, since I just assumed that the extra characters in the test-generated version were a mistake in the interpretation of the command inputs rather than an output viewing-window-size thing.

Still seems odd that this test succeeds in previous versions without the need to the columns variable to be set explicitly (I went back and tested on the same machine with the same configure and build commands), but I'm happy enough just to have at least learned what tview is actually used for.

daviesrob added a commit to daviesrob/samtools that referenced this issue Jan 17, 2020
Fixes samtools#1162 - "test_large_positions" failure due to exported
COLUMNS environment variable with a value other than 80.
jkbonfield pushed a commit that referenced this issue Jan 21, 2020
Fixes #1162 - "test_large_positions" failure due to exported
COLUMNS environment variable with a value other than 80.
rsmz added a commit to GSLBiotech/samtools that referenced this issue Jan 8, 2021
commit d58fc8a16729f25407da6729c440a51140396f4c
Merge: 76877ea 9d4b288
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Tue Sep 22 13:15:55 2020 +0100

    Release 1.11

commit 9d4b2880a07328a4575ebe70265ce958387480fd
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Mon Sep 21 12:16:12 2020 +0100

    Minor NEWS formatting updates

commit 869941a2cf5b6fb8d2ba7412417767585cdfb565
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Wed Sep 16 17:52:24 2020 +0100

    Updated Samtools NEWS based on merged PRs (PR #1245)

    Co-authored-by: Rob Davies <rmd+git@sanger.ac.uk>

commit 3e55af86e818882501d1bb5f67f271ebc5180a76
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Wed Sep 16 11:30:12 2020 +0100

    Rewrite the REF_CACHE manual entry.

    - Be explicit about REF_CACHE and lack of %s rules.

    - Avoid using "single directory" in the description as it's
      potentially confusing.  (It meant a single "path" entry as opposed to
      multiple colon-separated.)

    - Juggle the order a bit so we can give an explicit example after
      describing the seq_cache_populate.pl script.

commit 892c0ba4ba13c623f7a93d264089b1397b36c654
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Wed Sep 16 11:23:12 2020 +0100

    Give the user a hint on REF_CACHE in seq_cache_populate.pl

    See #1312

commit a058b3827be33a37d3f65d4e691e67581b6bd9d7
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Wed Sep 9 10:24:14 2020 +0100

    Make fastq -T cope with B aux tags. (PR #1301)

    Example:

        samtools fastq -T Mm,Ml mod_basecalls.bam

    Where the tag is e.g. Ml:B:C,100,22,44.

commit 07f8d651ab5e38c124c85d15d964226963412125
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Fri Sep 4 13:08:40 2020 +0100

    Generate the CASAVA entry correctly for paired-end reads,
    by only selecting the BC tag value from one of the reads.

commit 778aecb9e88e0d579f0a9a9801e46c8b16292c0b
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Fri Sep 4 10:19:55 2020 +0100

    Stop calling unneeded code.

commit faab8b07bc5b745b513e285eb44cd24f8d255c66
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Thu Aug 27 10:28:58 2020 +0100

    plot-ampliconstats now copes with spaces and slashes in sample names.

    All system() calls are now using the array syntax instead of a
    single string, so any other meta-characters in filenames won't trip
    us up.

    Also the glob <$prefix*.png> is quoted to handle spaces too, although
    it may still be confused by other globbing chars in prefix.

    Finally the use of "die $!" for system has been changed to just "die"
    as the error reported isn't appropriate and gnuplot stderr is all we
    need anyway.

commit 7d9fec0c3a466bd1bc2f1c08de6317fa14f239ab
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Thu Aug 27 11:46:26 2020 +0100

    Fix a memory overflow in samtools merge.

    The htslib ks_resize change exosed a bug in samtools merge where
    copying over a new transformed ID failed to add room for the nul
    string termination byte, but this was included however in the
    subsequent memmove.

commit cc4e1a68fd2a1db668ead3e9c5f01ff35753cb1a
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Mon Aug 17 15:00:58 2020 +0100

    Plot-ampliconstats command line aliasing.

    The general trend for multi-word arguments is with hyphens, but
    plot-ampliconstats used amp_add and depth_max.  Now it recognises both
    those and amp-add and depth-max.  The help has been revised to use the
    latter.

    This now matches the general unix norms.

commit c4efd9060f0e8884a38e495a41e8ccd6a3030568
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Mon Aug 17 14:52:21 2020 +0100

    Untabify plot-ampliconstats

commit e6f08d3c9e0740b0dde38cb414c830e904d11380
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Mon Aug 17 14:38:32 2020 +0100

    More tweaks to the plot-ampliconstats index.html generation.

    - Renamed fn_prefix to fn_base as we use prefix already and it's
      confusing.

    - Added the ability to create .thumb.png images via -thumbnails
      option, although this needs ImageMagick convert too.

    - Thumbnail (visible) size in index.html is now configurable via
      --thumb_size.  Defaults at 200 pixels.

    - Hidden option of -index-only; used mainly for debugging so we can
      keep regenerating index.html without running the rest of the script.

    - Index.html is generated in the same directory as the images
      themselves, via the global $prefix.

          plot-ampliconstats run1234 ampstats.txt

      will create run1234-*.png and index.html in current dir, while

          plot-ampliconstats /tmp/output/run1234 ampstats.txt

      will create /tmp/output/run1234*.png and /tmp/output/index.html.

    - Filenames referred to in index.html will always be relative to that
      path, so we can move the directory without breaking the links.

commit a2e295f0c08401d8dfe60b727af9da5182c2f89a
Author: FredDodd6 <68108916+FredDodd6@users.noreply.github.com>
Date:   Mon Aug 24 12:36:44 2020 +0100

    Update plot-ampliconstats to create index.html (PR #1298)

commit 386e86688160b62fed2c53b2696e714ca19edd6d
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Fri Aug 21 10:44:31 2020 +0100

    Explicitly document that sort -n is incompatible with indexing

    It's a somewhat common neophyte mistake to think "surely I need to
    specify some options" and settle on sorting with -n when in fact
    you're going to index the BAM file and just want the default sort.

commit 9943e81785390776b46e41d0f57ceb5ea6c7c364
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Wed Jul 22 09:44:01 2020 +0100

    Update dates in LICENSE and samtools --version.

commit 6383daaab9c8118f1079034b8a4e7c75f2deb841
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Tue Jul 21 15:01:03 2020 +0100

    Update copyright dates to 2020 where needed.

    With some exclusions for minor changes.

commit 90a8ca436479ea76f3e3962a13285297e1537c49
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Fri Jul 31 10:13:34 2020 +0100

    Improve samtools view error reporting.

    "[main_samview] truncated file" is a staggeringly unhelpful and
    misleading catch-all for something went wrong.

    Knowing precisely what isn't particularly trivial, but the next best
    thing is reporting the system errno as it may at least point the
    finger of blame somewhere sensible.

commit 228133888c08a5d10dc939d62a7a144ccd8da2b1
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Mon Jul 20 19:51:08 2020 +0300

    [stats] Add new GCT section  to stats (PR #1274)

    Adds new GCT section to stats, which shows the distribution of true bases on each
    read cycle. In GCT computation, the bases on the reverse reads are reverse
    complemented, in contrast with GCC where the bases are counted as they appear
    in the SAM output.

commit ae6e2b57ec4f9c537fb39bf863d461c97ab48a0c
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Mon Jul 20 16:39:47 2020 +0100

    Add an options to specifiy index location. (PR #1283)

    These are companion options to --output, specifying the locations of the .fai and (if needed) the .gzi index files.

    As a convenience in indexing mode (so when no region file is specified) --output will be treated the same as --fai-idx.

commit ba462f63e46a441258b3770879feefce82157f7a
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Thu Jul 9 15:09:28 2020 +0100

    Reformat NEWS entry after wording change [trivial]

commit 15c857747ed71abec69ab9a0d04ba911ba9a4ffd
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Fri Jul 3 15:24:15 2020 +0100

    Restore mpileup --output-MQ --output-BP column ordering

    PR #1073 (which landed in 1.10) moved the MAPQ column to its natural
    position amongst the other --output-extra SAM columns, and hence
    inadvertently changed the ordering of these two previously-existing
    optional columns from that of previous samtools releases.

    Restore the documented expected output format by making `--output-MQ`
    and `--output-extra MAPQ` control two separate mapping quality columns,
    each appearing in its expected position in the column ordering.

    Make this look sensible :-) by changing `--output-extra MAPQ` to show
    comma-separated numeric MAPQs, like the other --output-extra columns.

    Clarify the mpileup format documentation's description of these extra
    columns and their ordering; -s/--output-MQ is no longer equivalent to
    --output-extra MAPQ.

    Restore the previous a17.out expected `mpileup -sO` output.

commit 8796aa507d82e3ac80e9001fbff25ff976c6ca24
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Mon Jun 15 12:09:40 2020 +0100

    Delete MD and NM tags unless asked not to.

    MD and NM tags contents are wrong after clipping so delete them
    by default.  Add --keep-tag option to disable this and preserve
    the old tags.

commit 7197d97243c038d688a3438732700dc4f3e486db
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Tue Jun 2 17:08:05 2020 +0100

    Option to add OA tags.

commit 09abe04bbc49b98d532adb32d50422e4cad25795
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Tue Jul 7 17:50:00 2020 +0300

    Fix samtools coverage help message and quality option usage. (PR #1279)

    The -q/-Q options were inconsistent between the manual page,
    the online help and what they actually did.  This makes
    all three consistent and makes them work the same way as
    in mpileup.

commit b08a440106e56f30382775a92c19fff1c9470c9a
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Tue Jun 30 17:25:27 2020 +0100

    Allow "tview -w INT" to work on html too.

    [Rebases, so fixes #1280 for auto-close.]

commit 3080f6cf38a84ba247e4e0356f7d625bf9e083c6
Author: Petr Danecek <pd3@sanger.ac.uk>
Date:   Mon Jun 29 15:59:49 2020 +0100

    Add -w option to allow wider window with -d T

commit 3156beac615754e6f8811b0aec49539aae5875a3
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Wed May 27 15:42:20 2020 +0100

    Rebase, refactor, increase the base quality threshold to 1.

    Add unit tests.
    Update the documentation and the NEWS.

commit aa944e9faba856fea1fcc1d6fcaab7c5809298de
Author: Teng Li <707704459@qq.com>
Date:   Fri May 8 15:57:23 2020 +0800

    Add bam_mplp_init_overlaps func to insure an overlap pair reads should be

    counted as 1 depth unit not 2 units. The depth result will be same as with
    picard CollectWgsMetrics and samtools mpileup.

    Add -s option to control the overlap pair read depth count unit.

commit 70cf29fe246bd8911de7038e96d14b280db1b9d7
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Tue Jun 23 15:07:15 2020 +0100

    Add -u option to various samtools commands. (PR #1265)

    Enables uncompressed output, useful when writing to pipes.

commit 65c8721f2c6c97a14ea8e78adbb400d7cdc892d0
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Mon Jun 8 11:34:45 2020 +0100

    Added VDEPTH section.

    This is the "valid" depth, computed as per the the tdepth plots.
    Valid here means full-length coverage across the template, and is
    listed in the plots as "usable depth".  (It could also be considered
    to be the minimum depth across the amplicon.)

    Also fixed old calculation of FDEPTH/CDEPTH when reads extend beyond
    the inner-most primer locations. This was observed in an ONT run where
    the average depth was larger than the number of reads (obviously
    incorrect), due to the run not having the 3' primers trimmed.

    Plus the combined tdepth plot is now created in plot-ampliconstats.

commit 5425807c3f4661146fd44ce65604969c2c655963
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Thu Jun 4 16:16:13 2020 +0100

    Added two new output types to ampliconstats / plot.

    FDP_ALL and FDP_VALID are depth plots per base loci, rather than per
    amplicon.  This permits more traditional depth plots and it also
    allows us to see the difference between half depth because only the
    left-primer reads are present vs half depth because we just have half
    coverage as many left/right primer reads as hoped for.

    The depth plots are run-length encoded, merging values within +/- 1% of
    each other.  This has approximately 50 fold reduction in depth data
    size.  (Gnuplot can plot this RLE data directly.)

    Also fixed $prefix-combined-tdepth so it isn't reproduced once for
    every file.

commit f077f5883c3a1d4329d4d9bb45de9956eba55e53
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Thu May 21 18:44:11 2020 +0100

    Plot-ampliconstats improvements

    - The combined-reads plot now has the same Y scale as the auto-scaled
      per-file plot.

      Also to facilitate getting identical plots across runs which may
      auto-scale differently the scale can be forcibly set on the command
      line with e.g. "-depth_max 100000".

    - Fixed plot-ampliconstats issue with filenames starting with E.

      A bizarre one, but the first (and only the first) line in the data
      block following an 'split "-" ...' command musn't start with e or E
      otherwise it's treated as "end" and generates complaints about an
      empty plot.

      Discovered while testing ERR4018422. The solution is to use quotes.

    - Added a "tsize" plot.

      This is using the same data as the tcoord one, but rather than showing
      template position vs frequency it is position vs size; much like the
      Gap5 template display.

      It could do with improvements in colour selection.  Colour is used to
      show the frequency, so we can easily see when a specific length occurs
      many times.  There is also a little bit of jitter so the lines don't
      perfectly superimpose.

commit fa95dd51a95d7bf978714106f99946bdb69553e3
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Wed May 20 12:47:13 2020 +0100

    Samtools ampliconstats updates.

    - Additional error checking for bed file.
      Earlier fix for the same issue solved in #1250.

    - Record reference length in ampliconstats output.

      This is then used in plot-ampliconstats so that the tcoord graphs are
      all the same size irrespective of whether they miss amplicons at the
      start or end.

    - Ampliconstats: Add TCOORD numbers for unknown amplicons.

      That is where neither end matches a known primer, we still record it
      so it can be plotted in the tcoord.png files.

    - Fixed ampliconstats primer assignment for single-ended runs.

      Tested on a standard ONT and PacBio run and the effect is minimal
      (marginally better, but not consequential).  However it really helps
      on our local SMARTSeq data.

      If necessary we can add a --smart option, but this seems to be an
      appropriate fix.

    -  Added ampliconstats -b (binning) option.

      It bins the template start,end coordinates so that more variable
      starting/end coordinates can be clustered slightly before frequency
      counting.  Affects the TCOORD lines only.

      Bins are computed by aggregating infrequent coordinates into the
      frequent ones that are within +/- bin/2 on both start and end
      coordinates.

commit 29e0aa7f3803925cf24477615b5c19885685ba13
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Tue Jun 2 23:12:02 2020 +0100

    Typo fixes [minor]

    List Nicholas only once. Fix __cplusplus spelling (though this would
    only make a difference if tmp_file.h was copied into a C++ project).

commit b298f2909dcc9aab42d54117d24cb3711cc1d745
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Mon May 18 15:58:41 2020 +0100

    Allow depth to display 0 coverage on files with no reads.

commit 051c2e512b0a93df8ffa90b1ebf9cff9a454b46e
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Tue May 19 14:46:15 2020 +0100

    Prevent a couple of buffer overflows that might occur when the amplicon

    length is larger than expected.

commit e1028397ef8a45b9d7d059d7c1f5e79d50622ace
Merge: 88ccfa2 eff48be
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Tue May 19 11:44:30 2020 +0100

    Merge more ampliconstats improvements (PR #1236)

    Modified test to fix the set of input files instead of using
    a wlidcard.

commit 88ccfa2d4d77070b2e9979570cd679658664135f
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Thu May 14 11:25:50 2020 +0100

    Added tests and tweaked documentation.

commit 3d0321d1873e04d86a9a834ccde16d6a52f930bb
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Wed May 13 16:04:25 2020 +0100

    Add filter and fail marking options.

    Filter or fail by minimum match length option.
    Write filtered reads to a file.
    Filter out QCFAIL or unmapped reads.

commit cbd81e3c4381915ef490b85eb6cd8935dad2c095
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Thu May 14 17:20:04 2020 +0100

    Mention BAI chromosome length limit in samtools index man page (PR #1248)

commit 660268d7c24649e1a1bbe92c545cd64e7633579f
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Wed May 13 13:43:48 2020 +0100

    Allow bedcov to read space separated BED files.

commit 6616854bf46996fcc541e1ccf40387abe9dab58a
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Wed May 13 14:23:29 2020 +0100

    Fix > vs >= in samtools depth man page.

    Fixes #1243

commit eff48be06eb4f580911f60a5386898e01f249f34
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Wed May 13 12:23:15 2020 +0100

    Fixes TODO in previous commit.

    We use gnuplot variables so we can write the data as we parse the
    stats file, and put the plotting code after it instead of before it.

    That then means we can derive the max_range value from the data, using
    the gnuplot "stats" command.

commit bbb74d5f55da2469adf29d315372b8ce34f5200f
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Wed May 13 11:37:51 2020 +0100

    Autoscale read count/depth plots.

    The minimum value is now always 1, for consistency across all plots.
    We also compute the maximum depth for any file and use that (rounded
    up) for all plots.  This ensures easy comparison between figures in
    the same run.

    Note we still can't do this for the combined-reads.png file unless we
    rejig the ordering of the code as the gnuplot script for that is
    emitted as it parses, so we don't know the maximum until it's too
    late.

    (TODO: Possibly we could store the data in a gnuplot variable, still
    writing as we go, and have the plot lines at the end instead of start
    of the gnuplot file.)

commit cf35fdbd58ce04179bda4ec52625827aec8473e0
Author: Shane McCarthy <sm15@sanger.ac.uk>
Date:   Wed May 13 09:58:14 2020 +0100

    Improvements to ampliconstats help message.

    Also added --output as a long option for -o.

commit 12c51fbf15804dad390551c27967ccc105c1becc
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Tue May 12 11:04:30 2020 +0100

    Added simple ampliconstats test.

    Minimal test, but sufficiently hopefully to spot major regressions.
    Also fixed the CREADS\tSTDDEV line to use double arithmetic, as the
    integer version could sometimes generate "nan" results.

commit 9a7bfd990da39159350a25a326a70f69d40ce0df
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Tue May 5 17:59:33 2020 +0100

    Improve ampliconstats when dealing with single-ended data.

    We no longer use TLEN to work out the template length.  Instead we
    just look at the right hand end of the sequence and assume it was full
    length.  (If not, by more than pos-margin, then it'll be classified in
    the unknown category.)

commit 4867d1b95ba0cbc3009d53b47a7a6ba98a765948
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Tue May 5 17:45:58 2020 +0100

    Improved robustness of plot-ampliconstats.

    When we fail to allocate any reads to amplicons we no longer create a
    broken gnuplot script for $prefix-combined-tcoord.

commit 4778e907c1aeae6ffe11b9bef1a53564404a1330
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Tue May 5 15:36:58 2020 +0100

    Added FTCOORD/CTCOORD ampliconstats plots.

    This also needed amending the stats to record the status (OK,
    spanning, unknown) so we can colour accordingly.

commit 202ba4cf53a7a8151a04ca53a3fc7bbe3a43d078
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Mon May 4 16:55:59 2020 +0100

    Reorder ampliconstats output.

    The SS field is once again the first data.  This meant moving the
    bed2amplicon conversion later and creating a simple amplicon count
    function.

commit ea40305fd9b57c52b4fbcfa6964e6bc61f193e1b
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Mon May 4 14:30:40 2020 +0100

    Change ampliconstats TLEN to TCOORD.

    The original TLEN was rather unwieldy, being a non-sparse array of
    2000 lengths as a histogram.  This is unwieldy and unscalable, but
    also not actually that useful.  We also didn't have anything that
    plotted it.

    Length alone isn't as helpful as (start,end) tuples as the latter
    permits us to marry them up to LEFT/RIGHT primer pairs, possibly
    permitting QC on which primers work and which are just potential for
    causing more problem than they're worth.

    The new code uses a hash table so it can cope with any length.

commit 9439c5323e391e9143129d2c753c26aefbeafb02
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Mon May 4 10:28:29 2020 +0100

    Ampliconstats improvements.

    - Add samtools version and command line arguments to ampliconstats output.

    - Added AMPLICON section to ampliconstats.

      This is a reformatting of the BED file to show left/right primer
      locations, comma separated if alt primers are present.  This will
      permit us to improve plots, eg to superimpose an alternately shaded
      background to a template start/end (length) style plot.

    - Made MAX_AMP_LEN user configurable.

      We still have a fixed MAX_TLEN, so long amplicons may mean we can't
      properly report long template sizes.  Maybe it should default to
      double amplicon length and be configurable too?

      However I think the TLEN part needs a bit overhaul anyway.  It's
      bloaty and ideally instead of a large array we'd use a sparse array
      representation showing any length observed more than X times.  This
      would permit better plotting of the template size distributon without
      bloating the file with big arrays or with noise. (TODO)

    Fixes #1234

commit 557cdd538faa2b505747440e427fdc006c248ce4
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Mon May 4 10:15:12 2020 +0100

    Change ampliconstats default flags to B04.

    We had DUP in there too for filtering, which is wrong, but for some
    reason none of our files had DUP set anyway so the mistake slipped by.

commit 7fb80f7af13880dad5e4d29590551cd8330b68b1
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Wed May 6 10:38:11 2020 +0100

    Fix no argument ampliconstats run on MinGW consoles.

commit f5c028b3b6ace1a77a6a9957e3d1b94e69d0e167
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Sun May 10 17:28:52 2020 +0100

    Remove inadvertently committed test output [trivial]

commit 89760c1f25469553c31b30fdf0142d5a4038689c
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Wed May 6 16:27:44 2020 +0100

    Add documentation and both ends clipping to ampliconclip (PR #1231)

    Added option to clip both ends.

    Added man pages and tests.

    Fixed bug where l_data wasn't set properly when a read was
    completely hard clipped, leading to aux tag strangeness.

    Stopped trim functions from returning failure when all bases
    were clipped away, causing the program to exit without an
    error message.

commit 3f109d9d9336b955e0a31dae0b0103b5f21b673a
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Thu Apr 30 13:33:22 2020 +0100

    Fix amplicon_stats.o & bam_ampliconclip.o Makefile dependencies

    amplicon_stats.c does not (currently) use hfile.h facilities.

commit 7831883d1389a0627829aac5bd8173d1c2e25e30
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Thu Apr 30 13:00:38 2020 +0100

    Added ampliconstats sub-command and associated plot-ampliconstats script. (PR #1227)

    This is experimental, but functional.
    It currently misses the tests.

    Further ideas to consider adding:

    - Add amplicon location data into the stats file so we can parse it
      during plot generation.

    - Split metrics into LEFT and RIGHT primers, so we can better show
      one end being absent (eg RIGHT has skipped a primer).

    - Plot template start..end as line (X axis) and frequency (Y axis).
      This could identify which primers are used and in what prorportion
      when alts are available.  It's also a visual identification of
      mispriming.
      Colour by pool (eg alternating) and validity (wrong length).

    - Generate a web page, possibly with tooltips and SVG instead?

    - Improved auto-scaling, plus support for X pagination as well as Y
      pagination if we ever get to larger amplicon pools.  (It struggles
      already with 160.)

commit 586db01ec68f8b35866793684ab1d0480f0e21e3
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Fri Apr 24 12:28:30 2020 +0100

    Make bam_fillmd1_core skip alignment records with no sequence

    Add reporting for when this happens.

    Update manual page to explain that records with no sequence
    will be skipped.

commit f8aad99ea836ed2360f0fa427580e6d0d87a4380
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Fri Apr 24 11:24:04 2020 +0100

    Add bam_fillmd1_core() error checking

    Catch and report kstring and bam_aux update failures.

    Prevent possible out-of-bounds reads and writes to seq.

    Fix potential negative array index on seq_nt16_table for platforms
    where char is signed.

commit af515aa25db48c9da3729a75b30fb97f54ebb565
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Fri Apr 24 09:49:53 2020 +0100

    Remove calloc from bam_fillmd1_core

    By moving kstring_t str to the stack.

commit 8bb5672355ddd6c2431def9127cfa536ad5611b6
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Fri Apr 24 09:40:29 2020 +0100

    Replace one-letter variable names for easier maintenance

commit 3389c09845c5915ed53227d7f5443818a95f5995
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Tue Apr 14 15:34:40 2020 +0100

    Documentation formatting fixes [trivial] (PR #1224)

    .TS/.TE table rows are delimited (by default) with actual tabs.
    Man2fhtml converts to HTML one line at a time, so works best when
    sequences of \fB...\fR font escapes are kept within a single line.

commit 3c4b38015e117bdd17c2cd6756923f6eeba76e13
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Thu Apr 9 17:49:12 2020 +0100

    Add samtools ampliconclip (PR #1219)

    Clips the 5' end of reads based on values in a bed file.
    This is useful for amplicon sequencing experiments, where
    the first few bases sequenced come from the PCR primer
    used, and not from the sample of interest.

    Applied clipping can be soft (default) or hard.
    Unclipped reads can be written out as normal, or
    optionally filtered or have their QCFAIL flag set.

    Writes some basic stats on number of reads clipped either
    to a file, or stderr (default).

    As clipping may move the start point of some reads, the
    sort order in the header is set to "unknown" if it previously
    was "coordinate".

    Note that this is a work-in-progress.  It does not try to
    adjust MD tags after clipping, and insert sizes will be
    slightly incorrect.  To fix them, pass the output
    through calmd and fixmate.

    Co-authored-by: Rob Davies <rmd+git@sanger.ac.uk>

commit 189b5543d66b50e98e81173fc75c1d3a33febf3d
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Fri Mar 27 17:04:06 2020 +0000

    Add depth threshold option -d.

commit d3a9fcf655e12ab8641d26e8a075236a41d65364
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Fri Mar 27 11:02:25 2020 +0000

    Add alignment filtering options -g and -G to bedcov, similar to depth.

commit be11d383416a18ceae06e342f861665a0f3554b2
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Tue Mar 24 15:27:37 2020 +0000

    Reset skip counter for each file.

commit 01ef23de887a2e6ce1bbcdfda9849dab92f0d57a
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Thu Mar 19 10:43:40 2020 +0000

    Fix "value ... exceeds maximum object size" warning

    Warning is due to gcc deciding `g->max_bases * 2` could
    overflow.  Fix by casting to `size_t` to prived an extra bit.

commit 2e4d43a68dd87affd7299c29065e56c862a92601
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Wed Mar 11 19:37:17 2020 +0500

    Avoid calling fclose() on stdout (PR #1208)

    Only call fclose() when output has been redirected away from stdout.
    For stdout, do use fflush() instead so that previous write failures
    are still reported.

    (Leaving stdout open facilitates wrappers such as pysam that call
    samtools's main() and/or main_depth() as a subroutine.)

commit 988f9e190a0919886b21a29c3f6ab9efc3f528da
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Wed Mar 11 11:54:35 2020 +0000

    Further fixes to samtools coverage.

    - The last covered reference could have the coverage line omitted.

    - Removed uninitialised memory access on empty files (tid never set).

    - Avoid division by zero bug when asking for a bogus region of "*".

    - No longer crashes when specifying a missing file.

commit a6aa1e95caac1a9c06d76a340d069b8fb860b009
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Fri Mar 6 08:59:25 2020 +0000

    Fix stats collection.

commit 18b6bab90d271707c4df1af46fb0251f43022d9e
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Tue Mar 3 16:57:03 2020 +0000

    Expanded samtools fastq documentation.

    Addresses additional comment raised in PR #887

commit 618fac0fed86f8afe35f74494f69a582530cd903
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Thu Feb 27 11:53:24 2020 +0000

    Fix the CIGAR op number arithmetic, in order to prevent overflow
    due to implicit conversion to unsigned int.

commit df653349a8ed4948885beb97de62bb7c505e4ec4
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Wed Feb 19 09:00:25 2020 +0000

    Document the use of ##idx##.

    This is for specifying the index format used by --write-index, but
    I've also added it to the opening description as it doesn't appear to
    be documented elsewhere except for one specific subcommand (view).

    Fixes #1196

commit 6e6d5f96c12d0cc8b7af39be93466ba4f9c67d94
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Fri Aug 9 11:19:06 2019 +0100

    Added the ability to sort unmapped data by minhash.

    This has the effect of clumping similar sequences together, improving
    the efficiency of LZ based compression methods.  This is extremely
    simplistic with a single kmer and no assembly of minhashes into
    contigs.  Hence it's not going to achieve ratios like Minicom (which
    uses sketches), but it is fast, uses minimal memory and is achievable
    as part of "samtools sort".

    Credit for ideas also go to Tony Cox from Illumina.

    Some stats on SRR445724.fastq (as unaligned SAM):

                bpb         ctime   dtime
    Spring      0.4041      1986    374     (tested on seq3, -q bsc -i)
    CRAM        1.9494         ?      ?     (default CRAM)
    CRAM-M20    0.6306       148     26     (dtime from view -c -@8)
    "+Z7s100k   0.5055       677     27     (archive mode for V3.0)
    v31-small   0.5017      +498     46     (scramble -V3.1 -Xsmall -s100000 -Z -7 -t8)

    Total file sizes:
    -rw-r--r-- 1 jkb team117 3214122305 Aug 14 15:27 /tmp/_1.cram (orig)
    -rw-r--r-- 1 jkb team117 2611100075 Aug 14 15:30 /tmp/_2.cram (minhash20)
    -rw-r--r-- 1 jkb team117 2404005175 Aug 14 15:44 /tmp/_3.cram ("+Z7s100k)
    -rw-r--r-- 1 jkb team117 2090644964 Aug 14 16:21 /tmp/_4.cram (V3.1 small)
    -rw-r--r-- 1 jkb team117 2004008960 Aug 14 16:52 SRR445724.spring

    Not super compression unless we engage slow modes, but a big win for
    not much CPU expenditure.

    This also updates the sort-sorter (SO) sub-sort field to
    "coordinate:minhash".  This is because the bulk of the data is
    coordinate sorted, but the unaligned data (still essentially
    coordinate sorted, albeit to the same zero coordinate) is then sorted
    by minhash.

commit 4fc76fecdd955e808d90ac8e8bf5e22b26367bde
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Wed Feb 12 09:54:42 2020 +0000

    Fix documentation and help string for addreplacerg.

commit a6a160bba842d6afc3da061a8aa4f199fd7b729b
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Wed Feb 5 12:16:48 2020 +0000

    Add more explanation on remote fasta files to samtools view docs

commit 451834d03bc4107519cffc058867c001bcd16139
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Mon Jan 20 12:02:09 2020 +0000

    Use the new method `fai_path` to retrieve the name of a FAI file.

    Minor refactoring.
    Add NEWS and clarify documentation.

commit 616f2c3e91d377621b8004352f1e78acf43f7973
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Mon Feb 3 12:04:13 2020 +0000

    Delete the "samtools import" subcommand.

    This was deleted from the help / usage statements in 2009 (cc207d8)
    between 0.1.5 and 0.1.6.  Thus it has never been a documented command
    since the official launch of Samtools.

    Import was just a wrapper around view, but the wrapper broke when we
    added PG headers.  While a fix is trivial, this PR simply removes the
    dead and untested code instead.

    Fixes #1183 in as far as turning the segmentation fault into a handled
    usage error instead.

commit f4346b11d5fe8ef7f43bc221b8f4206f3032c8c5
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Tue Feb 4 14:00:53 2020 +0000

    Convert remaining samtools code to use HTSlib API directly

    Several functions actually used in samtools were still written using
    the legacy bam.h API. Convert them to use HTSlib directly:

    * bam_remove_B(), used in sam_view.c. (Of the other functions in bam.c,
      only bam_get_library() is used in samtools.)

    * bam_aux_drop_other(), used in bam_md.c to implement the undocumented
      `calmd -d` option. This function's functionality may be a candidate
      for adding via a new HTSlib API function.

    * bam_color.c functions, used in bam_tview.c. As there are no legacy
      functions also defined in bam_color.c, also converted the #includes
      (and Makefile dependencies) to include HTSlib headers directly.

commit 20c72f15c4512b62efa144ea90c746c376f7da39
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Mon Jan 27 13:47:55 2020 +0000

    Spelling corrections [minor]

    Corrections in manual pages and other documentation read by end-users.

commit 383a31b27196396f67fbaedec29a6f96d54a65c1
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Thu Jan 23 15:36:55 2020 +0000

    Fix target_count size and value. (PR #1174)

    Make `bases inside the target` work correctly with long references.

    Use the reference length to get the correct end point for
    open-ended target regions.

commit db7681cc8b7e7484d12d73dcd556ea62510edd7d
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Thu Jan 16 18:17:28 2020 +0000

    Make hts_with_curses.m4 test if -ltinfo is needed for linking

    Some symbols for ncurses (and possibly others) actually come from
    libtinfo. Normally it's arranged that these are included when
    linking just with -lncurses, but this can break down in some cases
    (when the --no-add-needed linker option is used, and libncurses.so
    is a link to the real library instead of a linker script that
    adds the missing -ltinfo).

    To make the tests in ax_with_curses.m4 resistant to this problem,
    add a test to see if -ltinfo is needed to get the cbreak() symbol,
    which is one of the ones affected.  If it is, -ltinfo gets appended
    to CURSES_LIB.

commit 8d705343729c2120d3daa2d6e11be21b37f4d8ab
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Thu Jan 16 18:01:55 2020 +0000

    Add #ifdef check for KEY_RESIZE

    It appears to be an ncurses feature, so may not be present on
    other versions.

commit 0c4c43c76d0113659ed348788001c0897ec9bed1
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Thu Jan 16 17:28:07 2020 +0000

    Add location for ncursesw-compatible header on Illumos

    Illumos installs the same library for both ncurses and ncursesw,
    and only has one copy of the include files (in
    /usr/include/ncurses).

commit 2a8d57b3222b2227b440262fe53549b796d98209
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Thu Jan 16 15:31:57 2020 +0000

    Improve autoconf curses tests

    * Pull duplicated AC_LINK_IFELSE tests into new macros

    * Stop testing for header files when a suitable one has been found.

    * Check that the headers work before deciding to use a curses
      library.  This fixes occasional failures to get a working
      curses when (say) both ncursesw and ncurses libraries are
      present, but the ncursesw headers don't work for some reason.

commit 0a00cbd24d7558e2e22d90bce99bd6c2e5609ee2
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Wed Jan 15 14:29:16 2020 +0000

    Rename AX_WITH_CURSES to HTS_WITH_CURSES

    In anticipation of divergence from the version in autoconf-archive.

commit acf411a3cf83d96c085a44f580d0912fb020b5f0
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Fri Jan 17 11:06:25 2020 +0000

    Ensure tview test prints the correct number of columns

    Fixes #1162 - "test_large_positions" failure due to exported
    COLUMNS environment variable with a value other than 80.

commit dcb0b2aa50157ed3e5296e47b39c0b76f0d332a6
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Wed Jan 15 14:02:56 2020 +0000

    Fix Illumos build: autoconfiscate @AWK@, other miscellanea (PR #1165)

    Fix the build on OpenIndiana with Sun Studio 12. The main problem is
    a substandard awk implementation, which we avoid by using AC_PROG_AWK
    so we instead get nawk on Illumos. This is propagated through the build
    infrastructure, and test/mpileup/regression.sh sets $awk accordingly and
    test/mpileup/*.reg invoke awk via $awk. Hat tip @jkbonfield for the latter.

    Also misc/ace2sam needs to pull in kstring.o on this platform, so link it
    against libhts.

    Also Illumos doesn't have the TIOCGWINSZ ioctl, so conditionalise its
    use via #ifdef. Disabling this code leads to a similar effect to the
    ioctl() call failing, so still leads to columns being handled sensibly.

    Fixes #653. As noted on PRs #654 and #663, at least on OpenIndiana
    you may need to configure --without-ncursesw.

commit c245ae48dcd0b9cd27eb4ac6206ce2880d609369
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Wed Jan 15 12:42:23 2020 +0000

    Add dict -A/--alias option to add AN by adding/removing 'chr' (PR #1164)

    New option for the 'dict' command that produces a first draft
    of AN alternative names for the reference sequences. Two long options
    are provided: --alias for succinctness; --alternative-name as that
    is the term used in the SAM specification.

commit b034693d30d67c1147aa7f3a76c366ed16726e41
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Wed Jan 15 12:33:05 2020 +0000

    Add option (-J) to include deletions in depth computation. (PR #1163)

commit 5ca6ee27c0b99bcdb3b4e7706b1d0d3971b3b638
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Tue Jan 14 12:20:05 2020 +0000

    Document that fixmate / markdup need name collated, not name sorted data.

commit a2916aaa1e60d0845b80c282039cefc3d468ab80
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Tue Jan 7 17:12:50 2020 +0000

    Updated SAM.gz indexing documentation.

commit 2dd125d11422d8e54dc875f3c30c7a254b619ba5
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Thu Dec 12 11:59:40 2019 +0000

    Update man page introduction to reflect modern samtools

commit d1bc74ae2dd325b896db9e61203c5fb9bc3f51c1
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Wed Dec 11 17:05:00 2019 +0000

    Added -@, --threads option to various manual pages.

commit b6097a366db2cb0070625b0d2e00a667110582a1
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Wed Dec 11 16:40:41 2019 +0000

    Added man page for samtools coverage sub-command.

commit 9813dbf1c007039cf07edb6240808e74be336d5c
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Wed Dec 11 15:06:12 2019 +0000

    Reshuffle main man page ordering.

    It seemed rather arbitrary before, neither sorted alphabetically nor
    grouping by related function (eg fixmates + markdup, sort +
    collate, merge + split).

    Also added a few more entries to the SYNOPSIS section which had
    commands described, but missing from the summary:  calmd, reheader,
    targetcut, phase and cut.

commit 80395dc75cbe1cd06d9066b349c0488f8ade6874
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Tue Jan 7 12:46:17 2020 +0000

    Better length estimation. (PR #1161)

    Change how optical duplicates get factored in.

    Makes result closer to the one given by Picard MarkDuplicates.

commit 519e90d6f5dfaa4ceee17c41569b8f2b1de74d6e
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Wed Dec 18 11:05:02 2019 +0000

    Add unit test for merging with a BED file.

commit 5b27a0c3a7dac2fb252a13101dc47a7b01ec12b9
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Thu Dec 12 11:16:03 2019 +0000

    Add BED file interface for merge.

commit 7f446caffc1b932ce6e6e182d0b9205584d2f5f5
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Fri Jan 3 10:20:08 2020 +0000

    Limit memory use on sort tests

    So that the test harness is less likely to run out of memory on
    small virtual machines.  The files being sorted are small so
    there's no need for the 768Mbytes per thread that sort usually
    requests.  With this change the minimum memory needed to complete
    all the current tests on Linux x86_64 reduces from 2Gbytes to
    about 600M.

commit 77a4a014ca1582766b5c0a63412412a264871e44
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Tue Dec 10 12:39:03 2019 +0000

    Use hts_srand48() rather than srand48()

    Since PR samtools/htslib#1002, on OpenBSD hts_srand48() calls
    srand48_deterministic() so that the same sequence of pseudo-random
    numbers is set up as on other platforms. This resolves test suite
    failures in which OpenBSD was producing differently-renamed reference
    sequences when testing `samtools merge -c -p`.

commit a42029e21345c35ee0d8aad80f7e9145d9d6bfce
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Tue Dec 3 11:26:52 2019 +0000

    Prevent shell brace expansion in this complex awk expression

    This test case was failing on OpenBSD because ksh considers
    `{gsub(/[=,BLAH,BLAH,BLAH,"",$8);print}` to be subject to brace
    expansion. Adding spaces so that `{` and `}` are in separate words
    (as seen by the shell) prevents this.

commit c62a0f17d653eda418e4795f9b33b5e794d02a4e
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Thu Nov 14 15:11:59 2019 +0000

    Added new tests for optical duplicates.

    Also including tests of optional tagging and QC failed reads.

commit c5b7134c01d6db6eddcb7c9cb4e07052e31670af
Merge: 79eecf6 76877ea
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Fri Dec 6 16:43:19 2019 +0000

    Merge version number bump and NEWS file from master

commit 76877ea4e41cd9d9a7f045307485535c7da7422b
Merge: b24d812 79eecf6
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Fri Dec 6 16:40:42 2019 +0000

    Release 1.10

commit 79eecf6c405d8b36d26e19d411753040ba1cd185
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Fri Dec 6 16:31:18 2019 +0000

    Fix invalid memory access in tv_win_goto()

    When pressing enter in an empty goto box

commit 6fe0285a077e4ba681239746966a3a666ae34969
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Fri Dec 6 11:55:00 2019 +0000

    Fix header file for `strcasecmp`.

commit 064361aa8a6751af88795110bd2dc656b5c53284
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Mon Dec 2 09:57:59 2019 +0000

    Add on-the-fly indexing for samtools sort

    For some reason this one was missed when the feature was
    added for other sub-commands.  This adds it for position
    sorted files (a warning is printed and the option ignored
    if sorting by name or aux tag).

commit 7d08dc88df37711b4ae781d9ed54087bf1997aeb
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Mon Dec 2 09:53:33 2019 +0000

    Update NEWS to mention SAM speed & threading.

commit 4c82d2ced75ee1b8d915e8976c3b120df3d4e3c5
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Tue Nov 26 17:12:59 2019 +0000

    Fix ks_radixsort() on x86_64 gcc 4.4.7 -O2

    To store tid and pos in the minimum number of bytes, ks_radixsort()
    called u64_to_le(pos) then u32_to_le(tid) with possibly-overlapping
    destination pointers.  On x86, these turn into simple (possibly
    unaligned) casts.  With optimisation turned on, gcc decided to
    swap the order of the stores, causing some or all bytes of `tid`
    to be overwritten.  (Arguably the unaligned stores are undefined
    behaviour so gcc is in its rights to do this.)

    Fix by doing a bit more shifting and ensure the stores don't
    overlap (they will also be properly aligned).

commit 94541a008e1f9ac73262afb24f0a467f1831b87e
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Thu Nov 21 18:21:28 2019 +0000

    NEWS update

    Changes affecting specific sub-commands have been grouped together
    to make them easier to find.

commit d06acbcc7020bc6e1dbebf0622e85ccd8f0dbf52
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Fri Nov 22 10:06:50 2019 +0000

    Man page updates

    * Add sam.gz to list of formats in samtools.1

    * Add information about indexing .sam.gz files to samtools-index.1,
      as this does actually work.

    * Alter samtools-fasta.1 as the default -F option is now 0x900,
      and it turns out that secondary and supplementary reads were
      always filtered out anyway.

commit 706c7b4fb32e676e309810ef403a8aba63a5040a
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Wed Nov 20 16:12:25 2019 +0000

    Fix tview manpage example [minor]

commit b59c80f02dc8db5c900f86a693938537788a39cb
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Tue Nov 19 12:03:24 2019 +0000

    Fix heap cleanup-on-fail in bam_merge_simple

    Bam records in the heap could have come from a file or an in-memory
    block.  Only the ones from files should be freed.  Fix an incorrect
    assumption that the first entries all came from files.  Instead,
    look in heap[i].i to see if the bam record came from a file or
    an in-memory block.

commit ef8e24f8fba1ba955ab3ca08129d113aff4fe80b
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Mon Nov 18 15:31:42 2019 +0000

    Add PG line with `split -u`.

commit 72d140b590cbacc975e96bf40f3db6e6370a5cbe
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Tue Nov 12 14:10:25 2019 +0000

    Updates copyright message for 2019.

    Added 2019 to copyright dates on files committed in 2019.

    Update files that should have been done before 2019.

commit 419f8ac826cefe7e655f43c2a3e7ea56181bc284
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Tue Nov 12 10:04:16 2019 +0000

    Fixed gcc9.2 warning on fprintf.

    Also put a check on unguarded memory allocations.

commit 264c7204226ce669c3ecc4715435a669034d95a8
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Tue Nov 12 09:26:48 2019 +0000

    Added the QC fail condition to optical dupe check. (PR #1134)

    Added the QC fail condition to optical duplicate check.

commit 3b0753f840b8e4053c51db4775252ef42313edfa
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Fri Nov 8 17:11:16 2019 +0000

    [depth] Options for filtering reads (PR #953)

    Add the ability to filter in and out reads with specific flag sets.

commit 8e49f4556a9563cad4d4eb36591f6919cfb61e4d
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Fri Nov 8 14:04:19 2019 +0000

    Fix Makefile & NEWS typos and expand NEWS entry [minor] (PR #1130)

    A previous change added $(bedidx_h) to the wrong Makefile line.

    Add reasoning for the removal and the exact spelling of the script name
    to the varfilter.py NEWS entry.

commit f6bd3b22ea4c9e4897cda455e786180fe650e494
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Fri Nov 8 12:48:47 2019 +0000

    Fix free of wrong pointer during error recovery

commit 3178fc72f3c26feb619b8eaacd706e27cb8888dd
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Thu Nov 7 17:06:11 2019 +0000

    Updates to use the new hts_parse_region functionality. (PR #864)

    This is necessary to resolve parsing conflicts introduced by the
    GRCh38 HLA contig names.

commit fec24465fb8ec3d5e8c06047fd0c8d54d67e107e
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Tue Nov 5 09:04:47 2019 +0000

    Corrected two stat names.
    Added missing error message.

commit 3b928575afd6d848188297f6bc21c1e44542ebee
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Mon Nov 4 13:56:38 2019 +0000

    More optical duplicate cases covered.
    Some restructuring.

commit 20b830311d75fed1afbd3e605df142e87759e29a
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Fri Nov 1 11:24:57 2019 +0000

    Interim commit.

    Checks for optical duplicates when multiple duplicates occur.
    Multiple duplicates of single original can now be tagged with that originals read name.
    Fixed broken PG option.
    Alterted stat output entry name for duplicate pairs.

commit 255b776a9d5a67e5423b163f2a9cbf302c3347dd
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Thu Oct 31 16:08:20 2019 +0000

    In anticipation of https://github.com/samtools/htslib/pull/963

commit 42d68ac1342967185f7af8d3c635cba01222c8c7
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Wed Oct 30 16:38:55 2019 +0000

    Add support for long references to coverage command.

commit cf444d8be1f45f2ef5951de61b15694c5d87644f
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Wed Oct 30 12:42:38 2019 +0000

    Switch targetcut to long references.

commit 3ccd3296eb015721100d6c325e49a8a4cecf0a90
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Thu Oct 24 18:01:51 2019 +0100

    Mostly ref length changes.

commit f6a4f2a0178439b5580c5b3e75b7b9f1a52da304
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Wed Oct 23 16:28:13 2019 +0100

    Changed leftmost variable to hts_pos_t.

    Added another smaller variable for the stored value.

commit 97a43b25990027a4650c51bc48b2b1b454c9029c
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Wed Oct 23 14:57:06 2019 +0100

    64bit upgrade to mpileup.

commit e12b0c2ae9e2f04c029954b54a2a35b917538001
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Wed Oct 16 11:30:59 2019 +0100

    Rename test files and remove one that was accidentally included

commit b3187b57b59d38b7bf768d1f1732d277721658aa
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Wed Oct 16 11:12:15 2019 +0100

    Remove misleading graphic in comment

commit c740e272dd8f7e603db9a2d4ed15761072da9882
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Wed Oct 16 11:07:52 2019 +0100

    Add #define for threshold where number spacing changes on scale line

commit 1678d942eec70463dbad81a1f26f4a25bc576fd4
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Tue Oct 15 17:28:18 2019 +0100

    Added another long ref check.

    This checks various boundary locations rather than just +10Gb to all
    and also validates fixmates generation of PNEXT and TLEN as well as
    samtools sort.

commit f38fa5672c919990e5d5820a7aa9c9db3386d8b8
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Wed Oct 9 15:08:07 2019 +0100

    Add stats tests with 64 bit positions.

commit 6c5b9dead78950d6d206dae5bc7c59bf0d035dbe
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Mon Oct 7 17:55:09 2019 +0100

    64 bit upgrades for fixmate, markdup and faidx.

commit f70ca4d4efb8fcebe9749455967a67f3bae942cf
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Tue Oct 8 15:16:37 2019 +0100

    Make stats work with 64 bit positions

commit d1353c1e027799930e71b3ee2be8ec184bdf785a
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Tue Oct 1 12:46:06 2019 +0100

    Add initial large position tests

    Tests for round-trip, index, bedidx, sort, merge, depth, and
    tview.

    Unrelated fix of "my variable $f masks earlier declaration" warning.

commit 7dfe8c5b445e6d5042b7be82a6e2c91956baa6ab
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Mon Sep 30 23:41:09 2019 +0100

    Make tview (and bits of pileup) work with 64 bit positions

commit 8ed92fb7f83ad15c795b2900ece950db3dcef055
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Mon Sep 30 22:27:47 2019 +0100

    Make bam2depth work with 64 bit positions

commit 77746bf5708d2c66d0ccd782e441dd266017ceed
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Mon Sep 30 21:51:14 2019 +0100

    Make bedidx work with 64 bit positions

    Use bedidx.h in bam2depth.c and bam_plcmd.c for bed_* function
    prototypes.

commit ab131e6cebcf4bdad8fd550c1dd4105e514c7c32
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Tue Sep 24 10:26:33 2019 +0100

    Use hts_parse_reg64

commit e7e29952fa92550ea43b6eccf3bc53794ab237ca
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Mon Sep 23 17:08:04 2019 +0100

    Make sort and merge work with 64 bit positions

    Separate tid from pos in heap1_t.  Merge rev with pos as only
    one bit is needed.

    Radix sort is changed to work exclusively on bytes instead of
    SHIFT bits at a time.  It now counts the number of bytes needed
    to store pos and tid separately, which should make it more
    efficient when pos is small.

commit 2c1daf57cfd884c3ba30d39594c2072a64d266d9
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Tue Oct 29 17:00:41 2019 +0000

    Removed misc/varfilter.py script

    This uses python 2, but rather than update it to python 3 we are
    retiring it as it also makes use of the "mpileup -c" option to emit
    consensus output, which itself was removed several years ago.

    Fixes #1125

commit f9e1cafd85853a2f5c8b59d87ee6dc1460128afa
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Wed Oct 16 14:46:09 2019 +0100

    Add --verbosity INT global option for setting hts_verbose

    Uncomment the existing placeholder in SAM_OPT_GLOBAL_OPTIONS etc,
    and rename the option as typically an option named --verbose would
    not have an argument.

    Add it to all of the sam_global_opt_help() calls; add an extra "-"
    (for suppress-"write-index"-option) to those calls where the string
    previously ended early (which implicitly meant suppress write-index).

commit 0ba6505b723260452738ac52a88e2581ba749a89
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Wed Oct 16 17:31:54 2019 +0100

    Fixes a stats error. (PR #1121)

    Fix bug where single (or paired with an unmapped mate) reads
    were being added to the wrong optical duplicate count.

commit 6d644120d8202ce86e919bcedf78368d5aef4452
Author: Neil Goodgame <neil.goodgame@genomicsengland.co.uk>
Date:   Mon Oct 14 11:44:39 2019 +0100

    added break to ignore fasta header lines when passing in a target regions bed file

commit 796cf226ff23771c754e9976fda85efa20414737
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Tue Oct 1 17:01:21 2019 +0100

    Make `-a` and `-aa` behave the same for single region filters. (PR #1113)

    When an entire region has no coverage from mpileup, ensure -a outputs
    lines showing zero depth for the region.

    Fixes #1112 (samtools depth -Q and -a conflict)

commit c54432f18c507f6776492dfdecaef870ff6dafad
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Mon Sep 30 10:24:01 2019 +0100

    Added checks for pileup_seq and bam_plp_insertion calls.

    These aren't elegantly done, but the state of the code is such that
    bubbling an error value all the way up to main is cumbersome.

commit a4bf0b5d87f75cc993ead79467ef1d335fbd70e6
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Mon Sep 23 12:48:40 2019 +0100

    mpileup/tview P support NEWS item and man page update

commit 220b3a7e0b7a36b5b0329e0264d3e603f61ac174
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Mon Sep 23 12:22:06 2019 +0100

    Make mpileup print pads as '#' when --reverse-del is used

    Being able to differentiate strands is useful for pads as
    well as deletions.

    Adds test with reverse reads.

    Makes the alignment of s3 in the mp_ID.sam file match the one
    shown in the comment.

commit 766717ebdbda6eaa2c33ce7a5933593bc5defa71
Author: James Bonfield <jkb@sanger.ac.uk>
Date:   Mon Dec 15 15:21:50 2014 +0000

    Fix tview and mpileup to cope with cigar P and compound ID / DI.

    Also update the tests, removing a couple now redundant, making
    some of the old expected-failures now passes, plus a raft of new
    ones.

commit a0b6c7138352b019de78a036dccd8569891ed956
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Thu Sep 26 15:25:36 2019 +0100

    Fix clang truncation warning on Mac build

commit cbe1246a9c6729e2d0df2b57777f63f7dae771f4
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Tue Aug 20 15:01:51 2019 +0100

    Prepare for 64-bit positions

    This does not add 64-bit position support, it just ensures samtools
    will build without warnings (using gcc/clang -Wall) when built
    against both 32-bit and 64-bit position branches of HTSlib.

    Makes various printf()s use PRId64 for positions.  The values
    are cast to (int64_t) so both 32-bit and 64-bit versions work.

    Fix isize calculation in bam_mate.c so it sign-extends correctly.

commit e5bac551ef2b587b0201f53cbfcbb5e8549ef808
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Thu Sep 19 17:26:22 2019 +0100

    Add output format text to flagstat man page

    NEWS update.

commit 86467380d6144c46b9ff471bf130a82dfe91b5c1
Author: Vivek Rai <mail@raivivek.in>
Date:   Fri Sep 20 10:25:01 2019 +0000

    Add TSV/JSON output format for `samtools flagstat` (PR #1106)

    Signed-off-by: Vivek Rai <mail@raivivek.in>

commit b1e2c784d2d681e6d7db0921c25f7cf7d83a2f4c
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Wed Sep 11 12:43:32 2019 +0100

    Fix RG line tests. (PR #1104)

commit 588342714c061234143646fcbca62826776d7542
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Mon Sep 9 12:10:02 2019 +0100

    Accepts newer name format for optical markdup.

    Format:
    instrument:run_id:flow_cell_id:lane:tile:x_pos:y_pos
    or
    instrument:run_id:flow_cell_id:lane:tile:x_pos:y_pos:UMI

    If we start coming across more name varients then we might have to resort to more complex name handling code.

commit 74718c24250f68fdb5bad6acdd07290fb6c8b8a3
Merge: 1b03b34 90dd595
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Wed Sep 4 18:15:27 2019 +0100

    Merge Additions to markdup (PR#1091)

    NEWS update.

commit 90dd5952c9d4cadd424f71135e75a0ccc7492848
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Wed Sep 4 15:22:18 2019 +0100

    Changed option name and behaviour.

    --relaxed has now become --mode s and has been decoupled from the --include-fails option.  The default behaviour remains as is for now.  Some documentation added but it will need a proper write-up explaining the differences.

commit 82be1eec6ffa2c7c6f1248e08acb5c6d3bd87a29
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Tue Sep 3 15:24:22 2019 +0100

    More review fixes plus additional documentation.

commit 1b03b34a195086ea3652741538f853e2b5e7050e
Author: Valeriu Ohan <vo2@sanger.ac.uk>
Date:   Mon Aug 19 16:02:13 2019 +0100

    Add `@PG` lines with view.

commit a6e523df72c2639ae68adf24c159b1286b255309
Author: Rob Davies <rmd+git@sanger.ac.uk>
Date:   Tue Sep 3 14:00:46 2019 +0100

    Add estimate_library_size comments and change function name

    Picard's estimateLibrarySize suggests it's using the
    Lander-Waterman equation, but that's not quite right (L-W is about
    estimating the number of gaps in an assembly, which is a slightly
    different calculation.)  It's actually using the expected value
    for the number of items in a set that have been covered after
    a given number have been randomly selected with replacement.

    For discussion, see this samtools-help thread:

    https://sourceforge.net/p/samtools/mailman/samtools-help/thread/DUB405-EAS154589A1ACEF2BE4C573D4592180%40phx.gbl/

    Change lw_equation to coverage_equation, and add a comment
    explaining how it works.

commit 9f3c5f17a31ccc9998f9a3b83660326627710620
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Tue Sep 3 12:22:15 2019 +0100

    Mention --output-extra columns in the Pileup Format description

    Also fix typo and formatting.

commit a3a7a029a909773413c42d8185943fec9f55055c
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Tue Sep 3 11:55:36 2019 +0100

    Add missing Makefile dependencies

commit fedb587816ee4eb182b9e7fab6beed70574e2f26
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Tue Sep 3 11:03:59 2019 +0100

    Rename test output files so they are ignored and cleaned

    Rename to {path}/dat/auto_indexed.tmp.* so they are ignored and cleaned
    by existing rules. Generate bam2fq.discard.*.fq in {tmp} to avoid the
    issue entirely.

commit 6e7b2848506b9723991e3540712e1ecaee47357c
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Mon Sep 2 13:39:27 2019 +0100

    Add additional checks after review.

    Ensure MC tag is the right tag type

    Fix possible memory leak in add_duplicate if the hash table entry
    already exists.

    Prevent divide-by-zero in estimate_library_size if somehow
    all pairs are duplicates.

commit aa8b4e51e57535ee391ac89e47fcbdb5af5e5f90
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Tue Aug 27 15:32:40 2019 +0100

    Replace magic numbers with #define.

commit f843080a296f8272dff05c0e6d01f09563a833a6
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Wed Aug 21 17:17:31 2019 +0100

    Small changes after review.

    Added an extra copyright notice.
    Removed an unused include header.
    Limited the number of warnings for incorrect read names.

commit 9a96b7ca55f8e34d9770f044a1f17482d1610fc4
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Tue Aug 20 16:01:23 2019 +0100

    Modified PG writing to fit in with latest code.

    Also added new options to man page.

commit 4a62303aea5aac2653739c867c26d6868a897df8
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Wed Aug 7 11:45:12 2019 +0100

    Added help for new options.

commit 67cda481d55fa98b929bf72415f40dabfff6fbd6
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Wed Aug 7 10:21:45 2019 +0100

    Added a --relaxed mode for duplicate detection.

    Also treating XA tags like SA tags.  This may not remain in place if a better solution presents itself.

commit 0557cd18f469028b788de141eff8e54de8d3a8da
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Fri Jul 19 11:31:52 2019 +0100

    Initialised variables,

commit 4a2fb7f1e1c66e14f2286eeaf60888a3e9d98173
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Fri Jul 19 10:03:40 2019 +0100

    Fixed memory error with wrong size stored.

commit f9415fed3758171a489a87949bcf8b2646886989
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Fri Jul 12 15:23:23 2019 +0100

    Added Novaseq coordinate reading code and command line to stats.

commit 9a2e86e54e17f913142278f5a6f52bfd8b5f1fbd
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Thu Jun 20 15:04:26 2019 +0100

    New -c option to clear old duplicate settings.

    Will remove 'do' and 'dt' flags from previous markdup runs but only in reads marked as duplicates.

commit 835f8e78affcde762835b3fce302f4bcd0b62e05
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Thu Jun 20 11:48:36 2019 +0100

    Added temp option to suppress adding @PG line.

commit a3066777e658d7d5806a07936cc79c35b343cbd8
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Thu Jun 20 11:32:54 2019 +0100

    Added call to add a @PG line using new htslib.

commit c277744ad7535fd3c5f4500902dbe20b91a89fbc
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Wed Jun 19 14:52:15 2019 +0100

    Added an estimated_library_size function.

    A copy of the picard function.

commit ad2599fbf68c275c2a05e6078d7d8a30468e16a3
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Tue Jun 18 09:32:09 2019 +0100

    Simplified optical_duplicate function.

commit 3725da27a07c8467c4b3cd92de6c574cc44e6311
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Thu Jun 13 16:40:17 2019 +0100

    Included secondary duplicate marking.

    Added duplicate type to non optical duplicates (e.g. dt:Z:LB).  Added a few more stats.  Some code tidying.

commit 9c727c35e45beade9d21295851b59f1b2a69e802
Author: Andrew Whitwham <whitwham@users.noreply.github.com>
Date:   Thu Jun 13 12:15:05 2019 +0100

    Added 'do' and 'dt' to su…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants