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

Uploaded
author si-datascience
date Thu, 24 May 2018 14:57:30 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
1 """
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
2 """
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
3
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
4 __author__ = 'mkh'
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
5
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
6 if __name__ == '__main__':
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
7 import argparse
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
8 import os
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
9 from shutil import copyfile
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
10 import sys
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
11
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
12 parser = argparse.ArgumentParser(description='Fake IPS.')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
13
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
14 parser.add_argument('-dp', action='store_true')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
15 parser.add_argument('--input')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
16 parser.add_argument('--seqtype', default='p')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
17 parser.add_argument('-f', dest='formats', default='tsv')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
18 parser.add_argument('--applications')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
19 parser.add_argument('--tempdir')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
20 parser.add_argument('--pathways', action='store_true')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
21 parser.add_argument('--goterms', action='store_true')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
22 parser.add_argument('--iprlookup', action='store_true')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
23 parser.add_argument('--mode')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
24 parser.add_argument('--clusterrunid')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
25 parser.add_argument('--output-file-base', dest='output_file_base')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
26 parser.add_argument('-o', dest='output_file', default="/tmp/junk")
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
27
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
28 args = parser.parse_args()
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
29 formats = args.formats.split(',')
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
30 src_data_dir = os.path.dirname(__file__) + '/data-' + args.seqtype
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
31
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
32 for ext in formats:
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
33 if ext in ['html', 'svg']:
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
34 ext += '.tar.gz'
0da2847fc108 Uploaded
si-datascience
parents:
diff changeset
35 copyfile(src_data_dir + '/' + '__base__' + '.' + ext, args.output_file_base + '.' + ext)