Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gene name to report #202

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions vaxrank/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ def new_columns():
("pos", []),
("ref", []),
("alt", []),
("gene_name", []),
("variant_rank", []),
("peptide_rank", []),
("mutation_start", []),
Expand Down Expand Up @@ -512,7 +513,7 @@ def make_minimal_neoepitope_report(
worksheet.set_column('%s:%s' % ('G', 'G'), 30)
worksheet.set_column('%s:%s' % ('H', 'H'), 9)
worksheet.set_column('%s:%s' % ('I', 'I'), 18)
writer.save()
writer.close()
logger.info('Wrote XLSX neoepitope report file to %s', excel_report_path)


Expand Down Expand Up @@ -546,6 +547,7 @@ def make_csv_report(
columns["pos"].append(variant.original_start)
columns["ref"].append(variant.original_ref)
columns["alt"].append(variant.original_alt)
columns["gene_name"].append(vaccine_peptide.mutant_protein_fragment.gene_name)
columns["variant_rank"].append(i + 1)
columns["peptide_rank"].append(j + 1)
columns["amino_acids"].append(vaccine_peptide.mutant_protein_fragment.amino_acids)
Expand Down Expand Up @@ -596,5 +598,5 @@ def make_csv_report(
df.to_excel(writer, sheet_name=shortened_sheet_name, index=False)
resize_columns(writer.sheets[shortened_sheet_name], 'A', 'C')

writer.save()
writer.close()
logger.info('Wrote manufacturer XLSX file to %s', excel_report_path)
Loading