Skip to content

Commit

Permalink
New vcf_pos column; Rename variant_id/qual to vcf_id/qual
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuojian-Tang committed Mar 13, 2019
1 parent 3db26c2 commit 051aaaf
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions vcf2maf.pl
Original file line number Diff line number Diff line change
Expand Up @@ -477,14 +477,17 @@ sub GetBiotypePriority {
EXON INTRON DOMAINS AF AFR_AF AMR_AF ASN_AF EAS_AF EUR_AF SAS_AF AA_AF EA_AF CLIN_SIG SOMATIC
PUBMED MOTIF_NAME MOTIF_POS HIGH_INF_POS MOTIF_SCORE_CHANGE IMPACT PICK VARIANT_CLASS TSL
HGVS_OFFSET PHENO MINIMISED ExAC_AF ExAC_AF_AFR ExAC_AF_AMR ExAC_AF_EAS ExAC_AF_FIN ExAC_AF_NFE
ExAC_AF_OTH ExAC_AF_SAS GENE_PHENO FILTER flanking_bps variant_id variant_qual ExAC_AF_Adj
ExAC_AF_OTH ExAC_AF_SAS GENE_PHENO FILTER flanking_bps vcf_id vcf_qual ExAC_AF_Adj
ExAC_AC_AN_Adj ExAC_AC_AN ExAC_AC_AN_AFR ExAC_AC_AN_AMR ExAC_AC_AN_EAS ExAC_AC_AN_FIN
ExAC_AC_AN_NFE ExAC_AC_AN_OTH ExAC_AC_AN_SAS ExAC_FILTER gnomAD_AF gnomAD_AFR_AF gnomAD_AMR_AF
gnomAD_ASJ_AF gnomAD_EAS_AF gnomAD_FIN_AF gnomAD_NFE_AF gnomAD_OTH_AF gnomAD_SAS_AF );

my @ann_cols_format; # To store the actual order of VEP data, that may differ between runs
push( @maf_header, @ann_cols );

# Add original VCF POS column header
push( @maf_header, "vcf_pos" );

# If the user has INFO fields they want to retain, create additional columns for those
my @addl_info_cols = ();
if( $retain_info or $remap_chain or $split_svs ) {
Expand Down Expand Up @@ -880,8 +883,11 @@ sub GetBiotypePriority {
$maf_line{flanking_bps} = $flanking_bps{$region};

# Add ID and QUAL from the input VCF into respective MAF columns
$maf_line{variant_id} = $var_id;
$maf_line{variant_qual} = $var_qual;
$maf_line{vcf_id} = $var_id;
$maf_line{vcf_qual} = $var_qual;

# Add original VCF POS column
$maf_line{vcf_pos} = $vcf_pos;

# If there are additional INFO data to add, then add those
foreach my $info_col ( @addl_info_cols ) {
Expand Down Expand Up @@ -930,7 +936,7 @@ sub GetBiotypePriority {
# Copy the header unchanged, after figuring out necessary column indexes
foreach( split( /\t/, $line )) { last if( $_ eq "Tumor_Sample_Barcode" ); ++$tid_idx; }
foreach( split( /\t/, $line )) { last if( $_ eq "Fusion" ); ++$fusion_idx; }
foreach( split( /\t/, $line )) { last if( $_ eq "variant_id" ); ++$var_id_idx; }
foreach( split( /\t/, $line )) { last if( $_ eq "vcf_id" ); ++$var_id_idx; }
$out_maf_fh->print( "$line\n" ); # Copy header unchanged
}
else {
Expand Down

0 comments on commit 051aaaf

Please sign in to comment.