Skip to content

Fix reference customization - #148

Open
jonasfreimuth wants to merge 28 commits into
RabadanLab:masterfrom
TRON-Bioinformatics:fix-expression-quant
Open

Fix reference customization#148
jonasfreimuth wants to merge 28 commits into
RabadanLab:masterfrom
TRON-Bioinformatics:fix-expression-quant

Conversation

@jonasfreimuth

Copy link
Copy Markdown

Hello everyone,

than you very much for providing this fine immunogenomics tool! I would like to integrate the quantification step into my pipeline, but currently the reference customization appears to be broken. Even running arcasHLA customize --help results in the following error:

Traceback (most recent call last):
  File "/home/freimujo/miniforge3/envs/arcasHLA/share/arcas-hla-0.6.0-2/scripts/customize.py", line 43, in <module>
    from Bio.Alphabet import generic_dna
  File "/home/freimujo/miniforge3/envs/arcasHLA/lib/python3.12/site-packages/Bio/Alphabet/__init__.py", line 20, in <module>
    raise ImportError(
ImportError: Bio.Alphabet has been removed from Biopython. In many cases, the alphabet can simply be ignored and removed from scripts. In a few cases, you may need to specify the ``molecule_type`` as an annotation on a SeqRecord for your script to work correctly. Please see https://biopython.org/wiki/Alphabet for more information.

ERROR conda.cli.main_run:execute(127): `conda run arcasHLA customize --help` failed. (See above for error)

The issue seems that the current arcasHLA dependencies use a new biopython version in which Bio.Alphabet is deprecated. However, as far as I can tell, the generic_dna object is never used anywhere. So by simply removing that import, the customization should be possible again.

I have already done that on my own fork and managed to get customize and quant to run again.

@jonasfreimuth

Copy link
Copy Markdown
Author

Requires #147 to be merged first though.

@jonasfreimuth jonasfreimuth changed the title Fix expression quantification Fix reference customization Jun 12, 2025
  Techincally git-lfs is the right thing for including the large files,
  but currently this is causing to many issues. The references can be
  expected to not change much so this should be ok.
  Else the env cannot be created when channel prio is strict.
To ensure this is usable by everyone.
  Now we can import script modules in tests.
  I will add unit tests, so this is more descriptive.
For reproducible conda envs.
@jonasfreimuth
jonasfreimuth force-pushed the fix-expression-quant branch 2 times, most recently from 778794e to 729612f Compare December 14, 2025 18:06
Else test fails might not be discovered when they happen, or at all.
So partial genotyping does not depend on previous whole allele
output.
Ensures tests are independent & more reproducible.
More idiomatic, also clearer.
Where they should live for other tests to use them.
Should lead to the script actually running.
  For individually unit testing customization
  code with debug support.
  As far as I can tell these are leftovers from debugging.
  This is git, if we need it we can reintroduce it.
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.

1 participant