From 47b225a367b264060dc1c845cad8be829c627fd8 Mon Sep 17 00:00:00 2001 From: Brandi Cantarel <brandi.cantarel@utsouthwestern.edu> Date: Fri, 13 Sep 2019 13:38:06 -0500 Subject: [PATCH] confounding symbols on multiple chrs --- genect_rnaseq/concat_fpkm.pl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/genect_rnaseq/concat_fpkm.pl b/genect_rnaseq/concat_fpkm.pl index c3be1e3..18ee999 100755 --- a/genect_rnaseq/concat_fpkm.pl +++ b/genect_rnaseq/concat_fpkm.pl @@ -15,7 +15,7 @@ while (my $line = <SYM>) { chomp($line); my ($chrom,$start,$end,$ensembl,$symbol,$type) = split(/\t/,$line); $ensembl = (split(/\./,$ensembl))[0]; - $names{$ensembl} = {symbol=>$symbol,type=>$type}; + $names{$ensembl} = {chr=>$chrom,symbol=>$symbol,type=>$type}; } my @files = @ARGV; @@ -32,8 +32,13 @@ foreach $file (@files) { while (my $line = <IN>) { chomp($line); my ($ensid,$gene,$chr,$strand,$start,$end,$cov,$fpkm,$tmp) = split(/\t/,$line); - my ($ens,$version) = split(/\./,$ensid); - $cts{$ens}{$sample} = $fpkm; + my $ens = $ensid; + $ens =~ s/\.\d+//; + if ($chr eq $names{$ens}{chr}) { + $cts{$ens}{$sample} = $fpkm; + }else { + warn "unable to map to genenames\n"; + } } close IN; } -- GitLab