liberu-genealogy / php-dna
lineage for PHP 8.3+
Fund package maintenance!
liberu-genealogy
Installs: 1 121
Dependents: 1
Suggesters: 0
Security: 0
Stars: 31
Watchers: 4
Forks: 23
Open Issues: 0
Requires
- php: >=8.3
- guzzlehttp/guzzle: ^7.2
- league/csv: ^9.0
- symfony/http-client: ^7.0
Requires (Dev)
- phpunit/phpunit: ^10.0
- rector/rector: ^0.11.49
- squizlabs/php_codesniffer: 3.6.*
- dev-main
- v1.0.1
- v1.0.0
- dev-sweep/Improve-and-refactor-match-kits-command-and-class
- dev-sweep/Implement-DNA-kit-matching-and-triangulation-with-visualization
- dev-sweep/Refactor-SNPs-class-and-add-SNPData-and-SNPAnalyzer-classes
- dev-sweep/complete_unfinished_functions_in_snpspyt
- dev-sweep/refactor_generally_to_improve_quality_th_79eb7
- dev-sweep/refactor_generally_to_improve_quality_th_e1621
- dev-sweep/refactor_generally_to_improve_quality_th_7bc25
- dev-sweep/refactor_generally_to_improve_quality_th_42ca9
- dev-sweep/refactor_generally_to_improve_quality_th_d3b69
- dev-sweep/refactor_generally_to_improve_quality_th
- dev-sweep/sweep_refactor_dnaphp_and_use_modulariza
- dev-sweep/sweep_refactor_triangulationphp_and_use
- dev-sweep/snps_a5859
- dev-sweep/snps_43433
- dev-sweep/snps
- dev-sweep/_95378
- dev-sweep/update_snps_2e6a7
- dev-sweep/update_snps
- dev-sweep/snps_81fbc
- dev-sweep/_ee421
- dev-sweep/improve_chromosome_visualisation_quality
- dev-sweep/improve_modularization_of_the_project_an
- dev-sweep/refactor
- dev-sweep/improve_gd
- dev-sweep/add_triangulation_to_matchkits_to_compar
- dev-sweep/update_readmemd
- dev-sweep/update_readmemd_to_describe_how_to_call
- dev-sweep/handling
- dev-sweep/_24679
- dev-sweep/_de62a
- dev-sweep/convert_python
- dev-sweep/_3b4fc
- dev-sweep/writer
- dev-sweep/write
- dev-sweep/refactor_for_php_83
- dev-sweep/finish_resources
- dev-sweep/finish_visualisation
- dev-sweep/finish_visulation
- dev-sweep/add-sweep-config
- dev-sweep/refactor_codebase_to_use_php_83_and_impr
This package is auto-updated.
Last update: 2024-12-17 09:53:11 UTC
README
Running MatchKits from the Command Line
To run the MatchKits script from the command line, navigate to the root directory of the php-dna project.
Ensure you have PHP installed on your system. You can check this by running php -v
in your command line. If PHP is not installed, please install it from the official PHP website.
Execute the script by running the following command: php src/MatchKits.php
.
The script will prompt you to enter the file paths for Kit 1 and Kit 2. Please enter the full path for each file when prompted.
After entering the file paths, the script will process the data and generate a matched data visualization. The output file named 'matched_data.png' will be saved in the root directory.
Requirements
- php-dna 1.0+ requires PHP 8.3 (or later).
Installation
There are two ways of installing php-dna.
Composer
To install php-dna in your project using composer, simply add the following require line to your project's composer.json
file:
{
"require": {
"liberu-genealogy/php-dna": "1.0.*"
}
}
Download and __autoload
If you are not using composer, you can download an archive of the source from GitHub and extract it into your project. You'll need to setup an autoloader for the files, unless you go through the painstaking process if requiring all the needed files one-by-one. Something like the following should suffice:
spl_autoload_register(function ($class) { $pathToDna = __DIR__ . '/library/'; // TODO FIXME if (!substr(ltrim($class, '\\'), 0, 7) == 'Dna\\') { return; } $class = str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php'; if (file_exists($pathToDna . $class)) { require_once($pathToDna . $class); } });