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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

VinzentRisch
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for Merge
Development

Successfully merging this pull request may close these issues.

2 participants