uc_to_sumaclust: Convert UC file (clustering output from USEARCH and VSEARCH)...

View source: R/uc_to_sumaclust.R

uc_to_sumaclustR Documentation

Convert UC file (clustering output from USEARCH and VSEARCH) to Sumaclust OTU observation map

Description

Convert UC file (clustering output from USEARCH and VSEARCH) to Sumaclust OTU observation map

Usage

uc_to_sumaclust(x, output_file = NULL)

Arguments

x

File name in UC-format (typically with .uc extension)

output_file

Optional, character string with the name of the output file

Value

This function invisibly returns a list, where each slot corresponds to a single OTU. Each slot is a charater vector that contains sequence names that belongs to this OTU. The first element of a vector is a name of the representative sequence of this OTU (OTU centoid) which occurs twice in this vector (i.e., there are two identical sequence IDs in a vector for OTUs that are represented by only one sequence).

References

https://git.metabarcoding.org/obitools/sumaclust/wikis/home

See Also

parse_uc

Examples

## OTU clustering with Sumaclust
## OTU observation map is written to 'sumaclust_map.txt'
# sumaclust -g -f -t 0.97 -O sumaclust_map.txt input_seqs.fasta

## OTU clustering with VSEARCH
## Results are in USEARCH cluster format (UC) in 'vsearch_clusters.uc' file
# vsearch --cluster_fast input_seqs.fasta --id 0.97 --uc vsearch_clusters.uc

## Convert VSEARCH clustering results (in UC-format) to Sumaclust OTU observation map
# uc_to_sumaclust("vsearch_clusters.uc", output_file = "vsearch_to_sumaclust.txt")


vmikk/metagMisc documentation built on June 20, 2024, 7:20 a.m.