Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running PureCN with only one normal samples #341

Open
sleyn opened this issue Jan 5, 2024 · 1 comment
Open

Running PureCN with only one normal samples #341

sleyn opened this issue Jan 5, 2024 · 1 comment
Labels

Comments

@sleyn
Copy link

sleyn commented Jan 5, 2024

Hello!

I have to questions:

  1. What is the recommended way to run PureCN with only one normal sample (if there is any)?
  2. Related to this more technical - why does the minimum coverage value is used differently with and without NormalDB (explained below)?

NormalDB.R refuses to build NormalDB with less than two samples. I know that PureCN manual recommends using panel of normals but I want to look at the results with only one normal to investigate some issues with the data.

I'm trying to run:

Rscript \
    /opt/PureCN/PureCN.R \
    --out . \
    --cores 4 \
    --fun-segmentation CBS \
    --genome hg19 \
    --intervals data/interval.txt \
    --vcf data/sample1.vcf.filtered.vcf.gz \
    --normal data/normal1.bam_coverage_loess.txt.gz \
    --post-optimize \
    --sampleid sample1 \
    --snp-blacklist data/hg19_simpleRepeats.bed \
    --tumor data/sample1.bam_coverage_loess.txt.gz

This way PureCN finishes without errors but removes all off-target intervals due to low coverage.

I've traced this issue and found that in the filterIntervals function there is code:

    if (!is.null(normalDB)) {
        min.coverage <- min.coverage / 10000
        flog.info("normalDB provided. Setting minimum coverage for segmentation to %.4fX.", min.coverage)
    } else {
        flog.warn("No normalDB provided. Provide one for better results.")
    }

If NormalDB is provided min.coverage value decreases 4 times but if not - it is remained untouched and 15X is too high for off-target coverage. Is it intended behavior?

@lima1
Copy link
Owner

lima1 commented Jan 5, 2024

Hi @sleyn

I'm pretty sure this code pre-dates off-target support and also the switch from average coverage to counts. This code basically ignores the min.coverage when normalDB is provided because poor baits coverage filtering is all taken care of there. Good catch. I'll need to dig into this ancient code to find a better solution without normalDB.

Thanks again for letting me know. Your bug reports have been super helpful!

Markus

@lima1 lima1 added the bug label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants