# HG changeset patch # User Vimalkumar Velayudhan # Date 1435834439 -3600 # Node ID b6fd86c539ea185ac2312afe6d0b9cf761ff5dcf # Parent 1e9797878349bd2e32c2cd7daeba062288d21b8b Fix pysam version in riboplot (was 0.7.7 instead of 0.8.3). Fix move sys import to the top in ribocount.py, riboplot.py. Minor: * Include an empty conditional when no RNA coverage is required. * Remove output directories after zip file is created. diff -r 1e9797878349 -r b6fd86c539ea data/riboplot.html --- a/data/riboplot.html Mon Jun 29 17:12:15 2015 +0100 +++ b/data/riboplot.html Thu Jul 02 11:53:59 2015 +0100 @@ -41,13 +41,13 @@


-

Download plots
+

Download plots
PNG, SVG -
+ -

Download counts
+

Download counts
RiboCounts.csv -
+

(Right click --> Save link/target as...) diff -r 1e9797878349 -r b6fd86c539ea ribocount.xml --- a/ribocount.xml Mon Jun 29 17:12:15 2015 +0100 +++ b/ribocount.xml Thu Jul 02 11:53:59 2015 +0100 @@ -7,7 +7,7 @@ - ./riboplot/ribocount.py + riboplot/ribocount.py --ribo_file "${ribo_file}" --transcriptome_fasta "${transcriptome_fasta}" --read_length "${read_length}" diff -r 1e9797878349 -r b6fd86c539ea riboplot.xml --- a/riboplot.xml Mon Jun 29 17:12:15 2015 +0100 +++ b/riboplot.xml Thu Jul 02 11:53:59 2015 +0100 @@ -3,12 +3,12 @@ matplotlib - pysam + pysam - ./riboplot/riboplot.py + riboplot/riboplot.py --ribo_file "${ribo_file}" --transcriptome_fasta "${transcriptome_fasta}" --transcript_name "${transcript_name}" @@ -41,6 +41,7 @@ + diff -r 1e9797878349 -r b6fd86c539ea riboplot/ribocount.py --- a/riboplot/ribocount.py Mon Jun 29 17:12:15 2015 +0100 +++ b/riboplot/ribocount.py Thu Jul 02 11:53:59 2015 +0100 @@ -1,4 +1,6 @@ # check dependencies +import sys + missing_deps = [] try: import pysam @@ -11,8 +13,7 @@ \n\n{}\n'''.format('\n'.join(missing_deps))) import os -import sys -import timeit +# import timeit import shutil import zipfile import logging @@ -141,10 +142,12 @@ for name in f: zip.write(os.path.join(root, name)) + shutil.rmtree(output_path) logging.debug('Writing HTML report') with open(os.path.join(CONFIG.DATA_DIR, 'ribocount_index.html')) as j, open(args.html_file, 'w') as k: k.write(j.read().format(count=count, read_length=read_length)) if __name__ == '__main__': - print timeit.timeit('main()', number=1, setup='from __main__ import main') + # print timeit.timeit('main()', number=1, setup='from __main__ import main') + main() diff -r 1e9797878349 -r b6fd86c539ea riboplot/riboplot.py --- a/riboplot/riboplot.py Mon Jun 29 17:12:15 2015 +0100 +++ b/riboplot/riboplot.py Thu Jul 02 11:53:59 2015 +0100 @@ -1,4 +1,6 @@ # check dependencies +import sys + missing_deps = [] try: import pysam @@ -21,10 +23,9 @@ import os import re -import sys import config import pysam -import timeit +# import timeit import shutil import logging import tempfile @@ -316,4 +317,5 @@ if __name__ == '__main__': - print timeit.timeit('main()', number=1, setup='from __main__ import main') + # print timeit.timeit('main()', number=1, setup='from __main__ import main') + main()