Giter Club home page Giter Club logo

Comments (5)

wfondrie avatar wfondrie commented on August 26, 2024

Hi Alex,

I'm not familiar with running command line tools within Spider, but this error seems to indicate that casanovo is not installed as a Python package in your current environment. What do you get when you run the following?

pip show casanovo

If casanovo was successfully installed, the output should look something like this:

Name: casanovo
Version: 0.1.dev13+gecf4884
Summary: De Novo Mass Spectrometry Peptide Sequencing with a Transformer Model
Home-page: https://github.com/Noble-Lab/casanovo
Author: Melih Yilmaz
Author-email: [email protected]
License: Apache 2.0
Location: /usr/local/anaconda3/lib/python3.8/site-packages
Requires: click, depthcharge-ms, numpy, pandas, pytorch-lightning, scikit-learn, spectrum-utils, torch
Required-by:

from casanovo.

alexmunroclark avatar alexmunroclark commented on August 26, 2024

Hi,

Yes running
pip show casanovo

is returning

Name: casanovo Version: 0.1.dev13+gecf4884 Summary: De Novo Mass Spectrometry Peptide Sequencing with a Transformer Model Home-page: https://github.com/Noble-Lab/casanovo Author: Melih Yilmaz Author-email: [email protected] License: Apache 2.0 Location: f:\applications\anaconda\lib\site-packages Requires: depthcharge-ms, click, numpy, torch, pytorch-lightning, scikit-learn, spectrum-utils, pandas Required-by:

from casanovo.

melihyilmaz avatar melihyilmaz commented on August 26, 2024

Hi Alex,

run casanovo --mode=denovo --model_path='pretrained_excl_clambacteria.ckpt' --test_data_path='dark_control_1.mgf' --config_path='config' --output_path='test.csv'

You seem to have a run at the beginning of your command, did you try executing the command without it?

Also the imports you mention are actually consistent and you can confirm this by checking the imports in denovo/__init__.py, which we access when from casanovo.denovo import is called in casanovo.py.

from casanovo.

alexmunroclark avatar alexmunroclark commented on August 26, 2024

Hi Melih,

I think I have solved the install issue.
I was trying to install it with Python 3.10 and it appears torch is not fully supported on it yet and was going unreported when trying to install through Spyder.
Downgrading Python to 3.9 and installing through the command line correctly installed it and the packages are called perfectly.

I have however had issues trying to load in my datasets.
The example command is:
casanovo --mode=denovo --model_path='path/to/pretrained' --test_data_path='path/to/test' --config_path='path/to/config' --output_path='path/to/output'

I've tried different combinations of the following for the paths but have had no luck.

  • Specifying the paths as: path='path/to/file.mgf' and path='path/to/folder'
  • Writing the paths as: path='paths/specified/with/quotes' and path=paths/without/quotes.
  • Writing the paths with: path='paths/with/forward/slash' and path='paths\with\back\slash'.
    I've put a few examples at the end of this message.

Could you please give some guidance on the best way to call the script with the correct arguments on Windows?

Best wishes,
Alex

A couple of examples:

casanovo --mode=denovo --model_path='F:\PhD_Data\Casanovo_Data' --test_data_path='F:\PhD_Data\Casanovo_Data' --config_path=F:\PhD_Data\Casanovo_Data' --output_path='F:\PhD_Data\Casanovo_Data'
casanovo --mode=denovo --model_path='F:\PhD_Data\Casanovo_Data\pretrained_excl_clambacteria.ckpt' --test_data_path='F:\PhD_Data\Casanovo_Data\dark_control_1.mgf' --config_path='F:\PhD_Data\Casanovo_Data\config_params.py' --output_path='F:\PhD_Data\Casanovo_Data\Output.csv'
casanovo --mode=denovo --model_path=F:\PhD_Data\Casanovo_Data\pretrained_excl_clambacteria.ckpt --test_data_path=F:\PhD_Data\Casanovo_Data\dark_control_1.mgf --config_path=F:\PhD_Data\Casanovo_Data\config_params.py --output_path=F:\PhD_Data\Casanovo_Data\Output.csv
casanovo --mode=denovo --model_path=F:/PhD_Data/Casanovo_Data/pretrained_excl_clambacteria.ckpt --test_data_path=F:/PhD_Data/Casanovo_Data/dark_control_1.mgf --config_path=F:/PhD_Data/Casanovo_Data/config_params.py --output_path=F:/PhD_Data/Casanovo_Data/Output.csv

from casanovo.

melihyilmaz avatar melihyilmaz commented on August 26, 2024

Hi Alex,

I just pushed a fix to solve the issue. You should provide paths with forward slash as shown in sample commands path/to/pretrained. More importantly, test_data_path, and other _data_path arguments as well, should point to a directory of mgf files, not a single mgf file.

Let me know if the issue is fixed.

from casanovo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.