I am converting the fast5 file to fastq by using guppy basecaller after that by using kraken2 classified the sequence.

Now I am trying to generate ASV file.

Is this possible to generate ASV file from kraken output?

Or is this any other way to generate ASV file from nanopore sequencing?

I am new to nanopore sequencing data. I need help or suggestions to generate ASV file.

Thank you

  • 1
    $\begingroup$ What is an ASV file? You should add information about that file format to your question. The first information I get talks about MATLAB, which doesn't seem correct. $\endgroup$
    – gringer
    Jun 27, 2022 at 6:14
  • 1
    $\begingroup$ ASV: amplicon sequence variant $\endgroup$ Jun 27, 2022 at 7:16
  • $\begingroup$ Dear @twinkle please do check the answer below and do consider upvoting/accepting. Its a good answer and it does help with site stats. $\endgroup$
    – M__
    Sep 13, 2023 at 16:16

1 Answer 1


I am not sure that kraken/kraken2 does anything similar to this.

Usually to get OTUs/ESVs I think that you want to use a tool that clusters your sequences into groupings that represent the same sequence, allowing for technical error.

Examples might include dada2 or dadasnake, or qiime. This is after the technical steps for adapter/trimming/denoising steps.

kraken2 is more for classifying into known taxonomic categories based on a reference sequence, which is a related but distinct task.

I don't think that I understand what the ESV file format is supposed to look like. This resource seems to have some info on processing data into ESVs, but it is not for nanopore. Possibly it is still useful for the final step of creating that file format. A linked repository has a ton of one-off scripts that may be helpful but are not very well documented. For example, here is a script that they use to generate TSV files which may be the "ASV"/"ESV" format:

source activate qiime2-2018.8

for item in `ls */*table.qza`
    name=`echo $item | cut -d\/ -f1`
    qiime tools export --input-path $item --output-path EXPORTS-GTDB-tax/$name
    mv EXPORTS-GTDB-tax/$name/feature-table.biom EXPORTS-GTDB-tax/$name.biom
    rmdir EXPORTS-GTDB-tax/$name

qiime tools export --input-path 11_ANT-28-5-SPA_seqs_classified_against_GTDB_r86.1_807F-1050R_primer_sliced/classification.qza --output-path EXPORTS-GTDB-tax/

sed -i '1c#OTUID    taxonomy    confidence' EXPORTS-GTDB-tax/taxonomy.tsv

#Tutorial here: https://forum.qiime2.org/t/exporting-and-modifying-biom-tables-e-g-adding-taxonomy-annotations/3630
for item in `ls EXPORTS-GTDB-tax/*biom`
    filestem=`basename $item .biom`
    biom add-metadata -i $item -o EXPORTS-GTDB-tax/$filestem.with-tax.biom --observation-metadata-fp EXPORTS-GTDB-tax/taxonomy.tsv --sc-separated taxonomy

for item in `ls EXPORTS-GTDB-tax/*.with-tax.biom`
    filestem=`basename $item .biom`
    biom convert -i $item -o EXPORTS-GTDB-tax/$filestem.tsv --to-tsv --header-key taxonomy


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.