8000 Phasing somatic SNP/INDEL/SV/5mc · Issue #92 · twolinin/longphase · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Phasing somatic SNP/INDEL/SV/5mc #92

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 r 8000 elated emails.

Already on GitHub? Sign in to your account

Open
DayTimeMouse opened this issue Nov 28, 2024 · 4 comments
Open

Phasing somatic SNP/INDEL/SV/5mc #92

DayTimeMouse opened this issue Nov 28, 2024 · 4 comments

Comments

@DayTimeMouse
Copy link

Hi,

Thanks for developing this nice tool.

I have called somatic SNP/indel/SV/5mc, then I want to phase somatic SNP/indel/SV/5mc. I also called germline SNP variants by Clair3, and then how to use SNP, SV and modification co-phasing? Should I call germline SV varaints(using normal or tumor)? Could you give some detail ideas?

Below is my script for phasing somatic SNP/INDEL and haplotagging bam file. How can I modify this script to get SNP, SV and modification co-phasing?

bcftools concat -a clair3_tumor_germline_output.PASS.vcf.gz sample.somatic_small_variants.PASS.vcf.gz | bcftools sort -Oz -o merged.vcf.gz
longphase phase -r genome.fa -s merged.vcf.gz -b hifi_tumor.bam -t 30 --pb -o tmp.phased
longphase haplotag -r genome.fa -s tmp.phased.vcf -b hifi_tumor.bam -t 30 -o tumor.longphase

Best regrads.

@ythuang0522
Copy link
Collaborator

Hi @DayTimeMouse

Should I call germline SV varaints (using normal or tumor)?
If you are inetersted in germline SV, you should use normal.bam for SV calling.
However, if you are only interested in somatic SVs, you should use tumor bam for SV calling.
In terms of co-phasing, you shoudn't mix normal and tumor vcf during the process.
e.g.,
longphase -b tumor.bam --sv-file tumor.sv.vcf -s tumor.snp.vcf --indels ...

For including 5mC, assuming you are interested in tumors, you should run modcall on tumor.bam to generated mod vcf (e.g., tumor.mod.vcf).
longphase modcall -b alignment.bam -r reference.fasta --indels ...

Below is my script for phasing somatic SNP/INDEL and haplotagging bam file. How can I modify this script to get SNP, SV and modification co-phasing?
longphase -b tumor.bam --sv-file tumor.sv.vcf -s tumor.snp.vcf --mod-file tumor.mod.vcf --indels...

We don't know why you merge clair3_tumor_germline_output.PASS.vcf.gz (assuming tumor?) and sample.somatic_small_variants.PASS.vcf.gz (assuming somatic?) and hope you don't mix the normal and tumor vcfs during phasing.

@DayTimeMouse
Copy link
Author

Hi ythuang0522,

We don't know why you merge clair3_tumor_germline_output.PASS.vcf.gz (assuming tumor?) and sample.somatic_small_variants.PASS.vcf.gz (assuming somatic?) and hope you don't mix the normal and tumor vcfs during phasing.

Because I want to phase somatic variants, so I used germline.vcf and somatic.vcf as the input of Longphase.
I am referring to the workflow at PacificBiosciences/HiFi-somatic-WDL to implement phasing for somatic variants. If there are any errors, please let me know, or do you have other ideas fo this? Thanks in advance.

phasing.wdl (Line 110-178)

    bcftools concat -a ~{vcf} ~{somatic_SNP_indel_vcf} | bcftools sort -Oz -o merged.vcf.gz

    longphase phase \
        -r ~{ref_fasta} \
        -s merged.vcf.gz \
        -b ~{bam} \
        -t ~{threads} \
        --pb \
        -o tmp.phased

    longphase haplotag \
        -r ~{ref_fasta} \
        -s tmp.phased.vcf \
        -b ~{bam} \
        -t ~{threads} \
        -o ~{sub(basename(bam), "\\.bam$", ".longphase")}

@ythuang0522
Copy link
Collaborator
ythuang0522 commented Nov 28, 2024

If you are interested in the haplotype background of somatic and adjacent germline variants, this is an adequate solution at this moment. The downside is the phasing blocks (range) are much smaller in the tumor.bam than the ordinary phaing in the normal.bam due to tumor heterogenity, complex SVs, .... We have developed a new solution for somatic/clonal phasing and tagging in tumor/normal paired samples. We shall release a major update of this feature once all the tests have been completed.

@DayTimeMouse
Copy link
Author

Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0