WriteEmblSeq              package:GeneR              R Documentation

_W_r_i_t_e _t_o _E_m_b_l _f_i_l_e

_D_e_s_c_r_i_p_t_i_o_n:

     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

_U_s_a_g_e:

     writeEmblSeq (file, seqno = 0)
     writeEmblLine (file, code = "", header = "", text = "",
                                nextfield = TRUE, append=TRUE)
     writeEmblComment(file, code = "", text = "",
                                nextfield = TRUE, append=TRUE)

_A_r_g_u_m_e_n_t_s:

    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_u_t_h_o_r(_s):

     A. Lucas and Vincent Lefort

_E_x_a_m_p_l_e_s:

     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'))

