It seems that 'fastuniq' does not support fq.gz files. How to solve this except for decompressing first.
3
0
Entering edit mode
8.6 years ago

It seems that 'fastuniq' does not support fq.gz files. How to solve this except for decompressing first.

fastuniq • 4.7k views
ADD COMMENT
7
Entering edit mode
8.6 years ago

To avoid creating large intermediate files, you might try running fastuniq with named pipes.

To set up the pipes:

$ mkfifo example.pair1.fastq.gz.pipe
$ mkfifo example.pair2.fastq.gz.pipe
$ gunzip -c example.pair1.fastq.gz > example.pair1.fastq.gz.pipe &
$ gunzip -c example.pair2.fastq.gz > example.pair2.fastq.gz.pipe &

Set up a list of filenames from the named pipes:

$ cat pipelist.txt
example.pair1.fastq.gz.pipe
example.pair2.fastq.gz.pipe

Then run fastuniq with your list and options:

$ fastuniq -i pipelist.txt ...

When you are done, delete the pipes:

$ rm example.pair*.fastq.gz.pipe

Not all binaries accept named pipes, though, so this may not work. But it might be worth trying.

ADD COMMENT
1
Entering edit mode

Works great! (also with multiple .gz files).

ADD REPLY
0
Entering edit mode

Thank you very much. I'll try.

ADD REPLY
1
Entering edit mode
8.6 years ago
h.mon 35k

As FastUniq requires a list of files as input, only by decompressing the files you could use it. You could use another tool, such as Dedupe from BBTools, or SuperDeduper, both accept .gz files as input.

ADD COMMENT
0
Entering edit mode

Thank you for your recommendation! Do you know which software is better in removing PCR duplicate reads without regarding the input data format ?

ADD REPLY
0
Entering edit mode
8.6 years ago
James Ashmore ★ 3.4k

If it doesn't support zipped files there is no way around this. Your best approach is to unzip the file, pipe the data into fastuniq, then zip the output. For example:

gunzip sample.fastq | fastuniq | gzip -c > uniq.fastq.gz
ADD COMMENT
0
Entering edit mode

Running gunzip like that will not write uncompressed data to standard output. Also, fastuniq does not appear to accept standard input.

ADD REPLY
0
Entering edit mode

Thank you. But fastuniq does not accept standard input.

ADD REPLY

Login before adding your answer.

Traffic: 2631 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6