承接 liberu-genealogy/laravel-dna 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

liberu-genealogy/laravel-dna

最新稳定版本:v2.2.0

Composer 安装命令:

composer require liberu-genealogy/laravel-dna

包简介

Laravel wrapper around php-dna for DNA analysis and genealogy

README 文档

README

Laravel 11 or Laravel 12 wrapper around php-dna

Installation

To install the laravel-dna dependency in your Laravel project, run the following command in your terminal:

composer require liberu-genealogy/laravel-dna

This will download and install the laravel-dna package, making it available for use within your Laravel application.

Dispatching the DispatchMatchkitsJob

To dispatch the DispatchMatchkitsJob for processing DNA matchkits, you can use the following code snippet:

use LaravelDna\Jobs\DispatchMatchkitsJob;
use Dna\MatchKits;

// Option 1: Using dependency injection
dispatch(new DispatchMatchkitsJob(app(MatchKits::class)));

// Option 2: Using the service container binding
dispatch(app('dispatchMatchkits'));

This will enqueue the job for processing by the Laravel queue system. Make sure your queue worker is running to process the job.

Usage

Using the Facade

You can use the MatchKitsFacade to access MatchKits functionality:

use LaravelDna\Facades\MatchKitsFacade;
use Dna\Snps\SNPs;

// Load DNA kits
$kit1 = new SNPs('/path/to/kit1.txt');
$kit2 = new SNPs('/path/to/kit2.txt');

// Get MatchKits instance via facade
$matchKits = app('matchKits');
$matchKits->setKitsData([$kit1, $kit2]);

// Match the kits
$matchKits->matchKits();

// Get matched data
$matchedData = $matchKits->getMatchedData();

// Visualize the results
$matchKits->visualizeMatchedData('matched_data.png', 'DNA Match Results', 'GRCh37', 'png');

Direct Usage

You can also use the MatchKits class directly:

use Dna\MatchKits;
use Dna\Snps\SNPs;

$matchKits = app(MatchKits::class);

// Load your DNA kit files
$kit1 = new SNPs('/path/to/kit1.txt');
$kit2 = new SNPs('/path/to/kit2.txt');

$matchKits->setKitsData([$kit1, $kit2]);
$matchKits->matchKits();

$matchedData = $matchKits->getMatchedData();

After setting up the php-dna dependency and dispatching the DispatchMatchkitsJob, you can start integrating DNA processing functionalities into your Laravel application. Refer to the php-dna documentation for more details on available methods and their usage.

For any custom functionalities or issues, feel free to extend the job or service provider classes as needed.

统计信息

  • 总下载量: 4.35k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 3
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固