Skip to content
Commits on Source (3)
#!/home/dabrowskiw/cwl/cwl_vw/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from cwltool.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
--- a/mapping.py
+++ b/mapping.py
@@ -134,10 +134,10 @@ class MAPPING:
# self.env = jinja2.Environment()
# self.env.loader = jinja2.FileSystemLoader('.')
- # self.template = self.env.get_template(os.path.join(os.path.dirname(__file__), 'report.tex'))
+ # self.template = self.env.get_template(os.path.join('/usr/share/mapping-pipeline', 'report.tex'))
# self.pdf_latex = self.template.render(pipeline=self, metric=self.metric)
template_dir = os.path.dirname(__file__) #'/usr/share/mapping-pipeline'
- template_file = 'report.tex'
+ template_file = '/usr/share/mapping-pipeline/report.tex'
loader = jinja2.FileSystemLoader(template_dir)
env = jinja2.Environment(loader=loader)
template = env.get_template(template_file)
--- a/mapping.py
+++ b/mapping.py
@@ -390,7 +390,7 @@ class MAPPING:
self.args.reference = files
def _valid_picard(self, f):
- if os.path.isfile(os.path.join(os.path.realpath(f), 'picard.jar')):
+ if os.path.isfile(os.path.join('/usr/share/java', 'picard.jar')):
return f
else:
raise argparse.ArgumentTypeError('Cannot find picard.jar in folder {}'.format(os.path.realpath(f)))
......@@ -7,14 +7,12 @@ Description: This script should not be called directly
--- a/metrics.py
+++ b/metrics.py
@@ -1,6 +1,4 @@
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
-import custom_logger as log
+from . import custom_logger as log
import custom_logger as log
import numpy as np
import matplotlib
matplotlib.use('Agg')
@@ -120,7 +118,7 @@ class METRICS:
self.reads_per_quality_result.append([os.path.realpath(os.path.join(self.output, 'reads_per_quality_{}.pdf'.format(valid_filename(reference)))), reference.replace('_','\_')])
fig, ax = plt.subplots( nrows=1, ncols=1 ) # create figure & 1 axis
......
python3.patch
config.patch
picard.patch
path_to_report.tex.patch
......@@ -10,5 +10,5 @@ override_dh_fixperms:
find debian -name "*.tex" -exec chmod -x \{\} \;
find debian -name "*.json" -exec chmod -x \{\} \;
for py in `find debian -name "*.py"` ; do \
if ! head -n 1 $$py | grep -q '^#!/usr/bin/python' ; then chmod -x $$py ; fi ; \
if ! head -n 1 $$py | grep -q '^#! */usr/bin/.*python' ; then chmod -x $$py ; fi ; \
done