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
35 stars 8 forks source link

No such file or directory "assets" #30

Open LucaMannino opened 5 months ago

LucaMannino commented 5 months ago

Hi,

Aplogies if I am sking something pointless I am fairly inexperienced in coding.

I got this error: no such file or directory "assets" image

When running the Loading and instantiating of the Identify MHC-bound neoantigens (T-antigen) part of the protocol without netMHCpan but using MHCflurry using the code below:

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

read in the splicing junction matrix

df = pd.read_csv('/nasdata/lmannino/PersonalisedCancer/SNAF/altanalyze_output/ExpressionInput/counts.original.pruned.txt',index_col=0,sep='\t')

database directory (where you extract the reference tarball file) and netMHCpan folder

db_dir = '/nasdata/lmannino/PersonalisedCancer/SNAF/data/'

demonstrate how to add additional control database, see below note for more

tcga_ctrl_db = ad.read_h5ad(os.path.join(db_dir,'controls','tcga_matched_control_junction_count.h5ad')) gtex_skin_ctrl_db = ad.read_h5ad(os.path.join(db_dir,'controls','gtex_skin_count.h5ad')) add_control = {'tcga_control':tcga_ctrl_db,'gtex_skin':gtex_skin_ctrl_db}

initiate

snaf.initialize(df=df,db_dir=db_dir,add_control=add_control)

I fixed the error by commenting out from line 18 to 22 of the app.py file in the snaf conda environment: image

I was wondering is this the correct approach? the code seams to be working now I just wanted to check with you and hopefully if it is correct other people that might encouter the same problem can use this solution.

frankligy commented 5 months ago

Hi @LucaMannino,

Thanks for bringing this up, for the particular error message that you mentioned, you did it correctly. This is not my proudest design, the reason is just for the T antigen and B antigen viewer, every time after using that, it will generate a lot of temporary images so I wrote this to automatically purge them when I exit the program. It will cause confusion if you are not using the viewer, but it doesn't do any harm for the program so I've been procrastinating resolving it. I hope this clear your confusion, and I'll try to find a better way to do that in the next release.

But from you logging, it immediately exit the program (showing this message) after initialization, this sounds weird to me because it basically says nothing has been executed. You can refer to this reply to see normally how the logging should look like (https://github.com/frankligy/SNAF/issues/27#issuecomment-1925444685).

You mentioned you are using mhcflurry, although it should work for smaller data, I do experience longer running time and the issue people brought up (the link I sent) saying it has memory overhead. Internally, I have been using netMHCpan for all my analysis. I had a youtube link to demo how to install & configure that, it is very straightforward. And I am happy to help if you encounter any issue.

Let me know if that makes sense, Frank