Skip to content

arcasHLA quant fails when kallisto counts nothing for all alleles of a gene #8

Description

@jonasfreimuth

It may (apparently) happen that Kallisto with the customized index for a given patient will not count any transcripts mapping to any allele of a gene (i.e., the total transcript count for a gene is zero), which will lead to errors during baf computation due to division by zero (see below).

arcasHLA/scripts/quant.py

Lines 282 to 285 in 8ba97fb

baf = allele_results[gene]["allele1_count"] / (
allele_results[gene]["allele1_count"]
+ allele_results[gene]["allele2_count"]
)

Easiest mitigation would be to just check and report NAs for that gene (probably).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions