Skip to content

Bug with different number of chromosomes in SNV, mean_tcn and avail_cn files #16

Description

@ivazquez

There is a bug when running cloneHD in SNV mode with --snv ${snv}, --avail-cn ${avail_cn} and --mean-tcn ${mean_tcn}. If the number of chromosomes in ${avail_cn} is greater than the number of chromosomes in ${snv}, cloneHD exits with a segmentation fault. @vmustonen has tested this for get_avail_cn in cloneHD-functions.cpp, but it may also affect get_mean_tcn.

The problem only seems to happen if the last chr in ${avail_cn} does not have any SNV hits. One can skip intermediate chrs without a problem so this seems to be a boundary case that has not occurred. This corner case is very rare with whole-genome data, but it is likely to cause problem for exome data.

We should build a safe guard, such that the chr count in ${avail_cn} should only run to max(SNVs chr). A solution would be to set max(SNVs chr)== max(avail-cn chr).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions