Previous changeset 23:bee03dc123f2 (2018-02-20) Next changeset 25:9f03c8587d6b (2018-08-24) |
Commit message:
An update to the core of galaxy prevents the way the code is trying to write files. This patch fixes this. |
modified:
rankfilter_GCMS/nistpdf_to_tabular.py |
b |
diff -r bee03dc123f2 -r 2ab40f9266e4 rankfilter_GCMS/nistpdf_to_tabular.py --- a/rankfilter_GCMS/nistpdf_to_tabular.py Tue Feb 20 07:29:49 2018 -0500 +++ b/rankfilter_GCMS/nistpdf_to_tabular.py Tue Feb 20 07:59:47 2018 -0500 |
[ |
@@ -15,8 +15,9 @@ """ -import sys +import sys,os import pdfread +import tempfile from subprocess import call # NB: THIS TOOL SHOULD BE DEPRECATED ONCE NIST-Wrapper tool is stable and released. NIST-Wrapper tool already produces the necessary tabular file. @@ -40,6 +41,8 @@ if __name__ == '__main__': - pdf_as_text = sys.argv[1]+".txt" + #pdf_as_text = sys.argv[1]+".txt" + pdf_as_text = tempfile.mkstemp()[1] convert_pdftotext(sys.argv[1], pdf_as_text) pdfread.convert_pdftotext2tabular(pdf_as_text, sys.argv[2], sys.argv[3], False) + os.remove(pdf_as_text) |