Get the complement sequences

Share:

Description

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

Usage

1

Arguments

fas

Fasta format object

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.

Value

The complement sequences in fasta format.

Author(s)

Jinlong Zhang jinlongzhang01@gmail.com

References

None

See Also

revComp for more information.

Examples

1
2
3
4
5
6
7
8
cat(
">No305",
"NTTCGAAAAACACACCCACTACTAAAANTTATCAGTCACT",
file = "dna1.fas", sep = "\n")

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

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.