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

when running bwameth example, exception: AttributeError: module 'toolshed.files' has no attribute 'prefunc' #89

Closed teryyoung closed 11 months ago

teryyoung commented 11 months ago

when i run: bwameth.py`` --reference ref.fa t_R1.fastq.gz t_R2.fastq.gz -t 12 | samtools view -b - > bwa-meth.bam

there's exception that:

_Found BWA MEM index running: /share/home/yangLab/yangyi/miniconda3/bin/python /share/apps/softwares/bwa-meth-master/bwameth.py c2t t_R1.fastq.gz t_R2.fastq.gz |bwa mem -T 40 -B 2 -L 10 -CM -U 100 -p -R '@RG\tID:t_R\tSM:t_R' -t 12 ref.fa.bwameth.c2t /dev/stdin

Traceback (most recent call last): File "/share/apps/softwares/bwa-meth-master/bwameth.py", line 559, in main(sys.argv[1:]) File "/share/apps/softwares/bwa-meth-master/bwameth.py", line 550, in main bwa_mem(args.reference, conv_fqs_cmd, ' '.join(map(str, pass_through_args)), File "/share/apps/softwares/bwa-meth-master/bwameth.py", line 370, in bwa_mem as_bam(cmd, fa, set_as_failed, do_not_penalize_chimeras) File "/share/apps/softwares/bwa-meth-master/bwameth.py", line 380, in as_bam sam_iter = nopen_keep_parent_stdin(pfile, 'r') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/share/apps/softwares/bwa-meth-master/bwameth.py", line 60, in nopen_keep_parent_stdin preexec_fn=toolshed.files.prefunc, ^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'toolshed.files' has no attribute 'prefunc' [mainsamview] fail to read the header from "-".

my toolshed version is 0.4.0, which version of toolshed should i use?

brentp commented 11 months ago

you'll need a newer version of toolshed: https://github.com/brentp/bwa-meth/issues/56#issuecomment-1011812977

teryyoung commented 11 months ago

@brentp thanks very much, I got a lateset version toolshed, and it worked.