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

Problem of forget to indel alignment-quality to your bam-file #133

Open
Xiang-Leo opened this issue Jun 26, 2023 · 4 comments
Open

Problem of forget to indel alignment-quality to your bam-file #133

Xiang-Leo opened this issue Jun 26, 2023 · 4 comments

Comments

@Xiang-Leo
Copy link

Hi, I met the problem of WARNING(lofreq_call.c|main_call): 5 indel calls (before filtering) were made without indel alignment-quality! Did you forget to indel alignment-quality to your bam-file? when I ran lofreq within Snakemake.
Here are the rules:

rule indelqual:
    input:
        bam = "03_map2covid.sort.bam"
    output:
        "05_map2covid.lofreq.indelqual.bam"
    params:
        ref = "NC_045512.2.fasta"
    shell:
        "lofreq indelqual --dindel -f {params.ref} -o {output} {input.bam}"


rule alnqual:
    input:
        bam = "05_map2covid.lofreq.indelqual.bam"
    output:
        "06_map2covid.lofreq.alqual.bam"
    params:
        ref = "NC_045512.2.fasta"
    shell:
        "lofreq alnqual -b {input.bam} {params.ref} > {output} "


rule lofreq_call:
    input:
        indelqual = "06_map2covid.lofreq.alqual.bam"
    output:
        "07_map2covid.lofreq.vcf"
    params:
        ref = "NC_045512.2.fasta"
    shell:
        "lofreq call --call-indels -f {params.ref} -o {output} 

It's quite strange since there are no problems when run one file with snakemake, but if there are several files to run, it report error of indel alignment-quality.

@andreas-wilm
Copy link
Contributor

Hi @Xiang-Leo,

This look more like a problem with the workflow itself. The commands in those rules look fine. I can't see what is actually being used in rule lofreq_call though, because the code is clipped at the end (and the input naming looks a bit weird: in the rules above you used bam as variable).

Best,
Andreas

@Xiang-Leo
Copy link
Author

I'm sorry for the clipped command. Actually I run three commands:

lofreq indelqual --dindel -f NC_045512.2.fasta -o 05_map2covid.lofreq.indelqual.bam 03_map2covid.sort.bam    # 05_map2covid.lofreq.indelqual.bam means the generated quality file
lofreq alnqual -b 05_map2covid.lofreq.indelqual.bam NC_045512.2.fasta > 06_map2covid.lofreq.alqual.bam
lofreq call --call-indels -f NC_045512.2.fasta -o 07_map2covid.lofreq.vcf 06_map2covid.lofreq.alqual.bam

Usually, if there are 3 or less files, it will report no problems. While I run snakemake with more then 10 files, it will report without indel alignment-quality

@Xiang-Leo
Copy link
Author

Also, when I run these commands step by step, it also report the warning WARNING(lofreq_call.c|main_call): 1 indel calls (before filtering) were made without indel alignment-quality! Did you forget to indel alignment-quality to your bam-file?. I'm sure that I ran lofreq indelqual and lofreq alnqual.
Here is an example: ERR10695916

@andreas-wilm
Copy link
Contributor

Hi @Xiang-Leo,

The series of commands you gave looks correct, i.e.:

lofreq indelqual --dindel -f NC_045512.2.fasta -o 05_map2covid.lofreq.indelqual.bam 03_map2covid.sort.bam
lofreq alnqual -b 05_map2covid.lofreq.indelqual.bam NC_045512.2.fasta > 06_map2covid.lofreq.alqual.bam
lofreq call --call-indels -f NC_045512.2.fasta -o 07_map2covid.lofreq.vcf 06_map2covid.lofreq.alqual.bam

I assume you removed the indexing commands for the sake of brevity.

The fact that the behaviour changes with more files, hints at a workflow problem. Can you see how the Snakemake commands change between one working input and one input that doesn't work?

Thanks,
Andreas

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