Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ATAC QC component #868

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

ATAC QC component #868

wants to merge 23 commits into from

Conversation

VladimirShitov
Copy link
Collaborator

@VladimirShitov VladimirShitov commented Aug 27, 2024

Changelog

Add component for calculating QC metrics for ATAC data.

Issue ticket number and link

Contributes to #398

Checklist before requesting a review

  • I have performed a self-review of my code

  • Conforms to the Contributor's guide

  • Check the correct box. Does this PR contain:

    • Breaking changes
    • New functionality
    • Major changes
    • Minor changes
    • Documentation
    • Bug fixes
  • Proposed changes are described in the CHANGELOG.md

  • CI tests succeed!

Copy link
Member

@DriesSchaumont DriesSchaumont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comments, but looking good overall! 👍

Comment on lines +105 to +111
- type: python
__merge__: [/src/base/requirements/anndata_mudata.yaml, .]
packages:
- numpy~=1.23.5
- scanpy~=1.9.3
- muon~=0.1.5
- pysam~=0.22.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a base version for scanpy. Also, the anndata_mudata base already pins numpy < 2

Suggested change
- type: python
__merge__: [/src/base/requirements/anndata_mudata.yaml, .]
packages:
- numpy~=1.23.5
- scanpy~=1.9.3
- muon~=0.1.5
- pysam~=0.22.0
- type: python
__merge__: [/src/base/requirements/anndata_mudata.yaml, .]
__merge__: [ /src/base/requirements/scanpy.yaml, .]
packages:
- muon~=0.1.5
- pysam~=0.22.0

- pysam~=0.22.0
test_setup:
- type: python
__merge__: [ /src/base/requirements/viashpy.yaml, /src/base/requirements/scanpy.yaml, .]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because scanpy is already included in the regular setup, it should not be added again. (test setup steps are added on top of the regular setup)

Suggested change
__merge__: [ /src/base/requirements/viashpy.yaml, /src/base/requirements/scanpy.yaml, .]
__merge__: [ /src/base/requirements/viashpy.yaml, .]

mdata = mu.read(par["input"])

logger.debug("Making var names unique")
mdata.var_names_make_unique()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I want to avoid calling this here

atac.obs.drop(col, axis=1, inplace=True)

logger.info("Calculating QC metrics")
sc.pp.calculate_qc_metrics(atac, percent_top=None, log1p=False, inplace=True, layer=par["layer"])
Copy link
Member

@DriesSchaumont DriesSchaumont Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to avoid that things get overwritten by scanpy, could you pass a copy of the data?

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.

2 participants