NucleotideString         package:Biostrings         R Documentation

_F_u_n_c_t_i_o_n_s _t_o _c_o_n_v_e_r_t _a _c_h_a_r_a_c_t_e_r _s_t_r_i_n_g _t_o _a _B_i_o_S_t_r_i_n_g _o_b_j_e_c_t

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

     The function 'NucleotideString' expects a character string
     representing either an RNA or DNA sequence, and converts it to a
     BioString object with the appropriate alphabet.

     The function 'DNAString' expects a character string representing
     either a DNA sequence, and converts it to a BioString object with
     the standard DNA alphabet.

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

     NucleotideString(src, type = c("DNA", "RNA"),
                      srctype = c("character", "connection"),
                      alphabet = if (type == "DNA")
                                 DNAPatternAlphabet() else RNAPatternAlphabet(),
                      gap = alphabet@gap)
     DNAString(src, gap="-")

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

     src: A character string 

    type: Either "DNA" (the default) or "RNA". 

 srctype: Currently the only valid value (and the default) is
          "character". In future, we may allow "connection" as another
          valid value denoting that the 'src' argument is a file name.

alphabet: Alphabet to be used for the string - usually one of
          DNAAlphabet() or RNAAlphabet(). 

     gap: The character in the input that represents a gap. All
          occurences of this character in the input is converted to the
          gap character of the alphabet (which is usually '-').

_V_a_l_u_e:

     An object of class "BioString".

_A_u_t_h_o_r(_s):

     Saikat DebRoy

_S_e_e _A_l_s_o:

     'BioString-class' for the class of the return value.

     'DNAAlphabet' and 'RNAAlphabet' alphabet for creating the standard
     DNA and RNA alphabets.

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

     NucleotideString("ACTGAACT")
     DNAString("ACTGAACT-GC")
     DNAString("ACTGAACTNGC", gap="N")

