alview: Print DNA or AA Sequence Alignement

Description Usage Arguments Details Author(s) See Also Examples

View source: R/DNA.R

Description

This function displays in the console or a file an alignment of DNA or AAsequences. The first sequence is printed on the first row and the bases of the other sequences are replaced by dots if they are identical with the first sequence.

Usage

1
alview(x, file = "", uppercase = TRUE, showpos = TRUE)

Arguments

x

a matrix or a list of DNA sequences (class "DNAbin") or a matrix of AA sequences (class "AAbin").

file

a character string giving the name of the file where to print the sequences; by default, they are printed in the console.

uppercase

a logical specifying whether to print the bases as uppercase letters.

showpos

either a logical value specifying whether to display the site positions, or a numeric vector giving these positions (see examples).

Details

The first line of the output shows the position of the last column of the printed alignment.

Author(s)

Emmanuel Paradis

See Also

DNAbin, image.DNAbin, alex, clustal, checkAlignment, all.equal.DNAbin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(woodmouse)
alview(woodmouse[, 1:50])
alview(woodmouse[, 1:50], uppercase = FALSE)
## display only some sites:
j <- c(10, 49, 125, 567) # just random
x <- woodmouse[, j]
alview(x, showpos = FALSE) # no site position displayed
alview(x, showpos = j)
## Not run: 
alview(woodmouse, file = "woodmouse.txt")

## End(Not run)

Example output

        00000000011111111112222222222333333333344444444445
        12345678901234567890123456789012345678901234567890
No305   NTTCGAAAAACACACCCACTACTAAAANTTATCAGTCACTCCTTCATCGA
No304   A..........................A......AC..............
No306   A..........................A......A...............
No0906S A..........................A.C....A...............
No0908S A..........................A......A...............
No0909S A..........................A......A...............
No0910S A..........................A......A......T........
No0912S A..........................A......A...............
No0913S A..........................A......AC..............
No1103S A..........................A....T.A...............
No1007S A..........................A......A...............
No1114S .NNNNNNNNNNNNNNNNNNNNNNNNNN.NNNNNNNNNNNNNNNNN.....
No1202S A..........................A......A...............
No1206S A..........................A......A...............
No1208S .NN........................A......A...............
        00000000011111111112222222222333333333344444444445
        12345678901234567890123456789012345678901234567890
No305   nttcgaaaaacacacccactactaaaanttatcagtcactccttcatcga
No304   a..........................a......ac..............
No306   a..........................a......a...............
No0906S a..........................a.c....a...............
No0908S a..........................a......a...............
No0909S a..........................a......a...............
No0910S a..........................a......a......t........
No0912S a..........................a......a...............
No0913S a..........................a......ac..............
No1103S a..........................a....t.a...............
No1007S a..........................a......a...............
No1114S .nnnnnnnnnnnnnnnnnnnnnnnnnn.nnnnnnnnnnnnnnnnn.....
No1202S a..........................a......a...............
No1206S a..........................a......a...............
No1208S .nn........................a......a...............
No305   AGTA
No304   ....
No306   ....
No0906S ....
No0908S ....
No0909S ....
No0910S ....
No0912S ....
No0913S ....
No1103S ....
No1007S ....
No1114S N...
No1202S ....
No1206S ....
No1208S ....
        0015
        1426
        0957
No305   AGTA
No304   ....
No306   ....
No0906S ....
No0908S ....
No0909S ....
No0910S ....
No0912S ....
No0913S ....
No1103S ....
No1007S ....
No1114S N...
No1202S ....
No1206S ....
No1208S ....

ape documentation built on April 25, 2021, 9:06 a.m.