From 1b16b35d69028d04aa5a7168fe92d16ff4741d45 Mon Sep 17 00:00:00 2001 From: Cyriac Kandoth Date: Thu, 8 Feb 2018 14:28:26 -0500 Subject: [PATCH] Fix tabs for empty MAF columns before newline --- vcf2maf.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcf2maf.pl b/vcf2maf.pl index 24851c2..4bb2cf6 100644 --- a/vcf2maf.pl +++ b/vcf2maf.pl @@ -839,7 +839,7 @@ sub GetBiotypePriority { # If there are additional INFO data to add, then add those foreach my $info_col ( @addl_info_cols ) { - $maf_line{$info_col} = ( $info{$info_col} ? $info{$info_col} : "" ); + $maf_line{$info_col} = ( defined $info{$info_col} ? $info{$info_col} : "" ); } # If this is an SV, pair up gene names from separate lines to backfill the Fusion column later @@ -882,7 +882,7 @@ sub GetBiotypePriority { } else { # Write the gene-pair name into the Fusion column if it was backfilled earlier - my @cols = split( /\t/, $line ); + my @cols = split( /\t/, $line, -1 ); my $sv_key = $cols[$var_id_idx] . "-" . $cols[$tid_idx]; $cols[$fusion_idx] = $sv_pair{$sv_key} if( $sv_pair{$sv_key} ); $out_maf_fh->print( join( "\t", @cols ) . "\n" );