Skip to content

Commit

Permalink
feat: Updated src/Snps/ReferenceSequence.php
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] committed Mar 12, 2024
1 parent 78a634f commit bbf22fe
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/Snps/ReferenceSequence.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ class ReferenceSequence
{

public function __construct(
private readonly string $ID = "",
private readonly string $url = "",
private readonly string $path = "",
private readonly string $assembly = "",
private readonly string $species = "",
private readonly string $taxonomy = ""
private string $ID = "",
private string $url = "",
private string $path = "",
private string $assembly = "",
private string $species = "",
private string $taxonomy = ""
) {
$this->sequence = [];
$this->md5 = "";
Expand All @@ -37,7 +37,7 @@ public function __toString()
*/
public function getID(): string
{
return $this->_ID;
return $this->ID;
}

/**
Expand All @@ -47,7 +47,7 @@ public function getID(): string
*/
public function getChrom(): string
{
return $this->_ID;
return $this->ID;
}

/**
Expand All @@ -57,7 +57,7 @@ public function getChrom(): string
*/
public function getUrl(): string
{
return $this->_url;
return $this->url;
}

/**
Expand All @@ -67,7 +67,7 @@ public function getUrl(): string
*/
public function getPath(): string
{
return $this->_path;
return $this->path;
}

/**
Expand All @@ -77,7 +77,7 @@ public function getPath(): string
*/
public function getAssembly(): string
{
return $this->_assembly;
return $this->assembly;
}

/**
Expand All @@ -87,7 +87,7 @@ public function getAssembly(): string
*/
public function getBuild(): string
{
return "B" . substr($this->_assembly, -2);
return "B" . substr($this->assembly, -2);
}
/**
* Returns the species of the reference sequence.
Expand All @@ -96,7 +96,7 @@ public function getBuild(): string
*/
public function getSpecies(): string
{
return $this->_species;
return $this->species;
}

/**
Expand All @@ -106,7 +106,7 @@ public function getSpecies(): string
*/
public function getTaxonomy(): string
{
return $this->_taxonomy;
return $this->taxonomy;
}

/**
Expand Down Expand Up @@ -167,7 +167,7 @@ private function loadSequence(): void
{
if (!count($this->sequence)) {
// Decompress and read file
$data = file_get_contents($this->_path);
$data = file_get_contents($this->path);

// check if file is gzipped
if (str_starts_with($data, "\x1f\x8b")) {
Expand Down

0 comments on commit bbf22fe

Please sign in to comment.