Skip to content

Commit

Permalink
feat: Updated src/Snps/SNPs.php
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] committed Mar 13, 2024
1 parent 87b5cd2 commit d9c9b1b
Showing 1 changed file with 7 additions and 26 deletions.
33 changes: 7 additions & 26 deletions src/Snps/SNPs.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

declare(strict_types=1);

namespace Dna\Snps;

Expand All @@ -17,34 +18,15 @@

// import copy // In PHP, you don't need to import the 'copy' module, as objects are automatically copied when assigned to variables

// from itertools import groupby, count // PHP has built-in support for array functions that can handle these operations natively

// import logging // For logging in PHP, you can use Monolog: https://github.com/Seldaek/monolog
// use Monolog\Logger;
// use Monolog\Handler\StreamHandler;

// import os, re, warnings
// PHP has built-in support for file operations, regex, and error handling, so no need to import these modules

// import numpy as np // See the note above about using MathPHP or another PHP library for numerical operations
// import pandas as pd // See the note above about using php-dataframe or another PHP library for data manipulation

// from pandas.api.types import CategoricalDtype // If using php-dataframe, check documentation for similar functionality

// For snps.ensembl, snps.resources, snps.io, and snps.utils, you'll need to find suitable PHP alternatives or adapt the Python code
use Dna\Snps\Ensembl;
use Dna\Snps\IO\SnpFileReader;
use Dna\Snps\Analysis\BuildDetector;
use Dna\Snps\Analysis\ClusterOverlapCalculator;
// from snps.utils import Parallelizer

// Set up logging
// $logger = new Logger('my_logger');
// $logger->pushHandler(new StreamHandler('php://stderr', Logger::DEBUG));
class SNPs implements Countable, Iterator

class SNPs implements Countable, Iterator
{

private array $_source = [];
private array $_snps = [];
private int $_build = 0;
Expand All @@ -56,14 +38,13 @@ class SNPs implements Countable, Iterator
private ?string $_cluster = null;
private int $_position = 0;
private array $_keys = [];
private array $_duplicate;
private array $_discrepant_XY;
private array $_heterozygous_MT;
private $_chip;
private $_chip_version;
private $_cluster;
private array $_duplicate = [];
private array $_discrepant_XY = [];
private array $_heterozygous_MT = [];


/**
/**
* SNPs constructor.
*
Expand Down

0 comments on commit d9c9b1b

Please sign in to comment.