Learn R Programming

phylotools (version 0.1.2)

complement: Get the complement sequences

Description

This function could be used to convert the sequences to its complement sequence. The input data must be fasta format.

Usage

complement(fas)

Arguments

fas
Fasta format object

Value

The complement sequences in fasta format.

Details

This function could be used to obtain the complement sequence given a fasta file. For example, the complement sequence for "5-TTGAACC-3" is "5-GGTTCAA-3".This may be used for converting the consensus sequence to its complement, when the user find that the sequence can not be aligned with other sequences.

References

None

See Also

revComp for more information.

Examples

Run this code

cat(
">No305",
"NTTCGAAAAACACACCCACTACTAAAANTTATCAGTCACT",
file = "dna1.fas", sep = "\n")

sequence <- read.fasta("dna1.fas")
complement(sequence)
unlink("dna1.fas")

Run the code above in your browser using DataLab