FelixKrueger / TrimGalore

A wrapper around Cutadapt and FastQC to consistently apply adapter and quality trimming to FastQ files, with extra functionality for RRBS data
GNU General Public License v3.0
459 stars 149 forks source link

Use of uninitialized value $decompression_path in concatenation (.) or string at /home/sli1/miniconda3/envs/atac3/bin/trim_galore line 2671. #155

Closed shl129 closed 1 year ago

shl129 commented 1 year ago

I used trim_galore for sequence trimming with the command below: `$ trim_galore -q 25 --phred33 -e 0.1 --stringency 4 --paired -o clean/ raw/S1-1.fastq.gz raw/S1-2.fastq.gz

The terminal returned this:

Multicore support not enabled. Proceeding with single-core trimming. Path to Cutadapt set as: 'cutadapt' (default) Cutadapt seems to be working fine (tested command 'cutadapt --version') Cutadapt version: 1.18 single-core operation. Use of uninitialized value $decompression_path in concatenation (.) or string at /home/sli1/miniconda3/envs/atac3/bin/trim_galore line 2671. Proceeding with '' for decompression. at /home/sli1/miniconda3/envs/atac3/bin/trim_galore line 2671. To decrease CPU usage of decompression, please install 'igzip' and run again

Output will be written into the directory: /home/sli1/project/atac/BMDM/1212/clean/ Use of uninitialized value $decompression_path in concatenation (.) or string at /home/sli1/miniconda3/envs/atac3/bin/trim_galore line 2101. Can't exec "-d": No such file or directory at /home/sli1/miniconda3/envs/atac3/bin/trim_galore line 2101. Failed to read from file '/home/sli1/project/atac/BMDM/1212/raw/S1-1.fastq.gz' to perform sanity check: No such file or directory

But gzip has been installed and the gzip version is 1.12.

Can anyone help me?

FelixKrueger commented 1 year ago

Thanks for reporting this, this is indeed an oversight, caused by the fact that no default value was specified for cases when single-core operation, or when no pigz was found on the system. You now have the following options.

  1. Install pigz on your system, and use -j 2 or more (optionally, install igzip in addition to pigz)
  2. Clone the current dev version, in which I have tried to fix the bug: https://github.com/FelixKrueger/TrimGalore/tree/dev
  3. Edit your trim_galore file, find the line https://github.com/FelixKrueger/TrimGalore/blob/a3c6a64ae71657f1a282e01134293e424177a7d5/trim_galore#L2440 and add my $decompression_path = 'gzip'; # default

I will in the next hours make a new release to fix this, and try to get it updated on Bioconda as well..

Apologies for the inconvenience, I hope this will be sorted out soon.

FelixKrueger commented 1 year ago

Just to quickly say, I have now made a new release (v0.6.10, a new Bioconda Pull-Request is ongoing. Best, Felix

FelixKrueger commented 1 year ago

The following command should hopefully fix everything by updating to the latest version v0.6.10:

conda update trim-galore
shl129 commented 1 year ago

Thank you very much! I updated the package to the latest version, and it works!!!