TGAC / KAT

The K-mer Analysis Toolkit (KAT) contains a number of tools that analyse and compare K-mer spectra.
http://www.earlham.ac.uk/kat-tools
GNU General Public License v3.0
200 stars 51 forks source link

Can I make "kat hist" read from standard input? #163

Open IgnasiLucas opened 2 years ago

IgnasiLucas commented 2 years ago

I have reads from two lanes of the flowcell in every fastq file, and there seems to be a problem in one of them. To avoid writing to and reading from new fastq files, I would like to send reads from only one lane to "kat hist" through standard input, but it does not work. To test reading ability from standard input, I have tried:

head -n 100000 sample1.fastq | kat hist -o sample1

With this error message:

src/input_handler.cc(70): Throw in function void kat::InputHandler::set5pTrim(const std::vector&) Dynamic exception type: boost::exception_detail::clone_impl std::exception::what: std::exception [kat::InputFileError*] = Inconsistent number of inputs and trimming settings. Please establish your inputs before trying to set trimming vector. Also ensure you have the same number of input files to trimming settings.

I have also tried with the dash:

head -n 100000 sample1.fastq | kat hist -o sample1 -

src/input_handler.cc(123): Throw in function void kat::InputHandler::validateInput() Dynamic exception type: boost::exception_detail::clone_impl std::exception::what: std::exception [kat::InputFileError*] = Could not find input file at: -; please check the path and try again.

And I have tried named pipes as well, which do not throw an error, but never finish:

mkfifo pipe0
head -n 100000 sample1.fastq > pipe0 &
kat hist -o sample1 pipe0