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

ENH: Added action normalize that can normalize a FeatureTable[Frequency] with common methods. #312

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

VinzentRisch
Copy link
Contributor

@VinzentRisch VinzentRisch commented Jul 22, 2024

This PR solves #311
This PR depends on qiime2/q2-types#340

  • This PR adds a new action that can normalize a FeatureTable[Frequency] with common RNA-seq methods. The action uses the package RNAnorm.
  • The action takes as input one FeatureTable[Frequency].
  • The gene-lengths input is used to pass the gene lengths and can only be used with the methods TPM and FPKM. It accepts artifacts of type FeatureData[SequenceCharacteristics % Properties("length")].

Run it locally

  1. First, clone the repo and checkout the PR branch:
git clone https://github.com/qiime2/q2-feature-table.git
cd q2-feature-table
git fetch origin pull/312/head:pr-312
git checkout pr-312
pip install -e .

Install dependent PR of q2-types

git clone https://github.com/qiime/q2-types.git
cd q2-types
git fetch origin pull/340/head:pr-340
git checkout pr-340
pip install -e .
  1. Download test files
    PR-311-feature-table.zip

  2. Test it out!
    Run all commands from PR folder

qiime feature-table normalize --i-table feature_table.qza --o-normalized-table norm_tmm.qza --p-method "tmm"  --p-m-trim 0.4 --p-a-trim 0.04
qiime feature-table normalize --i-table feature_table.qza --o-normalized-table norm_ctf.qza --p-method "ctf"  --p-m-trim 0.4 --p-a-trim 0.04
qiime feature-table normalize --i-table feature_table.qza --i-gene-length sequence_characteristics.qza --o-normalized-table norm_fpkm.qza --p-method "fpkm" 
qiime feature-table normalize --i-table feature_table.qza --i-gene-length sequence_characteristics.qza --o-normalized-table norm_tpm.qza --p-method "tpm"
qiime feature-table normalize --i-table feature_table.qza --o-normalized-table norm_uq.qza --p-method "uq" 
qiime feature-table normalize --i-table feature_table.qza --o-normalized-table norm_cuf.qza --p-method "cuf"
qiime feature-table normalize --i-table feature_table.qza --o-normalized-table norm_cpm.qza --p-method "cpm"

@VinzentRisch VinzentRisch changed the title 311 noramlize ENH: Added action normalize that can normalize a FeatureTable[Frequency] by gene length, library size and composition. Jul 22, 2024
@VinzentRisch VinzentRisch changed the title ENH: Added action normalize that can normalize a FeatureTable[Frequency] by gene length, library size and composition. ENH: Added action normalize that can normalize a FeatureTable[Frequency] with common methods. Jul 22, 2024
@ebolyen ebolyen self-assigned this Jul 31, 2024
Copy link
Member

@ebolyen ebolyen left a comment

Choose a reason for hiding this comment

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

Let's merge this at the start of the next release cycle.

@ebolyen
Copy link
Member

ebolyen commented Dec 12, 2024

@lizgehret, this is good to go, but do we need to wait for anything in distributions? It's going to add rnanorm as an unpinned dep.

@ebolyen ebolyen assigned lizgehret and unassigned ebolyen Dec 12, 2024
@ebolyen ebolyen linked an issue Dec 12, 2024 that may be closed by this pull request
@ebolyen ebolyen merged commit cb009e7 into qiime2:dev Dec 12, 2024
4 checks passed
@ebolyen ebolyen assigned VinzentRisch and unassigned lizgehret Dec 12, 2024
@ebolyen
Copy link
Member

ebolyen commented Dec 12, 2024

@VinzentRisch, could you add a note on this in our changelog under the Dev discussion (it'll be the release preview topic). Thanks!

gregcaporaso pushed a commit to gregcaporaso/q2-feature-table that referenced this pull request Jan 23, 2025
…uency]` with common methods. (qiime2#312)

* added normalized

* typemap properties and plugin setup

* lint and add rnanorm to metayaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Changelog Needed
Development

Successfully merging this pull request may close these issues.

ENH: Adding new action to normalize FeatureTable[Frequency]
3 participants