Spaces:
Sleeping
Sleeping
Erva Ulusoy
commited on
Commit
•
4962d7b
1
Parent(s):
b246580
location merger fix
Browse files- Domain2GO.py +1 -1
- run_domain2go_app.py +6 -6
Domain2GO.py
CHANGED
@@ -31,7 +31,7 @@ with st.sidebar:
|
|
31 |
value='>sp|O18783|PLMN_NOTEU\n'
|
32 |
'MEYGKVIFLFLLFLKSGQGESLENYIKTEGASLSNSQKKQFVASSTEECEALCEKETEFVCRSFEHYNKEQKCVIMSENSKTSSVERKRDVVLFEKRIYLSDCKSGNGRNYRGTLSKTKSGITCQKWSDLSPHVPNYAPSKYPDAGLEKNYCRNPDDDVKGPWCYTTNPDIRYEYCDVPECEDECMHCSGENYRGTISKTESGIECQPWDSQEPHSHEYIPSKFPSKDLKENYCRNPDGEPRPWCFTSNPEKRWEFCNIPRCSSPPPPPGPMLQCLKGRGENYRGKIAVTKSGHTCQRWNKQTPHKHNRTPENFPCRGLDENYCRNPDGELEPWCYTTNPDVRQEYCAIPSCGTSSPHTDRVEQSPVIQECYEGKGENYRGTTSTTISGKKCQAWSSMTPHQHKKTPDNFPNADLIRNYCRNPDGDKSPWCYTMDPTVRWEFCNLEKCSGTGSTVLNAQTTRVPSVDTTSHPESDCMYGSGKDYRGKRSTTVTGTLCQAWTAQEPHRHTIFTPDTYPRAGLEENYCRNPDGDPNGPWCYTTNPKKLFDYCDIPQCVSPSSFDCGKPRVEPQKCPGRIVGGCYAQPHSWPWQISLRTRFGEHFCGGTLIAPQWVLTAAHCLERSQWPGAYKVILGLHREVNPESYSQEIGVSRLFKGPLAADIALLKLNRPAAINDKVIPACLPSQDFMVPDRTLCHVTGWGDTQGTSPRGLLKQASLPVIDNRVCNRHEYLNGRVKSTELCAGHLVGRGDSCQGDSGGPLICFEDDKYVLQGVTSWGLGCARPNKPGVYVRVSRYISWIEDVMKNN')
|
33 |
else:
|
34 |
-
st.session_state['sequence'] = st.
|
35 |
st.session_state['name'] = st.session_state['sequence'].split('\n')[0].strip('>')
|
36 |
st.button('Use example sequence', on_click=click_button)
|
37 |
else:
|
|
|
31 |
value='>sp|O18783|PLMN_NOTEU\n'
|
32 |
'MEYGKVIFLFLLFLKSGQGESLENYIKTEGASLSNSQKKQFVASSTEECEALCEKETEFVCRSFEHYNKEQKCVIMSENSKTSSVERKRDVVLFEKRIYLSDCKSGNGRNYRGTLSKTKSGITCQKWSDLSPHVPNYAPSKYPDAGLEKNYCRNPDDDVKGPWCYTTNPDIRYEYCDVPECEDECMHCSGENYRGTISKTESGIECQPWDSQEPHSHEYIPSKFPSKDLKENYCRNPDGEPRPWCFTSNPEKRWEFCNIPRCSSPPPPPGPMLQCLKGRGENYRGKIAVTKSGHTCQRWNKQTPHKHNRTPENFPCRGLDENYCRNPDGELEPWCYTTNPDVRQEYCAIPSCGTSSPHTDRVEQSPVIQECYEGKGENYRGTTSTTISGKKCQAWSSMTPHQHKKTPDNFPNADLIRNYCRNPDGDKSPWCYTMDPTVRWEFCNLEKCSGTGSTVLNAQTTRVPSVDTTSHPESDCMYGSGKDYRGKRSTTVTGTLCQAWTAQEPHRHTIFTPDTYPRAGLEENYCRNPDGDPNGPWCYTTNPKKLFDYCDIPQCVSPSSFDCGKPRVEPQKCPGRIVGGCYAQPHSWPWQISLRTRFGEHFCGGTLIAPQWVLTAAHCLERSQWPGAYKVILGLHREVNPESYSQEIGVSRLFKGPLAADIALLKLNRPAAINDKVIPACLPSQDFMVPDRTLCHVTGWGDTQGTSPRGLLKQASLPVIDNRVCNRHEYLNGRVKSTELCAGHLVGRGDSCQGDSGGPLICFEDDKYVLQGVTSWGLGCARPNKPGVYVRVSRYISWIEDVMKNN')
|
33 |
else:
|
34 |
+
st.session_state['sequence'] = st.text_area('Enter protein sequence in FASTA format.')
|
35 |
st.session_state['name'] = st.session_state['sequence'].split('\n')[0].strip('>')
|
36 |
st.button('Use example sequence', on_click=click_button)
|
37 |
else:
|
run_domain2go_app.py
CHANGED
@@ -15,9 +15,9 @@ def find_domains(email, sequence, name):
|
|
15 |
}
|
16 |
|
17 |
data= {
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
|
22 |
|
23 |
job_id_response = requests.post('https://www.ebi.ac.uk/Tools/services/rest/iprscan5/run', headers=headers, data=data)
|
@@ -95,11 +95,11 @@ def find_domains(email, sequence, name):
|
|
95 |
|
96 |
|
97 |
def merge_locations(locations):
|
98 |
-
temp_locs
|
99 |
-
|
100 |
tree = intervaltree.IntervalTree.from_tuples(temp_locs)
|
101 |
tree.merge_overlaps()
|
102 |
-
merged_locations = ['-'.join([i.begin, i.end]) for i in tree]
|
103 |
return merged_locations
|
104 |
|
105 |
def generate_function_predictions(domains_df, mapping_path):
|
|
|
15 |
}
|
16 |
|
17 |
data= {
|
18 |
+
'email': email,
|
19 |
+
'stype': 'p',
|
20 |
+
'sequence': f'{sequence}'}
|
21 |
|
22 |
|
23 |
job_id_response = requests.post('https://www.ebi.ac.uk/Tools/services/rest/iprscan5/run', headers=headers, data=data)
|
|
|
95 |
|
96 |
|
97 |
def merge_locations(locations):
|
98 |
+
temp_locs= [i.split('-') for i in locations]
|
99 |
+
temp_locs = [[int(i[0]), int(i[1])] for i in temp_locs]
|
100 |
tree = intervaltree.IntervalTree.from_tuples(temp_locs)
|
101 |
tree.merge_overlaps()
|
102 |
+
merged_locations = ['-'.join([str(i.begin), str(i.end)]) for i in tree]
|
103 |
return merged_locations
|
104 |
|
105 |
def generate_function_predictions(domains_df, mapping_path):
|