
Last chance! 50% off unlimited learning
Sale ends in
write.pir(alignment=NULL, ids=NULL, seqs=alignment$ali,
pdb.file = NULL, chain.first = NULL, resno.first = NULL,
chain.last = NULL, resno.last = NULL, file, append = FALSE)
id
and ali
components, similar to that generated by read.fasta
.file
; otherwise, it will overwrite the contents of
file
.read.fasta
, read.fasta.pdb
,
write.fasta
## NOTE: FOLLOWING EXAMPLE NEEDS MUSCLE INSTALLED
if(check.utility("muscle")) {
## Generate an input file for structural modeling of
## transducin G-alpha subunit using the template 3SN6_A
## Read transducin alpha subunit sequence
seq <- get.seq("P04695", db = "uniprot", outfile = tempfile())
## Read structure template
path = tempdir()
pdb.file <- get.pdb("3sn6_A", path = path, split = TRUE)
pdb <- read.pdb(pdb.file)
## Build an alignment between template and target
aln <- seqaln(seqbind(pdbseq(pdb), seq), id = c("3sn6_A", seq$id), outfile = tempfile())
## Write PIR format alignment file
outfile = file.path(tempdir(), "eg.pir")
write.pir(aln, pdb.file = c(pdb.file, ""), file = outfile)
invisible( cat("\nSee the output file:", outfile, sep = "\n") )
}
Run the code above in your browser using DataLab