Skip to content

Commit

Permalink
Fixed missing slashes when using folders from settings.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-sturm committed Nov 16, 2024
1 parent 9a82eaf commit a29981c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/NGS/mapping_star.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

//optional arguments
$parser->addInfile("in2", "Input reverse reads in FASTQ(.GZ) format for paired-end alignment.", true);
$parser->addString("genome", "STAR reference genome index.", true, get_path("data_folder")."genomes/STAR/GRCh38");
$parser->addString("genome", "STAR reference genome index.", true, get_path("data_folder")."/genomes/STAR/GRCh38");

$parser->addFlag("uncompressed", "FASTQ input files are uncompressed.");

Expand Down
8 changes: 4 additions & 4 deletions src/Tools/data_setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
{
$base = basename($file);
print " rsync-ing genome file '$base'.\n";
$existed_before = file_exists($local_data.$base);
list($stdout, $stderr) = exec2("{$rsync} {$genome_folder}{$base} {$local_data}{$base}");
$existed_before = file_exists($local_data."/".$base);
list($stdout, $stderr) = exec2("{$rsync} {$genome_folder}{$base} {$local_data}/{$base}");
foreach(array_merge($stdout, $stderr) as $line)
{
$line = trim($line);
Expand All @@ -106,9 +106,9 @@
}
if (!$existed_before)
{
if (!chmod($local_data.$base, 0777))
if (!chmod($local_data."/".$base, 0777))
{
trigger_error("Could not change privileges of local data folder '{$local_data}{$base}'!", E_USER_ERROR);
trigger_error("Could not change privileges of local data folder '{$local_data}/{$base}'!", E_USER_ERROR);
}
}
}
Expand Down

0 comments on commit a29981c

Please sign in to comment.