tseemann / snippy

:scissors: :zap: Rapid haploid variant calling and core genome alignment
GNU General Public License v2.0
474 stars 115 forks source link

[E::bwa_set_rg] no ID within the read group line #491

Open safinaARK opened 2 years ago

safinaARK commented 2 years ago

Dear tseemann, I m using snippy multi but samples are failing on RG tag. Can you please help me with this error. I have installed snippy using mamba. I think something is wrong with bwa..

[13:45:22] This is snippy 3.1
[13:45:22] Written by Torsten Seemann <torsten.seemann@gmail.com>
[13:45:22] Obtained from https://github.com/tseemann/snippy
[13:45:22] Detected operating system: linux
[13:45:22] Enabling bundled linux tools.
[13:45:22] Found bwa - /home/sar/miniconda3/envs/snippy/bin/bwa
[13:45:22] Found samtools - /home/sar/miniconda3/envs/snippy/bin/samtools
[13:45:22] Found tabix - /home/sar/miniconda3/envs/snippy/bin/tabix
[13:45:22] Found bgzip - /home/sar/miniconda3/envs/snippy/bin/bgzip
[13:45:22] Found snpEff - /home/sar/miniconda3/envs/snippy/bin/snpEff
[13:45:22] Found java - /home/sar/miniconda3/envs/snippy/bin/java
[13:45:22] Found gzip - /usr/bin/gzip
[13:45:22] Found parallel - /home/sar/miniconda3/envs/snippy/bin/parallel
[13:45:22] Found freebayes - /home/sar/miniconda3/envs/snippy/bin/freebayes
[13:45:22] Found freebayes-parallel - /home/sar/miniconda3/envs/snippy/bin/freebayes-parallel
[13:45:22] Found fasta_generate_regions.py - /home/sar/miniconda3/envs/snippy/bin/fasta_generate_regions.py
[13:45:22] Found vcfstreamsort - /home/sar/miniconda3/envs/snippy/bin/vcfstreamsort
[13:45:22] Found vcfuniq - /home/sar/miniconda3/envs/snippy/bin/vcfuniq
[13:45:22] Found vcffirstheader - /home/sar/miniconda3/envs/snippy/bin/vcffirstheader
[13:45:22] Found vcf-consensus - /home/sar/miniconda3/envs/snippy/bin/../binaries/noarch/vcf-consensus
[13:45:22] Found snippy-vcf_to_tab - /home/sar/miniconda3/envs/snippy/bin/snippy-vcf_to_tab
[13:45:22] Found snippy-vcf_report - /home/sar/miniconda3/envs/snippy/bin/snippy-vcf_report
[13:45:22] Found snippy-vcf_filter - /home/sar/miniconda3/envs/snippy/bin/snippy-vcf_filter
[13:45:22] Using reference: /mnt/e/Working/Shigella/Data/shigella_sonnie/asia/snippy_sonn_asia/sonnei.gbk
[13:45:22] Treating reference as 'genbank' format.
[13:45:22] Will use 4 CPU cores.
[13:45:22] Using read file: /mnt/e/Working/Shigella/Data/shigella_sonnie/asia/snippy_sonn_asia/../ERR024095_1.fastq.gz
[13:45:22] Using read file: /mnt/e/Working/Shigella/Data/shigella_sonnie/asia/snippy_sonn_asia/../ERR024095_2.fastq.gz
[13:45:22] Creating folder: ERR024095
[13:45:22] Changing working directory: ERR024095
[13:45:22] Creating reference folder: reference
[13:45:22] Extracting FASTA and GFF from reference.
[13:45:24] Wrote 1 sequences to ref.fa
[13:45:24] Wrote 4601 features to ref.gff
[13:45:24] Creating reference/snpeff.config
[13:45:24] Freebayes will process 16 chunks of 302639 bp, 4 chunks at a time.
[13:45:24] Using BAM RG (Read Group) ID: ERR024095
[13:45:24] Running: samtools faidx reference/ref.fa 2>> ERR024095.log
[13:45:24] Running: bwa index reference/ref.fa 2>> ERR024095.log
[13:45:28] Running: mkdir reference/genomes && cp -f reference/ref.fa reference/genomes/ref.fa 2>> ERR024095.log
[13:45:28] Running: mkdir reference/ref && bgzip -c reference/ref.gff > reference/ref/genes.gff.gz 2>> ERR024095.log
[13:45:28] Running: snpEff build -c reference/snpeff.config -dataDir . -gff3 ref 2>> ERR024095.log
[13:45:32] Running: (bwa mem  -v 2 -M -R '@RG   ID:ERR024095    SM:ERR024095' -t 4 reference/ref.fa /mnt/e/Working/Shigella/Data/shigella_sonnie/asia/snippy_sonn_asia/../ERR024095_1.fastq.gz /mnt/e/Working/Shigella/Data/shigella_sonnie/asia/snippy_sonn_asia/../ERR024095_2.fastq.gz | samtools view -@ 4 -F 3844 -q 60 -S -b -u -T reference/ref.fa - | samtools sort -O bam -o ERR024095.bam -@ 4 -) 2>> ERR024095.log
[13:45:32] Error running command, check ERR024095/ERR024095.log`

The log:

### samtools faidx reference/ref.fa

### bwa index reference/ref.fa

[bwa_index] Pack FASTA... 0.03 sec
[bwa_index] Construct BWT for the packed sequence...
[bwa_index] 1.54 seconds elapse.
[bwa_index] Update BWT... 0.02 sec
[bwa_index] Pack forward-only FASTA... 0.02 sec
[bwa_index] Construct SA from BWT and Occ... 0.72 sec
[main] Version: 0.7.17-r1188
[main] CMD: bwa index reference/ref.fa
[main] Real time: 3.114 sec; CPU: 2.335 sec

### mkdir reference/genomes && cp -f reference/ref.fa reference/genomes/ref.fa

### mkdir reference/ref && bgzip -c reference/ref.gff > reference/ref/genes.gff.gz

### snpEff build -c reference/snpeff.config -dataDir . -gff3 ref

WARNING: All frames are zero! This seems rather odd, please check that 'frame' information in your 'genes' file is accurate.

### (bwa mem  -v 2 -M -R '@RG   ID:ERR024095    SM:ERR024095' -t 4 reference/ref.fa /mnt/e/Working/Shigella/Data/shigella_sonnie/asia/snippy_sonn_asia/../ERR024095_1.fastq.gz /mnt/e/Working/Shigella/Data/shigella_sonnie/asia/snippy_sonn_asia/../ERR024095_2.fastq.gz | samtools view -@ 4 -F 3844 -q 60 -S -b -u -T reference/ref.fa - | samtools sort -O bam -o ERR024095.bam -@ 4 -)

[E::bwa_set_rg] the read group line contained literal <tab> characters -- replace with escaped tabs: \t
[main_samview] fail to read the header from "-".
samtools sort: failed to read header from "-" 

Thanks

SAR

leejianhai commented 7 months ago

I have the same problem, did you find a solution?