snippy
snippy copied to clipboard
BCFtools command reads read group as sample ID
Hi Torsten,
My snippy analysis progresses well creating the expected output files using $sample as prefix, but errors when the BCFtools 'consensus' command is run, as the read group specified by '--rgid' snippy flag is mistakenly used as the value for BCFtools '--sample' flag:
- Tail of the log:
$ tail 7346.log
### bcftools convert -Oz -o 7346.vcf.gz 7346.vcf
### bcftools index -f 7346.vcf.gz
### bcftools consensus --sample 000000000-C56FR.1_7346_1\tPL:illumina\tPU:000000000-C56FR.1\tSM:7346\tLB:7346_1\tCN:AGRF -f reference/ref.fa -o 7346.consensus.fa 7346.vcf.gz
No such sample: 000000000-C56FR.1_7346_1tPL:illuminatPU:000000000-C56FR.1tSM:7346tLB:7346_1tCN:AGRF
- Directory listing for $sample:
$ ls -lhtr
total 64M
lrwxrwxrwx 1 cwil2281 RDS-FVS-Microbiome_long-RW 20 Dec 10 06:45 ref.fa.fai -> reference/ref.fa.fai
lrwxrwxrwx 1 cwil2281 RDS-FVS-Microbiome_long-RW 16 Dec 10 06:45 ref.fa -> reference/ref.fa
-rw-r--r-- 1 cwil2281 RDS-FVS-Microbiome_long-RW 60M Dec 10 06:45 7346.bam
drwxr-sr-x 4 cwil2281 RDS-FVS-Microbiome_long-RW 4.0K Dec 10 06:45 reference
-rw-r--r-- 1 cwil2281 RDS-FVS-Microbiome_long-RW 4.5K Dec 10 06:45 7346.bam.bai
-rw-r--r-- 1 cwil2281 RDS-FVS-Microbiome_long-RW 1.8M Dec 10 06:45 7346.raw.vcf
-rw-r--r-- 1 cwil2281 RDS-FVS-Microbiome_long-RW 527K Dec 10 06:45 7346.filt.vcf
-rw-r--r-- 1 cwil2281 RDS-FVS-Microbiome_long-RW 527K Dec 10 06:46 7346.vcf
-rw-r--r-- 1 cwil2281 RDS-FVS-Microbiome_long-RW 175K Dec 10 06:46 7346.tab
-rw-r--r-- 1 cwil2281 RDS-FVS-Microbiome_long-RW 800 Dec 10 06:46 7346.vcf.gz.csi
-rw-r--r-- 1 cwil2281 RDS-FVS-Microbiome_long-RW 114K Dec 10 06:46 7346.vcf.gz
-rw-r--r-- 1 cwil2281 RDS-FVS-Microbiome_long-RW 513K Dec 10 06:46 7346.subs.vcf
-rw-r--r-- 1 cwil2281 RDS-FVS-Microbiome_long-RW 3.4K Dec 10 06:46 7346.log
- The snippy command:
snippy --cpus $NCPUS \
--ram 47 \
--reference $ref \
--R1 $fq1 \
--R2 $fq2 \
--outdir ./Variants/${sample} \
--force \
--prefix $sample \
--unmapped \
--basequal 20 \
--minqual 200 \
--rgid "${flowcell}.${lane}_${sample}_${lib}\tPL:${platform}\tPU:${flowcell}.${lane}\tSM:${sample}\tLB:${sample}_${lib}\tCN:${centre}"
Thanks a lot, Cali