Spaces:
Sleeping
Sleeping
Commit
·
5b00e58
1
Parent(s):
a802398
Update code/alphafold_featureVector.py
Browse files
code/alphafold_featureVector.py
CHANGED
@@ -347,12 +347,14 @@ def alphafold(input_set, mode, impute):
|
|
347 |
## Physicochemical properties
|
348 |
print('Adding physicochemical properties...\n')
|
349 |
data = add_physicochemical(data)
|
350 |
-
st.write('
|
351 |
st.write(data)
|
352 |
|
353 |
## Domains
|
354 |
print('Adding domains\n')
|
355 |
data = add_domains(data, path_to_domains)
|
|
|
|
|
356 |
|
357 |
## Processing data frame
|
358 |
data = data.astype(str)
|
@@ -372,6 +374,12 @@ def alphafold(input_set, mode, impute):
|
|
372 |
## canonical_fasta : Dataframe including canonical sequence for the protein of interest. Obtained from UniProt.
|
373 |
## isoform_fasta: Dataframe including isoform sequences for the protein of interest. Obtained from UniProt.
|
374 |
not_match_in_uniprot, uniprot_matched, canonical_fasta, isoform_fasta = uniprotSequenceMatch(data)
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
|
376 |
not_match_in_uniprot = not_match_in_uniprot.reset_index().drop(['index'], axis=1)
|
377 |
|
@@ -379,7 +387,10 @@ def alphafold(input_set, mode, impute):
|
|
379 |
not_match_in_uniprot[key] = ''
|
380 |
not_match_in_uniprot = not_match_in_uniprot.rename(columns=change_names)
|
381 |
uniprot_matched = add_annotations(uniprot_matched)
|
382 |
-
st.write('
|
|
|
|
|
|
|
383 |
st.write(uniprot_matched)
|
384 |
|
385 |
|
@@ -401,6 +412,9 @@ def alphafold(input_set, mode, impute):
|
|
401 |
uniprot_matched.at[w, q] = 'nan'
|
402 |
uniprot_matched = uniprot_matched.rename(columns=change_names)
|
403 |
uniprot_matched['wt_sequence_match'] = uniprot_matched['wt_sequence_match'].astype(str)
|
|
|
|
|
|
|
404 |
|
405 |
|
406 |
## Avoiding downloading files for SASA calculation if already downloaded.
|
@@ -444,6 +458,8 @@ def alphafold(input_set, mode, impute):
|
|
444 |
|
445 |
|
446 |
uniprot_matched = uniprot_matched.replace({'nan': np.NaN})
|
|
|
|
|
447 |
for annot in ['Domain', 'Alternative sequence', 'Chain', 'Sequence conflict', 'Compositional bias']:
|
448 |
try:
|
449 |
uniprot_matched = uniprot_matched.drop(columns=annot)
|
|
|
347 |
## Physicochemical properties
|
348 |
print('Adding physicochemical properties...\n')
|
349 |
data = add_physicochemical(data)
|
350 |
+
st.write('add_physicochemical')
|
351 |
st.write(data)
|
352 |
|
353 |
## Domains
|
354 |
print('Adding domains\n')
|
355 |
data = add_domains(data, path_to_domains)
|
356 |
+
st.write('add_domains')
|
357 |
+
st.write(data)
|
358 |
|
359 |
## Processing data frame
|
360 |
data = data.astype(str)
|
|
|
374 |
## canonical_fasta : Dataframe including canonical sequence for the protein of interest. Obtained from UniProt.
|
375 |
## isoform_fasta: Dataframe including isoform sequences for the protein of interest. Obtained from UniProt.
|
376 |
not_match_in_uniprot, uniprot_matched, canonical_fasta, isoform_fasta = uniprotSequenceMatch(data)
|
377 |
+
st.write('not_match_in_uniprot')
|
378 |
+
st.write(not_match_in_uniprot)
|
379 |
+
|
380 |
+
st.write('uniprot_matched')
|
381 |
+
st.write(uniprot_matched)
|
382 |
+
|
383 |
|
384 |
not_match_in_uniprot = not_match_in_uniprot.reset_index().drop(['index'], axis=1)
|
385 |
|
|
|
387 |
not_match_in_uniprot[key] = ''
|
388 |
not_match_in_uniprot = not_match_in_uniprot.rename(columns=change_names)
|
389 |
uniprot_matched = add_annotations(uniprot_matched)
|
390 |
+
st.write('not_match_in_uniprot col name changed')
|
391 |
+
st.write(not_match_in_uniprot)
|
392 |
+
|
393 |
+
st.write('uniprot_matched annotation added')
|
394 |
st.write(uniprot_matched)
|
395 |
|
396 |
|
|
|
412 |
uniprot_matched.at[w, q] = 'nan'
|
413 |
uniprot_matched = uniprot_matched.rename(columns=change_names)
|
414 |
uniprot_matched['wt_sequence_match'] = uniprot_matched['wt_sequence_match'].astype(str)
|
415 |
+
|
416 |
+
st.write('burda ne oldu')
|
417 |
+
st.write(uniprot_matched)
|
418 |
|
419 |
|
420 |
## Avoiding downloading files for SASA calculation if already downloaded.
|
|
|
458 |
|
459 |
|
460 |
uniprot_matched = uniprot_matched.replace({'nan': np.NaN})
|
461 |
+
st.write('isoform match vs ')
|
462 |
+
st.write(uniprot_matched)
|
463 |
for annot in ['Domain', 'Alternative sequence', 'Chain', 'Sequence conflict', 'Compositional bias']:
|
464 |
try:
|
465 |
uniprot_matched = uniprot_matched.drop(columns=annot)
|