Skip to content

Add X chr functionality#66

Draft
AprilYUZhang wants to merge 10 commits into
AlphaGenes:develfrom
AprilYUZhang:X_chr
Draft

Add X chr functionality#66
AprilYUZhang wants to merge 10 commits into
AlphaGenes:develfrom
AprilYUZhang:X_chr

Conversation

@AprilYUZhang
Copy link
Copy Markdown

@AprilYUZhang AprilYUZhang commented May 9, 2026

Issue #47


spec["idn"] = int64
spec["nLoci"] = int64
spec["sex"] = int64
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.

We don’t need int64 for 0/1 sex code. @XingerTang can you suggest a more appropriate type?

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.

Based on https://numba.readthedocs.io/en/stable/reference/types.html#numbers. uint8 or boolean might be useful here.

Comment thread src/alphaimpute2/Imputation/Heuristic_Peeling.py
logGenotypeSegregationTensor_XXChrom = np.log(
genotypeSegregationTensor
)
for seg0 in [0, 1, 9]:
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.

Do we need this second block of for loops? Could we not move the content of the loop to the above loop?


def generateGenoProbs_Xchr_male():
global geno_probs_Xchr_male
error = 0.0001
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.

@AprilYUZhang @XingerTang we should pull out this error number and move it to an argument with a default value (the same for generateGenoProbs() above). Do you want to do it as part of this PR or open a new issue and we tackle this down the road?

np.array([0, 0.5, 0, 0.5], dtype=np.float32) * (1 - error) + error / 4
)

# geno_probs[9, 0, 1] no possible genotype
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 I am reading these correctly we have father, mother, and male progeny genotypes so mother 0/0—>0 and son 0/1->1 is indeed not a biologically plausible situation, however we should set probabilities for such a case nevertheless - there can be errors in the data, so we need a way to handle this case. Any suggestions what to do here?

geno_probs[9, 0, 0] = (
np.array([0.5, 0, 0.5, 0], dtype=np.float32) * (1 - error) + error / 4
)
# geno_probs[1, 1, 2] no possible genotype
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.

As above

geno_probs[9, 9, 1] = (
np.array([0, 0.5, 0.5, 0], dtype=np.float32) * (1 - error) + error / 4
)
geno_probs[9, 9, 0] = (
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.

Nice additions, but do we need these? I don’t know as I am removed from this code. I notice that below we don’t have all possible combinations of genotypes covered either. @XingerTang what are your thoughts?

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.

AlphaImpute2 keeps its options as simplistic as possible. I prefer to revise the errors once we have decided to update all the remaining option names according to AlphaPeel changes.

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.

OK re doing the errors later, but the comment refers to assigning geno_probs[x, y, z] for some combinations of x, y, z but not all of these, unless I got the code wrong, which confused me and hence my question.

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.

Sorry, I was intending to comment on the other review that related to the errors.
This change is probably not completed. We can review the logic afterwards.

pointEstimates[3, i] *= e
if sirehap0 != 9:
if sirehap0 + damhap0 == 1:
pointEstimates[0, i] *= 1 - e
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.

This e is defined above at the beginning of the function. What kind of error is this?

@AprilYUZhang @XingerTang we should pull out this error number and move it to an argument with a default value. Do you want to do it as part of this PR or open a new issue and we tackle this down the road?

print_title(f"Imputation cycle {cycle + 1}")
pedigreePeelDown(pedigree, args, genotype_cutoff)
pedigreePeelUp(pedigree, args, genotype_cutoff)
pedigreePeelDown(pedigree, args, genotype_cutoff, isXChrom)
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.

Once we move to other type of chromosomes/linkage-group/contig (such as Y chr and mtDNA) we should probably change isXChrom to chrType and have autosomal (A) as default and then we switch to X/Y/M. @AprilYUZhang please keep this in mind for future work.

Comment thread src/alphaimpute2/Imputation/Heuristic_Peeling.py
pointEstimates[3, i] *= e

elif sirehap0 == 9 and isXChrom:
if ind.sex == 0: # individual is male
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.

I think this part is ok, but I am struggling since I am doing this on the fly and can’t check. @XingerTang can you have a look too?

pointEstimates[1, i] *= e
pointEstimates[2, i] *= 1 - e
pointEstimates[3, i] *= 1 - e
elif isXChrom:
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.

I am struggling since I am doing this on the fly and can’t check. @XingerTang can you have a look too?

Also, we don’t need the isXChrom block for the second haplotype below?



def writeGenoProbs(pedigree, genoProbFunc, outputFile):
def writeGenoProbs(pedigree, outputFile, isXChr=False):
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.

Sometimes you use isXChr sometimes isXChrom, consolidate. I prefer isXChr (consistent with the command flag), but most importantly be consistent.

required=False,
help="Output genotype probabilities (see format details in the docs).",
)
core_parser.add_argument('-writekey', default="id", required=False, type=str,
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.

I don’t think we support sequence data in AlphaImpute2?

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.

AlphaImpute2 indeed does not support sequence input. This option can apply to a genotype input file in AlphaPeel.
But this option is not working for AlphaImpute2, and it is not in the help message or the documentation.

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.

It is called out_id_order in AlphaPeel now.

help="Output genotype probabilities (see format details in the docs).",
)
core_parser.add_argument('-writekey', default="id", required=False, type=str,
help='Determines the order in which individuals are ordered in the output file based on their order in the corresponding input file. Animals not in the input file are placed at the end of the file and sorted in alphanumeric order. These animals can be surpressed with the "-onlykeyed" option. Options: id, pedigree, genotypes, sequence, segregation. Defualt: id.')
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
help='Determines the order in which individuals are ordered in the output file based on their order in the corresponding input file. Animals not in the input file are placed at the end of the file and sorted in alphanumeric order. These animals can be surpressed with the "-onlykeyed" option. Options: id, pedigree, genotypes, sequence, segregation. Defualt: id.')
help='Determines the order in which individuals are ordered in the output file based on their order in the corresponding input file. Individuals not in the input file are placed at the end of the file and sorted in alphanumeric order. These individuals can be suppressed with the "-onlykeyed" option. Options: id, pedigree, genotypes, sequence, segregation. Default: id.')

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.

Port these edits to AlphaPeel/tinyhouse too?

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.

These changes are already placed in AlphaPeel, and tinyhouse does not have this docstring.

core_parser.add_argument('-writekey', default="id", required=False, type=str,
help='Determines the order in which individuals are ordered in the output file based on their order in the corresponding input file. Animals not in the input file are placed at the end of the file and sorted in alphanumeric order. These animals can be surpressed with the "-onlykeyed" option. Options: id, pedigree, genotypes, sequence, segregation. Defualt: id.')
core_parser.add_argument('-onlykeyed', action='store_true', required=False,
help='Flag to surpress the animals who are not present in the file used with -writekey. Also surpresses "dummy" animals.')
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
help='Flag to surpress the animals who are not present in the file used with -writekey. Also surpresses "dummy" animals.')
help='Flag to suppress the individuals who are not present in the file used with -writekey. Also suppresses "dummy" individuals.')

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.

Port these edits to AlphaPeel/tinyhouse too?

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.

Same here. AlphaPeel is updated, tinyhouse does not have this. This would not be printed as part of the help message of AlphaImpute2 as well.

Copy link
Copy Markdown
Member

@gregorgorjanc gregorgorjanc left a comment

Choose a reason for hiding this comment

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

@AprilYUZhang great that you are pushing this functionality! I reviewed on the go without access to computer to look into the code, so I wasn’t sure in some places if the code is correct or not or it’s just my lack of deep understanding. @XingerTang your review would be also appreciated.

@gregorgorjanc gregorgorjanc changed the title update X chr Add X chr functionality May 10, 2026
@gregorgorjanc
Copy link
Copy Markdown
Member

@AprilYUZhang I left some more comments at de2b6c8#r184944694 on your latest commit

@gregorgorjanc
Copy link
Copy Markdown
Member

Github is behaving odd lately - you might need to toggle file by clicking the > symbol to hide and the unhide file contents to see the comments

Copy link
Copy Markdown
Contributor

@XingerTang XingerTang left a comment

Choose a reason for hiding this comment

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

  • Pre-commit not passed
  • pytest failed on my end:
(phase) xtang3@S37-50MAQ05D AlphaImpute2 % pytest tests/functional_tests 
======================================== test session starts =========================================
platform darwin -- Python 3.11.11, pytest-9.0.1, pluggy-1.6.0
benchmark: 5.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /Users/xtang3/AlphaImpute2
configfile: pyproject.toml
plugins: benchmark-5.2.3
collected 2 items                                                                                    

tests/functional_tests/run_func_test.py F.                                                     [100%]

============================================== FAILURES ==============================================
_______________________________________________ test_1 _______________________________________________

    def test_1():
        """basic functionality test with pedigree only mode"""
        os.system(
            "AlphaImpute2 -genotypes tests/functional_tests/test_1/genotypes.txt -pedigree tests/functional_tests/test_1/pedigree.txt -ped_only -phase_output -seg_output -out tests/functional_tests/outputs/test_1"
        )
        assert os.path.exists("tests/functional_tests/outputs/test_1.genotypes")
        assert os.path.exists("tests/functional_tests/outputs/test_1.haplotypes")
        assert os.path.exists("tests/functional_tests/outputs/test_1.segregation")
    
        genotypes = read_file("tests/functional_tests/outputs/test_1.genotypes")
        expected_genotypes = read_file("tests/functional_tests/test_1/true_genotypes.txt")
>       assert genotypes == expected_genotypes
E       AssertionError: assert [['1', 1.0, 2....0, 0.0, 0.0]] == [['1', 1.0, 2....0, 0.0, 0.0]]
E         
E         At index 2 diff: ['3', 1.0, 2.0, 0.0, 0.0, 1.0] != ['3', 0.0, 2.0, 0.0, 0.0, 1.0]
E         Use -v to get more diff

tests/functional_tests/run_func_test.py:53: AssertionError
---------------------------------------- Captured stdout call ----------------------------------------
------------------------------------------
               AlphaImpute2               
------------------------------------------
Version: 0.0.3
Email:   alphagenes.dev@gmail.com
Website: https://github.com/AlphaGenes
------------------------------------------
Reading in AlphaGenes format: tests/functional_tests/test_1/genotypes.txt
Read in: 0.01 seconds

         Pedigree Imputation Only         
------------------------------------------
Number of peeling cycles: 4
Final cutoff: 0.1

Imputation cycle 1
False 1
[[0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]]
False -1
[[2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]
 [2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]]
Peel down: 4.86 seconds
False -1
[[2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]
 [2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]]
False 1
[[0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]]
Peel up: 4.89 seconds

Imputation cycle 2
False 1
[[0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]]
False -1
[[2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]
 [2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]]
Peel down: 0.00 seconds
False -1
[[2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]
 [2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]]
False 1
[[0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]]
Peel up: 0.00 seconds

Imputation cycle 3
False 1
[[0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]]
False -1
[[2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]
 [2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]]
Peel down: 0.00 seconds
False -1
[[2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]
 [2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]]
False 1
[[0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]]
Peel up: 0.00 seconds

Imputation cycle 4
False 1
[[0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]]
False -1
[[2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]
 [2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]]
Peel down: 0.00 seconds
False -1
[[2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]
 [2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]]
False 1
[[0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]]
Peel up: 0.00 seconds
Core peeling cycles: 9.75 seconds
Heuristic Peeling: 11.28 seconds

           Writing Out Results            
------------------------------------------
Write out: 0.00 seconds
Full Program Run: 11.52 seconds

required=False,
help="Output genotype probabilities (see format details in the docs).",
)
core_parser.add_argument('-writekey', default="id", required=False, type=str,
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.

AlphaImpute2 indeed does not support sequence input. This option can apply to a genotype input file in AlphaPeel.
But this option is not working for AlphaImpute2, and it is not in the help message or the documentation.

required=False,
help="Output genotype probabilities (see format details in the docs).",
)
core_parser.add_argument('-writekey', default="id", required=False, type=str,
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.

It is called out_id_order in AlphaPeel now.

help="Output genotype probabilities (see format details in the docs).",
)
core_parser.add_argument('-writekey', default="id", required=False, type=str,
help='Determines the order in which individuals are ordered in the output file based on their order in the corresponding input file. Animals not in the input file are placed at the end of the file and sorted in alphanumeric order. These animals can be surpressed with the "-onlykeyed" option. Options: id, pedigree, genotypes, sequence, segregation. Defualt: id.')
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.

These changes are already placed in AlphaPeel, and tinyhouse does not have this docstring.

core_parser.add_argument('-writekey', default="id", required=False, type=str,
help='Determines the order in which individuals are ordered in the output file based on their order in the corresponding input file. Animals not in the input file are placed at the end of the file and sorted in alphanumeric order. These animals can be surpressed with the "-onlykeyed" option. Options: id, pedigree, genotypes, sequence, segregation. Defualt: id.')
core_parser.add_argument('-onlykeyed', action='store_true', required=False,
help='Flag to surpress the animals who are not present in the file used with -writekey. Also surpresses "dummy" animals.')
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.

Same here. AlphaPeel is updated, tinyhouse does not have this. This would not be printed as part of the help message of AlphaImpute2 as well.

@XingerTang XingerTang marked this pull request as draft May 12, 2026 09:04
@XingerTang
Copy link
Copy Markdown
Contributor

No tests are written for this code. Convert this PR to a draft.

@XingerTang XingerTang linked an issue May 12, 2026 that may be closed by this pull request

ind.out_segregation = smoothedEstimates.copy()

print(ind.out_segregation)
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.

Remember to remove this at the end.


pointEstimates = np.full((4, nLoci), 1, dtype=np.float32)
fillPointEstimates(pointEstimates, ind, sire, dam)
print(isXChrom,ind.sex)
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.

Remember to remove this at the end.

geno_probs[9, 9, 1] = (
np.array([0, 0.5, 0.5, 0], dtype=np.float32) * (1 - error) + error / 4
)
geno_probs[9, 9, 0] = (
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.

Sorry, I was intending to comment on the other review that related to the errors.
This change is probably not completed. We can review the logic afterwards.

@XingerTang
Copy link
Copy Markdown
Contributor

@AprilYUZhang, please rebase the change in #68 for correct geno prob updates after cycle 2

@AprilYUZhang
Copy link
Copy Markdown
Author

AprilYUZhang commented May 12, 2026

Hi @gregorgorjanc, rough modification for X chr, now it works on the simple X chr sample. However, pytest still doesn't work. I will be back after @XingerTang updates the pytest. @XingerTang, please let me know once you finish all basic and general modifications.

@AprilYUZhang
Copy link
Copy Markdown
Author

  • Pre-commit not passed
  • pytest failed on my end:
(phase) xtang3@S37-50MAQ05D AlphaImpute2 % pytest tests/functional_tests 
======================================== test session starts =========================================
platform darwin -- Python 3.11.11, pytest-9.0.1, pluggy-1.6.0
benchmark: 5.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /Users/xtang3/AlphaImpute2
configfile: pyproject.toml
plugins: benchmark-5.2.3
collected 2 items                                                                                    

tests/functional_tests/run_func_test.py F.                                                     [100%]

============================================== FAILURES ==============================================
_______________________________________________ test_1 _______________________________________________

    def test_1():
        """basic functionality test with pedigree only mode"""
        os.system(
            "AlphaImpute2 -genotypes tests/functional_tests/test_1/genotypes.txt -pedigree tests/functional_tests/test_1/pedigree.txt -ped_only -phase_output -seg_output -out tests/functional_tests/outputs/test_1"
        )
        assert os.path.exists("tests/functional_tests/outputs/test_1.genotypes")
        assert os.path.exists("tests/functional_tests/outputs/test_1.haplotypes")
        assert os.path.exists("tests/functional_tests/outputs/test_1.segregation")
    
        genotypes = read_file("tests/functional_tests/outputs/test_1.genotypes")
        expected_genotypes = read_file("tests/functional_tests/test_1/true_genotypes.txt")
>       assert genotypes == expected_genotypes
E       AssertionError: assert [['1', 1.0, 2....0, 0.0, 0.0]] == [['1', 1.0, 2....0, 0.0, 0.0]]
E         
E         At index 2 diff: ['3', 1.0, 2.0, 0.0, 0.0, 1.0] != ['3', 0.0, 2.0, 0.0, 0.0, 1.0]
E         Use -v to get more diff

tests/functional_tests/run_func_test.py:53: AssertionError
---------------------------------------- Captured stdout call ----------------------------------------
------------------------------------------
               AlphaImpute2               
------------------------------------------
Version: 0.0.3
Email:   alphagenes.dev@gmail.com
Website: https://github.com/AlphaGenes
------------------------------------------
Reading in AlphaGenes format: tests/functional_tests/test_1/genotypes.txt
Read in: 0.01 seconds

         Pedigree Imputation Only         
------------------------------------------
Number of peeling cycles: 4
Final cutoff: 0.1

Imputation cycle 1
False 1
[[0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]]
False -1
[[2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]
 [2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]]
Peel down: 4.86 seconds
False -1
[[2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]
 [2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]]
False 1
[[0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]]
Peel up: 4.89 seconds

Imputation cycle 2
False 1
[[0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]]
False -1
[[2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]
 [2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]]
Peel down: 0.00 seconds
False -1
[[2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]
 [2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]]
False 1
[[0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]]
Peel up: 0.00 seconds

Imputation cycle 3
False 1
[[0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]]
False -1
[[2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]
 [2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]]
Peel down: 0.00 seconds
False -1
[[2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]
 [2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]]
False 1
[[0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]]
Peel up: 0.00 seconds

Imputation cycle 4
False 1
[[0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]]
False -1
[[2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]
 [2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]]
Peel down: 0.00 seconds
False -1
[[2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]
 [2.8239352e-01 3.0398920e-01 3.3998200e-01 3.9997000e-01 4.9994999e-01]
 [2.1760647e-01 1.9601080e-01 1.6001801e-01 1.0003000e-01 4.9999999e-05]]
False 1
[[0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]
 [0.25 0.25 0.25 0.25 0.25]]
Peel up: 0.00 seconds
Core peeling cycles: 9.75 seconds
Heuristic Peeling: 11.28 seconds

           Writing Out Results            
------------------------------------------
Write out: 0.00 seconds
Full Program Run: 11.52 seconds

pytest doesn't work on my end, too. I have no idea why pytest isn't working, since I didn't make any modifications that might affect the function test. But the tinyhouse version is different. I used the latest main branch because it includes the updates about sex chromosomes. This is the commit that I stay:f6cd2bc45f3e81d5a2b34e093be0f14b20f4218d. I suggest prioritizing tinyhouse update on your end, and then we can figure out where the problems are together. Finally, merge your branch to this request.

@gregorgorjanc
Copy link
Copy Markdown
Member

It must be due to code changes you have done for the autosomal case. I have spotted some odd cases and highlighted those via comments but could have missed some, I reckon. Happy bug hunting;)

@gregorgorjanc
Copy link
Copy Markdown
Member

Just to add that you should attempt to fix this @AprilYUZhang if at all possible. @XingerTang input is of course welcome and valuable.

mat = mat_probs[i] * (1 - e) + e / 2
if isXChrom and (ind.sex == 0):
for i in range(nLoci):
mat = mat_probs[i] * (1 - e) + e / 2
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.

Should the +e/2 be only e?

@AprilYUZhang
Copy link
Copy Markdown
Author

@AprilYUZhang, please rebase the change in #68 for correct geno prob updates after cycle 2

Rebased.

@XingerTang
Copy link
Copy Markdown
Contributor

It must be due to code changes you have done for the autosomal case. I have spotted some odd cases and highlighted those via comments but could have missed some, I reckon. Happy bug hunting;)

I agree that the differences might come from @AprilYUZhang's autosomal-related change in #66 (comment)

The function seems to use the known haplotypes to generate genotype probabilities and later to help construct the segregation tensor that indicates the inheritance. Introducing the genotype information here might be distracting for the segregation tensor.

I don't have any planned changes in tinyhouse or here in AlphaImpute2 recently.

@AprilYUZhang
Copy link
Copy Markdown
Author

It must be due to code changes you have done for the autosomal case. I have spotted some odd cases and highlighted those via comments but could have missed some, I reckon. Happy bug hunting;)

I agree that the differences might come from @AprilYUZhang's autosomal-related change in #66 (comment)

The function seems to use the known haplotypes to generate genotype probabilities and later to help construct the segregation tensor that indicates the inheritance. Introducing the genotype information here might be distracting for the segregation tensor.

I don't have any planned changes in tinyhouse or here in AlphaImpute2 recently.

Pytest is passing now. The bug was caused by the genoprob variable being shared between the X_male and autosome functions. I had updated it in X_male but forgot the autosome function, so I've now split them so they operate independently. I'm assuming this means the current version is stable now, right? I will check the comments you left periodically. These changes mainly ensure that the X chromosome works in AlphaImputation.

@XingerTang
Copy link
Copy Markdown
Contributor

The functional tests passed on my end, while some of the results for the accuracy tests for autosomal cases are changed:

  • There are both increases and decreases in the accuracy
  • The runtime increases significantly

You may want to know what led to these.

Before your code change:

===================================== Marker Accuracy ======================================
---------------------------------------- genotypes -----------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
1                    0.953                0.946                0.966                0.970                0.963                0.925                pop_only                            
2                    0.770                0.517                0.782                0.991                0.994                0.988                ped_only                            
3                    0.980                0.940                0.992                0.994                0.994                0.988                combined                            
---------------------------------------- haplotypes ----------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
1                    0.473                0.432                0.557                0.439                0.475                0.460                pop_only                            
2                    0.686                0.194                0.770                0.988                0.991                0.984                ped_only                            
3                    0.881                0.453                0.988                0.992                0.991                0.984                combined                            
--------------------------------------- segregation ----------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
2                    0.839                nan                  nan                  0.973                0.970                0.962                ped_only                            
3                    0.697                nan                  -0.115               0.974                0.970                0.962                combined                            
=================================== Individual Accuracy ====================================
---------------------------------------- genotypes -----------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
1                    0.981                0.977                0.985                0.987                0.985                0.970                pop_only                            
2                    0.897                0.602                0.896                0.995                0.997                0.995                ped_only                            
3                    0.993                0.978                0.997                0.997                0.997                0.995                combined                            
---------------------------------------- haplotypes ----------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
1                    0.668                0.644                0.719                0.645                0.670                0.663                pop_only                            
2                    0.847                0.418                0.839                0.992                0.995                0.990                ped_only                            
3                    0.926                0.656                0.993                0.995                0.995                0.990                combined                            
--------------------------------------- segregation ----------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
2                    0.930                nan                  nan                  0.943                0.936                0.909                ped_only                            
3                    0.676                nan                  -0.098               0.947                0.936                0.909                combined                            
=========================== Marker Accuracy (Order by accuracy) ============================
---------------------------------------- genotypes -----------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
3                    0.980                0.940                0.992                0.994                0.994                0.988                combined                            
1                    0.953                0.946                0.966                0.970                0.963                0.925                pop_only                            
2                    0.770                0.517                0.782                0.991                0.994                0.988                ped_only                            
---------------------------------------- haplotypes ----------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
3                    0.881                0.453                0.988                0.992                0.991                0.984                combined                            
2                    0.686                0.194                0.770                0.988                0.991                0.984                ped_only                            
1                    0.473                0.432                0.557                0.439                0.475                0.460                pop_only                            
--------------------------------------- segregation ----------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
2                    0.839                nan                  nan                  0.973                0.970                0.962                ped_only                            
3                    0.697                nan                  -0.115               0.974                0.970                0.962                combined                            
========================= Individual Accuracy (Order by accuracy) ==========================
---------------------------------------- genotypes -----------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
3                    0.993                0.978                0.997                0.997                0.997                0.995                combined                            
1                    0.981                0.977                0.985                0.987                0.985                0.970                pop_only                            
2                    0.897                0.602                0.896                0.995                0.997                0.995                ped_only                            
---------------------------------------- haplotypes ----------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
3                    0.926                0.656                0.993                0.995                0.995                0.990                combined                            
2                    0.847                0.418                0.839                0.992                0.995                0.990                ped_only                            
1                    0.668                0.644                0.719                0.645                0.670                0.663                pop_only                            
--------------------------------------- segregation ----------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
2                    0.930                nan                  nan                  0.943                0.936                0.909                ped_only                            
3                    0.676                nan                  -0.098               0.947                0.936                0.909                combined                            

--------------------------------------------------------------------------------- benchmark: 3 tests ---------------------------------------------------------------------------------
Name (time in s)            Min                Max               Mean            StdDev             Median               IQR            Outliers     OPS            Rounds  Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_accu[ped_only]     17.2271 (1.0)      22.7813 (1.11)     19.2766 (1.0)      2.1530 (2.13)     18.4047 (1.0)      2.5147 (2.01)          1;0  0.0519 (1.0)           5           1
test_accu[pop_only]     18.1706 (1.05)     20.6160 (1.0)      19.8552 (1.03)     1.0085 (1.0)      20.1179 (1.09)     1.2513 (1.0)           1;0  0.0504 (0.97)          5           1
test_accu[combined]     29.2272 (1.70)     33.2050 (1.61)     31.5243 (1.64)     1.6053 (1.59)     31.1556 (1.69)     2.3298 (1.86)          2;0  0.0317 (0.61)          5           1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

After your code change:

(phase) xtang3@S37-50MAQ05D AlphaImpute2 % pytest tests/accuracy_tests  
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.11.11, pytest-9.0.1, pluggy-1.6.0
benchmark: 5.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /Users/xtang3/AlphaImpute2
configfile: pyproject.toml
plugins: benchmark-5.2.3
collected 3 items                                                                                                                                                                                          

tests/accuracy_tests/run_accu_test.py ...                                                                                                                                                            [100%]

============================================================================================= Marker Accuracy ==============================================================================================
------------------------------------------------------------------------------------------------ genotypes -------------------------------------------------------------------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
1                    0.953                0.946                0.966                0.970                0.963                0.925                pop_only                            
2                    0.770                0.517                0.782                0.990                0.994                0.988                ped_only                            
3                    0.981                0.940                0.992                0.994                0.994                0.988                combined                            
------------------------------------------------------------------------------------------------ haplotypes ------------------------------------------------------------------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
1                    0.473                0.432                0.557                0.439                0.475                0.460                pop_only                            
2                    0.685                0.194                0.769                0.988                0.991                0.984                ped_only                            
3                    0.880                0.445                0.988                0.992                0.991                0.984                combined                            
----------------------------------------------------------------------------------------------- segregation ------------------------------------------------------------------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
2                    0.838                nan                  nan                  0.972                0.970                0.962                ped_only                            
3                    0.694                nan                  -0.126               0.974                0.970                0.962                combined                            
=========================================================================================== Individual Accuracy ============================================================================================
------------------------------------------------------------------------------------------------ genotypes -------------------------------------------------------------------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
1                    0.981                0.977                0.985                0.987                0.985                0.970                pop_only                            
2                    0.897                0.602                0.895                0.995                0.997                0.995                ped_only                            
3                    0.993                0.978                0.996                0.997                0.997                0.995                combined                            
------------------------------------------------------------------------------------------------ haplotypes ------------------------------------------------------------------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
1                    0.668                0.644                0.719                0.645                0.670                0.663                pop_only                            
2                    0.847                0.418                0.839                0.992                0.995                0.990                ped_only                            
3                    0.925                0.652                0.993                0.995                0.995                0.990                combined                            
----------------------------------------------------------------------------------------------- segregation ------------------------------------------------------------------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
2                    0.929                nan                  nan                  0.942                0.936                0.909                ped_only                            
3                    0.670                nan                  -0.122               0.947                0.936                0.909                combined                            
=================================================================================== Marker Accuracy (Order by accuracy) ====================================================================================
------------------------------------------------------------------------------------------------ genotypes -------------------------------------------------------------------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
3                    0.981                0.940                0.992                0.994                0.994                0.988                combined                            
1                    0.953                0.946                0.966                0.970                0.963                0.925                pop_only                            
2                    0.770                0.517                0.782                0.990                0.994                0.988                ped_only                            
------------------------------------------------------------------------------------------------ haplotypes ------------------------------------------------------------------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
3                    0.880                0.445                0.988                0.992                0.991                0.984                combined                            
2                    0.685                0.194                0.769                0.988                0.991                0.984                ped_only                            
1                    0.473                0.432                0.557                0.439                0.475                0.460                pop_only                            
----------------------------------------------------------------------------------------------- segregation ------------------------------------------------------------------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
2                    0.838                nan                  nan                  0.972                0.970                0.962                ped_only                            
3                    0.694                nan                  -0.126               0.974                0.970                0.962                combined                            
================================================================================= Individual Accuracy (Order by accuracy) ==================================================================================
------------------------------------------------------------------------------------------------ genotypes -------------------------------------------------------------------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
3                    0.993                0.978                0.996                0.997                0.997                0.995                combined                            
1                    0.981                0.977                0.985                0.987                0.985                0.970                pop_only                            
2                    0.897                0.602                0.895                0.995                0.997                0.995                ped_only                            
------------------------------------------------------------------------------------------------ haplotypes ------------------------------------------------------------------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
3                    0.925                0.652                0.993                0.995                0.995                0.990                combined                            
2                    0.847                0.418                0.839                0.992                0.995                0.990                ped_only                            
1                    0.668                0.644                0.719                0.645                0.670                0.663                pop_only                            
----------------------------------------------------------------------------------------------- segregation ------------------------------------------------------------------------------------------------
Test Num             Population Accu      Gen1 Accu            Gen2 Accu            Gen3 Accu            Gen4 Accu            Gen5 Accu            Test Name                           
2                    0.929                nan                  nan                  0.942                0.936                0.909                ped_only                            
3                    0.670                nan                  -0.122               0.947                0.936                0.909                combined                            

--------------------------------------------------------------------------------- benchmark: 3 tests ---------------------------------------------------------------------------------
Name (time in s)            Min                Max               Mean            StdDev             Median               IQR            Outliers     OPS            Rounds  Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_accu[pop_only]     24.1037 (1.0)      28.3200 (1.0)      25.6253 (1.0)      1.7736 (1.06)     24.8735 (1.0)      2.6808 (1.0)           1;0  0.0390 (1.0)           5           1
test_accu[ped_only]     24.9243 (1.03)     28.6741 (1.01)     26.9572 (1.05)     1.6665 (1.0)      27.0405 (1.09)     3.0574 (1.14)          2;0  0.0371 (0.95)          5           1
test_accu[combined]     44.4408 (1.84)     52.1430 (1.84)     46.6445 (1.82)     3.2624 (1.96)     45.0416 (1.81)     3.9049 (1.46)          1;0  0.0214 (0.55)          5           1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean

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.

Add x_chr functionality

3 participants