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
139 stars 53 forks source link

Multiple sets of FASTQ files #5

Closed superbobry closed 10 years ago

superbobry commented 10 years ago

The current documentation states that it's possible to pass a bunch of paired reads, eg

$ bwameth.py --reference $REF foo_1.fastq,foo_2.fastq bar_1.fastq,bar_2.fastq
Traceback (most recent call last):
  File "/home/user/.virtualenvs/env/bin/bwameth.py", line 581, in <module>
    main(sys.argv[1:])
  File "/home/user/.virtualenvs/env/bin/bwameth.py", line 576, in main
    rname(*args.fastqs), calmd=args.calmd,
TypeError: rname() takes at most 2 arguments (3 given)

However, args.fastqs are handled in way which makes this use-case impossible.

superbobry commented 10 years ago

I think I misread the documentation, sorry.

To prevent this kind of errors, I think it would be nice if bwameth accepted paired reads in a way similar to Bowtie:

$ bwameth.py --reference $REF -1 foo_1.fastq, bar_1.fastq -2 foo_2.fastq, bar_2.fastq
brentp commented 10 years ago

@superbobry it handles them like this:

bwameth.py --reference $REF foo_1.fastq,bar_1.fastq foo_2.fastq,bar_2.fastq

Does that work for you?

superbobry commented 10 years ago

Yes, this worked, thank you. My proposal was to make bwameth more robust to this kind of errors by adding separate -1 and -2 arguments for paired mode.

brentp commented 10 years ago

closing this as I'd like to keep the simplicity of positional args for the most common case.