View source: R/dada_to_fasta.R
dada_to_fasta | R Documentation |
Rename sequences to their hash values and write them to fasta file.
dada_to_fasta(seqtab, out = "DADA2.fasta", hash = "sha1", ...)
seqtab |
dada-class or derep-class objects |
out |
Output file name (fasta) |
hash |
Hash function to use: "sha1" (default), "sha256", "md5" |
... |
Additional parameters passed on to |
This function relabels sequences using diffetent message digest algorithms applied to each sequence. This approach guarantees (with a very high probability) that FASTA entries from different projects with identical names will also have identical sequences. MD5 algorithm generates a 128-bit digest that is represented by 32 hexadecimal characters. SHA1 generates a 160-bit digest that is represented by 40 hexadecimal characters. SHA256 generates a 256-bit digest that is represented by 64 hexadecimal characters. The probability of a collision (two non-identical sequences resulting in the same digest) is smaller for the SHA-algorithms than it is for the MD5 algorithm. Default hash function is SHA1 which should produce identical results with "–relabel_sha1" function of VSEARCH.
Invisible returns sequence names in the VSEARCH/USEARCH style.
uniquesToFasta
, getUniques
derep1 = derepFastq(system.file("extdata", "sam1F.fastq.gz", package="dada2"))
dada1 <- dada(derep1, err=tperr1)
seqtab <- getUniques(dada1)
dada_to_fasta(seqtab, out = "DADA2.fasta", hash = "sha1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.