Skip to content

Commit

Permalink
Adding IGV locus to the ASCII/PDF vaxrank report templates. Should ma…
Browse files Browse the repository at this point in the history
…ke variant review easier.
  • Loading branch information
julia326 committed Feb 26, 2018
1 parent 018d820 commit e3e4054
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -11,7 +11,6 @@ git:
# https://github.com/travis-ci/travis-ci/issues/4575
depth: 10
cache:
pip: true
# cache pip files; directory used for Ensembl downloads of GTF and FASTA files
# along with the indexed db of intervals and ID mappings and pickles
# of sequence dictionaries; vaxrank directory containing FM index of reference kmers
Expand All @@ -20,6 +19,7 @@ cache:
- $HOME/.cache/pyensembl/GRCh38/ensembl87/
- $HOME/.cache/pyensembl/GRCm38/ensembl87/
- $HOME/.cache/vaxrank
- $HOME/.cache/pip
before_install:
- |
if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion vaxrank/__init__.py
@@ -1 +1 @@
__version__ = "0.7.8"
__version__ = "0.7.9"
6 changes: 4 additions & 2 deletions vaxrank/report.py
Expand Up @@ -116,14 +116,16 @@ def _patient_info(self):
])
return patient_info

def _variant_data(self, top_vaccine_peptide):
def _variant_data(self, variant, top_vaccine_peptide):
"""
Returns an OrderedDict with info used to populate variant info section.
"""
variant_data = OrderedDict()
mutant_protein_fragment = top_vaccine_peptide.mutant_protein_fragment
top_score = _sanitize(top_vaccine_peptide.combined_score)
igv_locus = "chr%s:%d" % (variant.contig, variant.start)
variant_data = OrderedDict([
('IGV locus', igv_locus),
('Gene name', mutant_protein_fragment.gene_name),
('Top score', top_score),
('RNA reads supporting variant allele', mutant_protein_fragment.n_alt_reads),
Expand Down Expand Up @@ -300,7 +302,7 @@ def compute_template_data(self):
num += 1

top_peptide = vaccine_peptides[0]
variant_data = self._variant_data(top_peptide)
variant_data = self._variant_data(variant, top_peptide)
predicted_effect = top_peptide.mutant_protein_fragment.predicted_effect()
effect_data = self._effect_data(predicted_effect)

Expand Down

0 comments on commit e3e4054

Please sign in to comment.