Printing Sequence Alignments

Usage

"print"(x, alignment=TRUE, ...) .print.fasta.ali(x, width = NULL, col.inds = NULL, numbers = TRUE, conservation=TRUE, ...)

Arguments

x
a sequence alignment object as obtained from the functions read.fasta, read.fasta.pdb, pdbaln, seqaln, etc.
alignment
logical, if TRUE the sequence alignment will be printed to screen.
width
a single numeric value giving the number of residues per printed sequence block. By default this is determined from considering alignment identifier widths given a standard 85 column terminal window.
col.inds
an optional numeric vector that can be used to select subsets of alignment positions/columns for printing.
numbers
logical, if TRUE position numbers and a tick-mark every 10 positions are printed above and below sequence blocks.
conservation
logical, if TRUE conserved and semi-conserved columns in the alignment are marked with an ‘*’ and ‘^’, respectively.
...
additional arguments to ‘.print.fasta.ali’.

Description

Print method for fasta and pdbs sequence alignment objects.

Value

Called mostly for its effect but also silently returns block divided concatenated sequence strings as a matrix.

References

Grant, B.J. et al. (2006) Bioinformatics 22, 2695--2696.

Examples

file <- system.file("examples/kif1a.fa",package="bio3d") aln <- read.fasta(file) print(aln)
1 . . . . 50 [Truncated_Name:1]1bg2.pdb NIKVMCRFRPLNESEVNRGDKYIAKFQGEDTV----VIASK-------PY [Truncated_Name:2]1i6i.pdb SVKVAVRVRPFNSREMSRDSKCIIQMSGSTTT----IVNPKQPKETPKSF [Truncated_Name:3]1i5s.pdb SVKVAVRVRPFNSREMSRDSKCIIQMSGSTTT----IVNPKQPKETPKSF [Truncated_Name:4]2ncd.pdb NIRVFCRIRPPLESEENRMC-CTWTYHDESTVELQSIDAQAKSKMGQQIF ^^* * ** * * * ^ ^ 1 . . . . 50 51 . . . . 100 [Truncated_Name:1]1bg2.pdb AFDRVFQSS--------TSQEQVYNDCAKKIVKDVLEGYNGTIFAYGQTS [Truncated_Name:2]1i6i.pdb SFDYSYWSHTSPEDINYASQKQVYRDIGEEMLQHAFEGYNVCIFAYGQTG [Truncated_Name:3]1i5s.pdb SFDYSYWSHTSPEDINYASQKQVYRDIGEEMLQHAFEGYNVCIFAYGQTG [Truncated_Name:4]2ncd.pdb SFDQVFHPL--------SSQSDIF-EMVSPLIQSALDGYNICIFAYGQTG ** ^ ** ^^ ^ ^^ ^*** ******* 51 . . . . 100 101 . . . . 150 [Truncated_Name:1]1bg2.pdb SGKTHTMEGKLHDPEGMGIIPRIVQDIFNYIYSMDENL-EFHIKVSYFEI [Truncated_Name:2]1i6i.pdb AGKSYTMMGKQEK-DQQGIIPQLCEDLFSRINDTTNDNMSYSVEVSYMEI [Truncated_Name:3]1i5s.pdb AGKSYTMMGKQEK-DQQGIIPQLCEDLFSRINDTTNDNMSYSVEVSYMEI [Truncated_Name:4]2ncd.pdb SGKTYTMDGV---PESVGVIPRTVDLLFDSIRGYRNLGWEYEIKATFLEI **^ ** * ^ *^** ^* * ^ ^ ^^ ** 101 . . . . 150 151 . . . . 200 [Truncated_Name:1]1bg2.pdb YLDKIRDLL-DVSKT-NLSVHEDKNRVPYVKGCTERFVCSPDEVMDTIDE [Truncated_Name:2]1i6i.pdb YCERVRDLL-NPKNKGNLRVREHPLLGPYVEDLSKLAVTSYNDIQDLMDS [Truncated_Name:3]1i5s.pdb YCERVRDLL-NPKNKGNLRVREHPLLGPYVEDLSKLAVTSYNDIQDLMDS [Truncated_Name:4]2ncd.pdb YNEVLYDLLSNEQKDMEIRMAKNNKNDIYVSNITEETVLDPNHLRHLMHT * ^ ^ *** ^ ^ ** ^ * ^ ^ 151 . . . . 200 201 . . . . 250 [Truncated_Name:1]1bg2.pdb GKSNRHVAVTNMNEHSSRSHSIFLINVKQENTQT----EQKLSGKLYLVD [Truncated_Name:2]1i6i.pdb GNKARTVAATNMNETSSRSHAVFNIIFTQKRHDAETNITTEKVSKISLVD [Truncated_Name:3]1i5s.pdb GNKARTVAATNMNETSSRSHAVFNIIFTQKRHDAETNITTEKVSKISLVD [Truncated_Name:4]2ncd.pdb AKMNRATASTAGNERSSRSHAVTKLELIGRHAEK----QEISVGSINLVD ^ * * * ** ***** ^ ^ ^ *** 201 . . . . 250 251 . . . . 300 [Truncated_Name:1]1bg2.pdb LAGSEKVSKTGAEGAVLDEAKNINKSLSALGNVISALAEGSTYVPYRDSK [Truncated_Name:2]1i6i.pdb LAGSE---------------ANINKSLTTLGKVISALAEMD-FIPYRDSV [Truncated_Name:3]1i5s.pdb LAGSER-----AKGTRLKEGANINKSLTTLGKVISALAEMD--IPYRDSV [Truncated_Name:4]2ncd.pdb LAGSES--------------PNINRSLSELTNVILALLQKQDHIPYRNSK ***** ***^**^ * ** ** ^*** * 251 . . . . 300 301 . . . . 344 [Truncated_Name:1]1bg2.pdb MTRILQDSLGGNCRTTIVICCSPSSYNESETKSTLLFGQRAKTI [Truncated_Name:2]1i6i.pdb LTWLLRENLGGNSRTAMVAALSPADINYDETLSTLRYADRAKQI [Truncated_Name:3]1i5s.pdb LTWLLRENLGGNSRTAMVAALSPADINYDETLSTLRYADRAK-- [Truncated_Name:4]2ncd.pdb LTHLLMPSLGGNSKTLMFINVSPFQDCFQESVKSLRFAASVNSC ^* ^* **** ^* ^ ** *^ ^* ^^ 301 . . . . 344 Call: read.fasta(file = file) Class: fasta Alignment dimensions: 4 sequence rows; 344 position columns (293 non-gap, 51 gap) + attr: id, ali, call
# print(aln, col.inds=30:100, numbers=FALSE)

See also

read.fasta, read.fasta.pdb, pdbaln, seqaln

Author

Barry Grant