1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
Description: Use 2to3 to port to Python3
Bug-Debian: https://bugs.debian.org/936199
Author: Andreas Tille <tille@debian.org>
Last-Update: 2023-06-23
Forwarded: not-needed
Reviewed-By: Étienne Mollier <emollier@debian.org>
--- bedtools.orig/docs/conf.py
+++ bedtools/docs/conf.py
@@ -43,8 +43,8 @@
master_doc = 'index'
# General information about the project.
-project = u'bedtools'
-copyright = u'2009 - 2023, Aaron R. Quinlan'
+project = 'bedtools'
+copyright = '2009 - 2023, Aaron R. Quinlan'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -186,8 +186,8 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
- ('index', 'bedtools.tex', u'Bedtools Documentation',
- u'Quinlan lab @ Univ. of Utah', 'manual'),
+ ('index', 'bedtools.tex', 'Bedtools Documentation',
+ 'Quinlan lab @ Univ. of Utah', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -219,7 +219,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- ('index', 'bedtools', u'Bedtools Documentation', [u'UU'], 1)
+ ('index', 'bedtools', 'Bedtools Documentation', ['UU'], 1)
]
# Example configuration for intersphinx: refer to the Python standard library.
--- bedtools.orig/test/fisher/README.md
+++ bedtools/test/fisher/README.md
@@ -2,7 +2,7 @@
==============
Fisher is now based on the count of interval overlaps, subject to `-f`.
-We can compare the output of fisher on simulated data by running `python sim.py`
+We can compare the output of fisher on simulated data by running `python3 sim.py`
which will show the output from `bedtools fisher` and then running `bash shuf.sh`
which will repeatedly run
--- bedtools.orig/test/fisher/cmp.sh
+++ bedtools/test/fisher/cmp.sh
@@ -3,7 +3,7 @@
echo "fisher,shuffled"
for i in $(seq 1000); do
- fisher=$(python ./sim.py | tail -1 | cut -f 2)
+ fisher=$(python3 ./sim.py | tail -1 | cut -f 2)
shuffle=$(bash shuf.sh)
echo "$fisher,$shuffle"
done
--- bedtools.orig/test/fisher/sim.py
+++ bedtools/test/fisher/sim.py
@@ -25,7 +25,7 @@
fh.write("chr1\t%i\t%i\n" % (s, e))
fh.flush()
-print >> open('tgg.genome', 'w'), ("chr1\t%i" % genome_size)
+print(("chr1\t%i" % genome_size), file=open('tgg.genome', 'w'))
# NOTE: add -m here to make merged output
-print check_output("../../bin/bedtools fisher -a taa.bed -b tbb.bed -g tgg.genome", shell=True).strip()
+print(check_output("../../bin/bedtools fisher -a taa.bed -b tbb.bed -g tgg.genome", shell=True).strip())
--- bedtools.orig/test/bigchroms/test-bigchroms.sh
+++ bedtools/test/bigchroms/test-bigchroms.sh
@@ -28,7 +28,7 @@
rm obs
if [[ "$BT_NO_BIG_FILES" != "" ]]; then
-python make-big-chrom.py
+python3 make-big-chrom.py
echo -e " bigchroms.t03...big get fasta \c"
$BT getfasta -fi bigx.fasta -bed bigx.bed | tail -1 > obs
--- bedtools.orig/scripts/makeBashScripts.py
+++ bedtools/scripts/makeBashScripts.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# encoding: utf-8
"""
makeBashScripts.py
@@ -58,4 +58,4 @@
script.close()
if __name__ == "__main__":
- main()
\ No newline at end of file
+ main()
--- bedtools.orig/test/genomecov/test-genomecov.sh
+++ bedtools/test/genomecov/test-genomecov.sh
@@ -288,7 +288,7 @@
check obs exp
rm obs exp
-python mk-deep.py > deep.sam
+python3 mk-deep.py > deep.sam
echo -e " genomecov.t18...\c"
echo "c1 1 1000000" > exp
$BT genomecov -d -ibam deep.sam | head -1 > obs
--- bedtools.orig/tutorial/bedtools.html
+++ bedtools/tutorial/bedtools.html
@@ -495,7 +495,7 @@
<p>Now let’s make a 20x20 matrix of the Jaccard statistic. This will allow the data to play nicely with R.</p>
<pre><code>awk 'NF==3' pairwise.dnase.shortnames.txt \
| awk '$1 ~ /^f/ && $2 ~ /^f/' \
-| python make-matrix.py \
+| python3 make-matrix.py \
> dnase.shortnames.distance.matrix</code></pre>
<p>Let’s also make a file of labels for each dataset so that we can label each dataset in our R plot.</p>
<pre><code>cut -f 1 dnase.shortnames.distance.matrix | cut -f 1 -d "-" | cut -f 1 -d "_" > labels.txt</code></pre>
--- bedtools.orig/tutorial/bedtools.md
+++ bedtools/tutorial/bedtools.md
@@ -606,7 +606,7 @@
awk 'NF==3' pairwise.dnase.shortnames.txt \
| awk '$1 ~ /^f/ && $2 ~ /^f/' \
- | python make-matrix.py \
+ | python3 make-matrix.py \
> dnase.shortnames.distance.matrix
Let's also make a file of labels for each dataset so that we can label each dataset in our R plot.
|