From 2021008d18ef8fcafc2380cf2538de144b0893b1 Mon Sep 17 00:00:00 2001 From: Cyriac Kandoth Date: Wed, 17 Feb 2016 18:57:53 -0500 Subject: [PATCH] Fix for when column to retain is not in input MAF --- maf2maf.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maf2maf.pl b/maf2maf.pl index 6bac10a..3885f4f 100644 --- a/maf2maf.pl +++ b/maf2maf.pl @@ -294,8 +294,8 @@ else { my $key = join( ":", map{ my $c = lc; $cols[$output_maf_col_idx{$c}] } qw( Chromosome Start_Position Tumor_Sample_Barcode Reference_Allele Tumor_Seq_Allele2 )); foreach my $c ( map{lc} split( /\t/, $maf_header )){ - if( !$force_new_cols{$c} and defined $input_maf_data{$key}{$c} ) { - $cols[$output_maf_col_idx{$c}] = $input_maf_data{$key}{$c}; + if( !$force_new_cols{$c} ) { + $cols[$output_maf_col_idx{$c}] = ( defined $input_maf_data{$key}{$c} ? $input_maf_data{$key}{$c} : "" ); } } $tmp_tn_maf_fh->print( join( "\t", @cols ) . "\n" );