From f82daf2638d3fc6ee50b84495f874efca41c3dd7 Mon Sep 17 00:00:00 2001 From: Gael Yvert <Gael.Yvert@ens-lyon.fr> Date: Tue, 20 Apr 2021 12:38:53 +0200 Subject: [PATCH] bugfix: handle white spaces in dna-features name for cirdna plasmid map --- app/Http/Controllers/lib/Seq.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/lib/Seq.php b/app/Http/Controllers/lib/Seq.php index 9c08964..629cb23 100755 --- a/app/Http/Controllers/lib/Seq.php +++ b/app/Http/Controllers/lib/Seq.php @@ -151,7 +151,9 @@ function update_blastdb_dnafeatures($storagedir){ $dnafeaturesfasta = $storagedir . "dnafeatures.fasta"; $FastaFile = fopen($dnafeaturesfasta, 'w'); foreach ($dnafeatures as $dnafeature) { - $extendedname = $dnafeature->name . "_FEATCAT_" . $dnafeature->category; + // remove white spaces from name + $namenospace = str_replace(" ", "", $dnafeature->name); + $extendedname = $namenospace . "_FEATCAT_" . $dnafeature->category; fwrite($FastaFile, ">$extendedname\n"); $toprint = Convert2Fasta($dnafeature->sequence); for ($i=0; $i< count($toprint); $i++) { -- GitLab