annotate query.py @ 11:0d0f7080b55c draft

Deleted selected files
author fabio
date Wed, 31 Jan 2018 17:29:13 -0500
parents 027f2e9d4a25
children 039e8e1e8b1f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
1 #!/usr/bin/env python
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
2
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
3 # https://github.com/ross/requests-futures
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
4 # http://docs.python-requests.org/en/master/user/quickstart/#more-complicated-post-requests
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
5
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
6 import os, uuid, optparse, requests, json, time
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
7 #from requests_futures.sessions import FuturesSession
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
8
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
9 #### NN14 ####
10
027f2e9d4a25 Uploaded 20180131
fabio
parents: 8
diff changeset
10 SERVICE_URL = "http://nn14.galaxyproject.org:8080/";
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
11 #service_url = "http://127.0.0.1:8082/";
10
027f2e9d4a25 Uploaded 20180131
fabio
parents: 8
diff changeset
12 QUERY_URL = SERVICE_URL+"tree/0/query";
027f2e9d4a25 Uploaded 20180131
fabio
parents: 8
diff changeset
13 STATUS_URL = SERVICE_URL+"status/<task_id>";
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
14 ##############
6
97dd57f81d77 Uploaded 20180131
fabio
parents: 4
diff changeset
15 # query delay in seconds
10
027f2e9d4a25 Uploaded 20180131
fabio
parents: 8
diff changeset
16 QUERY_DELAY = 30;
6
97dd57f81d77 Uploaded 20180131
fabio
parents: 4
diff changeset
17 ##############
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
18
10
027f2e9d4a25 Uploaded 20180131
fabio
parents: 8
diff changeset
19 VALID_CHARS = '.-()[]0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ '
027f2e9d4a25 Uploaded 20180131
fabio
parents: 8
diff changeset
20
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
21 def query_request( options, args, payload ):
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
22 # add additional parameters to the payload
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
23 #payload["tree_id"] = str(options.treeid);
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
24 payload["search_mode"] = str(options.search);
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
25 payload["exact_algorithm"] = int(options.exact);
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
26 payload["search_threshold"] = float(options.sthreshold);
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
27 # set the content type to application/json
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
28 headers = {'Content-type': 'application/json'};
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
29
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
30 # create a session
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
31 session = requests.Session();
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
32 # make a synchronous post request to the query route
10
027f2e9d4a25 Uploaded 20180131
fabio
parents: 8
diff changeset
33 req = session.post(QUERY_URL, headers=headers, json=payload);
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
34 resp_code = req.status_code;
6
97dd57f81d77 Uploaded 20180131
fabio
parents: 4
diff changeset
35 print(str(req.content)+"\n\n");
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
36 if resp_code == requests.codes.ok:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
37 resp_content = str(req.content);
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
38 # convert out to json
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
39 json_content = json.loads(resp_content);
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
40 # retrieve task id
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
41 task_id = json_content['task_id'];
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
42 task_processed = False;
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
43 # results json content
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
44 json_status_content = None;
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
45 task_status = None;
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
46 while task_processed is False:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
47 # create a new session
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
48 session = requests.Session();
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
49 # make a synchronous get request to the status route
10
027f2e9d4a25 Uploaded 20180131
fabio
parents: 8
diff changeset
50 status_query_url = STATUS_URL.replace("<task_id>", task_id);
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
51 status_req = session.get(status_query_url);
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
52 status_resp_content = str(status_req.content);
6
97dd57f81d77 Uploaded 20180131
fabio
parents: 4
diff changeset
53 print(status_resp_content+"\n\n");
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
54 # convert out to json
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
55 json_status_content = json.loads(status_resp_content);
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
56 # take a look at the state
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
57 # state attribute is always available
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
58 if json_status_content['state'] == 'SUCCESS':
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
59 task_processed = True;
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
60 break;
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
61 elif json_status_content['state'] in ['FAILURE', 'REVOKED']:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
62 return "Task status: "+str(json_status_content['state']);
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
63 else:
10
027f2e9d4a25 Uploaded 20180131
fabio
parents: 8
diff changeset
64 time.sleep(QUERY_DELAY); # in seconds
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
65
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
66 # get output dir (collection) path
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
67 output_dir_path = options.outputdir;
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
68 if not os.path.exists(output_dir_path):
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
69 os.makedirs(output_dir_path);
10
027f2e9d4a25 Uploaded 20180131
fabio
parents: 8
diff changeset
70 out_file_format = "tabular";
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
71
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
72 for block in json_status_content['results']:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
73 seq_id = block['sequence_id'];
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
74 accessions = block['accession_numbers'];
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
75 # put response block in the output collection
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
76 output_file_path = os.path.join(output_dir_path, seq_id + "_" + out_file_format);
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
77 accessions_list = "";
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
78 for accession_number in accessions:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
79 accessions_list = accessions_list + accession_number + "\n";
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
80 with open(output_file_path, 'w') as out:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
81 out.write(accessions_list.strip());
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
82 else:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
83 return "Unable to query the remote server. Please try again in a while.";
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
84
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
85 def query( options, args ):
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
86 multiple_data = {};
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
87 comma_sep_file_paths = options.files;
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
88 #print("files: "+str(comma_sep_file_paths)+" - "+str(type(comma_sep_file_paths)));
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
89 # check if options.files contains at least one file path
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
90 if comma_sep_file_paths is not None:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
91 # split file paths
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
92 file_paths = comma_sep_file_paths.split(",");
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
93 # split file names
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
94 comma_sep_file_names = str(options.names);
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
95 #print("names: "+str(comma_sep_file_names));
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
96 file_names = comma_sep_file_names.split(",");
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
97 for idx, file_path in enumerate(file_paths):
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
98 #file_name = file_names[idx];
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
99 with open(file_path, 'r') as content_file:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
100 for line in content_file:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
101 if line.strip() != "":
8
256d015d69f9 Uploaded 20180131
fabio
parents: 6
diff changeset
102 line_split = line.strip().split("\t"); # split on tab
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
103 if len(line_split) == 2: # 0:id , 1:seq , otherwise skip line
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
104 seq_id = line_split[0];
10
027f2e9d4a25 Uploaded 20180131
fabio
parents: 8
diff changeset
105 # fix seq_id using valid chars only
027f2e9d4a25 Uploaded 20180131
fabio
parents: 8
diff changeset
106 seq_id = ''.join(e for e in seq_id if e in VALID_CHARS)
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
107 seq_text = line_split[1];
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
108 if seq_id in multiple_data:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
109 return "Error: the id '"+seq_id+"' is duplicated";
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
110 multiple_data[seq_id] = seq_text;
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
111 if len(multiple_data) > 0:
6
97dd57f81d77 Uploaded 20180131
fabio
parents: 4
diff changeset
112 return query_request( options, args, multiple_data );
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
113 #return echo( options, args );
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
114 else:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
115 return "An error has occurred. Please be sure that your input files are valid.";
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
116 else:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
117 # try with the sequence in --sequence
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
118 text_content = options.sequences;
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
119 #print("sequences: "+text_content);
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
120 # check if options.sequences contains a list of sequences (one for each row)
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
121 if text_content is not None:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
122 text_content = str(text_content);
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
123 if text_content.strip():
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
124 # populate a dictionary with the files containing the sequences to query
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
125 text_content = text_content.strip().split("__cn__"); # split on new line
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
126 for line in text_content:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
127 if line.strip() != "":
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
128 line_split = line.strip().split("__tc__"); # split on tab
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
129 if len(line_split) == 2: # 0:id , 1:seq , otherwise skip line
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
130 seq_id = line_split[0];
10
027f2e9d4a25 Uploaded 20180131
fabio
parents: 8
diff changeset
131 # fix seq_id using valid chars only
027f2e9d4a25 Uploaded 20180131
fabio
parents: 8
diff changeset
132 seq_id = ''.join(e for e in seq_id if e in VALID_CHARS)
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
133 seq_text = line_split[1];
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
134 if seq_id in multiple_data:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
135 return "Error: the id '"+seq_id+"' is duplicated";
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
136 multiple_data[seq_id] = seq_text;
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
137 if len(multiple_data) > 0:
6
97dd57f81d77 Uploaded 20180131
fabio
parents: 4
diff changeset
138 return query_request( options, args, multiple_data );
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
139 #return echo( options, args );
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
140 else:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
141 return "An error has occurred. Please be sure that your input files are valid.";
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
142 else:
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
143 return "You have to insert at least one row formatted as a tab delimited <id, sequence> touple";
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
144 return -1;
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
145
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
146 def __main__():
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
147 # Parse the command line options
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
148 usage = "Usage: query.py --files comma_sep_file_paths --names comma_seq_file_names --sequences sequences_text --search search_mode --exact exact_alg --sthreshold threshold --outputdir output_dir_path";
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
149 parser = optparse.OptionParser(usage = usage);
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
150 parser.add_option("-f", "--files", type="string",
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
151 action="store", dest="files", help="comma separated files path");
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
152 parser.add_option("-n", "--names", type="string",
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
153 action="store", dest="names", help="comma separated names associated to the files specified in --files");
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
154 parser.add_option("-s", "--sequences", type="string",
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
155 action="store", dest="sequences", help="contains a list of sequences (one for each row)");
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
156 parser.add_option("-a", "--fasta", type="string",
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
157 action="store", dest="fasta", help="contains the content of a fasta file");
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
158 parser.add_option("-x", "--search", type="string", default=0,
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
159 action="store", dest="search", help="search mode");
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
160 parser.add_option("-e", "--exact", type="int", default=0,
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
161 action="store", dest="exact", help="exact algorithm (required if search is 1 only)");
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
162 parser.add_option("-t", "--sthreshold", type="float",
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
163 action="store", dest="sthreshold", help="threshold applied to the search algrithm");
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
164 parser.add_option("-o", "--outputdir", type="string",
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
165 action="store", dest="outputdir", help="output directory (collection) path");
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
166
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
167 #parser.add_option("-k", "--outfile", type="string",
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
168 #action="store", dest="outfile", help="output file");
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
169
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
170 # TEST
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
171 #--search 'rrr'
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
172 #--sthreshold 0.5
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
173 #--exact 0
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
174 #--sequences 'id0__tc__CAATTAATGATAAATATTTTATAAGGTGCGGAAATAAAGTGAGGAATATCTTTTAAATTCAAGTTCAATTCTGAAAGC'
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
175 #--outputdir 'collection_content'
6
97dd57f81d77 Uploaded 20180131
fabio
parents: 4
diff changeset
176 #sequences = 'NM_001169378.2__tc__atttcggatgctttggagggaggaactctagtgctgcattgattggggcgtgtgttaatgatattcccagttcgcatggcgagcatcgattcctggtacgtatgtgggccccttgactcccacttatcgcacttgtcgttcgcaatttgcatgaattccgcttcgtctgaaacgcacttgcgccagacttctccggctggtctgatctggtctgtgatccggtctggtggggcgccagttgcgtttcgagctcatcaccagtcactccgcagtcgcattctgccagaggtctccgatcaagagcgcttctccattcgagattcaaacgcagcgcggtctgacgccgccacatcgagtgaaatccatatcgatggccacattcacacaggacgagatcgacttcctgcgcagccatggcaacgagctgtgtgccaagacctggctgggattgtgggatccgaagcgggctgtgcaccagcaggagcagcgcgaactgatgatggacaagtatgagcggaagcgatactacctggagccggccagtcctcttaagtcgctggccaatgcggtcaacctgaagtcgtctgctccggcgacgaaccacactcagaatggccaccaaaatgggtatgccagcatccatttgacgcctcctgctgcccagcggacctcggccaatggattgcagaaggtggccaactcgtcgagtaactcttctggaaagacctcatcctcgatcagtaggccacactataatcaccagaacaacagccaaaacaacaatcacgatgcctttggcctgggtggcggattgagcagcctgaacagcgccggttccacatccactggagctctttccgacaccagcagttgtgctagcaatggcttcggtgcggactgcgactttgtggctgactttggctcggccaacattttcgacgccacatcggcgcgttccacaggatcgccggcggtgtcgtccgtgtcctcagtgggttccagcaatggctacgccaaggtgcagcccatccgggcagctcatctccagcagcaacagcagttgcagcagcagctgcatcagcagcagctcctcaatggcaatggtcatcagggcactgagaactttgccgacttcgatcacgctcccatctacaatgcagtggctccaccgacttttaacgattggatcagcgactggagcaggcggggcttccacgatcccttcgacgattgcgatgactcgccaccaggtgcccgccctccagcacctgcgccagctcctgctcaagttcccgcagtatcatcaccattgccaaccgtccgagaagaaccagagcttgcgtggaatttttgggaggacgagatgcgaatagaggcgcaggaaaaggagtcccaaactaaacagccggagttgggctactccttttcgattagtactactacgcccctttccccttcgaatcccttcctgccctaccttgtcagtgaggagcagcatcgaaatcatccagagaagccctccttttcgtattcgttgttcagctccatatcaaatagttcgcaagaagatcaggcggatgatcatgagatgaatgttttaaatgccaatttccatgatttctttacgtggagtgctcccttgcagaacggccatacgaccagtccgcccaagggcggaaatgcagcgatggcgcccagtgaggatcgatatgccgctcttaaggatctcgacgagcagctgcgagaactgaaggccagcgaaagcgccacagagacgcccacgcccaccagtggcaatgttcaggccacagatgcctttggtggagccctcaacaacaatccaaatcccttcaagggccagcaacagcagcagctcagcagccatgtggtgaatccattccagcagcagcaacagcagcagcaccagcagaatctctatggccagttgacgctcataccaaatgcctacggcagcagttcccagcagcagatggggcaccatctcctccagcagcagcagcagcaacagcagagcttcttcaacttcaacaacaacgggttcgccatctcgcagggtctgcccaacggctgcggcttcggcagcatgcaacccgctcctgtgatggccaacaatccctttgcagccagcggcgccatgaacaccaacaatccattcttatgagactcaacccgggagaatccgcctcgcgccacctggcagaggcgctgagccagcgaacaaagagcagacgcggaggaaccgaaccgaaattagtccattttactaacaatagcgttaatctatgtatacataatgcacgccggagagcactctttgtgtacatagcccaaatatgtacacccgaaaggctccacgctgacgctagtcctcgcggatggcggaggcggactggggcgttgatatattcttttacatggtaactctactctaacgtttacggatacggatatttgtatttgccgtttgccctagaactctatacttgtactaagcgcccatgaacacttcatccactaacatagctactaatcctcatcctagtggaggatgcagttggtccagacactctgttatttgttttatccatcctcgtacttgtctttgtcccatttagcactttcgttgcggataagaactttgtcagttattgattgtgtggccttaataagattataaaactaaatattataacgtacgactatacatatacggatacagatacagattcagacacagttagtacagatacagatatacatatacgcttttgtacctaatgaattgcttcttgtttccattgctaatcatctgcttttcgtgtgctaattttatacactagtacgtgcgatatcggccgtgcagatagattgctcagctcgcgagtcaagcctcttttggttgcacccacggcagacatttgtacatatactgtctgattgtaagcctcgtgtaatacctccattaacaccactcccccaccacccatccatcgaaccccgaatccatgactcaattcactgctcacatgtccatgcccatgccttaacgtgtcaaacattatcgaagccttaaagttatttaaaactacgaaatttcaataaaaacaaataagaacgctatc';
4
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
177 #print(sequences);
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
178 #(options, args) = parser.parse_args(['-x', 'rrr', '-t', 0.5, '-s', sequences, '-o', 'collection_content']);
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
179
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
180 (options, args) = parser.parse_args();
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
181 return query( options, args );
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
182
35593423c2e2 Uploaded 20180131
fabio
parents:
diff changeset
183 if __name__ == "__main__": __main__()