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
469 stars 151 forks source link

Gunzip issue #5

Closed achamess closed 7 years ago

achamess commented 7 years ago

Hi, I'm running the latest version on Mac Sierra.

This is the error message I get: `AUTO-DETECTING ADAPTER TYPE

Attempting to auto-detect adapter type from the first 1 million sequences of the first file (>> AC-L1_S1_L001_R1_001.fastq.gz <<)

zcat: can't stat: AC-L1_S1_L001_R1_001.fastq.gz (AC-L1_S1_L001_R1_001.fastq.gz.Z): No such file or directory Found perfect matches for the following adapter sequences: Adapter type Count Sequence Sequences analysed Percentage Illegal division by zero at /usr/local/bin/trim_galore line 1123. `

FelixKrueger commented 7 years ago

This used to be a known Mac issue which we tried to address in Trim Galore version 0.4.2 (this is from the release notes: Replaced all instances of zcat with gunzip -c so that older versions of Mac OSX do not append a .Z to the end of the file and subsequently fail because the file is not present)

So when you are saying I am running the latest version does this mean the OS, or Trim Galore or both? In the first instance I would just upgrade to v0.4.3. and see if that works.

achamess commented 7 years ago

Thanks. There was a conflict. I must have had two versions of Trim Galore. Thanks.

FelixKrueger commented 7 years ago

You're welcome, I hope everything will work fine from now on.

antoine4ucsd commented 5 months ago

hello I am trying to use cutadapt with trim-galore on my mac M1 I have the following version installed

 cutadapt --version
4.8
trim_galore --version

                          Quality-/Adapter-/RRBS-Trimming
                               (powered by Cutadapt)
                                  version 0.4.3

                             Last update: 07 12 2016

but it looks like I have the same issue as above

see

zcat: can't stat: /path/paired-end/R1/quality_control/bulk_1_trimmed.fq.gz (/path/paired-end/R1/quality_control/bulk_1_trimmed.fq.gz.Z): No such file or directory

any suggestions?

FelixKrueger commented 5 months ago

the version you are using is more than 7 years out of date. Can you update to v0.6.10 and try again?

antoine4ucsd commented 5 months ago

you are right I tried with

trim_galore --version

                        Quality-/Adapter-/RRBS-/Speciality-Trimming
                                [powered by Cutadapt]
                                  version 0.6.10

                               Last update: 02 02 2023

but still get

1250000 sequences processed in total
Sequences removed because they became shorter than the length cutoff of 20 bp:  44211 (3.5%)

zcat: can't stat: /path/paired-end/R2/quality_control/bulk_2_trimmed.fq.gz (/path/R2/quality_control/bulk_2_trimmed.fq.gz.Z): No such file or directory

I am not sure what's wrong. attaching installed package in case there is conflict?

local.env.txt

FelixKrueger commented 5 months ago

On certain older versions of Mac OSX, unzipping with zcat expected files to end in .Z even it was not part of the file name. Trim Galore doesn't contain any zcat commands any more, they were all replaced with gunzip -c back in version 0.4.2.

You command complains that /path/R2/quality_control/bulk_2_trimmed.fq.gz.Z does not exist (which is probably true). The only explanation I see for this is that your system uses an even older version of Trim Galore than the two versions you linked above. Is that a possibility? What do you get when running which trim_galore (the same as for the command that failed with .Z above)?

antoine4ucsd commented 5 months ago

agree this is weird. within my conda env, I have

which trim_galore 
/Users/myparh/opt/miniconda3/envs/venus_macOS/bin/trim_galore

and

conda list
trim-galore               0.6.10               hdfd78af_0    bioconda

I don't understand why this is still calling zcat...

antoine4ucsd commented 5 months ago

I am making some progress but still not done yet... I changed the script to enforce the use my my trim_galore version no more error message! but... now running STAR I get this a bus error 10 ;-(

fyi I am attaching the code coming from https://github.com/aicb-ZhangLabs/Venus

module-integration.py.txt

all suggestions are welcome but I also wanted to thank you for your help

FelixKrueger commented 5 months ago

hmm, this might be buried somewhere within their repo, I suggest you contact the Venus authors for help.... Glad that Trim Galore is now working though