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

Program Error #4

Open
xuanwuji opened this issue Aug 28, 2023 · 4 comments
Open

Program Error #4

xuanwuji opened this issue Aug 28, 2023 · 4 comments

Comments

@xuanwuji
Copy link

Thanks for your excellent work. This is a useful tool but i got some problem when i use it.
I confirm that I have installed ANARCI in my environment and can successfully run the test file, but when I run my own file there is such an error, may I ask if it is because of my input sequence?

Below is my terminal runtime log

Predict batch 0
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 1
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 2
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 3
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 4
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 5
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 6
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 7
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 8
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 9
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 10
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 11
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 12
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 13
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 14
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 15
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 16
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 17
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 18
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 19
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 20
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 21
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 22
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 23
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 24
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 25
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 26
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 27
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 28
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 29
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 30
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 31
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 32
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 33
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 34
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 35
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 36
Save fasta file to tmp_faketcr.fasta
Aligning...
Predict batch 37
Save fasta file to tmp_faketcr.fasta
Aligning...
Error: b'Parse failed (sequence file /tmp/tmp4jw3lh1t.fasta):\nLine 18: illegal character ?\n\n'
Traceback (most recent call last):
File "/mnt/zhangzheng_group/xuany/tcr_software/TEIM/scripts/data_process.py", line 84, in get_numbering
df = pd.read_csv('tmp_align_B.csv')
File "/mnt/zhangzheng_group/xuany/miniconda3/envs/TEIM/lib/python3.9/site-packages/pandas/util/_decorators.py", line 311, in wrapper
return func(*args, **kwargs)
File "/mnt/zhangzheng_group/xuany/miniconda3/envs/TEIM/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 680, in read_csv
return _read(filepath_or_buffer, kwds)
File "/mnt/zhangzheng_group/xuany/miniconda3/envs/TEIM/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 575, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "/mnt/zhangzheng_group/xuany/miniconda3/envs/TEIM/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 933, in init
self._engine = self._make_engine(f, self.engine)
File "/mnt/zhangzheng_group/xuany/miniconda3/envs/TEIM/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 1217, in _make_engine
self.handles = get_handle( # type: ignore[call-overload]
File "/mnt/zhangzheng_group/xuany/miniconda3/envs/TEIM/lib/python3.9/site-packages/pandas/io/common.py", line 789, in get_handle
handle = open(
FileNotFoundError: [Errno 2] No such file or directory: 'tmp_align_B.csv'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/mnt/zhangzheng_group/xuany/tcr_software/TEIM/scripts/inference_seq2.py", line 171, in
predict_binding(input_path, output_path=output_path)
File "/mnt/zhangzheng_group/xuany/tcr_software/TEIM/scripts/inference_seq2.py", line 158, in predict_binding
pred = predictor.predict(seqs_cdr3_batch, seqs_epi_batch)[:, 0]
File "/mnt/zhangzheng_group/xuany/tcr_software/TEIM/scripts/inference_seq2.py", line 111, in predict
encoding_cdr3, encoding_epi, epi_vec = self.encode_data(seqs_cdr3, seqs_epi)
File "/mnt/zhangzheng_group/xuany/tcr_software/TEIM/scripts/inference_seq2.py", line 116, in encode_data
encoding_cdr3 = encode_cdr3(seqs_cdr3, self.tokenizer)
File "/mnt/zhangzheng_group/xuany/tcr_software/TEIM/scripts/data_process.py", line 171, in encode_cdr3
seqs_al = get_numbering(cdr3)
File "/mnt/zhangzheng_group/xuany/tcr_software/TEIM/scripts/data_process.py", line 86, in get_numbering
raise FileNotFoundError('Error: ANARCI failed to align, please check whether ANARCI exists in your environment')
FileNotFoundError: Error: ANARCI failed to align, please check whether ANARCI exists in your environment

@pengxingang
Copy link
Owner

Hello, we appreciate your interest in our work. After reviewing the error message you've shared, it appears that there might be an issue with the installation of ANARCI. To verify this, you can simply enter the command ANARCI in your command line. If it is not correctly installed, you will see the message ANARCI: command not found.

To proceed with the installation, you can utilize the following command: conda install -c bioconda anarci. Make sure to execute this command within the appropriate Anaconda environment.

@pengxingang
Copy link
Owner

If ANARCI has been installed correctly and you continue to encounter the same error message, we recommend verifying whether the sequences you've provided are indeed valid beta chain CDR3 sequences of TCRs.

@pengxingang
Copy link
Owner

The error message occurred at batch 37, which corresponds to the 4736th-4864th sequences in your input file because the batch size is set to 128. You can check these sequences.

@hello-88
Copy link

hello-88 commented May 9, 2024

Hello!I have also installed ANARCI in my environment but when I run inference_res.py there is such an error:ANARCI failed to align, please check whether ANARCI exists in your environment,How should I fix this?

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

3 participants