Skip to content

Commit aa0c360

Browse files
authored
Merge pull request #13 from CompOmics/update-docs-model
Update-docs-model
2 parents f4041a8 + e8ad3bc commit aa0c360

File tree

13 files changed

+2127
-464
lines changed

13 files changed

+2127
-464
lines changed

.pre-commit-config.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Pre-commit configuration for IM2Deep
2+
# Install with: pip install pre-commit && pre-commit install
3+
4+
repos:
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v4.4.0
7+
hooks:
8+
- id: trailing-whitespace
9+
- id: end-of-file-fixer
10+
- id: check-yaml
11+
- id: check-added-large-files
12+
- id: check-merge-conflict
13+
- id: debug-statements
14+
15+
- repo: https://github.com/psf/black
16+
rev: 23.3.0
17+
hooks:
18+
- id: black
19+
language_version: python3
20+
21+
- repo: https://github.com/pycqa/isort
22+
rev: 5.12.0
23+
hooks:
24+
- id: isort
25+
args: ["--profile", "black"]
26+
27+
- repo: https://github.com/pycqa/flake8
28+
rev: 6.0.0
29+
hooks:
30+
- id: flake8
31+
args: [--max-line-length=99]
32+
33+
- repo: https://github.com/pre-commit/mirrors-mypy
34+
rev: v1.3.0
35+
hooks:
36+
- id: mypy
37+
additional_dependencies: [types-requests]

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
- This CHANGELOG file
12+
- Comprehensive documentation with API reference, development guide, and tutorial
13+
- Enhanced error handling with custom exceptions
14+
- Input validation throughout the codebase
15+
- Type hints for better code clarity
16+
- Detailed logging with different verbosity levels
17+
18+
### Changed
19+
- Improved function signatures with better parameter validation
20+
- Enhanced docstrings with NumPy style documentation
21+
- Better error messages with more context
22+
- Improved CLI with better help text and validation
23+
- More robust file handling with proper encoding
24+
- Enhanced calibration functions with edge case handling
25+
26+
### Fixed
27+
- Import error handling for optional dependencies
28+
- File path validation in CLI
29+
- Memory management improvements
30+
- Edge cases in CCS/ion mobility conversions
31+
- Calibration edge cases with insufficient data

CONTRIBUTING.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Contributing to IM2Deep
2+
3+
We welcome contributions to IM2Deep! This document provides guidelines for contributing to the project.
4+
5+
## Getting Started
6+
7+
1. Fork the repository on GitHub
8+
2. Clone your fork locally
9+
3. Set up the development environment
10+
4. Create a feature branch
11+
5. Make your changes
12+
6. Run tests
13+
7. Submit a pull request
14+
15+
## Development Setup
16+
17+
```bash
18+
# Clone your fork
19+
git clone https://github.com/yourusername/IM2Deep.git
20+
cd IM2Deep
21+
22+
# Create virtual environment
23+
python -m venv venv
24+
source venv/bin/activate # On Windows: venv\Scripts\activate
25+
26+
# Install in development mode
27+
pip install -e .[dev,test]
28+
```
29+
30+
## Code Standards
31+
32+
### Style Guide
33+
- Follow PEP 8
34+
- Use Black for code formatting: `black im2deep/`
35+
- Use isort for imports: `isort im2deep/`
36+
- Maximum line length: 99 characters
37+
38+
### Documentation
39+
- Use NumPy-style docstrings
40+
- Include type hints
41+
- Provide examples in docstrings
42+
- Update documentation for new features
43+
44+
## Pull Request Process
45+
46+
1. Create a feature branch from `main`
47+
2. Make your changes
48+
3. Add tests for new functionality
49+
4. Update documentation
50+
5. Ensure all tests pass
51+
6. Update CHANGELOG.md
52+
7. Submit pull request
53+
54+
## Code of Conduct
55+
56+
- Be respectful and inclusive
57+
- Provide constructive feedback
58+
- Focus on the code, not the person
59+
- Help others learn and grow
60+
61+
## Questions?
62+
63+
Feel free to open an issue for questions or discussion!

im2deep/__init__.py

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,54 @@
1-
"""IM2Deep: Deep learning framework for peptide collisional cross section prediction."""
1+
"""
2+
IM2Deep: Deep learning framework for peptide collisional cross section prediction.
23
3-
__version__ = "1.0.3"
4+
IM2Deep is a Python package that provides accurate CCS (Collisional Cross Section)
5+
prediction for peptides and modified peptides using deep learning models trained
6+
specifically for TIMS (Trapped Ion Mobility Spectrometry) data.
7+
8+
Key Features:
9+
- Single-conformer CCS prediction using ensemble of neural networks
10+
- Multi-conformer CCS prediction for peptides with multiple conformations
11+
- Linear calibration using reference datasets
12+
- Support for modified peptides
13+
- Ion mobility conversion utilities
14+
- Command-line interface for easy usage
15+
16+
Example:
17+
Basic usage for CCS prediction:
18+
19+
>>> from im2deep.im2deep import predict_ccs
20+
>>> from psm_utils.psm_list import PSMList
21+
>>> predictions = predict_ccs(psm_list, calibration_data)
22+
23+
Dependencies:
24+
- deeplc: For deep learning model infrastructure
25+
- psm_utils: For peptide and PSM handling
26+
- pandas: For data manipulation
27+
- numpy: For numerical computations
28+
- click: For command-line interface
29+
30+
Authors:
31+
- Robbe Devreese
32+
- Robbin Bouwmeester
33+
- Ralf Gabriels
34+
35+
License:
36+
Apache License 2.0
37+
"""
38+
39+
__version__ = "1.1.0"
40+
41+
# Import main functionality for easier access
42+
from im2deep.im2deep import predict_ccs
43+
from im2deep.calibrate import linear_calibration
44+
from im2deep.utils import ccs2im, im2ccs
45+
from im2deep._exceptions import IM2DeepError, CalibrationError
46+
47+
__all__ = [
48+
"predict_ccs",
49+
"linear_calibration",
50+
"ccs2im",
51+
"im2ccs",
52+
"IM2DeepError",
53+
"CalibrationError",
54+
]

0 commit comments

Comments
 (0)