Skip to content

Add pixy wrapper - #8265

Open
d-callan wants to merge 1 commit into
galaxyproject:mainfrom
d-callan:pixy
Open

Add pixy wrapper#8265
d-callan wants to merge 1 commit into
galaxyproject:mainfrom
d-callan:pixy

Conversation

@d-callan

@d-callan d-callan commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

FOR CONTRIBUTOR:

  • I have read the CONTRIBUTING.md document and this tool is appropriate for the tools-iuc repo.
  • Use of AI
    • The contribution is mostly AI generated
    • The contribution has been assisted by AI
  • License permits unrestricted use (educational + commercial)
  • This PR adds a new tool or tool collection
  • This PR updates an existing tool or tool collection
  • This PR does something else (explain below)

There are two labels that allow to ignore specific (false positive) tool linter errors:

  • skip-version-check: Use it if only a subset of the tools has been updated in a suite.
  • skip-url-check: Use it if github CI sees 403 errors, but the URLs work.

To request a review once your PR is ready, comment "please review" on the PR. This will
automatically apply the ready-for-review label if the PR is not a draft, all review
threads are resolved, and all CI checks have passed.

- Supports all pixy stats: pi, dxy, fst (WC & Hudson), Watterson's theta, Tajima's D
- Windowing via fixed size or BED file
- Chromosome/interval filtering, sites file, chunk size
- FST options: fst_type, fst_components, fst_biallelic (guarded behind fst selection)
- Callable sites via wisp BED, GVCF mode, bypass invariant check
- 5 tests covering: Hudson FST (haploid), watterson+tajima, BED windowing,
  chromosome/interval filtering, WC FST (diploid)
- Test data from official pixy repo (haploid) and Ag1000G subset (diploid)
- detect_errors=aggressive, no stdio block
- htslib dependency for tabix
Comment thread tools/pixy/pixy.xml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The if should nor be needed,. Should we have the index always? What about just link || true?

Comment thread tools/pixy/macros.xml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If htslib is needed should that be part of the package.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i mean yea probably but i hadnt tracked it down yet. i just saw it wasnt in bioconda and decided i needed to go to sleep and it could be future danielles problem. i guess im future danielle though lol

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ooooooh. htslib IS bioconda and the dep goes the opposite way, i get it now. so actually idk conda-forge well enough to know what makes sense in that case

Comment thread tools/pixy/pixy.xml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
--n_cores "\${GALAXY_SLOTS:-1}"

Comment thread tools/pixy/pixy.xml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The Boolean trick... You don't need an if

Comment thread tools/pixy/pixy.xml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are those file not always created?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sort of, depends what stats you select. but theres a weird edge case where you can select wc fst and if you send haploid data itll just not produce the file. itll put a message about it to stderr but still exit 0. was trying to replicate that behavior. can switch to not use the if etc, but then gxy might err? idk quite

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

error might be less confusing in this case even, in gxy context, than just not having the file and a message buried in stderr.

Comment thread tools/pixy/pixy.xml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since the path is predictable you could use from_work_dir and remove this entire block

Comment thread tools/pixy/pixy.xml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure if we need to offer this option. If we want to just on the CLI with an ENV that an admin can overwrite?

Comment thread tools/pixy/pixy.xml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe you can use from_work_dir here?

Comment thread tools/pixy/pixy.xml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This can be done with cheetah .. something like

#for $s in $stats
    $s
#end for

or maybe even on a single line using #echo

Comment thread tools/pixy/pixy.xml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would prefer standard labels ${tool.name} on ${on_string}: ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage/Discuss

Development

Successfully merging this pull request may close these issues.

3 participants