File: tss_test.py

package info (click to toggle)
htseq 2.0.9%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 103,476 kB
  • sloc: python: 6,280; sh: 211; cpp: 147; makefile: 80
file content (35 lines) | stat: -rw-r--r-- 1,142 bytes parent folder | download
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
import os
import sys
import sysconfig
import numpy

build_dir = "build/lib.%s-%s" % (sysconfig.get_platform(), sys.version[0:3])

sys.path.insert(0, os.path.join(os.getcwd(), build_dir))
import HTSeq
os.chdir("example_data")

print("TSS test, scheme 1")
exec(compile(open(os.path.join("..", "doc", "code_examples", "tss1.py")).read(), os.path.join("..", "doc", "tss1.py"), 'exec'))
profile1 = profile.copy()
print("finished")

print("TSS test, scheme 2")
exec(compile(open(os.path.join("..", "doc", "code_examples", "tss2.py")).read(), os.path.join("..", "doc", "tss2.py"), 'exec'))
profile2 = profile.copy()
print("finished", end=' ')

if (profile2 == profile1).all():
    print("and matches result from scheme 1.")
else:
    print("and differs to result from scheme 1!  <<<!!!>>>")

print("TSS test, scheme 3")
exec(compile(open(os.path.join("..", "doc", "code_examples", "tss3.py")).read(), os.path.join("..", "doc", "tss3.py"), 'exec'))
profile3 = profile.copy()
print("finished", end=' ')

if (profile3 == profile1).all():
    print("and matches result from scheme 1.")
else:
    print("and differs to result from scheme 1!  <<<!!!>>>")