Coder Social home page Coder Social logo

php-dna's Introduction

php-dna

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);
    }
});

php-dna's People

Contributors

curtisdelicata avatar joshkisb avatar sweep-ai[bot] avatar timeisgolden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

php-dna's Issues

Sweep: Refactor codebase to use php 8.3 and improve code overall

Checklist
  • Modify src/Snps/IO/Reader.php937ceab Edit
  • Running GitHub Actions for src/Snps/IO/Reader.phpEdit
  • Modify src/Snps/IO/Writer.php1227a1d Edit
  • Running GitHub Actions for src/Snps/IO/Writer.phpEdit
  • Modify src/Snps/Utils.php9f16ca7 Edit
  • Running GitHub Actions for src/Snps/Utils.phpEdit
  • Modify tests/Snps/ResourcesTest.php55aa9cb Edit
  • Running GitHub Actions for tests/Snps/ResourcesTest.phpEdit
  • Modify src/Snps/IO/ExtraTabsFilter.phpa73943b Edit
  • Running GitHub Actions for src/Snps/IO/ExtraTabsFilter.phpEdit
  • Modify src/Snps/EnsemblRestClient.php3e3050f Edit
  • Running GitHub Actions for src/Snps/EnsemblRestClient.phpEdit
  • Modify src/Snps/SNPs.php5993646 Edit
  • Running GitHub Actions for src/Snps/SNPs.phpEdit
  • Modify src/Snps/ReferenceSequence.phpcec5ca9 Edit
  • Running GitHub Actions for src/Snps/ReferenceSequence.phpEdit

Sweep: snps

Details

Details

Convert the following files from python 3 into php 8.3 and refactor:

https://raw.githubusercontent.com/apriha/snps/master/src/snps/snps.py

Update src/Snps/Snps.php

Do this so that matchkits still works or will now work

Checklist
  • Create src/Snps/PythonDependencyAdapter.php56fda3c Edit
  • Running GitHub Actions for src/Snps/PythonDependencyAdapter.phpEdit
  • Modify src/Snps/Utils.php31315be Edit
  • Running GitHub Actions for src/Snps/Utils.phpEdit
  • Modify src/Snps/SNPs.phpc33d651 Edit
  • Running GitHub Actions for src/Snps/SNPs.phpEdit
  • Modify src/Snps/IO/Reader.phpf9e1ff2 Edit
  • Running GitHub Actions for src/Snps/IO/Reader.phpEdit
  • Modify src/Snps/IO/Writer.phpa50a107 Edit
  • Running GitHub Actions for src/Snps/IO/Writer.phpEdit

Sweep: update readme.md

Details

Update README.md on how to call src/MatchKits.php from the command line

Checklist
  • Modify README.mdd476315 Edit
  • Running GitHub Actions for README.mdEdit

Sweep: improve modularization of the project and efficiency

Checklist
  • Create src/Snps/ReferenceSequenceManager.php822b8b7 Edit
  • Running GitHub Actions for src/Snps/ReferenceSequenceManager.phpEdit
  • Create src/Snps/AssemblyMappingManager.php129c643 Edit
  • Running GitHub Actions for src/Snps/AssemblyMappingManager.phpEdit
  • Create src/Snps/DatasetDownloader.php6f94880 Edit
  • Running GitHub Actions for src/Snps/DatasetDownloader.phpEdit
  • Modify src/Snps/SNPsResources.php ! No changes made Edit
  • Running GitHub Actions for src/Snps/SNPsResources.phpEdit

Sweep:

Details

Finish converting from python 3 into php 8.3 the following file https://github.com/apriha/snps/blob/master/src%2Fsnps%2Fio%2Freader.py and update src/Snps/IO/Reader.php also convert all the python called external files into php 8.3 and place in src/Snps/IO

Checklist
  • Modify src/Snps/IO/Reader.php26719e9 Edit
  • Running GitHub Actions for src/Snps/IO/Reader.phpEdit
  • Modify src/Snps/IO/ExtraTabsFilter.php2f008e9 Edit
  • Running GitHub Actions for src/Snps/IO/ExtraTabsFilter.phpEdit
  • Modify src/Snps/SNPsResources.php ! No changes made Edit
  • Running GitHub Actions for src/Snps/SNPsResources.phpEdit
  • Modify src/Snps/IO/CsvReader.phpe5ebcc9 Edit
  • Running GitHub Actions for src/Snps/IO/CsvReader.phpEdit

Sweep: convert python

Details

Convert the following files from python 3 into php 8.3 and refactor:

https://raw.githubusercontent.com/apriha/snps/master/src/snps/ensembl.py

Update src/Snps/Ensembl.php

Checklist
  • Create src/Snps/Ensembl.php2a154aa Edit
  • Running GitHub Actions for src/Snps/Ensembl.phpEdit
  • Modify src/Snps/SNPs.php2e0e401 Edit
  • Running GitHub Actions for src/Snps/SNPs.phpEdit
  • Modify src/Snps/SNPs.php105410c Edit
  • Running GitHub Actions for src/Snps/SNPs.phpEdit

Sweep: Refactor for php 8.3

Checklist
  • Modify composer.jsond576635 Edit
  • Running GitHub Actions for composer.jsonEdit
  • Modify src/Snps/SNPs.php01570df Edit
  • Running GitHub Actions for src/Snps/SNPs.phpEdit
  • Modify src/Snps/EnsemblRestClient.php ! No changes made Edit
  • Running GitHub Actions for src/Snps/EnsemblRestClient.phpEdit
  • Modify src/Snps/IO/Reader.phpad09040 Edit
  • Running GitHub Actions for src/Snps/IO/Reader.phpEdit
  • Modify src/Snps/Utils.php02b08d6 Edit
  • Running GitHub Actions for src/Snps/Utils.phpEdit

Sweep: handling

Details

Create entry point to match two kits using the current code

Checklist
  • Create src/MatchKits.php3c0e513 Edit
  • Running GitHub Actions for src/MatchKits.phpEdit
  • Modify src/Snps/SNPs.phpa0211c4 Edit
  • Running GitHub Actions for src/Snps/SNPs.phpEdit
  • Modify src/Visualization.phpd8c94c0 Edit
  • Running GitHub Actions for src/Visualization.phpEdit

Sweep: improve gd

Details

Improve and add php GD image library support to src/Visualization.php so that beautiful chromosome outputs are generated using png and svg. Also generate a csv with information of the matching data

Checklist
  • Modify src/Visualization.php9a2699f Edit
  • Running GitHub Actions for src/Visualization.phpEdit
  • Modify src/MatchKits.phpbd2795d Edit
  • Running GitHub Actions for src/MatchKits.phpEdit
  • Create src/Helpers/CSVGenerator.php037a6f5 Edit
  • Running GitHub Actions for src/Helpers/CSVGenerator.phpEdit
  • Modify src/Visualization.php0665716 Edit
  • Running GitHub Actions for src/Visualization.phpEdit

Sweep: Refactor

Details

Refactor src/Snps/Snps.php to be more modular and efficient

Checklist
  • Create src/Snps/IO/SnpFileReader.php8bd4255 Edit
  • Running GitHub Actions for src/Snps/IO/SnpFileReader.phpEdit
  • Create src/Snps/Analysis/BuildDetector.php2f1e204 Edit
  • Running GitHub Actions for src/Snps/Analysis/BuildDetector.phpEdit
  • Create src/Snps/Analysis/ClusterOverlapCalculator.php61b745c Edit
  • Running GitHub Actions for src/Snps/Analysis/ClusterOverlapCalculator.phpEdit
  • Modify src/Snps/SNPs.php9ed4e94 Edit
  • Running GitHub Actions for src/Snps/SNPs.phpEdit

Sweep:

Details

Convert the following files from python 3 into php 8.3 and refactor:

https://raw.githubusercontent.com/apriha/snps/master/src/snps/snps.py

Update src/Snps/Snps.php

Checklist
  • Modify src/Snps/SNPs.php95dbafd Edit
  • Running GitHub Actions for src/Snps/SNPs.phpEdit
  • Create src/Snps/Utils/MathOperations.php09cab11 Edit
  • Running GitHub Actions for src/Snps/Utils/MathOperations.phpEdit
  • Create src/Snps/Utils/DataFrame.phpc5ffadd Edit
  • Running GitHub Actions for src/Snps/Utils/DataFrame.phpEdit
  • Modify src/Snps/IO/Reader.php018aa34 Edit
  • Running GitHub Actions for src/Snps/IO/Reader.phpEdit
  • Modify src/Snps/IO/Writer.php850d6a2 Edit
  • Running GitHub Actions for src/Snps/IO/Writer.phpEdit

Sweep: update snps

Details

Convert the following file from python 3 into php 8.3:

https://raw.githubusercontent.com/apriha/snps/master/src/snps/snps.py

Update src/Snps/Snps.php in this project and refactor for php 8.3

Checklist
  • Modify src/Snps/SNPs.php ! No changes made Edit
  • Running GitHub Actions for src/Snps/SNPs.phpEdit
  • Modify src/Snps/Utils.phpb5cdfd8 Edit
  • Running GitHub Actions for src/Snps/Utils.phpEdit
  • Create src/Snps/IO/DataParser.php08c6015 Edit
  • Running GitHub Actions for src/Snps/IO/DataParser.phpEdit

Sweep: writer

Details

Finish converting from python 3 into php 8.3 the following file https://github.com/apriha/snps/blob/master/src%2Fsnps%2Fio%2Fwriter.py and update src/Snps/IO/Wruter.php also convert all the python called external files into php 8.3 and place in src/Snps/IO

Checklist
  • Create src/Snps/IO/PythonDependency.php5181fb3 Edit
  • Running GitHub Actions for src/Snps/IO/PythonDependency.phpEdit
  • Modify src/Snps/IO/Writer.php6249a7f Edit
  • Running GitHub Actions for src/Snps/IO/Writer.phpEdit

Sweep: write

Details

Details

Finish converting from python 3 into php 8.3 the following file https://github.com/apriha/snps/blob/master/src%2Fsnps%2Fio%2Fwriter.py and update src/Snps/IO/Writer.php also convert all the python called external files into php 8.3 and place in src/Snps/IO

Checklist
  • Modify src/Snps/IO/Writer.php ! No changes made Edit
  • Running GitHub Actions for src/Snps/IO/Writer.phpEdit
  • Create src/Snps/IO/AdditionalFile.php199ae3b Edit
  • Running GitHub Actions for src/Snps/IO/AdditionalFile.phpEdit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.