Entering edit mode
5.1 years ago
User000
▴
750
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.
Hello, it looks like if you give full path in the
bam_list
file, the vcf will automatically keep sample name only.