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: add collate-annotations action #139

Merged
merged 6 commits into from
Mar 5, 2024

Conversation

Sann5
Copy link
Contributor

@Sann5 Sann5 commented Feb 21, 2024

What's new

  • In order to speed up both eggnog-diamond-search one can partition the input and run several of these actions in parallel.
  • Then one can proceed to annotate the output with the eggnog-annotate action still on the partitioned outputs in order to keep benefiting from parallelization.
  • Once this annotation is complete it makes sense to collate all of the outputs together into the same artifact.
  • This PR introduces an action that does exactly this. Takes a collection of Featuredata[NOG] artifacts and collates them into a single artifact.
  • Closes ENH: action to join ortholog annotations artifacts (FeatureData[NOG]) #138

Set up an environment

# For linux: 
# export MY_OS="linux"
# For mac:
export MY_OS="osx" 
wget "https://data.qiime2.org/distro/shotgun/qiime2-shotgun-2024.2-py38-"$MY_OS"-conda.yml"
conda env create -n q2-shotgun --file qiime2-shotgun-2024.2-py38-osx-conda.yml
rm "qiime2-shotgun-2024.2-py38-"$MY_OS"-conda.yml""

Run it locally

  1. Clone the repo and checkout the PR branch
# Remove q2-moshpit so you can install your local version.
conda activate q2-shotgun
pip remove q2-moshpit

# clone from GitHub
cd <clone_here>
git clone [email protected]:bokulich-lab/q2-moshpit.git
cd q2-moshpit
gh pr checkout 139
pip install -e .
  1. Let's get you some data to play with:
cd <download here>
wget https://polybox.ethz.ch/index.php/s/IClpzSmbZ6EDEeW/download -O artifacts.zip
unzip artifacts.zip
  1. Test it out!
qiime moshpit collate-annotations --i-ortholog-annotations artifacts --o-collated-annotations collated_annotations.qza --verbose

Running the tests

pytest -W ignore -vv --pyargs q2_moshpit

@Sann5 Sann5 added the enhancement New feature or request label Feb 21, 2024
@Sann5 Sann5 requested a review from misialq February 21, 2024 12:09
@Sann5 Sann5 self-assigned this Feb 21, 2024
Copy link
Contributor

@misialq misialq left a comment

Choose a reason for hiding this comment

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

Looks good @Sann5, thanks! I'll merge this one 🙌

q2_moshpit/plugin_setup.py Outdated Show resolved Hide resolved
@misialq misialq merged commit 2a51837 into bokulich-lab:main Mar 5, 2024
5 of 7 checks passed
@Sann5 Sann5 deleted the collate-annotations-iss-138 branch March 5, 2024 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: action to join ortholog annotations artifacts (FeatureData[NOG])
2 participants