WriteEmblSeq {GeneR} | R Documentation |
Write a sequence, with description into a EMBL file. writeEmblSeq write the sequence; writeEmblLine write a feature line, writeEmblComment write a comment line. CompleteStringWithSpace: internal function
writeEmblSeq (file, seqno = 0) writeEmblLine (file, code = "", header = "", text = "", nextfield = TRUE, append=TRUE) writeEmblComment(file, code = "", text = "", nextfield = TRUE, append=TRUE)
file |
EMBL File name |
code |
2 letters: to be written at line beginning |
header |
First part of line |
text |
a text to be written |
seqno |
Integer, sequence number (bufno) |
nextfield |
TRUE: write XX after line, FALSE: don't write XX. |
append |
Scalar boolean. TRUE -> line(s) is added at the end of the file. FALSE -> file is written over. |
A. Lucas and Vincent Lefort
s<-"gtcatgcatgctaggtgacagttaaaatgcgtctaggtgacagtctaacaa" placeString(s) # Add lines with "CC bla bla bla" and a line "XX" writeEmblComment(file="toto.embl",code="CC",text="This is a comment for \ this dummy sequence... I try to be long enough to show that this comment \ will be written on several lines",append=FALSE) # Add a line with "FT CDS bla bla bla" writeEmblLine(file="toto.embl",code="FT",header="CDS",text="<1..12", nextfield = FALSE) # Add lines with "FT bla bla bla" writeEmblLine(file="toto.embl",code="FT",header="",text="/codon_start=2", nextfield = FALSE) writeEmblLine(file="toto.embl",code="FT",header="",text="/gene=\"toto\"", nextfield = FALSE) writeEmblLine(file="toto.embl",code="FT",header="",text="/note=\"Here is \ what I think about this gene\"",nextfield = FALSE) ## Translation prot <- translate(seqno=0,from=getOrfs()[1,1],to=getOrfs()[1,2]) writeEmblLine (file="toto.embl",code='FT',header='', text=paste('/translation="',prot ,'\"',sep=''),nextfield =TRUE) # Add sequence writeEmblSeq(file="toto.embl") ## Show file cat(paste(readLines("toto.embl"),collapse='\n'))