microsoft / microsoft/foldingdiff
Error when using script partial_noise_reconstruct.py
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 568
- Forks
- 74
- Avg merge
- 20h 2m
- Merged PRs (30d)
- 1
Description
Hello,
It is a good idea to incorporate a script to produce variants from starting structures (aka. inpaiting). I was trying to run the script partial_noise_reconstruct.py but I got the following error:
$ python ../bin/partial_noise_reconstruct.py protein1.pdb protein2.pdb output.json
INFO:root:Detected huggingface repo ID wukevin/foldingdiff_cath
Fetching 6 files: 100%|█████████████████████| 6/6 [00:00<00:00, 23410.07it/s]
INFO:root:Using downloaded model at /home/tn/.cache/huggingface/hub/models--wukevin--foldingdiff_cath/snapshots/98d77b1e68468db5ca03cdba1c0a90f2a2a33edc
INFO:root:Loading dataset from 2 pdb files
INFO:root:Clean dataset class: <class 'foldingdiff.datasets.CathCanonicalAnglesOnlyDataset'>
Traceback (most recent call last):
File "../bin/partial_noise_reconstruct.py", line 132, in <module>
main()
File "../bin/partial_noise_reconstruct.py", line 116, in main
scores = get_reconstruction_error(
File "../bin/partial_noise_reconstruct.py", line 94, in get_reconstruction_error
dset = load_dataset(pdb_files, model)
File "../bin/partial_noise_reconstruct.py", line 34, in load_dataset
dset = clean_dset_class(
File "/home/tn/foldingdiff/foldingdiff/datasets.py", line 499, in __init__
super().__init__(*args, **kwargs)
File "/home/tn/foldingdiff/foldingdiff/datasets.py", line 123, in __init__
fnames = self.__get_pdb_fnames(pdbs)
File "/home/tn/foldingdiff/foldingdiff/datasets.py", line 238, in __get_pdb_fnames
if Path(pdbs).is_dir():
File "/home/tn/.conda/envs/foldingdiff/lib/python3.8/pathlib.py", line 1042, in __new__
self = cls._from_parts(args, init=False)
File "/home/tn/.conda/envs/foldingdiff/lib/python3.8/pathlib.py", line 683, in _from_parts
drv, root, parts = self._parse_args(args)
File "/home/tn/.conda/envs/foldingdiff/lib/python3.8/pathlib.py", line 667, in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not list
Could you please help on this issue?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with bin/partial_noise_reconstruct.py, especially load_dataset and get_reconstruction_error, then inspect foldingdiff/datasets.py around __get_pdb_fnames. Re-run the command shown with the two PDB inputs and confirm that dataset loading completes and output.json is produced without the TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- huggingface, python
- Domain
- bioinformatics, machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100