BigelowLab / edna-dada2

Maine eDNA dada2
0 stars 0 forks source link

cutadapt problem #25

Closed robinsleith closed 2 years ago

robinsleith commented 2 years ago

I am not sure if the version of cutadapt changed or some python issue has changes but commands that previously worked are not working, the error is below. I am working here /mnt/storage/data/edna/dada/projects/robin_foo/dada_3step following these notes, which have worked without problems many times.

cutadapt: error: argument -n/--times: invalid int value: '2.0'
Run "cutadapt --help" to see command-line options.
See https://cutadapt.readthedocs.io/ for full documentation.
robinsleith commented 2 years ago

I think this is an issue with dada2/1.2, I went back to 1.18 and I think things are working

btupper commented 2 years ago

Weirdly...

$ module load dada2
$ cutadapt --help
-bash: cutadapt: command not found

OK. That's unexpected! I'm a little rusty, but whatevs...

I think it doesn't like the floating point values for -n; note that the error says "invalid int value". I suspect the problem may be resolved by changing the cutadapt more_args element in the yaml from

cutadapt:
  app: /mnt/modules/bin/dada2/1.14.1/bin/cutadapt
  more_args: --minimum-length 25.0 -n 2.0 --discard-untrimmed

to

cutadapt:
  app: /mnt/modules/bin/dada2/1.14.1/bin/cutadapt
  more_args: --minimum-length 25.0 -n 2 --discard-untrimmed

or similar. But I can't test it since I can't seem to find cutdadapt. How we we find it in scripts. Oh, the rust!

robinsleith commented 2 years ago

Well, changing to integer seems to have fixed the problem. Its just strange since that value has not changed in those scripts to the best of my knowledge and they previously worked.

btupper commented 2 years ago

It must be how the more recent install of cutadapt is more anal about argument types. Not really that useful for sloths like me, but I suppose they can do as they like. I would have just cast it as integer within the application, but that violates python's principle of least surprise. I get it.

But how come I couldn't find cutadapt? That's still weird.