Repository 'damidseq_findpeaks'
hg clone https://toolshed.g2.bx.psu.edu/repos/mvdbeek/damidseq_findpeaks

Changeset 0:be830200e987 (2018-04-20)
Next changeset 1:e726f7546561 (2018-04-20)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/damidseq_findpeaks commit 87c99a97cb2ce55640afdd2e55c8b3ae5ad99324
added:
damidseq_findpeaks.xml
find_peaks
test-data/hp1.bed
test-data/peaks.gff
b
diff -r 000000000000 -r be830200e987 damidseq_findpeaks.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/damidseq_findpeaks.xml Fri Apr 20 04:34:17 2018 -0400
[
@@ -0,0 +1,68 @@
+<tool id="damidseq_find_peaks" name="damidseq find peaks" version="0.1.3">
+    <description>Simple FDR random permutation peak caller</description>
+    <requirements>
+        <requirement type="package" version="5.26">perl</requirement>
+    </requirements>
+    <version_command><![CDATA['$__tool_directory__/find_peaks' --help 2>&1| grep find_peaks]]></version_command>
+    <command detect_errors="aggressive"><![CDATA[
+'$__tool_directory__/find_peaks'
+ --fdr=$fdr
+ --frac=$fdr
+ --min_count=$min_count
+ --min_quant=$min_quant
+ --n=$n
+ --step=$step
+ --unified_peaks=$unified_peaks
+ '$input_file' && 
+mv peak_analysis*/*.gff peaks.gff &&
+mv peak_analysis*/*data log.txt
+    ]]></command>
+    <inputs>
+        <param name="input_file" type="data" format="gff,bed,bedgraph" label="Select dam-fusion/dam ratio files" help="You can use damidseq_core to produce this file."/>
+        <param argument="--fdr" type="float" min="0" max="1" value="0.01" label="Set the False Discovery Rate (FDR)"/>
+        <param argument="--frac" type="float" min="0" max="1" value="0.01" label="Number of random fragments to consider per iteration"/>
+        <param argument="--min_count" type="integer" min="1" value="2" label="Minimum number of fragments to consider as a peak"/>
+        <param argument="--min_quant" type="float" min="0" max="1" value="0.95" label="Minimum quantile for considering peaks"/>
+        <param argument="--n" type="integer" min="1" value="100" label="Number of iterations"/>
+        <param argument="--step" type="float" min="0" max="1" value="0.01" label="Stepping for quantiles"/>
+        <param argument="--unified_peaks" type="select" label="Set the False Discovery Rate (FDR)">
+            <option value="max">call maximum overlap as peak</option>
+            <option value="min">call minimum overlap as peak</option>
+        </param>
+    </inputs>
+    <outputs>
+        <data name="peaks" format="gff3" from_work_dir="peaks.gff" label="${tool.name} on ${on_string}"/>
+        <data name="logs" format="txt" hidden="true" from_work_dir="log.txt" label="${tool.name} logs on ${on_string}"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input_file" value="hp1.bed" ftype="bed"/>
+            <param name="min_count" value="1"/>
+            <param name="fdr" value="0.1"/>
+            <output name="peaks" value="peaks.gff"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+
+Options:
+ --fdr            False discovery rate value
+                    [Current value: 0.01]
+ --frac           Number of random fragments to consider per iteration
+ --min_count      Minimum number of fragments to consider as a peak
+                    [Current value: 2]
+ --min_quant      Minimum quantile for considering peaks
+                    [Current value: 0.95]
+ --n              Number of iterations
+                    [Current value: 100]
+ --step           Stepping for quantiles
+                    [Current value: 0.01]
+ --unified_peaks  Method for calling peak overlaps (two options):
+                    'min': call minimum overlapping peak area
+                    'max': call maximum overlap as peak
+                    [Current value: max]
+
+        ]]></help>
+    <citations>
+        <citation type="doi">10.1093/bioinformatics/btv386</citation>
+    </citations>
+</tool>
b
diff -r 000000000000 -r be830200e987 find_peaks
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/find_peaks Fri Apr 20 04:34:17 2018 -0400
[
b'@@ -0,0 +1,633 @@\n+#!/usr/bin/perl -w\n+\n+# Copyright \xa9 2012-2015, Owen Marshall\n+\n+# This program is free software; you can redistribute it and/or modify\n+# it under the terms of the GNU General Public License as published by\n+# the Free Software Foundation; either version 2 of the License, or (at\n+# your option) any later version. \n+# \n+# This program is distributed in the hope that it will be useful, but\n+# WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+# General Public License for more details. \n+# \n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, write to the Free Software\n+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 \n+# USA\n+\n+use strict;\n+use File::Basename;\n+use 5.010;\n+$|++;\n+\n+my $version = "1.0.1";\n+\n+print STDERR "\\nfind_peaks v$version\\nCopyright \xa9 2012-15, Owen Marshall\\n\\n";\n+\n+my %vars = (\n+\t\'fdr\' => 0.01,\n+\t\'min_count\' => 2,\n+\t\'n\' => 100,\n+\t\'frac\' => 0,\n+\t\'min_quant\' => 0.95,\n+\t\'step\' => 0.01,\n+\t\'unified_peaks\' => \'max\',\n+);\n+\n+my %vars_details = (\n+\t\'fdr\' => \'False discovery rate value\',\n+\t\'min_count\' => \'Minimum number of fragments to consider as a peak\',\n+\t\'n\' => \'Number of iterations\',\n+\t\'frac\' => \'Number of random fragments to consider per iteration\',\n+\t\'min_quant\' => \'Minimum quantile for considering peaks\',\n+\t\'step\' => \'Stepping for quantiles\',\n+\t\'unified_peaks\' => "Method for calling peak overlaps (two options):\\n\\r\'min\': call minimum overlapping peak area\\n\\r\'max\': call maximum overlap as peak",\n+);\n+\n+\n+my @in_files;\n+process_cli();\n+\n+# Time and date\n+my ($sec,$min,$hour,$mday,$mon,$year) = localtime();\n+my $date = sprintf("%04d-%02d-%02d.%02d-%02d-%02d",$year+1900,$mon+1,$mday,$hour,$min,$sec);\n+\n+help() unless @in_files;\n+\n+foreach my $fn (@in_files) {\n+\tmy @in;\n+\tmy @unified_peaks;\n+\tmy @sig_peaks;\n+\tmy @peakmins;\n+\t\n+\tmy %peaks;\n+\tmy %peak_count;\n+\tmy %peak_count_real;\n+\tmy %log_scores;\n+\tmy %regression;\n+\tmy %peak_fdr_cutoff;\n+\tmy %fdr;\n+\t\n+\t# Output file names\n+\tmy ($name,$dir,$ext) = fileparse($fn, qr/\\.[^.]*/);\n+\t\n+\t# filenames\n+\tmy $fn_base_date = "peak_analysis.".$name.".$date";\n+\tmy $base_dir = "$fn_base_date/";\n+\tmy $out = "$base_dir"."$name-FDR$vars{\'fdr\'}";\n+\tmy $out_peak_unified_track = $out.".peaks.gff";\n+\tmy $out_peaks = $out."_FDR-data";\n+\t\n+\t# Load gff data files\n+\tload_gff(FILE=>$fn, IN_REF=>\\@in);\n+\t\n+\tmy $probes = @in;\n+\t\n+\tfind_quants(IN_REF=>\\@in, PEAKMINS_REF=>\\@peakmins);\n+\tfind_randomised_peaks(IN_REF=>\\@in, PEAKMINS_REF=>\\@peakmins, PEAK_COUNT=>\\%peak_count, PEAKS=>\\%peaks);\n+\t\n+\t# Make directory\n+\tmkdir($base_dir);\n+\t\n+\t# Open peaks file for writing\n+\topen(OUTP, ">$out_peaks")|| die "Cannot open peak file for writing: $!\\n";\n+\tprint OUTP "FDR peak call v$version\\n\\n";\n+\tprint OUTP "Input file: $fn\\n";\n+\t\n+\tcalculate_regressions(IN_REF=>\\@in, PEAKMINS_REF=>\\@peakmins, PEAK_COUNT=>\\%peak_count, PEAKS=>\\%peaks, LOG_SCORES=>\\%log_scores, REGRESSION=>\\%regression);\n+\t\n+\tcall_peaks_unified_redux(ITER=>1, REAL=>1, AREF=>\\@in, PEAKMINS_REF=>\\@peakmins, PEAK_COUNT=>\\%peak_count, PEAK_COUNT_REAL=>\\%peak_count_real, PEAKS=>\\%peaks);\n+\t\n+\tcalculate_fdr(IN_REF=>\\@in, PEAKMINS_REF=>\\@peakmins, PEAK_COUNT=>\\%peak_count, PEAK_COUNT_REAL=>\\%peak_count_real, PEAK_FDR_CUTOFF=>\\%peak_fdr_cutoff, FDR=>\\%fdr, LOG_SCORES=>\\%log_scores, REGRESSION=>\\%regression);\n+\t\n+\tfind_significant_peaks(PEAKMINS=>\\@peakmins, SIG_PEAKS=>\\@sig_peaks, PEAKS=>\\%peaks, PEAK_FDR_CUTOFF=>\\%peak_fdr_cutoff, FDR=>\\%fdr);\n+\t\n+\tmake_unified_peaks(SIG_PEAKS=>\\@sig_peaks, UNIFIED_PEAKS=>\\@unified_peaks, OUT=>$out_peak_unified_track, TYPE=>$vars{\'unified_peaks\'});\n+\t\n+\tprint STDERR "$#unified_peaks peaks found.\\n\\n";\n+\t\n+\tclose OUTP;\n+}\n+\n+print STDERR "All done.\\n\\n";\n+exit 0;\n+\n+\n+######################\n+# Subroutines start here\n+#\n+\n+sub find_significant_peaks {\n+\tmy (%opts) = @_;\n+\t\n+\tmy $peakmins = $opts{PEAKMINS};\n+\tmy $peaks = $opts{PEAKS};\n+\tmy $sig_p'..b'ts{OUT};\n+\tmy $unified_peaks = $opts{UNIFIED_PEAKS};\n+\tmy $type = $opts{TYPE};\n+\tmy $total = @$ref;\n+\t\t\n+\t# Unify overlapping peaks, and make significant peaks file\n+\tmy $skipped_peaks;\n+\tprint STDERR "Combining significant peaks ...\\n";\n+\t\n+\t# unroll chromosomes for speed\n+\tforeach my $chr (uniq( map @{$_}[0], @$ref )) {\n+\t\tmy @c = grep {@{$_}[0] eq $chr} @$ref;\n+\t\t\n+\t\tmy @unified_peaks_chr;\n+\t\tforeach my $ar (@c) {\n+\t\t\tif (state $i++ % 100 == 0) {\n+\t\t\t\t\tmy $pc = sprintf("%0.2f",($i*100)/$total);\n+\t\t\t\t\tprint STDERR "$pc\\% processed ...\\r";\n+\t\t\t}\n+\t\t\t\n+\t\t\tmy ($chra, $start, $end, $score, $total_score, $count, $peaklen, $fdr) = @$ar;\n+\t\t\t\n+\t\t\t# next if @unified_peaks_chr already overlaps\n+\t\t\tnext if grep {\n+\t\t\t\t\t\t@{$_}[3] < $end\n+\t\t\t\t\t\t&& @{$_}[4] > $start\n+\t\t\t\t\t} @unified_peaks_chr;\n+\t\t\t\n+\t\t\t# Grab all elements that overlap\n+\t\t\tmy @test = grep {\n+\t\t\t\t\t\t@{$_}[1] < $end\n+\t\t\t\t\t\t&& @{$_}[2] > $start\n+\t\t\t\t\t} @c;\n+\t\t\t\n+\t\t\tfor my $j (0 .. $#test) {\n+\t\t\t\tmy ($chr1, $start1, $end1, $score1, $total_score1, $count1, $peaklen1, $fdr1) = @{$test[$j]};\n+\t\t\t\t\n+\t\t\t\tnext unless $start1 < $end;\n+\t\t\t\tnext unless $end1 > $start;\n+\t\t\t\t\n+\t\t\t\tif ($type eq \'min\') {\n+\t\t\t\t\t$start = max($start, $start1);\n+\t\t\t\t\t$end = min($end, $end1);\n+\t\t\t\t} else {\n+\t\t\t\t\t$start = min($start, $start1);\n+\t\t\t\t\t$end = max($end, $end1);\n+\t\t\t\t}\n+\t\t\t\t\n+\t\t\t\t$score = max($score, $score1);\n+\t\t\t\t$fdr = min($fdr, $fdr1);\n+\t\t\t}\n+\t\t\t\n+\t\t\tpush @unified_peaks_chr, [($chr, \'.\', \'.\', $start, $end, $score, \'.\', \'.\', "FDR=$fdr")];\n+\t\t}\n+\t\t\n+\t\t@$unified_peaks = (@$unified_peaks, @unified_peaks_chr);\n+\t}\n+\t\n+\t$total = $#$unified_peaks;\n+\t\n+\tprint STDERR "Sorting unified peaks ...\\n";\n+\t@$unified_peaks = sort { $a->[3] <=> $b->[3] } @$unified_peaks;\n+\t@$unified_peaks = sort { $a->[0] cmp $b->[0] } @$unified_peaks;\n+\t\n+\tprint STDERR "Writing unified peaks file ...\\n";\n+\topen(PEAKOUTUNI, ">$out_peak_unified_track") || die "Unable to open peak output track for writing: $!\\n\\n"; \n+\tfor my $j (0 .. $#$unified_peaks) {\n+\t\tprint PEAKOUTUNI join("\\t", @{$$unified_peaks[$j]}), "\\n";\n+\t}\n+}\n+\n+sub max {\n+    my ($max, @vars) = @_;\n+\tmy $index=0;\n+\t$max||=0;\n+    for my $i (0..$#vars) {\n+        ($max, $index) = ($vars[$i], $i+1) if $vars[$i] > $max;\n+    }\n+    return $max;\n+}\n+\n+sub min {\n+    my ($min, @vars) = @_;\n+\tmy $index=0;\n+\t$min||=0;\n+    for my $i (0..$#vars) {\n+        ($min, $index) = ($vars[$i],$i+1) if $vars[$i] < $min;\n+    }\n+    return $min;\n+}\n+\n+sub uniq {\n+\tmy %seen;\n+\treturn grep { !$seen{$_}++ } @_;\n+}\n+\n+\n+\n+sub process_cli {\n+\tforeach (@ARGV) {\n+\t\tif (/--(.*)=(.*)/) {\n+\t\t\tunless (defined($vars{$1})) {\n+\t\t\t\tprint STDERR "Did not understand $_ ...\\n";\n+\t\t\t\thelp();\n+\t\t\t}\n+\t\t\tmy ($v, $opt) = ($1,$2);\n+\t\t\t$vars{$v} = $opt;\n+\t\t\tnext;\n+\t\t} elsif (/--h[elp]*/) {\n+\t\t\thelp();\n+\t\t} elsif (/--(.*)/) {\n+\t\t\tprint STDERR "Please add a parameter to $_ ...\\n\\n";\n+\t\t\texit 1;\n+\t\t}\n+\t\tpush @in_files, $_;\n+\t}\n+}\n+\n+\n+sub help {\n+\tprint STDOUT <<EOT;\n+Simple FDR random permutation peak caller\n+Usage: [options] [files in bedgraph or GFF format]\n+\t\n+Options:\n+EOT\n+\t\n+\tmy $opt_len = 0;\n+\tforeach (keys %vars) {\n+\t\tmy $l = length($_);\n+\t\t$opt_len = $l if $l > $opt_len;\n+\t}\n+\t\n+\t$opt_len+=2;\n+\t\n+\tmy $cols= `tput cols` || 80;\n+\t\n+\tmy ($v, $val, $def, $def_format);\n+\tmy $help_format = "format STDOUT =\\n"\n+\t\t.\' \'.\'^\'.\'<\'x$opt_len . \' \'. \'^\' . \'<\'x($cols-$opt_len-4) . "\\n"\n+\t\t.\'$v, $def_format\'."\\n"\n+\t\t.\' \'.\'^\'.\'<\'x$opt_len . \'   \'. \'^\' . \'<\'x($cols-$opt_len-6) . "~~\\n"\n+\t\t.\'$v, $def_format\'."\\n"\n+\t\t.".\\n";\n+\t\t\n+\teval $help_format;\n+\tdie $@ if $@;\n+\t\n+\tforeach my $k (sort (keys %vars)) {\n+\t\t($v, $val, $def) = ($k, $vars{$k}, $vars_details{$k});\n+\t\t$def||="";\n+\t\t$def_format = $val ? "$def\\n\\r[Current value: $val]" : $def;\n+\t\t$v = "--$v";\n+#\t\tformat =\n+# ^<<<<<<<<<<<<<<<<<<<< ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n+#$v, $def_format\n+# ^<<<<<<<<<<<<<<<<<<<<   ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~~\n+#$v, $def_format\n+#.\n+\n+\t\twrite();\n+\t\t\n+\t}\n+\tprint STDOUT "\\n";\n+\texit 1;\n+}\n'
b
diff -r 000000000000 -r be830200e987 test-data/hp1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/hp1.bed Fri Apr 20 04:34:17 2018 -0400
b
b'@@ -0,0 +1,2000 @@\n+3L\t17415961\t17416091\t-2.4153674931314\n+3L\t17416091\t17416196\t-2.55492586585599\n+3L\t17416196\t17416656\t2.05932465978737\n+3L\t17416656\t17417546\t-0.599249371648761\n+3L\t17417546\t17418033\t-4.07452348956241\n+3L\t17418033\t17418337\t-6.20594954430726\n+3L\t17418337\t17418447\t-5.26249039904586\n+3L\t17418447\t17418719\t-2.77645084089879\n+3L\t17418719\t17420249\t-1.51483717395\n+3L\t17420249\t17420459\t-3.807732051728\n+3L\t17420459\t17420660\t-4.17530933603838\n+3L\t17420660\t17421213\t-4.17530933603838\n+3L\t17421213\t17421223\t-2.90724258636772\n+3L\t17421223\t17421228\t-3.42663311503462\n+3L\t17421228\t17421615\t-3.56515643745284\n+3L\t17421615\t17421629\t0\n+3L\t17421629\t17421762\t-1.05910489381442\n+3L\t17421762\t17421772\t-2.0877734257891\n+3L\t17421772\t17421946\t-2.0877734257891\n+3L\t17421946\t17421980\t-1.39256885351249\n+3L\t17421980\t17422107\t-1.39256885351249\n+3L\t17422107\t17422172\t-2.90724258636772\n+3L\t17422172\t17422355\t-3.05563971869915\n+3L\t17422355\t17422490\t-2.0877734257891\n+3L\t17422490\t17422792\t-1.20186343010074\n+3L\t17422792\t17423430\t-2.84332836994737\n+3L\t17423430\t17423460\t-2.0877734257891\n+3L\t17423460\t17423535\t-1.39256885351249\n+3L\t17423535\t17423600\t0\n+3L\t17423600\t17423686\t0\n+3L\t17423686\t17423739\t-1.39256885351249\n+3L\t17423739\t17423973\t-2.34017592319915\n+3L\t17423973\t17424090\t-2.4153674931314\n+3L\t17424090\t17424215\t-3.42663311503462\n+3L\t17424215\t17424809\t-4.35793833134167\n+3L\t17424809\t17424921\t-3.56515643745284\n+3L\t17424921\t17425440\t-3.42663311503462\n+3L\t17425440\t17425825\t-2.26084893649928\n+3L\t17425825\t17425970\t-2.0877734257891\n+3L\t17425970\t17426273\t-3.42663311503462\n+3L\t17426273\t17426428\t-0.575168107609865\n+3L\t17426428\t17426746\t0.00482907107359622\n+3L\t17426746\t17426777\t-0.00467530052002015\n+3L\t17426777\t17426885\t-2.55492586585599\n+3L\t17426885\t17427159\t-2.77645084089879\n+3L\t17427159\t17427895\t-3.38234266122887\n+3L\t17427895\t17427930\t-2.55492586585599\n+3L\t17427930\t17427961\t0\n+3L\t17427961\t17427970\t0\n+3L\t17427970\t17428057\t0\n+3L\t17428057\t17428207\t0\n+3L\t17428207\t17428349\t-2.0877734257891\n+3L\t17428349\t17428494\t1.19717008618447\n+3L\t17428494\t17428510\t2.97408106030375\n+3L\t17428510\t17428639\t5.06185448609285\n+3L\t17428639\t17428708\t4.10441267255218\n+3L\t17428708\t17428781\t0\n+3L\t17428781\t17428864\t0\n+3L\t17428864\t17428938\t0\n+3L\t17428938\t17429057\t0\n+3L\t17429057\t17429071\t0\n+3L\t17429071\t17430048\t0\n+3L\t17430048\t17430148\t0\n+3L\t17430148\t17430342\t-1.78164771235138\n+3L\t17430342\t17430402\t-2.55492586585599\n+3L\t17430402\t17431777\t-2.53376819312325\n+3L\t17431777\t17431963\t-3.72147453126565\n+3L\t17431963\t17432187\t-5.53955621377484\n+3L\t17432187\t17432272\t-4.57024464575376\n+3L\t17432272\t17432335\t0\n+3L\t17432335\t17432373\t0\n+3L\t17432373\t17432404\t0\n+3L\t17432404\t17432455\t0\n+3L\t17432455\t17432587\t0\n+3L\t17432587\t17432785\t0\n+3L\t17432785\t17432846\t0\n+3L\t17432846\t17432868\t-1.39256885351249\n+3L\t17432868\t17432876\t-2.0877734257891\n+3L\t17432876\t17433362\t-1.73208775926791\n+3L\t17433362\t17434012\t-1.56098342977366\n+3L\t17434012\t17434745\t-2.0877734257891\n+3L\t17434745\t17434875\t-1.39256885351249\n+3L\t17434875\t17435361\t2.35624268381577\n+3L\t17435361\t17435492\t-1.05910489381442\n+3L\t17435492\t17435510\t0\n+3L\t17435510\t17435577\t0\n+3L\t17435577\t17435637\t-1.39256885351249\n+3L\t17435637\t17436191\t1.28498697177989\n+3L\t17436191\t17436240\t1.54948680669619\n+3L\t17436240\t17436340\t-4.10890705137129\n+3L\t17436340\t17436797\t-5.06648320422561\n+3L\t17436797\t17436977\t-3.1901861920131\n+3L\t17436977\t17437344\t-2.0877734257891\n+3L\t17437344\t17437377\t-2.0877734257891\n+3L\t17437377\t17437461\t-2.0877734257891\n+3L\t17437461\t17437783\t-2.0877734257891\n+3L\t17437783\t17443646\t-0.318351482828144\n+3L\t17443646\t17443808\t-0.858163070035469\n+3L\t17443808\t17444686\t-0.345861399909242\n+3L\t17444686\t17444691\t-2.0877734257891\n+3L\t17444691\t17444866\t-2.74181239868136\n+3L\t17444866\t17445180\t-4.21373152611049\n+3L\t17445180\t17445580\t-5.74298869455855\n+3L\t17445580\t17445763\t-4.2995935275974\n+3L\t17445763\t17446580\t-1.05910489381442\n+3L\t17446580\t17446681\t0\n+3L\t17446681\t17446688\t0\n+3L\t17446688\t17446769\t0\n+3L\t17446769\t17446858\t0\n+3L\t17446858\t17447621\t0\n+3L\t17447621\t17448967\t-0.424601364136886\n+3L\t174'..b'91\t-3.13786351330112\n+3L\t18105391\t18105423\t-4.75527859770636\n+3L\t18105423\t18105847\t-2.32864184726809\n+3L\t18105847\t18106276\t-1.85565337727462\n+3L\t18106276\t18107038\t-0.00356355365022258\n+3L\t18107038\t18107134\t-4.10890705137129\n+3L\t18107134\t18108071\t-4.26717158112086\n+3L\t18108071\t18108136\t-2.90724258636772\n+3L\t18108136\t18108218\t0\n+3L\t18108218\t18108316\t0\n+3L\t18108316\t18108337\t0\n+3L\t18108337\t18108392\t-3.96616443097239\n+3L\t18108392\t18108822\t-5.60525984962007\n+3L\t18108822\t18108854\t-3.96616443097239\n+3L\t18108854\t18109794\t-2.58530095496211\n+3L\t18109794\t18109992\t-5.72831892824831\n+3L\t18109992\t18110536\t-4.81897392259593\n+3L\t18110536\t18110880\t-5.32232407845369\n+3L\t18110880\t18110932\t0.296680620824183\n+3L\t18110932\t18110991\t2.97408106030375\n+3L\t18110991\t18111360\t1.70553589342993\n+3L\t18111360\t18111519\t-1.66324290730034\n+3L\t18111519\t18111660\t0\n+3L\t18111660\t18111788\t0\n+3L\t18111788\t18111958\t0\n+3L\t18111958\t18111973\t0\n+3L\t18111973\t18112166\t0\n+3L\t18112166\t18112224\t-3.807732051728\n+3L\t18112224\t18112606\t-5.53955621377484\n+3L\t18112606\t18113243\t-3.52044370844044\n+3L\t18113243\t18113412\t-2.55492586585599\n+3L\t18113412\t18113991\t-3.67633139673871\n+3L\t18113991\t18114297\t-4.91925594869484\n+3L\t18114297\t18114631\t-1.21517046020173\n+3L\t18114631\t18114873\t-1.77155672248989\n+3L\t18114873\t18114903\t-3.1901861920131\n+3L\t18114903\t18115050\t0\n+3L\t18115050\t18115188\t0\n+3L\t18115188\t18115227\t0\n+3L\t18115227\t18115384\t-2.4153674931314\n+3L\t18115384\t18115732\t-4.75527859770636\n+3L\t18115732\t18115875\t-3.42663311503462\n+3L\t18115875\t18117669\t-0.746118358928867\n+3L\t18117669\t18118073\t-2.8150453150792\n+3L\t18118073\t18119550\t-0.982053164881759\n+3L\t18119550\t18119830\t-1.21234200048783\n+3L\t18119830\t18119839\t-1.97197155116823\n+3L\t18119839\t18120240\t-4.15656641309002\n+3L\t18120240\t18120298\t-5.8952170740068\n+3L\t18120298\t18120337\t-4.91925594869484\n+3L\t18120337\t18120490\t0\n+3L\t18120490\t18120586\t-1.39256885351249\n+3L\t18120586\t18120729\t-3.10189685114339\n+3L\t18120729\t18121028\t-3.87320717616847\n+3L\t18121028\t18121118\t-2.90724258636772\n+3L\t18121118\t18121169\t-2.90724258636772\n+3L\t18121169\t18121766\t-4.2249221066907\n+3L\t18121766\t18121830\t-5.20006743060371\n+3L\t18121830\t18122118\t-5.83075574626064\n+3L\t18122118\t18122415\t-4.35793833134167\n+3L\t18122415\t18122731\t-4.78959902445488\n+3L\t18122731\t18122777\t-5.13482089478576\n+3L\t18122777\t18122807\t-5.43502497407227\n+3L\t18122807\t18123134\t-5.49864801902651\n+3L\t18123134\t18125416\t-1.33563555857024\n+3L\t18125416\t18125682\t-2.0877734257891\n+3L\t18125682\t18126068\t-5.06648320422561\n+3L\t18126068\t18126203\t-3.807732051728\n+3L\t18126203\t18126971\t-2.65985131681495\n+3L\t18126971\t18127447\t-0.621593005588116\n+3L\t18127447\t18128151\t-5.80582032059082\n+3L\t18128151\t18128367\t-4.23878936063925\n+3L\t18128367\t18128566\t-3.88912196962424\n+3L\t18128566\t18129562\t-2.90724258636772\n+3L\t18129562\t18129849\t-4.64712862306423\n+3L\t18129849\t18130219\t-4.78393535212557\n+3L\t18130219\t18130410\t-4.10890705137129\n+3L\t18130410\t18130431\t-4.35793833134167\n+3L\t18130431\t18130803\t-4.83959573744425\n+3L\t18130803\t18131537\t-4.66572604956879\n+3L\t18131537\t18131560\t-3.42663311503462\n+3L\t18131560\t18131639\t2.71184381903969\n+3L\t18131639\t18131669\t2.97408106030375\n+3L\t18131669\t18131854\t3.28020677374147\n+3L\t18131854\t18131873\t5.06185448609285\n+3L\t18131873\t18131987\t4.10441267255218\n+3L\t18131987\t18132144\t0\n+3L\t18132144\t18132315\t-3.42663311503462\n+3L\t18132315\t18132613\t-5.36846617965385\n+3L\t18132613\t18133074\t-4.65246668120586\n+3L\t18133074\t18133558\t-3.42663311503462\n+3L\t18133558\t18134814\t-1.17902990514451\n+3L\t18134814\t18135116\t0\n+3L\t18135116\t18135245\t0\n+3L\t18135245\t18136204\t-2.3067112819453\n+3L\t18136204\t18136587\t-4.66572604956879\n+3L\t18136587\t18136961\t-2.4153674931314\n+3L\t18136961\t18137813\t-1.78164771235138\n+3L\t18137813\t18139313\t-3.02166662541891\n+3L\t18139313\t18139356\t-3.62972994085222\n+3L\t18139356\t18139713\t-3.42663311503462\n+3L\t18139713\t18139828\t-2.0877734257891\n+3L\t18139828\t18139862\t0\n+3L\t18139862\t18139920\t0\n+3L\t18139920\t18141102\t0\n+3L\t18141102\t18142039\t-1.17015064642504\n+3L\t18142039\t18142143\t-1.05910489381442\n+3L\t18142143\t18142231\t-4.35793833134167\n'
b
diff -r 000000000000 -r be830200e987 test-data/peaks.gff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/peaks.gff Fri Apr 20 04:34:17 2018 -0400
b
@@ -0,0 +1,43 @@
+3L . . 17416196 17416656 2.06 . . FDR=0.0434782608695652
+3L . . 17428494 17428708 4.60 . . FDR=0.25
+3L . . 17434875 17435361 2.36 . . FDR=0.0434782608695652
+3L . . 17436191 17436240 1.55 . . FDR=0.0434782608695652
+3L . . 17454392 17455057 1.47 . . FDR=0.0434782608695652
+3L . . 17469263 17469357 1.76 . . FDR=0.25
+3L . . 17474212 17474436 2.67 . . FDR=0.1
+3L . . 17478792 17479470 2.71 . . FDR=0.25
+3L . . 17480437 17480672 4.80 . . FDR=0.1
+3L . . 17484190 17484263 1.55 . . FDR=0.0434782608695652
+3L . . 17493333 17493632 2.10 . . FDR=0.0434782608695652
+3L . . 17509604 17509706 2.15 . . FDR=0.0434782608695652
+3L . . 17548916 17549057 1.90 . . FDR=0.0434782608695652
+3L . . 17629032 17629240 1.43 . . FDR=0.0434782608695652
+3L . . 17637540 17637772 3.90 . . FDR=0.1
+3L . . 17639208 17639274 1.55 . . FDR=0.0434782608695652
+3L . . 17655832 17656401 4.47 . . FDR=0.0555555555555556
+3L . . 17663729 17663765 2.15 . . FDR=0.0434782608695652
+3L . . 17745743 17745838 1.47 . . FDR=0.0434782608695652
+3L . . 17748063 17748387 2.92 . . FDR=0.0434782608695652
+3L . . 17753481 17753917 4.56 . . FDR=0.1
+3L . . 17756873 17757959 1.63 . . FDR=0.0434782608695652
+3L . . 17801230 17802045 1.85 . . FDR=0.0434782608695652
+3L . . 17841131 17842320 2.31 . . FDR=1
+3L . . 17853549 17854148 1.90 . . FDR=0.0555555555555556
+3L . . 17858323 17858952 1.68 . . FDR=0.111111111111111
+3L . . 17859435 17859724 1.64 . . FDR=0.0555555555555556
+3L . . 17861050 17861152 2.02 . . FDR=0.0434782608695652
+3L . . 17869953 17870956 2.56 . . FDR=0.25
+3L . . 17872304 17873275 2.92 . . FDR=0.25
+3L . . 17874546 17875836 3.37 . . FDR=0.25
+3L . . 17910607 17910788 2.74 . . FDR=0.1
+3L . . 17918198 17918586 1.62 . . FDR=0.0434782608695652
+3L . . 17936813 17937334 1.85 . . FDR=0.0434782608695652
+3L . . 17999429 17999479 2.15 . . FDR=0.0434782608695652
+3L . . 18008966 18009131 2.85 . . FDR=0.1
+3L . . 18016765 18016884 1.47 . . FDR=0.0434782608695652
+3L . . 18017196 18017386 2.02 . . FDR=0.0555555555555556
+3L . . 18018167 18018993 1.65 . . FDR=0.0434782608695652
+3L . . 18036026 18036121 4.10 . . FDR=0.0434782608695652
+3L . . 18079650 18079739 2.15 . . FDR=0.0434782608695652
+3L . . 18110932 18111360 1.88 . . FDR=0.1
+3L . . 18131560 18131987 3.45 . . FDR=1