From 636e989b65cc76352111cedac9a8762fbe570384 Mon Sep 17 00:00:00 2001
From: Brandi Cantarel <brandi.cantarel@utsouthwestern.edu>
Date: Fri, 31 Aug 2018 08:37:13 -0500
Subject: [PATCH] update cytoband column

---
 variants/filter_cnvkit.pl | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/variants/filter_cnvkit.pl b/variants/filter_cnvkit.pl
index 083f1f5..6dfdf44 100755
--- a/variants/filter_cnvkit.pl
+++ b/variants/filter_cnvkit.pl
@@ -100,7 +100,12 @@ while (my $line = <IN>) {
 	print BIO join("\t",$gene,$entrez{$gene},$cn_cbio),"\n";
         print BIO2 join("\t",$gene,$entrez{$gene},$log2),"\n";
 	my @cytoband = sort {$a->[1] <=>$b->[1]} @{$cyto{$key}};
-	print OUT2 join("\t",$gene,$chr,$start,$end,$abtype,$cn,$weight,join("",@{$cytoband[0]},'-',@{$cytoband[-1]})),"\n";
+	if (join("",@{$cytoband[0]}) eq join("",@{$cytoband[-1]})) {
+	    $cband = join("",@{$cytoband[0]});
+	}else {
+	    $cband = join("",@{$cytoband[0]},'-',@{$cytoband[-1]});
+	}
+	print OUT2 join("\t",$gene,$chr,$start,$end,$abtype,$cn,$weight,$cband),"\n";
 	print OUT join("\t",$gene,$chr,$start,$end,$abtype,$cn,$weight),"\n";
     }
 }
-- 
GitLab