is.gap( c("G",".","X","-","G","K","S","T") )
aln <- read.fasta( system.file("examples/kif1a.fa",
package = "bio3d") )
##- Mask existing gaps with an "X"
xaln <- aln
xaln$ali[ is.gap(xaln$ali) ]="X"
##- Read a new PDB and align its sequence to the existing alignment
pdb <- read.pdb( "1mkj" )
seq2aln(pdbseq(pdb), xaln, id = "1mkj")
Run the code above in your browser using DataLab