How to do it...

Splitting sequence files into OTUs can be done using the following steps:

  1. Load the data and compute the OTUs:
library(kmer)
library(magrittr)
library(ape)
seqs <- ape::read.fastq(file.path(getwd(), "datasets", "ch5","fq", "SRR9040914ab.fq.gz") otu_vec <- otu(seqs, k = 6, threshold = 0.99 )


  1. Count the frequency of each OTU cluster:
data.frame(
seqid = names(otu_vec),
cluster = otu_vec,
row.names = NULL) %>%
dplyr::group_by(cluster) %>%
dplyr::summarize(count = dplyr::n() )
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.179.171