From 166bdae362918bcd76d22f94009cedb37c6c31bf Mon Sep 17 00:00:00 2001 From: Keiran Raine Date: Tue, 16 May 2017 13:24:29 +0100 Subject: [PATCH] fixed #13 --- scripts/analysisWGS.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/analysisWGS.sh b/scripts/analysisWGS.sh index 9c12ebf..cf8136f 100755 --- a/scripts/analysisWGS.sh +++ b/scripts/analysisWGS.sh @@ -102,8 +102,8 @@ if [ ! -f $OUTPUT_DIR/pre-exec.done ]; then fi ## get sample names from BAM headers -NAME_MT=`samtools view -H $BAM_MT | perl -ne 'if($_ =~ m/^\@RG/) {($sm) = $_ =~m/\tSM:([^\t]+)/; print "$sm\n";}' | uniq` -NAME_WT=`samtools view -H $BAM_WT | perl -ne 'if($_ =~ m/^\@RG/) {($sm) = $_ =~m/\tSM:([^\t]+)/; print "$sm\n";}' | uniq` +NAME_MT=`samtools view -H $BAM_MT | perl -ne 'chomp; if($_ =~ m/^\@RG/) {($sm) = $_ =~m/\tSM:([^\t]+)/; print "$sm\n";}' | uniq` +NAME_WT=`samtools view -H $BAM_WT | perl -ne 'chomp; if($_ =~ m/^\@RG/) {($sm) = $_ =~m/\tSM:([^\t]+)/; print "$sm\n";}' | uniq` echo -e "\tNAME_MT : $NAME_MT" echo -e "\tNAME_WT : $NAME_WT"