Skip to content

Commit

Permalink
feat: Updated src/Visualization.php
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] committed Mar 12, 2024
1 parent 037a6f5 commit 0665716
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Visualization.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use League\Csv\Reader;
use League\Csv\Writer;
use src\Helpers\CSVGenerator;

function _chromosome_collections($df, $y_positions, $height) {
$collections = [];
Expand Down Expand Up @@ -64,6 +65,7 @@ function plot_chromosomes($matchedData, $path, $title, $build, $format) {
fclose($svgFile);
return;
}
CSVGenerator::generate($matchedData, str_replace('.svg', '.csv', $path));
$color = imagecolorallocate($image, $collection['colors'][0] * 255, $collection['colors'][1] * 255, $collection['colors'][2] * 255);
foreach ($collection['xranges'] as $xrange) {
imagerectangle($image, $xrange['start'], $collection['yrange'][0], $xrange['start'] + $xrange['width'], $collection['yrange'][1], $color);
Expand All @@ -78,3 +80,4 @@ function generate_csv($matchedData, $path) {
}
fclose($csvFile);
}
CSVGenerator::generate($matchedData, str_replace(['.png', '.jpeg', '.jpg'], '.csv', $path));

0 comments on commit 0665716

Please sign in to comment.