Skip to content

Commit 2532d55

Browse files
committed
Fix #94 and CI
1 parent bad9390 commit 2532d55

File tree

5 files changed

+26
-21
lines changed

5 files changed

+26
-21
lines changed

README.rst

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@ alleles and were added by the Aldy authors. These alleles do not exist in the so
298298
VCF support
299299
-----------
300300

301-
The output will be a VCF file if the output file extension is `.vcf`.
301+
The output will be a VCF file if the output file extension is ``.vcf``.
302302
Aldy will report a VCF sample for each potential solution and the appropriate genotypes.
303-
Aldy will also output tags `MA` and `MI` for major and minor solutions.
303+
Aldy will also output tags ``MA`` and ``MI`` for major and minor solutions.
304304

305305
**Note:** VCF is not an optimal format for star-allele reporting. Unless you really need it,
306306
we recommend using Aldy's default format.
@@ -315,7 +315,7 @@ If you encounter any issues with Aldy, please run Aldy with debug parameter:
315315

316316
aldy genotype ... --debug debuginfo
317317

318-
This will produce `debuginfo.tar.gz` file that contains the sample and LP model dumps.
318+
This will produce ``debuginfo.tar.gz`` file that contains the sample and LP model dumps.
319319
Please send us this file, and we will try to resolve the issue.
320320

321321
This file contains no private information of any kind except for the phasing information
@@ -336,7 +336,7 @@ Sample datasets are also available for download. They include:
336336
The expected results are:
337337

338338
============= ===================== ================ ================= ============ ==============
339-
Gene (`-g`) HG00463 NA19790 NA24027 NA10856 NA10860
339+
Gene (``g``) HG00463 NA19790 NA24027 NA10856 NA10860
340340
============= ===================== ================ ================= ============ ==============
341341
*CYP2D6* \*36+\*10/\*36+\*10 \*1/\*78+\*2 \*6/\*2+\*2 \*1/\*5 \*1/\*4+\*4
342342
*CYP2A6* \*1/\*1 \*1/\*1 \*1/\*35 \*1/\*1
@@ -442,13 +442,17 @@ Commands:
442442

443443
You can specify a gene name (e.g. ``aldy query CYP2D6``) or an allele (e.g. ``aldy query 'CYP2D6*121'`` or ``aldy q 'CYP2D6*4C'``).
444444

445+
See below (``genotype`` section) for additional options.
446+
445447
* ``profile [FILE]``
446448

447449
Generate a copy-number profile for a custom sequencing panel and
448450
print it on the standard output.
449451
``FILE`` is a SAM/BAM sample that is known to have two copies of the gene of interest
450452
(without any fusions or copy number alterations).
451453

454+
See below (``genotype`` section) for additional options.
455+
452456
* ``genotype``
453457

454458
Genotype a sequencing sample. Arguments:
@@ -555,6 +559,7 @@ alleles and were added by the Aldy authors. These alleles do not exist in the so
555559
can be accurately called only when the copy number detection is enabled
556560
(i.e., they cannot be called in WES mode)
557561
- Detection of the non-functional *CYP2D7* intron 1 retention is spotty
562+
- *CYP2D6*\*4 is sometimes miscalled as *CYP2D6*\*139 (see **Issues** below; track this issue here: #50).
558563
* - *CYP2A6*
559564
- PharmVar v6.2.14
560565
- ✅
@@ -579,7 +584,7 @@ alleles and were added by the Aldy authors. These alleles do not exist in the so
579584
* - *CYP2C19*
580585
- PharmVar v6.2.14
581586
- ✅
582-
-
587+
- \*1/\*38 are interchangeable in VCF mode with hg19.
583588
* - *CYP2C8*
584589
- PharmVar v6.2.14
585590
- ✅
@@ -627,7 +632,7 @@ alleles and were added by the Aldy authors. These alleles do not exist in the so
627632
* - *CYP3A7*
628633
- PharmVar v5.2.3
629634
- ✅
630-
-
635+
- \*1/\*2 are interchangeable in VCF mode with hg19.
631636
* - *CYP4F2*
632637
- PharmVar v6.2.14
633638
- ✅
@@ -715,21 +720,21 @@ Change log
715720
- "ALDY" alleles renamed to "X" alleles
716721
- CPIC functionality reporting
717722
- indelPost version upgrade
718-
- Support for calling non-database novel variants (`--param novel=True`)
723+
- Support for calling non-database novel variants (``--param novel=True``)
719724

720725
- Aldy v4.7 (Nov 2024)
721-
- Support for _ABCG2_, _CACNA1S_ and _RYR1_
722-
- Database updates (with major _UGT1A1_ update)
726+
- Support for *ABCG2*, *CACNA1S* and *RYR1*
727+
- Database updates (with major *UGT1A1* update)
723728
- Various fixes
724729

725730
- Aldy v4.6 (May 2024)
726-
- PharmVar 6.1.2 updates (including _NAT2_ PharmVar update)
731+
- PharmVar 6.1.2 updates (including *NAT2* PharmVar update)
727732
- Support for custom structural events (partial deletions)
728733
- Various bug fixes
729734

730735
- Aldy v4.5 (Nov 2023)
731-
- Add `min_avg_coverage` parameter
732-
- Add `vcf_sample_idx` parameter for selecting VCF sample in multi-sample VCF
736+
- Add ``min_avg_coverage`` parameter
737+
- Add ``vcf_sample_idx`` parameter for selecting VCF sample in multi-sample VCF
733738
- Database cleanup
734739
- Various bug fixes
735740

aldy/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
from typing import Iterable, Any, List
8-
import importlib.resources
8+
import importlib_resources
99
import re
1010
import time
1111
import pprint
@@ -202,7 +202,7 @@ def script_path(key: str) -> str:
202202
components = key.split("/")
203203
if len(components) < 2:
204204
raise AldyException(f'"{key}"" is not valid resource name')
205-
return str(importlib.resources.files(components[0]) / "/".join(components[1:]))
205+
return str(importlib_resources.files(components[0]) / "/".join(components[1:]))
206206

207207

208208
def colorize(text: str, color: str = "green") -> str:

aldy/genotype.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from typing import List, Optional, Any, Set, Dict
88
import os
99
import sys
10-
import importlib.resources
10+
import importlib_resources
1111
import datetime
1212
import time
1313

@@ -98,15 +98,15 @@ def genotype(
9898

9999
avail_genes = []
100100
if gene_db == "all":
101-
avail_genes = importlib.resources.files("aldy.resources.genes").iterdir()
101+
avail_genes = importlib_resources.files("aldy.resources.genes").iterdir()
102102
avail_genes = [
103103
i[:-4]
104104
for i in avail_genes
105105
if len(i) > 4 and i.endswith(".yml") and not i.startswith("pharma-")
106106
]
107107
avail_genes = sorted(avail_genes)
108108
elif gene_db == "pharmacoscan":
109-
avail_genes = importlib.resources.files(
109+
avail_genes = importlib_resources.files(
110110
"aldy.resources.genes.pharmacoscan"
111111
).iterdir()
112112
avail_genes = [

aldy/profile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,11 @@ def get_sam_profile_data(
330330
if not genome:
331331
genome = "hg19"
332332
if len(regions) == 0:
333-
import importlib.resources
333+
import importlib_resources
334334

335335
gene_regions = {}
336336
for g in sorted(
337-
importlib.resources.files("aldy.resources.genes").iterdir()
337+
importlib_resources.files("aldy.resources.genes").iterdir()
338338
):
339339
if g.suffix != ".yml":
340340
continue

aldy/tests/test_full.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,12 +473,12 @@ def test_pacbio(monkeypatch, solver):
473473

474474

475475
def test_load_all_genes(monkeypatch, solver):
476-
import importlib.resources
476+
import importlib_resources
477477
from aldy.gene import Gene
478478
from aldy.profile import Profile
479479
from aldy.common import AldyException
480480

481-
avail_genes = importlib.resources.files("aldy.resources.genes").iterdir()
481+
avail_genes = importlib_resources.files("aldy.resources.genes").iterdir()
482482
for g in sorted(avail_genes):
483483
if g.is_file() and g.suffix == ".yml":
484484
print(g)

0 commit comments

Comments
 (0)