frankligy / SNAF

Splicing Neo Antigen Finder (SNAF) is an easy-to-use Python package to identify splicing-derived tumor neoantigens from RNA sequencing data, it further leverages both deep learning and hierarchical Bayesian models to prioritize certain candidates for experimental validation
MIT License
34 stars 7 forks source link

No neoantigens table in #Interactive Neoantigen Viewer# (TypeError: 'NoneType' object is not subscriptable) #44

Open hywyh2018 opened 3 weeks ago

hywyh2018 commented 3 weeks ago

Thank you for sharing this nice toolkit of neoantigen identification!

I have finished the T antigen workflow analyses while some errors occurred in the Interactive Neoantigen Viewer. The table of neoantigens is empty like this:

Screenshot from 2024-06-13 04-24-36

and the terminal reports errors: Screenshot from 2024-06-13 04-22-31

------------------ My codes ------------------ import os,sys import pandas as pd import numpy as np import anndata as ad import snaf snaf.run_dash_T_antigen(input_abs_path='/mnt/sda/resource/ref/SNAF/shared_vs_unique_neoantigen_all.txt',remove_cols=['n_sample'],output_abs_path='/mnt/sda/resource/ref/SNAF')

The same for the example file: snaf.run_dash_T_antigen(input_abs_path='/mnt/sda/prog/ZIP/SNAF-main/test/result/shared_vs_unique_neoantigen_all.txt')

Looking forward to your help!

frankligy commented 3 weeks ago

Hi @hywyh2018,

It might not be the issue, but as a simple test, if you select some of the dots in the scatter plot, would anything show up? The way how it is designed is users selecting some dots (I believe you can just draw a circle on the plot), and the table and weblogo plot will show up.

Let me know, and if it does not work, I'll investigate it further.

Best, Frank

hywyh2018 commented 3 weeks ago

Hi Frank,

Thank you for your prompt reply.

I noticed that the peptide sequence and uid of the neoantigen appeared when the cursor moved on the dot. However, nothing changed when I clicked on the dots. Additionally, I tried the Box/Lasso Select tool on the toolbar of umap plot, and the plot of 'Selected Weblogo' shown on the left, while the table below remained empty. Screenshot from 2024-06-14 01-45-48

I wonder if the version of python is right. My codes for installation: conda create -n SNAF python==3.7.6 pip install git+https://github.com/frankligy/SNAF.git@e23ce39512a1a7f58c74e59b4b7cedc89248b908

All the best, Yahui

frankligy commented 3 weeks ago

Hi @hywyh2018,

I just did a test using a random dataset on my end and it worked, it didn't work at first try and I refreshed it and then it worked. Does refreshing or using different toolbar in the umap (zoom in and out, box select or lasso select or just playing with it a bit)? If it turns out to be a persistent issue, would you mind privately sharing with me your shared_vs_unique_neoantigen_all.txt with me (guangyuan.li@nyulangone.org) and I can see if it can render on my end?

Screenshot 2024-06-14 at 12 15 15 PM

My code is as below:

#!/gpfs/data/yarmarkovichlab/Frank/test_snaf/test_snaf_env/bin/python3.7

import os,sys
import pandas as pd
import numpy as np
import snaf
import anndata as ad

snaf.analyze_neoantigens(freq_path='result/frequency_stage2_verbosity1_uid.txt',
                         junction_path='result/burden_stage0.txt',
                         total_samples=66,outdir='result',
                         mers=None,
                         fasta=False)
snaf.run_dash_T_antigen(input_abs_path='/gpfs/data/yarmarkovichlab/Frank/test_snaf/result/shared_vs_unique_neoantigen_all.txt')

Best, Frank

hywyh2018 commented 3 weeks ago

Hi Frank,

Sorry for the delay reply.

I found that the same web page appeared using my file and the example file. Additionally, I tried the SNAF pipline on another computer these days, and the web page works fine. The difference between two computers is the installation codes: The SNAF installed on the former computer using: pip install SNAF This time using: pip install git+https://github.com/frankligy/SNAF.git@e23ce39512a1a7f58c74e59b4b7cedc89248b908

Then I reinstalled SNAF on the former computer and all things work fine. So the incompatible version of SNAF might be the source of my question. Screenshot from 2024-06-17 14-57-16

Thanks for your time and help~

All the best, Yahui