• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openvax / topiary / 24209217670

09 Apr 2026 07:27PM UTC coverage: 86.507% (+0.4%) from 86.074%
24209217670

Pull #100

github

iskandr
Rename norm→left_cdf/right_cdf, add hinge, aggregations, update docs

Rename survival/norm_lower → right_cdf, norm → left_cdf (keep norm as alias):
- left_cdf(mean, std): higher input → higher output (for scores)
- right_cdf(mean, std): lower input → higher output (for IC50, rank)

Add hinge() = max(0, x) on Expr.

Add aggregation functions for combining multiple expressions:
- mean(), geomean(), minimum(), maximum(), median()
- All skip NaN values; geomean skips non-positive
- Work with qualified fields: mean(Affinity["netmhcpan"].logistic(...), ...)

Update all docs and README:
- filter → filter_by in all examples
- norm → left_cdf/right_cdf with direction documentation
- Aggregation functions in transforms section and API reference
- hinge in transforms table

Bump version to 4.6.0.
Pull Request #100: DSL polish: direction docs, log2/log1p, filter_by, parser errors

91 of 105 new or added lines in 4 files covered. (86.67%)

1449 of 1675 relevant lines covered (86.51%)

2.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/topiary/cli/script.py
1
# Licensed under the Apache License, Version 2.0 (the "License");
2
# you may not use this file except in compliance with the License.
3
# You may obtain a copy of the License at
4
#
5
#       http://www.apache.org/licenses/LICENSE-2.0
6
#
7
# Unless required by applicable law or agreed to in writing, software
8
# distributed under the License is distributed on an "AS IS" BASIS,
9
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
# See the License for the specific language governing permissions and
11
# limitations under the License.
12

13
"""
14
Script to generate epitope predictions from somatic cancer variants
15
and (optionally) tumor RNA-seq data.
16

17
Example usage:
18
    topiary \
19
        --mhc-predictor netmhcpan
20
        --mhc-alleles-file HLA.txt
21
        --vcf somatic.vcf
22
        --rna-gene-fpkm-file genes.fpkm_tracking
23
        --rna-transcript-fpkm-file isoforms.fpkm_tracking
24
        --filter-ic50 500
25
        --filter-percentile 2
26
        --output results.csv
27
"""
28

29
import sys
×
30

NEW
31
import argcomplete
×
32

33
from .args import arg_parser, predict_epitopes_from_args
×
34

35
from .outputs import write_outputs
×
36

37

38
def parse_args(args_list=None):
×
39
    if args_list is None:
×
40
        args_list = sys.argv[1:]
×
NEW
41
    argcomplete.autocomplete(arg_parser)
×
42
    return arg_parser.parse_args(args_list)
×
43

44

45
def main(args_list=None):
×
46
    """
47
    Script entry-point to predict neo-epitopes from genomic variants using
48
    Topiary.
49
    """
50
    args = parse_args(args_list)
×
51
    print("Topiary commandline arguments:")
×
52
    print(args)
×
53
    df = predict_epitopes_from_args(args)
×
54
    write_outputs(df, args)
×
55
    print("Total count: %d" % len(df))
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc