Path to bam files in --bam_list bcftools mpileup
0
0
Entering edit mode
4.2 years ago
User000 ▴ 690

Hello,

I want to do variant calling of my multiple bam files.

rule bcftools:
    input:
        ref="genome.fa",
        bam="/path/to/bam_list",
    output:
        outf ="chr.vcf"
    shell:
        "bcftools mpileup -f {input.ref} --bam-list {input.bam} |"  
        "bcftools call -vcO v {output.outf}"

bam_list:

bob.bam
john.bam
carl.bam
...
so on

If I do not specify the path of each bam file in the bam_list, it cannot find it. But if I specify in my final vcf file, the path will be included in each column of the genotype name (which is annoying and long since I have many bam files). How can I specify one single path to all my bam files?

EDIT: I specified the working directory and it works, if there are any other solutions good to know anyway.

bcftools bam • 1.8k views
ADD COMMENT

Login before adding your answer.

Traffic: 2849 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6