You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To reproduce the bug: find a tumor-normal sample with only one complete chromosome deletion. This deletion must be homozygous. Slack me for specific tumor-normal examples from IMPACT.
Situation: when there are no *“existing” chromosomes in chr_del, the calculation sets segs_loh to NA/NULL and we lose all HRDLOH information for that sample. For example, a sample segs dataframe has chrom=19, but entire chromosome 19 is 0:0 (mcn:lcn), so chromosome 19 gets filtered out at initial step, and no longer exists in segs_loh to be filtered out by chr_del list. Since chrom 19 is the only deleted chromosome and happens to be a homozygous deletion, the calculation is trying to pass something that exists in chr_del but doesn't exist in segs_loh when trying to filter out that chromosome in the final step. If chromosome 19 was a heterozygous deletion 1:0 (mcn:lcn), this error would not occur. If chromosome 20 was deleted as well (1:0), this error would not occur.
once filtered out, then chrom 19 no longer exists in segs_loh (but still exists in chr_del)
“Final” step of HRDLOH calculation after filtering out 0:0 segments: segs_loh = segs_loh[-which(segs_loh$chrom %in% chr_del)
Potential solutions:
Move the “final” step chronologically above the "initial" step? May cause yet foreseen bugs
Change base R final step solution to a dplyr method that can better handle the NA/Null that is created when there are “existing” chromosomes in chr_del but not segs_loh i.e.:
calculate_hrdloh function bug
To reproduce the bug: find a tumor-normal sample with only one complete chromosome deletion. This deletion must be homozygous. Slack me for specific tumor-normal examples from IMPACT.
Situation: when there are no *“existing” chromosomes in chr_del, the calculation sets segs_loh to NA/NULL and we lose all HRDLOH information for that sample. For example, a sample segs dataframe has chrom=19, but entire chromosome 19 is 0:0 (mcn:lcn), so chromosome 19 gets filtered out at initial step, and no longer exists in segs_loh to be filtered out by chr_del list. Since chrom 19 is the only deleted chromosome and happens to be a homozygous deletion, the calculation is trying to pass something that exists in chr_del but doesn't exist in segs_loh when trying to filter out that chromosome in the final step. If chromosome 19 was a heterozygous deletion 1:0 (mcn:lcn), this error would not occur. If chromosome 20 was deleted as well (1:0), this error would not occur.
“Initial” step of HRDLOH calculation:
segs_loh = segs_loh[which(segs_loh$lcn == 0 & segs_loh$mcn != 0), ]
once filtered out, then chrom 19 no longer exists in segs_loh (but still exists in chr_del)
“Final” step of HRDLOH calculation after filtering out 0:0 segments:
segs_loh = segs_loh[-which(segs_loh$chrom %in% chr_del)
Potential solutions:
*“exisiting”: chromosomes that are in the chr_del list but not in segs_loh dataframe
The text was updated successfully, but these errors were encountered: