Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TrRosetta example doesn't work #18

Open
GrayWasTaken opened this issue May 6, 2023 · 0 comments
Open

TrRosetta example doesn't work #18

GrayWasTaken opened this issue May 6, 2023 · 0 comments

Comments

@GrayWasTaken
Copy link

The example code provided in the README.md for TrRosetta doesn't work and throws the following exception:

Traceback (most recent call last):
  File "...", line 1, in <module>
    msas_processed = tr_preprocessing.process(msas)
  File ".venv/lib/python3.10/site-packages/sequence_models/trRosetta_utils.py", line 254, in process
    x = F.one_hot(x, len(trR_ALPHABET)).unsqueeze(0).float()
TypeError: one_hot(): argument 'input' (position 1) must be Tensor, not list

code:

from sequence_models.trRosetta_utils import trRosettaPreprocessing, parse_a3m
from sequence_models.trRosetta import trRosetta
from sequence_models.constants import trR_ALPHABET

msas = parse_a3m(path_to_msa) # load in msas in a3m format
alphabet = trR_ALPHABET # load your alphabet order
tr_preprocessing = trRosettaPreprocessing(alphabet) # setup preprocessor for msa
msas_processed = tr_preprocessing.process(msas)
@GrayWasTaken GrayWasTaken changed the title TrRosetta example doesn't actually work TrRosetta example doesn't work May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant