diff interproscan5/fake_ips.py @ 0:0da2847fc108 draft default tip

Uploaded
author si-datascience
date Thu, 24 May 2018 14:57:30 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/interproscan5/fake_ips.py	Thu May 24 14:57:30 2018 -0400
@@ -0,0 +1,35 @@
+"""
+"""
+
+__author__ = 'mkh'
+
+if __name__ == '__main__':
+    import argparse
+    import os
+    from shutil import copyfile
+    import sys
+
+    parser = argparse.ArgumentParser(description='Fake IPS.')
+
+    parser.add_argument('-dp', action='store_true')
+    parser.add_argument('--input')
+    parser.add_argument('--seqtype', default='p')
+    parser.add_argument('-f', dest='formats', default='tsv')
+    parser.add_argument('--applications')
+    parser.add_argument('--tempdir')
+    parser.add_argument('--pathways', action='store_true')
+    parser.add_argument('--goterms', action='store_true')
+    parser.add_argument('--iprlookup', action='store_true')
+    parser.add_argument('--mode')
+    parser.add_argument('--clusterrunid')
+    parser.add_argument('--output-file-base', dest='output_file_base')
+    parser.add_argument('-o', dest='output_file', default="/tmp/junk")
+
+    args = parser.parse_args()
+    formats = args.formats.split(',')
+    src_data_dir = os.path.dirname(__file__) + '/data-' + args.seqtype
+
+    for ext in formats:
+        if ext in ['html', 'svg']:
+            ext += '.tar.gz'
+        copyfile(src_data_dir + '/' + '__base__' + '.' + ext, args.output_file_base + '.' + ext)