changeset 0:ebcd48f183b3 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
author iuc
date Fri, 05 Jul 2024 06:00:15 +0000
parents
children 8377a6abb4da
files README.md bigwig_outlier_bed.py bigwig_outlier_bed.xml test-data/1.bigwig test-data/bedouthi2_sample test-data/bedouthi_sample test-data/bedouthilo2_sample test-data/bedouthilo_sample test-data/bedoutlo2_sample test-data/bedoutlo_sample test-data/bigwig_sample test-data/table2_sample test-data/table_sample
diffstat 13 files changed, 996 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.md	Fri Jul 05 06:00:15 2024 +0000
@@ -0,0 +1,31 @@
+## bigwig peak bed maker
+
+### July 30 2024 for the VGP
+
+This code will soon become a Galaxy tool, for building some of the [NIH MARBL T2T assembly polishing](https://github.com/marbl/training) tools as Galaxy workflows.
+
+JBrowse2 2.12.3 update will include a plugin for optional colours to distinguish bed features, shown being tested in the screenshots below.
+
+### Find and mark BigWig peaks to a bed file for display
+
+In the spirit of DeepTools, but finding contiguous regions where the bigwig value is either above or below a given centile.
+0.99 and 0.01 for example. These quantile cut point values are found and applied over each chromosome using some [cunning numpy code](http://gregoryzynda.com/python/numpy/contiguous/interval/2019/11/29/contiguous-regions.html)
+
+![image](https://github.com/fubar2/bigwig_peak_bed/assets/6016266/cdee3a2b-ae31-4282-b744-992c15fb49db)
+
+![image](https://github.com/fubar2/bigwig_peak_bed/assets/6016266/59d1564b-0c34-42a3-b437-44332cf1b2f0)
+
+Big differences between chromosomes 14,15,21,22 and Y in this "all contigs" view - explanations welcomed:
+
+![image](https://github.com/fubar2/bigwig_peak_bed/assets/6016266/162bf681-2977-4eb8-8d6f-9dad5b3931f8)
+
+
+[pybedtools](https://github.com/jackh726/bigtools) is used for the bigwig interface. Optionally allow
+multiple bigwigs to be processed into a single bed - the bed features have the bigwig name in the label for viewing.
+
+### Note on quantiles per chromosome rather than quantiles for the whole bigwig
+
+It is just not feasible to hold all contigs in the entire decoded bigwig in RAM to estimate quantiles. It may be
+better to sample across all chromosomes so as not to lose any systematic differences between them - the current method will hide those
+differences unfortunately. Sampling might be possible. Looking at the actual quantile values across a couple of test bigwigs suggests that
+there is not much variation between chromosomes but there's now a tabular report to check them for each input bigwig.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bigwig_outlier_bed.py	Fri Jul 05 06:00:15 2024 +0000
@@ -0,0 +1,177 @@
+"""
+Ross Lazarus June 2024 for VGP
+Bigwigs are great, but hard to reliably "see" small low coverage or small very high coverage regions.
+Colouring in JB2 tracks will need a new plugin, so this code will find bigwig regions above and below a chosen percentile point.
+0.99 and 0.01 work well in testing with a minimum span of 10 bp.
+Multiple bigwigs **with the same reference** can be combined - bed segments will be named appropriately
+Combining multiple references works but is silly because only display will rely on one reference so others will not be shown...
+Tricksy numpy method from http://gregoryzynda.com/python/numpy/contiguous/interval/2019/11/29/contiguous-regions.html
+takes about 95 seconds for a 17MB test wiggle
+JBrowse2 bed normally displays ignore the score, so could provide separate low/high bed file outputs as an option.
+Update june 30 2024: wrote a 'no-build' plugin for beds to display red/blue if >0/<0 so those are used for scores
+Bed interval naming must be short for JB2 but needs input bigwig name and (lo or hi).
+"""
+
+import argparse
+import copy
+import os
+import sys
+from pathlib import Path
+
+import numpy as np
+import pybigtools
+
+
+class findOut:
+
+    def __init__(self, args):
+        self.bwnames = args.bigwig
+        self.bwlabels = args.bigwiglabels
+        self.bedwin = args.minwin
+        self.qlo = args.qlo
+        self.qhi = args.qhi
+        self.outbeds = args.outbeds
+        self.bedouthi = args.bedouthi
+        self.bedoutlo = args.bedoutlo
+        self.bedouthilo = args.bedouthilo
+        self.tableoutfile = args.tableoutfile
+        self.bedwin = args.minwin
+        self.qhi = args.qhi
+        self.qlo = args.qlo
+        nbw = len(args.bigwig)
+        nlab = len(args.bigwiglabels)
+        if nlab < nbw:
+            self.bwlabels += ["Nolabel"] * (nbw - nlab)
+        self.makeBed()
+
+    def processVals(self, bw, isTop):
+        """
+        idea from http://gregoryzynda.com/python/numpy/contiguous/interval/2019/11/29/contiguous-regions.html
+        Fast segmentation into regions by taking np.diff on the boolean array of over (under) cutpoint indicators in bwex.
+        This only gives non-zero values at the segment boundaries where there's a change, so those zeros are all removed in bwexdnz
+        leaving an array of segment start/end positions. That's twisted around into an array of start/end coordinates.
+        Magical. Fast. Could do the same for means or medians over windows for sparse bigwigs like repeat regions.
+        """
+        if isTop:
+            bwex = np.r_[False, bw >= self.bwtop, False]  # extend with 0s
+        else:
+            bwex = np.r_[False, bw <= self.bwbot, False]
+        bwexd = np.diff(bwex)
+        bwexdnz = bwexd.nonzero()[0]
+        bwregions = np.reshape(bwexdnz, (-1, 2))
+        return bwregions
+
+    def writeBed(self, bed, bedfname):
+        """
+        potentially multiple
+        """
+        bed.sort()
+        beds = ["%s\t%d\t%d\t%s\t%d" % x for x in bed]
+        with open(bedfname, "w") as bedf:
+            bedf.write("\n".join(beds))
+            bedf.write("\n")
+
+    def makeTableRow(self, bw, bwlabel, chr):
+        """
+        called for every contig, but messy inline
+        """
+        bwmean = np.mean(bw)
+        bwstd = np.std(bw)
+        bwmax = np.max(bw)
+        nrow = np.size(bw)
+        bwmin = np.min(bw)
+        row = "%s\t%s\t%d\t%f\t%f\t%f\t%f" % (
+            bwlabel,
+            chr,
+            nrow,
+            bwmean,
+            bwstd,
+            bwmin,
+            bwmax,
+        )
+        if self.qhi is not None:
+            row += "\t%f" % self.bwtop
+        else:
+            row += "\t"
+        if self.qlo is not None:
+            row += "\t%f" % self.bwbot
+        else:
+            row += "\t"
+        return row
+
+    def makeBed(self):
+        bedhi = []
+        bedlo = []
+        bwlabels = self.bwlabels
+        bwnames = self.bwnames
+        if self.tableoutfile:
+            restab = ["bigwig\tcontig\tn\tmean\tstd\tmin\tmax\tqtop\tqbot"]
+        for i, bwname in enumerate(bwnames):
+            bwlabel = bwlabels[i].replace(" ", "")
+            fakepath = "in%d.bw" % i
+            if os.path.isfile(fakepath):
+                os.remove(fakepath)
+            p = Path(fakepath)
+            p.symlink_to(bwname)  # required by pybigtools (!)
+            bwf = pybigtools.open(fakepath)
+            chrlist = bwf.chroms()
+            chrs = list(chrlist.keys())
+            chrs.sort()
+            for chr in chrs:
+                bw = bwf.values(chr)
+                bw = bw[~np.isnan(bw)]  # some have NaN if parts of a contig not covered
+                if self.qhi is not None:
+                    self.bwtop = np.quantile(bw, self.qhi)
+                    bwhi = self.processVals(bw, isTop=True)
+                    for j, seg in enumerate(bwhi):
+                        if seg[1] - seg[0] >= self.bedwin:
+                            bedhi.append((chr, seg[0], seg[1], "%s_hi" % (bwlabel), 1))
+                if self.qlo is not None:
+                    self.bwbot = np.quantile(bw, self.qlo)
+                    bwlo = self.processVals(bw, isTop=False)
+                    for j, seg in enumerate(bwlo):
+                        if seg[1] - seg[0] >= self.bedwin:
+                            bedlo.append((chr, seg[0], seg[1], "%s_lo" % (bwlabel), -1))
+                if self.tableoutfile:
+                    row = self.makeTableRow(bw, bwlabel, chr)
+                    restab.append(copy.copy(row))
+        if self.tableoutfile:
+            stable = "\n".join(restab)
+            with open(self.tableoutfile, "w") as t:
+                t.write(stable)
+                t.write("\n")
+        some = False
+        if self.qlo:
+            if self.outbeds in ["outall", "outlo", "outlohi"]:
+                self.writeBed(bedlo, self.bedoutlo)
+                some = True
+        if self.qhi:
+            if self.outbeds in ["outall", "outlohi", "outhi"]:
+                self.writeBed(bedhi, self.bedouthi)
+                some = True
+        if self.outbeds in ["outall", "outhilo"]:
+            allbed = bedlo + bedhi
+            self.writeBed(allbed, self.bedouthilo)
+            some = True
+        if not some:
+            sys.stderr.write(
+                "Invalid configuration - no output could be created. Was qlo missing and only low output requested for example?"
+            )
+            sys.exit(2)
+
+
+if __name__ == "__main__":
+    parser = argparse.ArgumentParser()
+    a = parser.add_argument
+    a("-m", "--minwin", default=10, type=int)
+    a("-l", "--qlo", default=None, type=float)
+    a("-i", "--qhi", default=None, type=float)
+    a("--bedouthi", default=None)
+    a("--bedoutlo", default=None)
+    a("--bedouthilo", default=None)
+    a("-w", "--bigwig", nargs="+")
+    a("-n", "--bigwiglabels", nargs="+")
+    a("-o", "--outbeds", default="outhilo", help="optional high and low combined bed")
+    a("-t", "--tableoutfile", default=None)
+    args = parser.parse_args()
+    findOut(args)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bigwig_outlier_bed.xml	Fri Jul 05 06:00:15 2024 +0000
@@ -0,0 +1,177 @@
+<tool name="Bigwig extremes to bed features" id="bigwig_outlier_bed" version="0.1.4" profile="22.05">
+  <description>Writes high and low bigwig runs as features in a bed file</description>
+  <edam_topics>
+      <edam_topic>topic_0157</edam_topic>
+      <edam_topic>topic_0092</edam_topic>
+  </edam_topics>
+  <edam_operations>
+      <edam_operation>operation_0337</edam_operation>
+  </edam_operations>
+  <xrefs>
+    <xref type="bio.tools">bigtools</xref>
+  </xrefs>
+  <requirements>
+    <requirement type="package" version="3.12.3">python</requirement>
+    <requirement type="package" version="2.0.0">numpy</requirement>
+    <requirement type="package" version="0.1.4">pybigtools</requirement>
+  </requirements>
+  <required_files>
+      <include path="bigwig_outlier_bed.py"/>
+  </required_files>
+  <version_command><![CDATA[python -c "import pybigtools; from importlib.metadata import version; print(version('pybigtools'))"]]></version_command>
+  <command><![CDATA[python '${__tool_directory__}/bigwig_outlier_bed.py'
+--bigwig 
+#for bw in $bigwig: 
+ '$bw' 
+#end for
+--bigwiglabels
+#for bw in $bigwig: 
+  '$bw.name'
+#end for
+--outbeds '$outbeds'
+#if $outbeds in ['outhilo', 'outall']:
+  --bedouthilo '$bedouthilo'
+#end if
+#if $outbeds in ['outhi', 'outall', 'outlohi']:
+  --bedouthi '$bedouthi'
+#end if
+#if $outbeds in ['outlo', 'outall', 'outlohi']:
+  --bedoutlo '$bedoutlo'
+#end if
+--minwin '$minwin'
+#if $qhi:
+--qhi '$qhi'
+#end if
+#if $qlo:
+--qlo '$qlo'
+#end if
+#if $tableout == "create":
+ --tableoutfile '$tableoutfile'
+#end if
+]]></command>
+  <inputs>
+    <param name="bigwig" type="data" optional="false" label="Choose one or more bigwig file(s) to return outlier regions as a bed file" 
+      help="If more than one, MUST all use the same reference sequence to be displayable. Feature names will include the bigwig label." format="bigwig" multiple="true"/>
+    <param name="minwin" type="integer" value="10" label="Minimum continuous bases to count as a high or low bed feature" 
+      help="Continuous features as long or longer than this window size will appear as bed features"/>
+    <param name="qhi" type="float" value="0.99" label="Quantile cutoff for a high region - 0.99 will cut off at or above the 99th percentile" help="Required" optional="false"/>
+    <param name="qlo" type="float" value="0.01" label="Quantile cutoff for a low region - 0.01 will cut off at or below the 1st percentile." help="Optional" optional="true"/>
+    <param name="outbeds" type="select" label="Select the required bed file outputs" help="Any combination of the 3 different kinds of bed file output can be made">
+      <option value="outhilo" selected="true">Make 1 bed output with both low and high regions</option>
+      <option value="outhi">Make 1 bed output with high regions only</option>
+      <option value="outlo">Make 1 bed output with low regions only</option>
+      <option value="outall">Make 3 bed outputs with low and high together in one, high in one and low in the other</option>
+      <option value="outlohi">Make 2 bed outputs with high in one and low in the other</option>
+    </param>
+    <param name="tableout" type="select" label="Write a table showing contig statistics for each bigwig input" help="">
+      <option value="donotmake">Do not create this report</option>
+      <option value="create" selected="true">Create this report</option>
+    </param>
+  </inputs>
+  <outputs>
+    <data name="bedouthilo" format="bed" label="High_and_low_bed" hidden="false">
+      <filter>outbeds in ["outall", "outhilo"]</filter>
+    </data>
+    <data name="bedouthi" format="bed" label="High bed" hidden="false">
+      <filter>outbeds in ["outall", "outlohi", "outhi"]</filter>
+    </data>
+    <data name="bedoutlo" format="bed" label="Low bed" hidden="false">
+      <filter>outbeds in ["outall", "outlohi", "outlo"]</filter>
+    </data>
+    <data name="tableoutfile" format="tabular" label="Contig statistics" hidden="false">
+      <filter>tableout == "create"</filter>
+    </data>
+  </outputs>
+  <tests>
+    <test expect_num_outputs="1">
+      <output name="bedouthilo" value="bedouthilo_sample" compare="diff" lines_diff="0"/>
+      <param name="outbeds" value="outhilo"/>
+      <param name="bigwig" value="bigwig_sample"/>
+      <param name="minwin" value="10"/>
+      <param name="qhi" value="0.99"/>
+      <param name="qlo" value="0.01"/>
+      <param name="tableout" value="donotmake"/>
+    </test>
+    <test expect_num_outputs="2">
+      <output name="bedouthilo" value="bedouthilo_sample" compare="diff" lines_diff="0"/>
+      <output name="tableoutfile" value="table_sample" compare="diff" lines_diff="0"/>
+      <param name="outbeds" value="outhilo"/>
+      <param name="bigwig" value="bigwig_sample"/>
+      <param name="minwin" value="10"/>
+      <param name="qhi" value="0.99"/>
+      <param name="qlo" value="0.01"/>
+      <param name="tableout" value="create"/>
+    </test>
+    <test expect_num_outputs="3">
+      <output name="bedouthi" value="bedouthi_sample" compare="diff" lines_diff="0"/>
+      <output name="bedoutlo" value="bedoutlo_sample" compare="diff" lines_diff="0"/>
+      <output name="tableoutfile" value="table_sample" compare="diff" lines_diff="0"/>
+      <param name="outbeds" value="outlohi"/>
+      <param name="bigwig" value="bigwig_sample"/>
+      <param name="minwin" value="10"/>
+      <param name="qhi" value="0.99"/>
+      <param name="qlo" value="0.01"/>
+      <param name="tableout" value="create"/>
+    </test>
+    <test expect_num_outputs="4">
+      <output name="bedouthilo" value="bedouthilo2_sample" compare="diff" lines_diff="0"/>
+      <output name="bedoutlo" value="bedoutlo2_sample" compare="diff" lines_diff="0"/>
+      <output name="bedouthi" value="bedouthi2_sample" compare="diff" lines_diff="0"/>
+      <output name="tableoutfile" value="table2_sample" compare="diff" lines_diff="0"/>
+      <param name="outbeds" value="outall"/>
+      <param name="bigwig" value="bigwig_sample,1.bigwig"/>
+      <param name="minwin" value="10"/>
+      <param name="qhi" value="0.99"/>
+      <param name="qlo" value="0.01"/>
+      <param name="tableout" value="create"/>
+    </test>
+  </tests>
+  <help><![CDATA[
+
+ **Purpose**
+ 
+ *Combine bigwig outlier regions into bed files*
+ 
+ Bigwigs allow quantative tracks to be viewed in an interactive genome browser like JBrowse2. 
+ Peaks are easy to see. Unusually low regions can be harder to spot, even if they are relatively large, unless the view is zoomed right in.
+ Automated methods for combining evidence from multiple bigwigs can be useful for constructing browseable *issues* or other kinds of summary bed format tracks.
+ For example, combining coverage outlier regions, with the frequency of specific dicnucleotide short tandem repeats,
+ for evaluating technical sequencing technology effects in the evaluation of a genome assembly described at https://github.com/arangrhie/T2T-Polish
+
+ **What does it produce?**
+
+ Bed format results are output, containing each continuous segment of at least *minwin* base pairs above a cut point, or below another cut point. 
+ These can be viewed as features on the reference genome using a genome browser tool like JBrowse2.
+ Three kinds of bed files can be created depending on the values included.  
+ Both high and low regions in one bed output is the default. This can be displayed in JBrowse2 with colour indicating the high or low status, 
+ one less track and a little easier to understand. High and low features can be output as separate bed files.
+
+ **How is it controlled?**
+
+ The cut points are calculated using a user supplied quantile, from each chromosome's bigwig value distribution. 
+ The defaults are 0.99 and 0.01 and the default *minwin* is 10.  
+ The probability of 10 values at or below the 1st percentile purely by chance is about 0.01**10, so false positives should be
+ rare, even in a 3GB genome.  
+ This data driven and non-parametric method is preferred for the asymmetrical distributions found in typical bigwigs, such as depth of coverage 
+ for genome sequencing reads. Coverage values are truncated at zero, and regions with very high values often form a long sparse right tail. 
+
+ **How do I choose the input data?**
+
+ One or more bigwigs and can be selected as inputs.  
+ Multiple bigwigs will be combined in bed files, so must share the reference genome to display
+ using JBrowse2.
+ 
+ .. class:: warningmark
+
+ **Lower quantile may not behave as expected in bigwigs with large fractions of zero values**
+
+ The lower cut point may be problematic for integer values like coverage if many values are zero. For example, if 5% of bases have zero coverage, the 1st percentile is also zero, 
+ but that cut point will include the entire 5% *at or below 0*
+
+ 
+  ]]></help>
+  <citations>
+    <citation type="doi">10.1093/bioinformatics/btae350</citation>
+  </citations>
+</tool>
+
Binary file test-data/1.bigwig has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bedouthi2_sample	Fri Jul 05 06:00:15 2024 +0000
@@ -0,0 +1,73 @@
+Merlin	20	30	bigwig_sample_hi	1
+Merlin	190	200	bigwig_sample_hi	1
+Merlin	1570	1580	bigwig_sample_hi	1
+Merlin	1730	1740	bigwig_sample_hi	1
+Merlin	1850	1860	bigwig_sample_hi	1
+Merlin	1880	1890	bigwig_sample_hi	1
+Merlin	3400	3410	bigwig_sample_hi	1
+Merlin	4030	4040	bigwig_sample_hi	1
+Merlin	7120	7130	bigwig_sample_hi	1
+Merlin	7860	7870	bigwig_sample_hi	1
+Merlin	8280	8290	bigwig_sample_hi	1
+Merlin	10820	10830	bigwig_sample_hi	1
+Merlin	13310	13320	bigwig_sample_hi	1
+Merlin	17570	17580	bigwig_sample_hi	1
+Merlin	17940	17950	bigwig_sample_hi	1
+Merlin	18340	18350	bigwig_sample_hi	1
+Merlin	18810	18820	bigwig_sample_hi	1
+Merlin	22310	22320	bigwig_sample_hi	1
+Merlin	23760	23770	bigwig_sample_hi	1
+Merlin	24580	24590	bigwig_sample_hi	1
+Merlin	24860	24870	bigwig_sample_hi	1
+Merlin	25700	25710	bigwig_sample_hi	1
+Merlin	26450	26460	bigwig_sample_hi	1
+Merlin	27220	27230	bigwig_sample_hi	1
+Merlin	27280	27290	bigwig_sample_hi	1
+Merlin	28500	28510	bigwig_sample_hi	1
+Merlin	29740	29750	bigwig_sample_hi	1
+Merlin	31540	31550	bigwig_sample_hi	1
+Merlin	31890	31900	bigwig_sample_hi	1
+Merlin	32970	32980	bigwig_sample_hi	1
+Merlin	33980	33990	bigwig_sample_hi	1
+Merlin	35440	35450	bigwig_sample_hi	1
+Merlin	36510	36520	bigwig_sample_hi	1
+Merlin	39690	39700	bigwig_sample_hi	1
+Merlin	40350	40360	bigwig_sample_hi	1
+Merlin	40550	40560	bigwig_sample_hi	1
+Merlin	40780	40790	bigwig_sample_hi	1
+Merlin	41390	41400	bigwig_sample_hi	1
+Merlin	41940	41950	bigwig_sample_hi	1
+Merlin	42470	42480	bigwig_sample_hi	1
+Merlin	42560	42570	bigwig_sample_hi	1
+Merlin	42730	42740	bigwig_sample_hi	1
+Merlin	43010	43020	bigwig_sample_hi	1
+Merlin	43910	43920	bigwig_sample_hi	1
+Merlin	44670	44680	bigwig_sample_hi	1
+Merlin	46010	46020	bigwig_sample_hi	1
+Merlin	46470	46480	bigwig_sample_hi	1
+Merlin	49370	49380	bigwig_sample_hi	1
+Merlin	50310	50320	bigwig_sample_hi	1
+Merlin	52980	52990	bigwig_sample_hi	1
+Merlin	54630	54640	bigwig_sample_hi	1
+Merlin	55430	55440	bigwig_sample_hi	1
+Merlin	56450	56460	bigwig_sample_hi	1
+Merlin	56630	56640	bigwig_sample_hi	1
+Merlin	57610	57620	bigwig_sample_hi	1
+Merlin	57790	57800	bigwig_sample_hi	1
+Merlin	58730	58740	bigwig_sample_hi	1
+Merlin	59360	59370	bigwig_sample_hi	1
+Merlin	59450	59460	bigwig_sample_hi	1
+Merlin	60210	60220	bigwig_sample_hi	1
+Merlin	61110	61120	bigwig_sample_hi	1
+Merlin	62470	62480	bigwig_sample_hi	1
+Merlin	63330	63340	bigwig_sample_hi	1
+Merlin	63350	63360	bigwig_sample_hi	1
+Merlin	66210	66220	bigwig_sample_hi	1
+Merlin	66510	66520	bigwig_sample_hi	1
+Merlin	66850	66860	bigwig_sample_hi	1
+Merlin	67690	67700	bigwig_sample_hi	1
+Merlin	68760	68780	bigwig_sample_hi	1
+Merlin	69850	69860	bigwig_sample_hi	1
+chr21	375	385	1.bigwig_hi	1
+chr21	2385	2400	1.bigwig_hi	1
+chr21	2625	2635	1.bigwig_hi	1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bedouthi_sample	Fri Jul 05 06:00:15 2024 +0000
@@ -0,0 +1,70 @@
+Merlin	20	30	bigwig_sample_hi	1
+Merlin	190	200	bigwig_sample_hi	1
+Merlin	1570	1580	bigwig_sample_hi	1
+Merlin	1730	1740	bigwig_sample_hi	1
+Merlin	1850	1860	bigwig_sample_hi	1
+Merlin	1880	1890	bigwig_sample_hi	1
+Merlin	3400	3410	bigwig_sample_hi	1
+Merlin	4030	4040	bigwig_sample_hi	1
+Merlin	7120	7130	bigwig_sample_hi	1
+Merlin	7860	7870	bigwig_sample_hi	1
+Merlin	8280	8290	bigwig_sample_hi	1
+Merlin	10820	10830	bigwig_sample_hi	1
+Merlin	13310	13320	bigwig_sample_hi	1
+Merlin	17570	17580	bigwig_sample_hi	1
+Merlin	17940	17950	bigwig_sample_hi	1
+Merlin	18340	18350	bigwig_sample_hi	1
+Merlin	18810	18820	bigwig_sample_hi	1
+Merlin	22310	22320	bigwig_sample_hi	1
+Merlin	23760	23770	bigwig_sample_hi	1
+Merlin	24580	24590	bigwig_sample_hi	1
+Merlin	24860	24870	bigwig_sample_hi	1
+Merlin	25700	25710	bigwig_sample_hi	1
+Merlin	26450	26460	bigwig_sample_hi	1
+Merlin	27220	27230	bigwig_sample_hi	1
+Merlin	27280	27290	bigwig_sample_hi	1
+Merlin	28500	28510	bigwig_sample_hi	1
+Merlin	29740	29750	bigwig_sample_hi	1
+Merlin	31540	31550	bigwig_sample_hi	1
+Merlin	31890	31900	bigwig_sample_hi	1
+Merlin	32970	32980	bigwig_sample_hi	1
+Merlin	33980	33990	bigwig_sample_hi	1
+Merlin	35440	35450	bigwig_sample_hi	1
+Merlin	36510	36520	bigwig_sample_hi	1
+Merlin	39690	39700	bigwig_sample_hi	1
+Merlin	40350	40360	bigwig_sample_hi	1
+Merlin	40550	40560	bigwig_sample_hi	1
+Merlin	40780	40790	bigwig_sample_hi	1
+Merlin	41390	41400	bigwig_sample_hi	1
+Merlin	41940	41950	bigwig_sample_hi	1
+Merlin	42470	42480	bigwig_sample_hi	1
+Merlin	42560	42570	bigwig_sample_hi	1
+Merlin	42730	42740	bigwig_sample_hi	1
+Merlin	43010	43020	bigwig_sample_hi	1
+Merlin	43910	43920	bigwig_sample_hi	1
+Merlin	44670	44680	bigwig_sample_hi	1
+Merlin	46010	46020	bigwig_sample_hi	1
+Merlin	46470	46480	bigwig_sample_hi	1
+Merlin	49370	49380	bigwig_sample_hi	1
+Merlin	50310	50320	bigwig_sample_hi	1
+Merlin	52980	52990	bigwig_sample_hi	1
+Merlin	54630	54640	bigwig_sample_hi	1
+Merlin	55430	55440	bigwig_sample_hi	1
+Merlin	56450	56460	bigwig_sample_hi	1
+Merlin	56630	56640	bigwig_sample_hi	1
+Merlin	57610	57620	bigwig_sample_hi	1
+Merlin	57790	57800	bigwig_sample_hi	1
+Merlin	58730	58740	bigwig_sample_hi	1
+Merlin	59360	59370	bigwig_sample_hi	1
+Merlin	59450	59460	bigwig_sample_hi	1
+Merlin	60210	60220	bigwig_sample_hi	1
+Merlin	61110	61120	bigwig_sample_hi	1
+Merlin	62470	62480	bigwig_sample_hi	1
+Merlin	63330	63340	bigwig_sample_hi	1
+Merlin	63350	63360	bigwig_sample_hi	1
+Merlin	66210	66220	bigwig_sample_hi	1
+Merlin	66510	66520	bigwig_sample_hi	1
+Merlin	66850	66860	bigwig_sample_hi	1
+Merlin	67690	67700	bigwig_sample_hi	1
+Merlin	68760	68780	bigwig_sample_hi	1
+Merlin	69850	69860	bigwig_sample_hi	1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bedouthilo2_sample	Fri Jul 05 06:00:15 2024 +0000
@@ -0,0 +1,164 @@
+Merlin	20	30	bigwig_sample_hi	1
+Merlin	80	90	bigwig_sample_lo	-1
+Merlin	190	200	bigwig_sample_hi	1
+Merlin	430	440	bigwig_sample_lo	-1
+Merlin	1230	1240	bigwig_sample_lo	-1
+Merlin	1570	1580	bigwig_sample_hi	1
+Merlin	1730	1740	bigwig_sample_hi	1
+Merlin	1850	1860	bigwig_sample_hi	1
+Merlin	1880	1890	bigwig_sample_hi	1
+Merlin	2670	2680	bigwig_sample_lo	-1
+Merlin	3400	3410	bigwig_sample_hi	1
+Merlin	3740	3750	bigwig_sample_lo	-1
+Merlin	4030	4040	bigwig_sample_hi	1
+Merlin	4700	4710	bigwig_sample_lo	-1
+Merlin	5870	5890	bigwig_sample_lo	-1
+Merlin	6290	6300	bigwig_sample_lo	-1
+Merlin	7120	7130	bigwig_sample_hi	1
+Merlin	7860	7870	bigwig_sample_hi	1
+Merlin	8280	8290	bigwig_sample_hi	1
+Merlin	8860	8870	bigwig_sample_lo	-1
+Merlin	10520	10530	bigwig_sample_lo	-1
+Merlin	10820	10830	bigwig_sample_hi	1
+Merlin	11190	11200	bigwig_sample_lo	-1
+Merlin	11380	11390	bigwig_sample_lo	-1
+Merlin	11810	11820	bigwig_sample_lo	-1
+Merlin	12660	12670	bigwig_sample_lo	-1
+Merlin	13310	13320	bigwig_sample_hi	1
+Merlin	14160	14170	bigwig_sample_lo	-1
+Merlin	14750	14760	bigwig_sample_lo	-1
+Merlin	16270	16280	bigwig_sample_lo	-1
+Merlin	17240	17250	bigwig_sample_lo	-1
+Merlin	17570	17580	bigwig_sample_hi	1
+Merlin	17940	17950	bigwig_sample_hi	1
+Merlin	18290	18300	bigwig_sample_lo	-1
+Merlin	18340	18350	bigwig_sample_hi	1
+Merlin	18810	18820	bigwig_sample_hi	1
+Merlin	19080	19090	bigwig_sample_lo	-1
+Merlin	19220	19230	bigwig_sample_lo	-1
+Merlin	20240	20250	bigwig_sample_lo	-1
+Merlin	21650	21660	bigwig_sample_lo	-1
+Merlin	21810	21820	bigwig_sample_lo	-1
+Merlin	22310	22320	bigwig_sample_hi	1
+Merlin	23630	23640	bigwig_sample_lo	-1
+Merlin	23760	23770	bigwig_sample_hi	1
+Merlin	24580	24590	bigwig_sample_hi	1
+Merlin	24860	24870	bigwig_sample_hi	1
+Merlin	25030	25040	bigwig_sample_lo	-1
+Merlin	25700	25710	bigwig_sample_hi	1
+Merlin	26260	26270	bigwig_sample_lo	-1
+Merlin	26450	26460	bigwig_sample_hi	1
+Merlin	26560	26570	bigwig_sample_lo	-1
+Merlin	26610	26620	bigwig_sample_lo	-1
+Merlin	27220	27230	bigwig_sample_hi	1
+Merlin	27280	27290	bigwig_sample_hi	1
+Merlin	27670	27680	bigwig_sample_lo	-1
+Merlin	27970	27980	bigwig_sample_lo	-1
+Merlin	28500	28510	bigwig_sample_hi	1
+Merlin	29400	29410	bigwig_sample_lo	-1
+Merlin	29740	29750	bigwig_sample_hi	1
+Merlin	29910	29920	bigwig_sample_lo	-1
+Merlin	31540	31550	bigwig_sample_hi	1
+Merlin	31890	31900	bigwig_sample_hi	1
+Merlin	32970	32980	bigwig_sample_hi	1
+Merlin	33460	33470	bigwig_sample_lo	-1
+Merlin	33910	33920	bigwig_sample_lo	-1
+Merlin	33980	33990	bigwig_sample_hi	1
+Merlin	34470	34490	bigwig_sample_lo	-1
+Merlin	35320	35330	bigwig_sample_lo	-1
+Merlin	35440	35450	bigwig_sample_hi	1
+Merlin	35620	35630	bigwig_sample_lo	-1
+Merlin	35880	35890	bigwig_sample_lo	-1
+Merlin	36510	36520	bigwig_sample_hi	1
+Merlin	36810	36820	bigwig_sample_lo	-1
+Merlin	37230	37240	bigwig_sample_lo	-1
+Merlin	37560	37570	bigwig_sample_lo	-1
+Merlin	37750	37760	bigwig_sample_lo	-1
+Merlin	38330	38340	bigwig_sample_lo	-1
+Merlin	39600	39610	bigwig_sample_lo	-1
+Merlin	39690	39700	bigwig_sample_hi	1
+Merlin	40350	40360	bigwig_sample_hi	1
+Merlin	40550	40560	bigwig_sample_hi	1
+Merlin	40780	40790	bigwig_sample_hi	1
+Merlin	41390	41400	bigwig_sample_hi	1
+Merlin	41900	41910	bigwig_sample_lo	-1
+Merlin	41940	41950	bigwig_sample_hi	1
+Merlin	42050	42060	bigwig_sample_lo	-1
+Merlin	42470	42480	bigwig_sample_hi	1
+Merlin	42560	42570	bigwig_sample_hi	1
+Merlin	42730	42740	bigwig_sample_hi	1
+Merlin	43010	43020	bigwig_sample_hi	1
+Merlin	43910	43920	bigwig_sample_hi	1
+Merlin	44440	44450	bigwig_sample_lo	-1
+Merlin	44670	44680	bigwig_sample_hi	1
+Merlin	46010	46020	bigwig_sample_hi	1
+Merlin	46470	46480	bigwig_sample_hi	1
+Merlin	46610	46620	bigwig_sample_lo	-1
+Merlin	49290	49300	bigwig_sample_lo	-1
+Merlin	49370	49380	bigwig_sample_hi	1
+Merlin	50310	50320	bigwig_sample_hi	1
+Merlin	50880	50890	bigwig_sample_lo	-1
+Merlin	52230	52240	bigwig_sample_lo	-1
+Merlin	52460	52470	bigwig_sample_lo	-1
+Merlin	52740	52750	bigwig_sample_lo	-1
+Merlin	52770	52780	bigwig_sample_lo	-1
+Merlin	52980	52990	bigwig_sample_hi	1
+Merlin	53150	53160	bigwig_sample_lo	-1
+Merlin	54630	54640	bigwig_sample_hi	1
+Merlin	54830	54840	bigwig_sample_lo	-1
+Merlin	55430	55440	bigwig_sample_hi	1
+Merlin	56020	56030	bigwig_sample_lo	-1
+Merlin	56450	56460	bigwig_sample_hi	1
+Merlin	56630	56640	bigwig_sample_hi	1
+Merlin	57220	57230	bigwig_sample_lo	-1
+Merlin	57610	57620	bigwig_sample_hi	1
+Merlin	57790	57800	bigwig_sample_hi	1
+Merlin	58730	58740	bigwig_sample_hi	1
+Merlin	59360	59370	bigwig_sample_hi	1
+Merlin	59450	59460	bigwig_sample_hi	1
+Merlin	60210	60220	bigwig_sample_hi	1
+Merlin	61110	61120	bigwig_sample_hi	1
+Merlin	61250	61260	bigwig_sample_lo	-1
+Merlin	62470	62480	bigwig_sample_hi	1
+Merlin	63190	63200	bigwig_sample_lo	-1
+Merlin	63290	63300	bigwig_sample_lo	-1
+Merlin	63330	63340	bigwig_sample_hi	1
+Merlin	63350	63360	bigwig_sample_hi	1
+Merlin	64660	64670	bigwig_sample_lo	-1
+Merlin	65050	65060	bigwig_sample_lo	-1
+Merlin	66210	66220	bigwig_sample_hi	1
+Merlin	66510	66520	bigwig_sample_hi	1
+Merlin	66660	66670	bigwig_sample_lo	-1
+Merlin	66850	66860	bigwig_sample_hi	1
+Merlin	66900	66910	bigwig_sample_lo	-1
+Merlin	67150	67160	bigwig_sample_lo	-1
+Merlin	67690	67700	bigwig_sample_hi	1
+Merlin	68760	68780	bigwig_sample_hi	1
+Merlin	68790	68800	bigwig_sample_lo	-1
+Merlin	69660	69670	bigwig_sample_lo	-1
+Merlin	69850	69860	bigwig_sample_hi	1
+chr21	375	385	1.bigwig_hi	1
+chr21	610	625	1.bigwig_lo	-1
+chr21	1010	1020	1.bigwig_lo	-1
+chr21	1060	1070	1.bigwig_lo	-1
+chr21	1170	1180	1.bigwig_lo	-1
+chr21	1210	1225	1.bigwig_lo	-1
+chr21	1250	1265	1.bigwig_lo	-1
+chr21	1280	1290	1.bigwig_lo	-1
+chr21	1450	1460	1.bigwig_lo	-1
+chr21	1500	1510	1.bigwig_lo	-1
+chr21	1865	1875	1.bigwig_lo	-1
+chr21	1980	1990	1.bigwig_lo	-1
+chr21	2385	2400	1.bigwig_hi	1
+chr21	2625	2635	1.bigwig_hi	1
+chr21	2960	2970	1.bigwig_lo	-1
+chr21	3025	3035	1.bigwig_lo	-1
+chr21	3465	3475	1.bigwig_lo	-1
+chr21	3490	3500	1.bigwig_lo	-1
+chr21	3670	3680	1.bigwig_lo	-1
+chr21	3850	3865	1.bigwig_lo	-1
+chr21	3875	3885	1.bigwig_lo	-1
+chr21	3915	3925	1.bigwig_lo	-1
+chr21	4495	4510	1.bigwig_lo	-1
+chr21	4630	4640	1.bigwig_lo	-1
+chr21	4975	4985	1.bigwig_lo	-1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bedouthilo_sample	Fri Jul 05 06:00:15 2024 +0000
@@ -0,0 +1,139 @@
+Merlin	20	30	bigwig_sample_hi	1
+Merlin	80	90	bigwig_sample_lo	-1
+Merlin	190	200	bigwig_sample_hi	1
+Merlin	430	440	bigwig_sample_lo	-1
+Merlin	1230	1240	bigwig_sample_lo	-1
+Merlin	1570	1580	bigwig_sample_hi	1
+Merlin	1730	1740	bigwig_sample_hi	1
+Merlin	1850	1860	bigwig_sample_hi	1
+Merlin	1880	1890	bigwig_sample_hi	1
+Merlin	2670	2680	bigwig_sample_lo	-1
+Merlin	3400	3410	bigwig_sample_hi	1
+Merlin	3740	3750	bigwig_sample_lo	-1
+Merlin	4030	4040	bigwig_sample_hi	1
+Merlin	4700	4710	bigwig_sample_lo	-1
+Merlin	5870	5890	bigwig_sample_lo	-1
+Merlin	6290	6300	bigwig_sample_lo	-1
+Merlin	7120	7130	bigwig_sample_hi	1
+Merlin	7860	7870	bigwig_sample_hi	1
+Merlin	8280	8290	bigwig_sample_hi	1
+Merlin	8860	8870	bigwig_sample_lo	-1
+Merlin	10520	10530	bigwig_sample_lo	-1
+Merlin	10820	10830	bigwig_sample_hi	1
+Merlin	11190	11200	bigwig_sample_lo	-1
+Merlin	11380	11390	bigwig_sample_lo	-1
+Merlin	11810	11820	bigwig_sample_lo	-1
+Merlin	12660	12670	bigwig_sample_lo	-1
+Merlin	13310	13320	bigwig_sample_hi	1
+Merlin	14160	14170	bigwig_sample_lo	-1
+Merlin	14750	14760	bigwig_sample_lo	-1
+Merlin	16270	16280	bigwig_sample_lo	-1
+Merlin	17240	17250	bigwig_sample_lo	-1
+Merlin	17570	17580	bigwig_sample_hi	1
+Merlin	17940	17950	bigwig_sample_hi	1
+Merlin	18290	18300	bigwig_sample_lo	-1
+Merlin	18340	18350	bigwig_sample_hi	1
+Merlin	18810	18820	bigwig_sample_hi	1
+Merlin	19080	19090	bigwig_sample_lo	-1
+Merlin	19220	19230	bigwig_sample_lo	-1
+Merlin	20240	20250	bigwig_sample_lo	-1
+Merlin	21650	21660	bigwig_sample_lo	-1
+Merlin	21810	21820	bigwig_sample_lo	-1
+Merlin	22310	22320	bigwig_sample_hi	1
+Merlin	23630	23640	bigwig_sample_lo	-1
+Merlin	23760	23770	bigwig_sample_hi	1
+Merlin	24580	24590	bigwig_sample_hi	1
+Merlin	24860	24870	bigwig_sample_hi	1
+Merlin	25030	25040	bigwig_sample_lo	-1
+Merlin	25700	25710	bigwig_sample_hi	1
+Merlin	26260	26270	bigwig_sample_lo	-1
+Merlin	26450	26460	bigwig_sample_hi	1
+Merlin	26560	26570	bigwig_sample_lo	-1
+Merlin	26610	26620	bigwig_sample_lo	-1
+Merlin	27220	27230	bigwig_sample_hi	1
+Merlin	27280	27290	bigwig_sample_hi	1
+Merlin	27670	27680	bigwig_sample_lo	-1
+Merlin	27970	27980	bigwig_sample_lo	-1
+Merlin	28500	28510	bigwig_sample_hi	1
+Merlin	29400	29410	bigwig_sample_lo	-1
+Merlin	29740	29750	bigwig_sample_hi	1
+Merlin	29910	29920	bigwig_sample_lo	-1
+Merlin	31540	31550	bigwig_sample_hi	1
+Merlin	31890	31900	bigwig_sample_hi	1
+Merlin	32970	32980	bigwig_sample_hi	1
+Merlin	33460	33470	bigwig_sample_lo	-1
+Merlin	33910	33920	bigwig_sample_lo	-1
+Merlin	33980	33990	bigwig_sample_hi	1
+Merlin	34470	34490	bigwig_sample_lo	-1
+Merlin	35320	35330	bigwig_sample_lo	-1
+Merlin	35440	35450	bigwig_sample_hi	1
+Merlin	35620	35630	bigwig_sample_lo	-1
+Merlin	35880	35890	bigwig_sample_lo	-1
+Merlin	36510	36520	bigwig_sample_hi	1
+Merlin	36810	36820	bigwig_sample_lo	-1
+Merlin	37230	37240	bigwig_sample_lo	-1
+Merlin	37560	37570	bigwig_sample_lo	-1
+Merlin	37750	37760	bigwig_sample_lo	-1
+Merlin	38330	38340	bigwig_sample_lo	-1
+Merlin	39600	39610	bigwig_sample_lo	-1
+Merlin	39690	39700	bigwig_sample_hi	1
+Merlin	40350	40360	bigwig_sample_hi	1
+Merlin	40550	40560	bigwig_sample_hi	1
+Merlin	40780	40790	bigwig_sample_hi	1
+Merlin	41390	41400	bigwig_sample_hi	1
+Merlin	41900	41910	bigwig_sample_lo	-1
+Merlin	41940	41950	bigwig_sample_hi	1
+Merlin	42050	42060	bigwig_sample_lo	-1
+Merlin	42470	42480	bigwig_sample_hi	1
+Merlin	42560	42570	bigwig_sample_hi	1
+Merlin	42730	42740	bigwig_sample_hi	1
+Merlin	43010	43020	bigwig_sample_hi	1
+Merlin	43910	43920	bigwig_sample_hi	1
+Merlin	44440	44450	bigwig_sample_lo	-1
+Merlin	44670	44680	bigwig_sample_hi	1
+Merlin	46010	46020	bigwig_sample_hi	1
+Merlin	46470	46480	bigwig_sample_hi	1
+Merlin	46610	46620	bigwig_sample_lo	-1
+Merlin	49290	49300	bigwig_sample_lo	-1
+Merlin	49370	49380	bigwig_sample_hi	1
+Merlin	50310	50320	bigwig_sample_hi	1
+Merlin	50880	50890	bigwig_sample_lo	-1
+Merlin	52230	52240	bigwig_sample_lo	-1
+Merlin	52460	52470	bigwig_sample_lo	-1
+Merlin	52740	52750	bigwig_sample_lo	-1
+Merlin	52770	52780	bigwig_sample_lo	-1
+Merlin	52980	52990	bigwig_sample_hi	1
+Merlin	53150	53160	bigwig_sample_lo	-1
+Merlin	54630	54640	bigwig_sample_hi	1
+Merlin	54830	54840	bigwig_sample_lo	-1
+Merlin	55430	55440	bigwig_sample_hi	1
+Merlin	56020	56030	bigwig_sample_lo	-1
+Merlin	56450	56460	bigwig_sample_hi	1
+Merlin	56630	56640	bigwig_sample_hi	1
+Merlin	57220	57230	bigwig_sample_lo	-1
+Merlin	57610	57620	bigwig_sample_hi	1
+Merlin	57790	57800	bigwig_sample_hi	1
+Merlin	58730	58740	bigwig_sample_hi	1
+Merlin	59360	59370	bigwig_sample_hi	1
+Merlin	59450	59460	bigwig_sample_hi	1
+Merlin	60210	60220	bigwig_sample_hi	1
+Merlin	61110	61120	bigwig_sample_hi	1
+Merlin	61250	61260	bigwig_sample_lo	-1
+Merlin	62470	62480	bigwig_sample_hi	1
+Merlin	63190	63200	bigwig_sample_lo	-1
+Merlin	63290	63300	bigwig_sample_lo	-1
+Merlin	63330	63340	bigwig_sample_hi	1
+Merlin	63350	63360	bigwig_sample_hi	1
+Merlin	64660	64670	bigwig_sample_lo	-1
+Merlin	65050	65060	bigwig_sample_lo	-1
+Merlin	66210	66220	bigwig_sample_hi	1
+Merlin	66510	66520	bigwig_sample_hi	1
+Merlin	66660	66670	bigwig_sample_lo	-1
+Merlin	66850	66860	bigwig_sample_hi	1
+Merlin	66900	66910	bigwig_sample_lo	-1
+Merlin	67150	67160	bigwig_sample_lo	-1
+Merlin	67690	67700	bigwig_sample_hi	1
+Merlin	68760	68780	bigwig_sample_hi	1
+Merlin	68790	68800	bigwig_sample_lo	-1
+Merlin	69660	69670	bigwig_sample_lo	-1
+Merlin	69850	69860	bigwig_sample_hi	1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bedoutlo2_sample	Fri Jul 05 06:00:15 2024 +0000
@@ -0,0 +1,91 @@
+Merlin	80	90	bigwig_sample_lo	-1
+Merlin	430	440	bigwig_sample_lo	-1
+Merlin	1230	1240	bigwig_sample_lo	-1
+Merlin	2670	2680	bigwig_sample_lo	-1
+Merlin	3740	3750	bigwig_sample_lo	-1
+Merlin	4700	4710	bigwig_sample_lo	-1
+Merlin	5870	5890	bigwig_sample_lo	-1
+Merlin	6290	6300	bigwig_sample_lo	-1
+Merlin	8860	8870	bigwig_sample_lo	-1
+Merlin	10520	10530	bigwig_sample_lo	-1
+Merlin	11190	11200	bigwig_sample_lo	-1
+Merlin	11380	11390	bigwig_sample_lo	-1
+Merlin	11810	11820	bigwig_sample_lo	-1
+Merlin	12660	12670	bigwig_sample_lo	-1
+Merlin	14160	14170	bigwig_sample_lo	-1
+Merlin	14750	14760	bigwig_sample_lo	-1
+Merlin	16270	16280	bigwig_sample_lo	-1
+Merlin	17240	17250	bigwig_sample_lo	-1
+Merlin	18290	18300	bigwig_sample_lo	-1
+Merlin	19080	19090	bigwig_sample_lo	-1
+Merlin	19220	19230	bigwig_sample_lo	-1
+Merlin	20240	20250	bigwig_sample_lo	-1
+Merlin	21650	21660	bigwig_sample_lo	-1
+Merlin	21810	21820	bigwig_sample_lo	-1
+Merlin	23630	23640	bigwig_sample_lo	-1
+Merlin	25030	25040	bigwig_sample_lo	-1
+Merlin	26260	26270	bigwig_sample_lo	-1
+Merlin	26560	26570	bigwig_sample_lo	-1
+Merlin	26610	26620	bigwig_sample_lo	-1
+Merlin	27670	27680	bigwig_sample_lo	-1
+Merlin	27970	27980	bigwig_sample_lo	-1
+Merlin	29400	29410	bigwig_sample_lo	-1
+Merlin	29910	29920	bigwig_sample_lo	-1
+Merlin	33460	33470	bigwig_sample_lo	-1
+Merlin	33910	33920	bigwig_sample_lo	-1
+Merlin	34470	34490	bigwig_sample_lo	-1
+Merlin	35320	35330	bigwig_sample_lo	-1
+Merlin	35620	35630	bigwig_sample_lo	-1
+Merlin	35880	35890	bigwig_sample_lo	-1
+Merlin	36810	36820	bigwig_sample_lo	-1
+Merlin	37230	37240	bigwig_sample_lo	-1
+Merlin	37560	37570	bigwig_sample_lo	-1
+Merlin	37750	37760	bigwig_sample_lo	-1
+Merlin	38330	38340	bigwig_sample_lo	-1
+Merlin	39600	39610	bigwig_sample_lo	-1
+Merlin	41900	41910	bigwig_sample_lo	-1
+Merlin	42050	42060	bigwig_sample_lo	-1
+Merlin	44440	44450	bigwig_sample_lo	-1
+Merlin	46610	46620	bigwig_sample_lo	-1
+Merlin	49290	49300	bigwig_sample_lo	-1
+Merlin	50880	50890	bigwig_sample_lo	-1
+Merlin	52230	52240	bigwig_sample_lo	-1
+Merlin	52460	52470	bigwig_sample_lo	-1
+Merlin	52740	52750	bigwig_sample_lo	-1
+Merlin	52770	52780	bigwig_sample_lo	-1
+Merlin	53150	53160	bigwig_sample_lo	-1
+Merlin	54830	54840	bigwig_sample_lo	-1
+Merlin	56020	56030	bigwig_sample_lo	-1
+Merlin	57220	57230	bigwig_sample_lo	-1
+Merlin	61250	61260	bigwig_sample_lo	-1
+Merlin	63190	63200	bigwig_sample_lo	-1
+Merlin	63290	63300	bigwig_sample_lo	-1
+Merlin	64660	64670	bigwig_sample_lo	-1
+Merlin	65050	65060	bigwig_sample_lo	-1
+Merlin	66660	66670	bigwig_sample_lo	-1
+Merlin	66900	66910	bigwig_sample_lo	-1
+Merlin	67150	67160	bigwig_sample_lo	-1
+Merlin	68790	68800	bigwig_sample_lo	-1
+Merlin	69660	69670	bigwig_sample_lo	-1
+chr21	610	625	1.bigwig_lo	-1
+chr21	1010	1020	1.bigwig_lo	-1
+chr21	1060	1070	1.bigwig_lo	-1
+chr21	1170	1180	1.bigwig_lo	-1
+chr21	1210	1225	1.bigwig_lo	-1
+chr21	1250	1265	1.bigwig_lo	-1
+chr21	1280	1290	1.bigwig_lo	-1
+chr21	1450	1460	1.bigwig_lo	-1
+chr21	1500	1510	1.bigwig_lo	-1
+chr21	1865	1875	1.bigwig_lo	-1
+chr21	1980	1990	1.bigwig_lo	-1
+chr21	2960	2970	1.bigwig_lo	-1
+chr21	3025	3035	1.bigwig_lo	-1
+chr21	3465	3475	1.bigwig_lo	-1
+chr21	3490	3500	1.bigwig_lo	-1
+chr21	3670	3680	1.bigwig_lo	-1
+chr21	3850	3865	1.bigwig_lo	-1
+chr21	3875	3885	1.bigwig_lo	-1
+chr21	3915	3925	1.bigwig_lo	-1
+chr21	4495	4510	1.bigwig_lo	-1
+chr21	4630	4640	1.bigwig_lo	-1
+chr21	4975	4985	1.bigwig_lo	-1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bedoutlo_sample	Fri Jul 05 06:00:15 2024 +0000
@@ -0,0 +1,69 @@
+Merlin	80	90	bigwig_sample_lo	-1
+Merlin	430	440	bigwig_sample_lo	-1
+Merlin	1230	1240	bigwig_sample_lo	-1
+Merlin	2670	2680	bigwig_sample_lo	-1
+Merlin	3740	3750	bigwig_sample_lo	-1
+Merlin	4700	4710	bigwig_sample_lo	-1
+Merlin	5870	5890	bigwig_sample_lo	-1
+Merlin	6290	6300	bigwig_sample_lo	-1
+Merlin	8860	8870	bigwig_sample_lo	-1
+Merlin	10520	10530	bigwig_sample_lo	-1
+Merlin	11190	11200	bigwig_sample_lo	-1
+Merlin	11380	11390	bigwig_sample_lo	-1
+Merlin	11810	11820	bigwig_sample_lo	-1
+Merlin	12660	12670	bigwig_sample_lo	-1
+Merlin	14160	14170	bigwig_sample_lo	-1
+Merlin	14750	14760	bigwig_sample_lo	-1
+Merlin	16270	16280	bigwig_sample_lo	-1
+Merlin	17240	17250	bigwig_sample_lo	-1
+Merlin	18290	18300	bigwig_sample_lo	-1
+Merlin	19080	19090	bigwig_sample_lo	-1
+Merlin	19220	19230	bigwig_sample_lo	-1
+Merlin	20240	20250	bigwig_sample_lo	-1
+Merlin	21650	21660	bigwig_sample_lo	-1
+Merlin	21810	21820	bigwig_sample_lo	-1
+Merlin	23630	23640	bigwig_sample_lo	-1
+Merlin	25030	25040	bigwig_sample_lo	-1
+Merlin	26260	26270	bigwig_sample_lo	-1
+Merlin	26560	26570	bigwig_sample_lo	-1
+Merlin	26610	26620	bigwig_sample_lo	-1
+Merlin	27670	27680	bigwig_sample_lo	-1
+Merlin	27970	27980	bigwig_sample_lo	-1
+Merlin	29400	29410	bigwig_sample_lo	-1
+Merlin	29910	29920	bigwig_sample_lo	-1
+Merlin	33460	33470	bigwig_sample_lo	-1
+Merlin	33910	33920	bigwig_sample_lo	-1
+Merlin	34470	34490	bigwig_sample_lo	-1
+Merlin	35320	35330	bigwig_sample_lo	-1
+Merlin	35620	35630	bigwig_sample_lo	-1
+Merlin	35880	35890	bigwig_sample_lo	-1
+Merlin	36810	36820	bigwig_sample_lo	-1
+Merlin	37230	37240	bigwig_sample_lo	-1
+Merlin	37560	37570	bigwig_sample_lo	-1
+Merlin	37750	37760	bigwig_sample_lo	-1
+Merlin	38330	38340	bigwig_sample_lo	-1
+Merlin	39600	39610	bigwig_sample_lo	-1
+Merlin	41900	41910	bigwig_sample_lo	-1
+Merlin	42050	42060	bigwig_sample_lo	-1
+Merlin	44440	44450	bigwig_sample_lo	-1
+Merlin	46610	46620	bigwig_sample_lo	-1
+Merlin	49290	49300	bigwig_sample_lo	-1
+Merlin	50880	50890	bigwig_sample_lo	-1
+Merlin	52230	52240	bigwig_sample_lo	-1
+Merlin	52460	52470	bigwig_sample_lo	-1
+Merlin	52740	52750	bigwig_sample_lo	-1
+Merlin	52770	52780	bigwig_sample_lo	-1
+Merlin	53150	53160	bigwig_sample_lo	-1
+Merlin	54830	54840	bigwig_sample_lo	-1
+Merlin	56020	56030	bigwig_sample_lo	-1
+Merlin	57220	57230	bigwig_sample_lo	-1
+Merlin	61250	61260	bigwig_sample_lo	-1
+Merlin	63190	63200	bigwig_sample_lo	-1
+Merlin	63290	63300	bigwig_sample_lo	-1
+Merlin	64660	64670	bigwig_sample_lo	-1
+Merlin	65050	65060	bigwig_sample_lo	-1
+Merlin	66660	66670	bigwig_sample_lo	-1
+Merlin	66900	66910	bigwig_sample_lo	-1
+Merlin	67150	67160	bigwig_sample_lo	-1
+Merlin	68790	68800	bigwig_sample_lo	-1
+Merlin	69660	69670	bigwig_sample_lo	-1
Binary file test-data/bigwig_sample has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/table2_sample	Fri Jul 05 06:00:15 2024 +0000
@@ -0,0 +1,3 @@
+bigwig	contig	n	mean	std	min	max	qtop	qbot
+bigwig_sample	Merlin	70040	16414.614934	9523.634628	13.000000	32767.000000	32387.000000	323.000000
+1.bigwig	chr21	4995	33.203203	21.071159	0.000000	100.000000	80.000000	0.000000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/table_sample	Fri Jul 05 06:00:15 2024 +0000
@@ -0,0 +1,2 @@
+bigwig	contig	n	mean	std	min	max	qtop	qbot
+bigwig_sample	Merlin	70040	16414.614934	9523.634628	13.000000	32767.000000	32387.000000	323.000000