brentp / bwa-meth

fast and accurate alignment of BS-Seq reads using bwa-mem and a 3-letter genome
https://arxiv.org/abs/1401.1129
MIT License
144 stars 54 forks source link

error with bwa-mem -R #53

Closed crazyhottommy closed 6 years ago

crazyhottommy commented 6 years ago

Hi Brent,

I am aware of https://github.com/tseemann/snippy/issues/100 I am using bwa/0.7.10. but I checked https://github.com/brentp/bwa-meth/blob/master/bwameth.py, it seems you already took care of it https://github.com/brentp/bwa-meth/blob/master/bwameth.py#L293 by escaping the tab rg = '@RG\\tID:{rg}\\tSM:{rg}'.format(rg=rg)

what's wrong here?

python /scratch/genomic_med/apps/bwa-meth/bwa-meth-0.2.0/bwameth.py --threads 8 --reference /scratch/genomic_med/apps/annot/bwa_meth_index/UCSC_hg19_genome.fa 01trimmed_fastqs/Panc1_Exo1_trimmed.fq                     --read-group '@RG   ID:Panc1_Exo1   SM:Panc1_Exo1'
running: bwa mem -T 40 -B 2 -L 10 -CM -R '@RG   ID:Panc1_Exo1   SM:Panc1_Exo1' -t 8  /scratch/genomic_med/apps/annot/bwa_meth_index/UCSC_hg19_genome.fa.bwameth.c2t '</scratch/genomic_med/apps/python/anaconda/default/bin/python /scratch/genomic_med/apps/bwa-meth/bwa-meth-0.2.0/bwameth.py c2t 01trimmed_fastqs/Panc1_Exo1_trimmed.fq NA'
[E::bwa_set_rg] no ID at the read group line
Traceback (most recent call last):
  File "/scratch/genomic_med/apps/bwa-meth/bwa-meth-0.2.0/bwameth.py", line 450, in <module>
    main(sys.argv[1:])
  File "/scratch/genomic_med/apps/bwa-meth/bwa-meth-0.2.0/bwameth.py", line 447, in main
    set_as_failed=args.set_as_failed)
  File "/scratch/genomic_med/apps/bwa-meth/bwa-meth-0.2.0/bwameth.py", line 273, in bwa_mem
    as_bam(cmd, fa, set_as_failed)
  File "/scratch/genomic_med/apps/bwa-meth/bwa-meth-0.2.0/bwameth.py", line 290, in as_bam
    raise Exception("bad or empty fastqs")
Exception: bad or empty fastqs

thanks.

crazyhottommy commented 6 years ago

sorry about that, I provided rg through my snakemake file.. and I did not escape the tab there. https://gitlab.com/tangming2005/pyflow-RRBSeq/blob/master/Snakefile#L134