Skip to content

Fix/issue-244-code-cleanup#246

Merged
XingerTang merged 1 commit into
AlphaGenes:develfrom
XingerTang:fix/issue-244-code-cleanup
Apr 21, 2026
Merged

Fix/issue-244-code-cleanup#246
XingerTang merged 1 commit into
AlphaGenes:develfrom
XingerTang:fix/issue-244-code-cleanup

Conversation

@XingerTang

Copy link
Copy Markdown
Contributor

Related Issue

Closes #244

What changed

See #244

Why this change

See #244

Submodule changes

  • Submodule repository: AlphaGenes/tinyhouse
  • Commit: 6aa46cc
  • Why needed: print docs link

Notes / Risks

  • Need to rebase to the recent changes of the devel branch before merge

@XingerTang

Copy link
Copy Markdown
Contributor Author

New help message:

------------------------------------------
                AlphaPeel                 
------------------------------------------
Version: 1.3.0
Docs:    https://alphapeel.readthedocs.io/en/v1.3.0/usage.html
Email:   alphagenes.dev@gmail.com
Website: https://github.com/AlphaGenes
------------------------------------------
usage: AlphaPeel [-h] -out_file OUT_FILE [-method METHOD] [-plink_file [PLINK_FILE ...]] [-geno_file [GENO_FILE ...]] [-pheno_file [PHENO_FILE ...]] [-hap_file [HAP_FILE ...]]
                 [-seq_file [SEQ_FILE ...]] [-ped_file [PED_FILE ...]] [-alt_allele_prob_file [ALT_ALLELE_PROB_FILE ...]]
                 [-pheno_penetrance_prob_file [PHENO_PENETRANCE_PROB_FILE ...]] [-start_snp START_SNP] [-stop_snp STOP_SNP] [-main_metafounder MAIN_METAFOUNDER]
                 [-map_file MAP_FILE] [-no_dosage] [-geno] [-geno_threshold [GENO_THRESHOLD ...]] [-geno_prob] [-phased_geno_prob] [-hap] [-hap_threshold [HAP_THRESHOLD ...]]
                 [-seg_prob] [-pheno_prob] [-no_param] [-alt_allele_prob] [-pheno_penetrance_prob] [-binary_call_file] [-out_id_order OUT_ID_ORDER] [-out_id_only]
                 [-n_io_thread N_IO_THREAD] [-n_thread N_THREAD] [-rec_length REC_LENGTH] [-n_cycle N_CYCLE] [-geno_error_prob GENO_ERROR_PROB]
                 [-seq_error_prob SEQ_ERROR_PROB] [-mut_prob MUT_PROB] [-x_chr] [-est_start_alt_allele_prob] [-est_alt_allele_prob] [-est_geno_error_prob]
                 [-est_seq_error_prob] [-est_pheno_penetrance_prob] [-no_phase_founder] [-seg_map_file SEG_MAP_FILE] [-seg_file SEG_FILE] [-version]

options:
  -h, --help            show this help message and exit
  -version              Show program's version number and exit.

Core arguments:
  -out_file OUT_FILE    The output file prefix. All file outputs will be named as "PREFIX.OUTPUT.txt", where "OUTPUT" is the type of output (for example, "dosage" and
                        "geno_prob").

Mandatory peeling arguments:
  -method METHOD        Peeling method: single or multi.

Input Options:
  -plink_file [PLINK_FILE ...]
                        Plink (binary) file(s) (see format details in the docs).
  -geno_file [GENO_FILE ...]
                        Genotype file(s) (see format details in the docs).
  -pheno_file [PHENO_FILE ...]
                        Phenotype file(s) (see format details in the docs).
  -hap_file [HAP_FILE ...]
                        A haplotype file in AlphaGenes format.
  -seq_file [SEQ_FILE ...]
                        Sequence allele read count file(s) (see format details in the docs).
  -ped_file [PED_FILE ...]
                        Pedigree file(s) in (see format details in the docs).
  -alt_allele_prob_file [ALT_ALLELE_PROB_FILE ...]
                        Alternative allele probability file (see format details in the docs). Default: 0.5 for each locus.
  -pheno_penetrance_prob_file [PHENO_PENETRANCE_PROB_FILE ...]
                        Phenotype penetrance probability file (see format details in the docs).
  -start_snp START_SNP  The first locus to consider. Counting starts at 1. Default: 1.
  -stop_snp STOP_SNP    The last locus to consider. Default: all loci in input files
  -main_metafounder MAIN_METAFOUNDER
                        ID used to represent the base population of the pedigree (metafounder / unknown parent group) (see format details in the docs). Default: MF_1.
  -map_file MAP_FILE    Map file for loci in genomic data files (see format details in the docs).

Output Options:
  -no_dosage            Suppress default output of allele dosages (see format details in the docs).
  -geno                 Call and output genotypes (see format details in the docs). The default genotype calling threshold is set to 1/3.
  -geno_threshold [GENO_THRESHOLD ...]
                        Custom genotype calling threshold(s) from the genotype probabilities. Multiple space separated values allowed. Value(s) less than 1/3 are replaced by
                        1/3.
  -geno_prob            Output genotype probabilities (see format details in the docs).
  -phased_geno_prob     Output phased genotype probabilities (see format details in the docs).
  -hap                  Call and output haplotypes (see format details in the docs). The default haplotype calling threshold is set to 1/2.
  -hap_threshold [HAP_THRESHOLD ...]
                        Custom haplotype calling threshold(s) from the phased genotype probabilities. Multiple space separated values allowed. Value(s) less than 1/2 are
                        replaced by 1/2.
  -seg_prob             Flag to enable writing out the segregation probabilities.
  -pheno_prob           Flag to enable writing out the phenotype probabilities.
  -no_param             Flag to suppress writing the model parameter files.
  -alt_allele_prob      Flag to write out the alternative allele frequencies for each metafounder.
  -pheno_penetrance_prob
                        Flag to write out the phenotype penetrance probabilities.
  -binary_call_file     Flag to write out the called genotype files as a binary plink output [Not yet implemented].
  -out_id_order OUT_ID_ORDER
                        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 inividuals can be surpressed with the "-out_id_only" option.
                        Options: id, pedigree, genotypes, sequence, segregation. Defualt: id.
  -out_id_only          Suppress output for individuals not present in the file specified with -out_id_order. It also suppresses "dummy" individuals.

Multithreading Options:
  -n_io_thread N_IO_THREAD
                        Number of threads to use for input and output. Default: 1.
  -n_thread N_THREAD    Maximum number of threads to use. Default: 1.

Optional peeling arguments:
  -rec_length REC_LENGTH
                        Recombination length of the chromosome in Morgans. Default: 1.00
  -n_cycle N_CYCLE      Number of peeling cycles. Default: 5.
  -geno_error_prob GENO_ERROR_PROB
                        Genotype error probability. Default: 0.0001.
  -seq_error_prob SEQ_ERROR_PROB
                        Sequencing error probability. Must not be 0. Default: 0.001.
  -mut_prob MUT_PROB    Mutation probability. Default: 1e-8.

Peeling control arguments:
  -x_chr                Indicate that input data is for the X chromosome (see details in the docs).
  -est_start_alt_allele_prob
                        Estimate starting alternative allele probabilities from all inputted genomic data prior to peeling.
  -est_alt_allele_prob  Estimate alternative allele probabilities after each peeling cycle.
  -est_geno_error_prob  Estimate genotype error probability after each peeling cycle.
  -est_seq_error_prob   Estimate sequence error probability after each peeling cycle.
  -est_pheno_penetrance_prob
                        Estimate phenotype penetrance probabilities.
  -no_phase_founder     Suppress phasing a heterozygous allele (if such an allele can be found).

Hybrid peeling arguments:
  -seg_map_file SEG_MAP_FILE
                        Map file for loci in the segregation probabilities file.
  -seg_file SEG_FILE    Segregation probabilities file (see format details in the docs).

@XingerTang

Copy link
Copy Markdown
Contributor Author

Docs change preview: https://xingertang-alphapeel.readthedocs.io/en/latest/usage.html
May need to clean the cache to see the updated docs.

Comment thread docs/source/usage.rst
Comment thread docs/source/usage.rst
Comment thread docs/source/usage.rst Outdated
Comment thread docs/source/usage.rst
Comment thread docs/source/usage.rst Outdated
Comment thread docs/source/usage.rst

@gregorgorjanc gregorgorjanc left a comment

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.

Good job @XingerTang. I left some minor comments and actions for you to follow on.

Comment thread docs/source/usage.rst Outdated
Comment thread docs/source/usage.rst Outdated

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
Map file for loci in the segregation probabilities file
(:ref:`see format details <map_file_format>`).

@gregorgorjanc gregorgorjanc left a comment

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.

Looks good @XingerTang. Apply the suggested edit for seg_map_file and merge;)

@XingerTang XingerTang linked an issue Apr 20, 2026 that may be closed by this pull request
7 tasks
@XingerTang XingerTang force-pushed the fix/issue-244-code-cleanup branch from c9aee98 to c2728e3 Compare April 21, 2026 09:17
@XingerTang XingerTang force-pushed the fix/issue-244-code-cleanup branch from c2728e3 to 34585c6 Compare April 21, 2026 09:18
@XingerTang XingerTang merged commit 32d0f30 into AlphaGenes:devel Apr 21, 2026
3 checks passed
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.

Fixing part of AlphaGenes/AlphaPeel#227

2 participants