Repository: griffithlab/VAtools

Issue:
Inaccurate warning message when running vcf-expression-annotator
very minor, but if a gene is not found when running vcf-expression-annotator the warning message still says:
```WARNING:root:12 of 382 transcripts did not have an expression entry for their gene id.```
from
```vcf-expression-annotator SCLC20_R_LN.vatools_anno_6.vcf /storage1/fs1/rgovindan/Active/rnaAnalysis/phase0/expression/SCLC20_R_LN.kallisto_gene_abundance.tsv kallisto gene -s TUMOR -o SCLC20_R_LN.vatools_anno_7.vcf```

Discussion:

Patch:
diff --git a/vatools/vcf_expression_annotator.py b/vatools/vcf_expression_annotator.py
index a094bad..29d7b6f 100644
--- a/vatools/vcf_expression_annotator.py
+++ b/vatools/vcf_expression_annotator.py
@@ -225,7 +225,7 @@ def main(args_input = sys.argv[1:]):
     vcf_writer.close()
 
     if missing_expressions_count > 0:
-        logging.warning("{} of {} transcripts did not have an expression entry for their {} id.".format(missing_expressions_count, entry_count, args.mode))
+        logging.warning("{} of {} {}s did not have an expression entry for their {} id.".format(missing_expressions_count, entry_count, args.mode, args.mode))
 
 if __name__ == '__main__':
     main()


Test patch:
diff --git a/tests/test_vcf_expression_annotator.py b/tests/test_vcf_expression_annotator.py
index 21a037c..276ba10 100644
--- a/tests/test_vcf_expression_annotator.py
+++ b/tests/test_vcf_expression_annotator.py
@@ -165,7 +165,7 @@ class VcfExpressionEncoderTests(unittest.TestCase):
             ]
             vcf_expression_annotator.main(command)
             temp_path.cleanup()
-            l.check_present(('root', 'WARNING', "1 of 1 transcripts did not have an expression entry for their gene id."))
+            l.check_present(('root', 'WARNING', "1 of 1 genes did not have an expression entry for their gene id."))
 
     def test_multi_sample_vcf(self):
         temp_path = tempfile.TemporaryDirectory()