pyhiv package

Subpackages

Submodules

pyhiv.cli module

PyHIV Command Line Interface

pyhiv.cli.count_fasta_files(directory)[source]

Count FASTA files in the input directory.

pyhiv.cli.validate_n_jobs(ctx, param, value)[source]

Validate that n_jobs is positive if provided.

pyhiv.config module

pyhiv.config.get_reference_base_dir()[source]

Return the root directory for reference genomes.

Return type:

Path

pyhiv.config.get_reference_paths(base_dir=None)[source]

Return all key reference paths derived from the base directory.

Parameters:

base_dir (Path | None)

Return type:

dict[str, Path]

pyhiv.config.validate_reference_paths(paths=None)[source]

Ensure all required reference files and directories exist.

Parameters:

paths (dict[str, Path] | None)

Module contents

pyhiv.PyHIV(fastas_dir, subtyping=True, splitting=True, output_dir=None, n_jobs=None, reporting=True)[source]

Main function to run the PyHIV pipeline. It aligns the user sequences with the reference sequences and saves the best alignment in a fasta file. If subtyping is True, it aligns the user sequences with the reference sequences from the HIV-1 subtyping tool. If splitting is True, it splits the user sequences into gene regions and saves them in specific folders. It also saves a final table with the results. If reporting is True, it generates a PDF report with visualizations.

Parameters:
  • fastas_dir (str)

  • subtyping (bool)

  • splitting (bool)

  • output_dir (str | None)

  • n_jobs (int | None)

  • reporting (bool)