fatmacankara commited on
Commit
4d3c48c
·
1 Parent(s): 7a9bb10

Update code/alphafold_featureVector.py

Browse files
Files changed (1) hide show
  1. code/alphafold_featureVector.py +10 -5
code/alphafold_featureVector.py CHANGED
@@ -291,6 +291,7 @@ def get_coords(annot, alignments, coords, resnums_for_sasa, mode):
291
 
292
 
293
  from huggingface_hub import hf_hub_download
 
294
 
295
 
296
  # FUNCTIONS
@@ -620,13 +621,17 @@ def alphafold(input_set, mode, impute):
620
  except:
621
  KeyError
622
  info_per_model[mod][annot] = annotation_pos_on_pdb_
623
- st.write('so far so good')
624
- pdb_path = hf_hub_download(repo_id="HuBioDataLab/AlphafoldStructures", filename=f"AF-{uniprotID}-F{mod}-model_v4.pdb.gz",repo_type = 'dataset')
625
- st.write('pdb_path', pdb_path)
626
-
 
 
 
 
 
627
 
628
  pdbSequence = convert_non_standard_amino_acids(pdbSequence)
629
- st.write('pdbSequence', pdbSequence)
630
 
631
  atomSequence = ''
632
  coords = []
 
291
 
292
 
293
  from huggingface_hub import hf_hub_download
294
+ from huggingface_hub import utils as u
295
 
296
 
297
  # FUNCTIONS
 
621
  except:
622
  KeyError
623
  info_per_model[mod][annot] = annotation_pos_on_pdb_
624
+ try:
625
+ pdb_path = hf_hub_download(repo_id="HuBioDataLab/AlphafoldStructures", filename=f"AF-{uniprotID}-F{mod}-model_v4.pdb.gz",repo_type = 'dataset')
626
+ st.write('1')
627
+ except u.EntryNotFoundError:
628
+ pdb_path = hf_hub_download(repo_id="HuBioDataLab/AlphafoldStructures2", filename=f"AF-{uniprotID}-F{mod}-model_v4.pdb.gz",repo_type = 'dataset')
629
+ st.write('2')
630
+ except u.EntryNotFoundError:
631
+ pdb_path = hf_hub_download(repo_id="HuBioDataLab/AlphafoldStructures3", filename=f"AF-{uniprotID}-F{mod}-model_v4.pdb.gz",repo_type = 'dataset')
632
+ st.write('3')
633
 
634
  pdbSequence = convert_non_standard_amino_acids(pdbSequence)
 
635
 
636
  atomSequence = ''
637
  coords = []