Mercurial > repos > adrian.diaz > b2btools_single_sequence
annotate singleSeq/script.py @ 0:cacb90cde53e draft
First version of b2btools for single sequences in Galaxy
author | adrian.diaz |
---|---|
date | Wed, 06 Jul 2022 11:01:15 +0000 |
parents | |
children |
rev | line source |
---|---|
0
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
1 import optparse |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
2 import os.path |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
3 import unicodedata |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
4 import re |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
5 import pandas as pd |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
6 from b2bTools import SingleSeq |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
7 import matplotlib.pyplot as plt |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
8 |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
9 |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
10 def slugify(value): |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
11 """ |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
12 Taken from https://github.com/django/django/blob/master/django/utils/text.py |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
13 Convert to ASCII if 'allow_unicode'. Convert spaces or repeated |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
14 dashes to single dashes. Remove characters that aren't alphanumerics, |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
15 underscores, or hyphens. Convert to lowercase. Also strip leading and |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
16 trailing whitespace, dashes, and underscores. |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
17 """ |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
18 value = str(value) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
19 value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii') |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
20 value = re.sub(r'[^\w\s-]', '', value.lower()) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
21 return re.sub(r'[-\s]+', '-', value).strip('-_') |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
22 |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
23 |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
24 def plot_prediction(prediction_name, highlighting_regions, predicted_values, seq_name): |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
25 thresholds_dict = {'backbone': {'membrane spanning': [1., 1.5], |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
26 'rigid': [0.8, 1.], |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
27 'context-dependent': [0.69, 0.8], |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
28 'flexible': [-1.0, 0.69]}, |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
29 'earlyFolding': {'early folds': [0.169, 2.], 'late folds': [-1., 0.169]}, |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
30 'disoMine': {'ordered': [-1., 0.5], 'disordered': [0.5, 2.]}, |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
31 } |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
32 ordered_regions_dict = {'backbone': ['flexible', 'context-dependent', 'rigid', 'membrane spanning'], |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
33 'earlyFolding': ['late folds', 'early folds'], |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
34 'disoMine': ['ordered', 'disordered'], |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
35 } |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
36 colors = ['yellow', 'orange', 'pink', 'red'] |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
37 ranges_dict = { |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
38 'backbone': [-0.2, 1.2], |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
39 'sidechain': [-0.2, 1.2], |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
40 'ppII': [-0.2, 1.2], |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
41 'earlyFolding': [-0.2, 1.2], |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
42 'disoMine': [-0.2, 1.2], |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
43 'agmata': [-0.2, 1.2], |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
44 'helix': [-1., 1.], |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
45 'sheet': [-1., 1.], |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
46 'coil': [-1., 1.], |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
47 } |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
48 fig, ax = plt.subplots(1, 1) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
49 fig.set_figwidth(10) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
50 fig.set_figheight(5) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
51 ax.set_title(prediction_name + ' ' + 'prediction') |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
52 plt.tight_layout(rect=[0, 0, 0.75, 1]) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
53 if seq_name == 'all': |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
54 max_len = 0 |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
55 for seq in predicted_values.keys(): |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
56 predictions = predicted_values[seq] |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
57 ax.plot(range(len(predictions)), predictions, label=seq) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
58 if len(predictions)>max_len: |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
59 max_len = len(predictions) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
60 ax.set_xlim([0, max_len - 1]) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
61 else: |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
62 predictions = predicted_values |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
63 ax.plot(range(len(predictions)), predictions, label=seq_name) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
64 ax.set_xlim([0, len(predictions) - 1]) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
65 legend_lines = plt.legend(bbox_to_anchor=(1.04,1), loc="upper left", fancybox=True, shadow=True) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
66 ax.add_artist(legend_lines) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
67 # Define regions |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
68 if highlighting_regions: |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
69 if prediction_name in ordered_regions_dict.keys(): |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
70 for i, prediction in enumerate(ordered_regions_dict[prediction_name]): |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
71 lower = thresholds_dict[prediction_name][prediction][0] |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
72 upper = thresholds_dict[prediction_name][prediction][1] |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
73 color = colors[i] |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
74 ax.axhspan(lower, upper, alpha=0.3, color=color, label=prediction) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
75 included_in_regions_legend = list(reversed( |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
76 [prediction for prediction in ordered_regions_dict[prediction_name]])) # to sort it "from up to low" |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
77 # Get handles and labels |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
78 handles, labels = plt.gca().get_legend_handles_labels() |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
79 handles_dict = {label: handles[idx] for idx, label in enumerate(labels)} |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
80 # Add legend for regions, if available |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
81 region_legend = ax.legend([handles_dict[region] for region in included_in_regions_legend], |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
82 [region for region in included_in_regions_legend], fancybox=True, shadow=True, |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
83 loc='lower left', bbox_to_anchor=(1.04,0)) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
84 ax.add_artist(region_legend) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
85 ax.set_ylim(ranges_dict[prediction_name]) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
86 ax.set_xlabel('residue index') |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
87 ax.set_ylabel('prediction values') |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
88 ax.grid(axis='y') |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
89 plt.savefig(os.path.join(options.plot_output, "{0}_{1}.png".format(slugify(seq_name), prediction_name)), bbox_inches="tight") |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
90 plt.close() |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
91 |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
92 def df_dict_to_dict_of_values(df_dict, predictor): |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
93 results_dict = {} |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
94 for seq in df_dict.keys(): |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
95 df = pd.read_csv(df_dict[seq], sep='\t') |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
96 results_dict[seq] = df[predictor] |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
97 return results_dict |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
98 |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
99 def main(options): |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
100 single_seq = SingleSeq(options.input_fasta) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
101 b2b_tools = [] |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
102 if options.dynamine: |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
103 b2b_tools.append('dynamine') |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
104 if options.disomine: |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
105 b2b_tools.append('disomine') |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
106 if options.efoldmine: |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
107 b2b_tools.append('efoldmine') |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
108 if options.agmata: |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
109 b2b_tools.append('agmata') |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
110 |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
111 single_seq.predict(b2b_tools) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
112 predictions = single_seq.get_all_predictions() |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
113 results_json = single_seq.get_all_predictions_json('all') |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
114 with open(options.json_output, 'w') as f: |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
115 f.write(results_json) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
116 first_sequence_key = next(iter(predictions)) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
117 prediction_keys = predictions[first_sequence_key].keys() |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
118 df_dictionary = {} |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
119 for sequence_key, sequence_predictions in predictions.items(): |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
120 residues = sequence_predictions['seq'] |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
121 residues_count = len(residues) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
122 sequence_df = pd.DataFrame(columns=prediction_keys, index=range(residues_count)) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
123 sequence_df.index.name = 'residue_index' |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
124 for predictor in prediction_keys: |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
125 sequence_df[predictor] = sequence_predictions[predictor] |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
126 sequence_df = sequence_df.rename(columns={"seq": "residue"}) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
127 sequence_df = sequence_df.round(decimals=2) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
128 filename = f'{options.output}/{slugify(sequence_key)}.tsv' |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
129 df_dictionary[sequence_key] = filename |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
130 sequence_df.to_csv(filename, sep="\t") |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
131 # Plot each individual plot (compatible with plot all) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
132 if options.plot: |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
133 for predictor in prediction_keys: |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
134 if predictor != 'seq': |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
135 plot_prediction(prediction_name=predictor, highlighting_regions=True, |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
136 predicted_values=sequence_predictions[predictor], seq_name=sequence_key) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
137 # Plot all together (compatible with plot individual) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
138 if options.plot_all: |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
139 for predictor in prediction_keys: |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
140 if predictor != 'seq': |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
141 results_dictionary = df_dict_to_dict_of_values(df_dict=df_dictionary, predictor=predictor) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
142 plot_prediction(prediction_name=predictor, highlighting_regions=True, |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
143 predicted_values=results_dictionary, seq_name='all') |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
144 |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
145 if __name__ == "__main__": |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
146 parser = optparse.OptionParser() |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
147 parser.add_option("--dynamine", action="store_true", default=False) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
148 parser.add_option("--disomine", action="store_true", default=False) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
149 parser.add_option("--efoldmine", action="store_true", default=False) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
150 parser.add_option("--agmata", action="store_true", default=False) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
151 parser.add_option("--file", dest="input_fasta", default=False) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
152 parser.add_option("--output", dest="output", default=False) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
153 parser.add_option("--plot-output", dest="plot_output", default=False) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
154 |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
155 parser.add_option("--json", dest="json_output", default=False) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
156 parser.add_option("--plot", action="store_true", default=False) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
157 parser.add_option("--plot_all", action="store_true", default=False) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
158 parser.add_option("--highlight", action="store_true", default=False) |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
159 options, _args = parser.parse_args() |
cacb90cde53e
First version of b2btools for single sequences in Galaxy
adrian.diaz
parents:
diff
changeset
|
160 main(options) |