Kneaddata v0.10.0 - unrecognized arguments: --mode strict

Hello,
I’m running kneaddata v0.10.0 on a paired-end dataset.

$ kneaddata --remove-intermediate-output --threads 32 --input {2} --input {3} \
--output $out_folder --reference-db $ref --sequencer-source NexteraPE \
 --trimmomatic-options "SLIDINGWINDOW:4:20 MINLEN:50" --trimmomatic \
$trimmo_path --bowtie2-options "--very-sensitive --dovetail"

I’m getting the following error:

...
Running trf ... 
Running trf ... 
Decontaminating ...
Running bowtie2 ... 
Error executing: kneaddata_bowtie2_discordant_pairs --bowtie2 /home/jmaturana/miniconda3/envs/bif2020.1/bin/bowtie2 --threads 32 -x /data_1/jmaturana/Akker/Workflows/Piglets/data/databases/human_genome_index/hg37dec_v0.1 --mode strict --bowtie2-options "--very-sensitive --dovetail --phred33" -1 /data_1/jmaturana/Akker/Workflows/Piglets/knead_test/ERR1855535_1_kneaddata.repeats.removed.1.fastq -2 /data_1/jmaturana/Akker/Workflows/Piglets/knead_test/ERR1855535_1_kneaddata.repeats.removed.2.fastq --un-pair /data_1/jmaturana/Akker/Workflows/Piglets/knead_test/ERR1855535_1_kneaddata_hg37dec_v0.1_bowtie2_paired_clean_%.fastq --al-pair /data_1/jmaturana/Akker/Workflows/Piglets/knead_test/ERR1855535_1_kneaddata_hg37dec_v0.1_bowtie2_paired_contam_%.fastq -U /data_1/jmaturana/Akker/Workflows/Piglets/knead_test/ERR1855535_1_kneaddata.repeats.removed.unmatched.1.fastq,/data_1/jmaturana/Akker/Workflows/Piglets/knead_test/ERR1855535_1_kneaddata.repeats.removed.unmatched.2.fastq --un-single /data_1/jmaturana/Akker/Workflows/Piglets/knead_test/ERR1855535_1_kneaddata_hg37dec_v0.1_bowtie2_unmatched_%_clean.fastq --al-single /data_1/jmaturana/Akker/Workflows/Piglets/knead_test/ERR1855535_1_kneaddata_hg37dec_v0.1_bowtie2_unmatched_%_contam.fastq -S /dev/null

Error message returned from bowtie2 :
usage: kneaddata_bowtie2_discordant_pairs [-h] -1 PAIR1 -2 PAIR2 -x INDEX
                                          --un-pair UN_PAIR --al-pair AL_PAIR
                                          --un-single UN_SINGLE --al-single
                                          AL_SINGLE [-U ORPHAN] [-S SAM]
                                          [--bowtie2 BOWTIE2]
                                          [--threads THREADS]
                                          [--bowtie2-options BOWTIE2_OPTIONS]
                                          [--cat-pairs] [--reorder]
kneaddata_bowtie2_discordant_pairs: error: unrecognized arguments: --mode strict

As I understand it, --mode strict is set by default when using paired-end reads and I did’t set It, so I don’t really know what to do.

Regards,

Jose Luis

I also tried --trimmomatic-options="SLIDINGWINDOW:4:20" --trimmomatic-options="MINLEN:50" and the same with the bowtie options and I got the same error

Hello Jose, Thank you for the detailed post. It looks like you might possibly have more then one kneaddata version installed. From the error it looks like kneaddata is calling an older version of the kneaddata_bowtie2_discordant_pairs function. Can you try uninstalling all kneaddata packages and then reinstalling? I think this should resolve the error.

Thank you,
Lauren

Hello Lauren, I’m sure it’s the latest version.

The thing is that I cannot uninstall the system’s kneaddata, which is 0.7.10. It’s a small cluster but it’s not a module, it’s in /usr/bin . What I did to make sure to execute the version i had installed in my conda environment, which doesn’t work when I activate the environment either, it’s to hard code the path. So now I’m sure v0.10 is being executed because i print the version and the log file has it too:

04/30/2021 02:25:03 PM - kneaddata.knead_data - INFO: Running kneaddata v0.10.0

Ah, got it! Thanks for all the information. I think when kneaddata runs it picks up the system install for the kneaddata_bowtie2_discordant_pairs script which causes the error because it is of a different version. You could try changing your paths so that the path to your local install is before the path to the system install. This way when you run it should pick up your local packages before it uses the system packages.

Thanks!
Lauren

I see, for some reason I thought that If I set the path of the main script, it will call the correct versions of the other scripts. It just better to export the path of my environment. So now it’s working, thank you for your help :slight_smile:

Thank you for the follow up. I am glad to hear it is working now!

Thanks,
Lauren

1 Like