BEAM-Labs / ContraNovo

20 stars 1 forks source link

Question about de novo prediction of own files #2

Closed JannikSchneider12 closed 8 months ago

JannikSchneider12 commented 8 months ago

Hello,

I wanted to try the model on my mgf files. Since I don't have any peptide sequences and want to predict new ones, I dont have a peptide or sequence parameter in my mgf files. I tried running the model, but I am getting this error:

return spectrum, precursor_mz, precursor_charge, peptide.replace("pyro-","-17.027") AttributeError: 'NoneType' object has no attribute 'replace'

So is it even possible to just predict new sequences or would I need to have data with labels?

Thanks for your time and help

sxu99 commented 8 months ago

Hi @JannikSchneider12 ,

Sorry for the late reply and thank you for using ContraNovo!

For de novo sequencing (predict peptide sequences from mgf files), you can specify the --mode option as denovo.

python -m ContraNovo.ContraNovo  --mode=denovo --peak_path=./you_file.mgf --model=./ContraNovo/ContraNovo.ckpt

If you have any further questions or encounter any issues, please don't hesitate to let us know.

Thank you!