Skip to content

Conversation

@Starlitnightly
Copy link
Collaborator

This pull request introduces the core infrastructure for integrating DeepVelo, Celldancer, and latentvelo

Example

#celldancer 
celldancer_df,adata=dyn.tl.extvelo(
    adata,
    method='celldancer',
    basis= "X_umap",
    Ms_key= "M_s",
    Mu_key= "M_u",
    permutation_ratio=0.5, #n_jobs=1,
    model_dir_path='model',
    n_jobs=1,        
    device='cuda',
)
#deepvelo
adata=dyn.tl.extvelo(
    adata,
    method='deepvelo',
    celltype_key='clusters',
    basis= "X_umap",
    Ms_key= "M_s",
    Mu_key= "M_u",
)
#latentvelo
latent_adata,adata=dyn.tl.extvelo(
    adata,
    method='latentvelo',
    celltype_key='clusters',
    basis= "X_umap",
    Ms_key= "M_s",
    Mu_key= "M_u",
    batch_size = 100, learning_rate=1e-2,
    epochs=50, param_name_key='temp/latentvelo_params',
    grad_clip=100,
    latentvelo_VAE_kwargs={
        'latent_dim':50,
        'zr_dim':2,
        'h_dim':2,
    }
)

…ing steps

- Replaced deprecated functions with Scanpy equivalents for log transformation, scaling, PCA, neighbors, and UMAP.
- Updated `extvelo` function to create a temporary directory if it doesn't exist and added dynamics metadata to the AnnData object.
…loDataset

- Integrated tqdm progress bar for epoch tracking in BaseTrainer.
- Enhanced logging to display metrics during training based on progress bar usage.
- Updated VeloDataset to handle sparse matrices and adjusted PCA solver.
- Improved neighbor graph construction in VeloDataset for better performance.
- Integrated deepvelo training process into extvelo function.
- Updated AnnData layers and metadata to accommodate deepvelo outputs.
- Ensured compatibility with existing velocity calculations and data structures.
- Implemented velovi integration within extvelo function.
- Added necessary data processing and metadata updates for velovi outputs.
- Included comments indicating successful testing for existing methods and noted the need for testing on the new velovi method.
…onality

- Included necessary imports for torch, numpy, and scipy to enhance the velovi method.
- Ensured proper integration of the velovi setup process within the extvelo function.
- Maintained existing structure and comments for clarity on method testing status.
@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

❌ Patch coverage is 0.18013% with 3325 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.11%. Comparing base (27eb07f) to head (68c50fd).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
dynamo/external/deepvelo/utils/temporal.py 0.00% 501 Missing ⚠️
dynamo/external/deepvelo/plot/scatter.py 0.00% 421 Missing ⚠️
dynamo/external/deepvelo/tool/velocity.py 0.00% 223 Missing ⚠️
dynamo/external/deepvelo/model/model.py 0.00% 183 Missing ⚠️
dynamo/external/deepvelo/utils/confidence.py 0.00% 181 Missing ⚠️
dynamo/external/deepvelo/utils/optimization.py 0.00% 171 Missing ⚠️
dynamo/external/deepvelo/model/loss.py 0.00% 169 Missing ⚠️
dynamo/external/deepvelo/trainer/trainer.py 0.00% 156 Missing ⚠️
dynamo/external/deepvelo/plot/plot.py 0.00% 144 Missing ⚠️
...namo/external/deepvelo/data_loader/data_loaders.py 0.00% 123 Missing ⚠️
... and 29 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #731      +/-   ##
==========================================
- Coverage   30.26%   28.11%   -2.15%     
==========================================
  Files         258      295      +37     
  Lines       43407    46721    +3314     
==========================================
  Hits        13137    13137              
- Misses      30270    33584    +3314     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Adjusted function signature for extvelo to enhance readability.
- Added missing comma in the parameters dictionary for consistency.
- Included additional import for data preprocessing to support velovi method.
- Ensured adata is copied before processing to maintain data integrity.
@Starlitnightly Starlitnightly merged commit af58715 into aristoteleo:master Nov 7, 2025
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant