Skip to content

Commit

Permalink
BAM_EDIT field missing from VCF output
Browse files Browse the repository at this point in the history
  • Loading branch information
William McLaren committed Nov 23, 2017
1 parent 0cbb384 commit d1204cc
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions modules/Bio/EnsEMBL/VEP/CacheDir.pm
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ sub info {
if($info->{bam} && !$self->param('use_given_ref')) {
$self->status_msg("INFO: BAM-edited cache detected, enabling --use_transcript_ref; use --use_given_ref to override this\n");
$self->param('use_transcript_ref', 1);
$self->param('bam_edited', 1);
}

## NOT CURRENTLY BEING USED, COMMENTED OUT AS NO UNIT TEST
Expand Down
1 change: 1 addition & 0 deletions modules/Bio/EnsEMBL/VEP/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ our @OPTION_SETS = (
flags => ['bam'],
set => {
use_transcript_ref => 1,
bam_edited => 1,
}
},

Expand Down
2 changes: 1 addition & 1 deletion modules/Bio/EnsEMBL/VEP/Constants.pm
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ our @FLAG_FIELDS = (
{ flag => 'refseq', fields => ['REFSEQ_MATCH'] },
{ flag => 'merged', fields => ['REFSEQ_MATCH', 'SOURCE'] },
{ flag => 'use_transcript_ref', fields => ['GIVEN_REF', 'USED_REF']},
{ flag => 'bam', fields => ['BAM_EDIT']},
{ flag => 'bam_edited', fields => ['BAM_EDIT']},
{ flag => 'custom', fields => ['SOURCE'] },
{ flag => 'gene_phenotype', fields => ['GENE_PHENO'] },
{ flag => 'nearest', fields => ['NEAREST'] },
Expand Down
2 changes: 1 addition & 1 deletion t/OutputFactory.t
Original file line number Diff line number Diff line change
Expand Up @@ -1008,14 +1008,14 @@ $ib = get_annotated_buffer({
species => 'homo_sapiens',
dir => $test_cfg->{cache_root_dir},
refseq => 1,
fasta => $test_cfg->{fasta},
});

$vfoa = $of->get_all_VariationFeatureOverlapAlleles($ib->buffer->[0])->[0];

is_deeply(
$of->BaseTranscriptVariationAllele_to_output_hash($vfoa)->{REFSEQ_MATCH},
[
'rseq_ens_match_cds',
'rseq_mrna_nonmatch',
'rseq_cds_mismatch'
],
Expand Down
7 changes: 7 additions & 0 deletions t/OutputFactory_VCF.t
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ is_deeply(
'headers - plugin'
);

$headers = get_runner({refseq => 1, fasta => $test_cfg->{fasta}, quiet => 1, input_file => $test_cfg->{test_vcf}, vcf => 1})->get_OutputFactory->headers;
is(
$headers->[-2],
'##INFO=<ID=CSQ,Number=.,Type=String,Description="Consequence annotations from Ensembl VEP. Format: Allele|Consequence|IMPACT|SYMBOL|Gene|Feature_type|Feature|BIOTYPE|EXON|INTRON|HGVSc|HGVSp|cDNA_position|CDS_position|Protein_position|Amino_acids|Codons|Existing_variation|DISTANCE|STRAND|FLAGS|SYMBOL_SOURCE|HGNC_ID|REFSEQ_MATCH|GIVEN_REF|USED_REF|BAM_EDIT">',
'headers - BAM_EDIT'
);

is_deeply(
$of->fields,
[
Expand Down
Binary file not shown.
1 change: 1 addition & 0 deletions t/testdata/cache/homo_sapiens_refseq/84_GRCh38/info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ host ens-variation3
variation_cols chr,variation_name,failed,somatic,start,end,allele_string,strand,minor_allele,minor_allele_freq,clin_sig,phenotype_or_disease,pubmed,AFR,AMR,EAS,EUR,SAS,AA,EA,ExAC,ExAC_AFR,ExAC_AMR,ExAC_Adj,ExAC_EAS,ExAC_FIN,ExAC_NFE,ExAC_OTH,ExAC_SAS
port 3306
build all
bam interim_GRCh38.p10_knownrefseq_alignments_2017-01-13.bam
polyphen b
regulatory 1
assembly GRCh38
Expand Down

0 comments on commit d1204cc

Please sign in to comment.