khmer icon indicating copy to clipboard operation
khmer copied to clipboard

how to read two fastq files(paired fastq file) in the example/consume.cc

Open lzhLab opened this issue 7 years ago • 1 comments
trafficstars

counts.consume_seqfile<FastxReader>(argv[1], seqs_consumed, kmers_consumed); Assume that I have two fastq file, 'seq_1.fastq' and 'seq_2.fastq', I found it's is not useful via the API ,"consume_seqfile()",to read multiple fastq files, since it only accepts one file.

The commend I used ./consume rs_frag_{1,2}.fastq

this is other available API I can use? any help will be appreciated !

lzhLab avatar Aug 17 '18 06:08 lzhLab

Hi @IzhLab!

If you’re only going to be storing the reads in a counttable or countgraph, then pairing info is not required. You can simply consume one file and then the next.

If there’s another reason you need to retain the pairing information, khmer only supports interleaved Fastq files—the read followed by its paired sequence. There should be a “broken_paired_reader” in both the Python API and the C++/Cython API. I don’t know if either one is well documented, but you should be able to find some example code in the scripts. 🤷‍♂️

standage avatar Aug 22 '18 23:08 standage