https://github.com/bigbio/dleamse
A Deep LEArning-based Mass Spectra Embedder for spectral similarity scoring
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
✓DOI references
Found 1 DOI reference(s) in README -
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.4%) to scientific vocabulary
Repository
A Deep LEArning-based Mass Spectra Embedder for spectral similarity scoring
Basic Info
Statistics
- Stars: 11
- Watchers: 4
- Forks: 4
- Open Issues: 4
- Releases: 2
Metadata Files
README.md
DLEAMSE
A Deep LEArning-based Mass Spectra Embedder for spectral similarity scoring. DLEAMSE (based on Siamese Network) is trained and tested with a larger dataset from PRIDE Cluster. The repository stores the encoder and embedder scripts of DLEAMSE to encode and embed spectra.
The following repo presented the model DLEAMSE and the tool mslookup.
Training data set
A larger spectral set from PRIDE Cluster is used to construct the training and test data, which use high confidence spectra retrieved from high consistency clusters. We chose PRIDE Cluster data to train and test DLEAMSE, for two reasons: 1. The spectra in high consistency clusters are high confidence spectra. 2. The spectral set from PRIDE Cluster covers more species and instrument types. Two filters were used for retrieving high confidence spectra. The first filter controls the quality of collected clusters. We customized clustering-file-converter (https://github.com/spectra-cluster/clustering-file-converter) to retain the high-quality spectral clusters (cluster size >= 30, cluster ratio >= 0.8, and the total ions current (TIC) >= 0.2). The second filter eliminates duplicate clusters assigned with same peptide sequence, only one in the dupli-cates has been chosen, to ensure that the retained clusters are from different peptides. Then 113,362 clusters have been retrained from PRIDE Cluster release 201504. The needed spectra in clusters are acquired from the PRIDE Archive.
Model and Training
In DLEAMSE, Siamese network (Figure 1a) trains two same embedding models (Figure 1c) with shared weights, and spectra are encoded by the same encoder (Figure 1b) before the embedding. Based on the Euclidean distance between the pair of embedded spectra, the weights of embedding model is learned by contrastive loss function adapted from Hadsell et. al. that penalizes far-apart same-label spectra (label=1) and nearby different-label spectra (label=0). Back propagation from the loss function is used to update the weights in the network. The net-work is trained by stochastic gradient descent with the Adam update rule with a learning rate of 0.005. The codes are implemented in Python3 with the PyTorch framework.

Testing

Requirements
- Python3.7 (or Anaconda3)
- torch==1.0.0 (python -m pip install torch===1.0.0 torchvision===0.2.1 -f https://download.pytorch.org/whl/torch_stable.html)
- pyteomics>=3.5.1
- numpy>=1.13.3
- numba>=0.45.0
- faiss-cpu (conda install faiss-cpu pytorch -c)
- more_itertools==7.1.0
Installation
DLEAMSE’s encoder and embedder have been packaged and uploaded to pypi library, the package’s name is dleamse.
python
python -m pip install dleamse
Usage
The model file of DLEAMSE: 080802201000NM500Rmodel.pkl The 500 reference spectra used in our project: 500rfsspectra.mgf
mslookup.py: the commandline script of dleamse
MSLOOKUP
The mslookup is a tool developed using the DLEAMSE model and algorithm and faiss database to encode, index and search previously identified/unidentified spectra in public repositories.
Encode and Embed spectra
python
python mslookup.py embed-ms-file -i test_cml_index/PXD003552_61576_ArchiveSpectrum.json
Create index files
python
python mslookup.py make-index -d test_cml_index/database_ids_usi.csv -e test_cml_index/ -o test_cml_index/test_cml_0412.index
Merge index files
python
python mslookup.py merge-indexes test_cml_index/*.index test_cml_index/test_cml_merge_0412.index
Range Search
In this case, lowerthreshold and upperthreshold of range searching are default values, lowerthreshold(-lt)=0, upperthreshold(-ut)=0.07.
python
python mslookup.py range-search -i test_cml_index/test_cml_0412.index -u test_cml_index/test_cml_0412_ids_usi.csv -e test_cml_index/*_embedded.txt -o test_cml_index/test_cml_rangesearch_rlt.json
In this case, lowerthreshold(-lt)=0.01, and upperthreshold(-ut) is set to default value 0.07.
python
python mslookup.py range-search -i test_cml_index/test_cml_0412.index -u test_cml_index/test_cml_0412_ids_usi.csv -e test_cml_index/*_embedded.txt -lt 0.01 -o test_cml_index/test_cml_rangesearch_rlt.json
In this case, lowerthreshold(-lt)=0.01, and upperthreshold(-ut) = 0.05.
python
python mslookup.py range-search -i test_cml_index/test_cml_0412.index -u test_cml_index/test_cml_0412_ids_usi.csv -e test_cml_index/*_embedded.txt -lt 0.01 -ut 0.05 -o test_cml_index/test_cml_rangesearch_rlt.json
About index search
dleamse_faiss_index_search.py
Range Search query 32D spectra vectors against spectra library's index file, Default lowerthreshold is 0 and upperthreshold is 0.07.
Databases
We have released a couple of databases for the users of the mslookup tool ftp://ftp.pride.ebi.ac.uk/pride/data/proteogenomics/projects/mslookup/. Databases can be download from the FTP and use locally in your own computer.
Citation
Deep learning embedder method and tool for mass spectra similarity search. Journal of Proteomics . 2021 Feb 10;232:104070. doi:10.1016/j.jprot.2020.104070. Epub 2020 Dec 8 Manuscript File
Owner
- Name: BigBio Stack
- Login: bigbio
- Kind: organization
- Email: proteomicsstack@gmail.com
- Location: Cambridge, UK
- Website: http://bigbio.xyz
- Repositories: 24
- Profile: https://github.com/bigbio
Provide big data solutions Bioinformatics
GitHub Events
Total
- Delete event: 1
- Issue comment event: 2
- Member event: 1
- Pull request event: 4
- Create event: 2
Last Year
- Delete event: 1
- Issue comment event: 2
- Member event: 1
- Pull request event: 4
- Create event: 2
Committers
Last synced: over 3 years ago
All Time
- Total Commits: 261
- Total Committers: 7
- Avg Commits per committer: 37.286
- Development Distribution Score (DDS): 0.398
Top Committers
| Name | Commits | |
|---|---|---|
| qinchunyuan | 5****0@q****m | 157 |
| yperez | y****l@g****m | 61 |
| xiyang | 3****0@q****m | 32 |
| xiyang | 3****o@u****m | 5 |
| XiYang-Luo | 2****z | 3 |
| baimingze | b****e@g****m | 2 |
| luoxi123 | 3****3@u****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 18
- Total pull requests: 36
- Average time to close issues: 3 months
- Average time to close pull requests: about 1 month
- Total issue authors: 3
- Total pull request authors: 3
- Average comments per issue: 0.94
- Average comments per pull request: 0.28
- Merged pull requests: 33
- Bot issues: 0
- Bot pull requests: 6
Past Year
- Issues: 0
- Pull requests: 3
- Average time to close issues: N/A
- Average time to close pull requests: 22 days
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 1.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 3
Top Authors
Issue Authors
- ypriverol (16)
- XiYang-Luo (1)
- Peggyying (1)
Pull Request Authors
- ypriverol (21)
- dependabot[bot] (10)
- XiYang-Luo (9)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 54 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 13
- Total maintainers: 2
pypi.org: dleamse
dleamse's encoding and embedding methods, and dleamse's faiss index (IndexIDMap type) write.
- Homepage: https://github.com/bigbio/DLEAMSE
- Documentation: https://dleamse.readthedocs.io/
- License: 'Apache 2.0
-
Latest release: 0.3.6
published almost 6 years ago
Rankings
Dependencies
- click *
- faiss-cpu *
- h5py *
- lxml *
- matplotlib *
- more_itertools ==7.1.0
- numba ==0.49.0
- numpy ==1.18.1
- pandas ==0.25.3
- pyteomics ==4.1.1
- scipy *
- sklearn *
- torch ==1.0.0
- torchvision ==0.2.1
- faiss-cpu >=1.5.3
- more_itertools *
- numba >=0.45
- numpy >=1.13.3
- pyteomics >=3.5.1
- torch ==1.0.0
- actions/checkout v2 composite
- actions/setup-python v1 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite