From 65577bbf062c7a711c90ce1257c773164e249b97 Mon Sep 17 00:00:00 2001 From: Daniel Richter <56433682+darichter87@users.noreply.github.com> Date: Mon, 15 May 2023 14:18:15 +0200 Subject: [PATCH] Update fqfilter_v2.pl Fix whitespace Problem in read-IDs. For read-IDs containing multiple whitespaces, only the last part was removed due to greedy matching of only one whitespace. Subsequently, read-IDs within the *.unmapped.bam can contain whitespaces, which cause problems when mapping with STAR (all reads will consist of one single 'N' nucleotide). Adapting the pattern to just match the first non-whitespace character-set within the read-ID fixes this Problem. --- fqfilter_v2.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fqfilter_v2.pl b/fqfilter_v2.pl index 0e88a8a..b200161 100644 --- a/fqfilter_v2.pl +++ b/fqfilter_v2.pl @@ -305,11 +305,11 @@ BEGIN chomp($rid); if($rid =~ m/^\@.*\s/){ - $rid =~ m/^\@(.*)\s/; + $rid =~ m/^\@(\S+)/; $ridtmp = $1; } else{ - $rid =~ m/^\@(.*)/; + $rid =~ m/^\@(\S+)/; $ridtmp = $1; }