I'm working with RADseq data (288 compressed FASTQ files, *.fq.gz) from 3 plates of plant tissue. I've done demultiplexing and preliminary QC (using the Stacks process_radtags command), and before performing a reference alignment, I want make sure the sequences in each sample (roughly) correspond to the organism I expect them to be derived from, rather than potential contaminants (bacteria and/or fungi).

Does anyone have a straightforward, "canned" approach for doing this, either in R or a different environment? I believe the blastn algorithm can be used to query the sequences in these files against a database (like NCBI), and is usable on the command line. However, I've not used it before, and I'm not sure if it makes sense to query all the sequences in each file. Additionally, I don't know if the command can process this many files of this size (~600 MB per FASTQ file).

This post from ~4 years ago asks a similar question for a pair of human blood samples, but is concerned with bacterial/viral DNA. The answer linking kmerfinder might have promise, but I'd appreciate any input from folks familiar with this issue.

(Background: I've gotten my Master's degree in Biology and have worked with NGS data for ~4 years now. I'm performing analyses on a 32-core Linux server. I'm less skilled in Python, but am willing to use it if there are no other options.)

  • $\begingroup$ Do you have a high quality reference genome of the plant you are working with? $\endgroup$
    – Pallie
    Jan 10 at 8:59
  • $\begingroup$ Yes, I do. I've used the same reference genome in other projects, with similarly related taxa. $\endgroup$
    – akoontz11
    Jan 11 at 14:14
  • $\begingroup$ Thanks for the question, I'm familiar with working on RAD format and particularly don't know whether you've generated mixed genome RAD data. If know this information and I've time I'll put an answer down using either Bash or Python. I don't use R unless I've no other option. Please post a note below the question if you do edit it to notify me. $\endgroup$
    – M__
    Jan 12 at 16:56

1 Answer 1


I ultimately addressed this issue using the kraken2 software. I found this approach to rely on a good deal of my server's memory, but it was sufficient for doing a viral/bacterial classification of sequences.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.