matchprobes package:matchprobes R Documentation _A _f_u_n_c_t_i_o_n _t_o _m_a_t_c_h _a _q_u_e_r_y _s_e_q_u_e_n_c_e _t_o _t_h_e _s_e_q_u_e_n_c_e_s _o_f _a _s_e_t _o_f _p_r_o_b_e_s. _D_e_s_c_r_i_p_t_i_o_n: The 'query' sequence, a character string (probably representing a transcript of interest), is scanned for the presence of exact matches to the sequences in the character vector 'records'. The indices of the set of matches are returned. The function is inefficient: it works on R's character vectors, and the actual matching algorithm is of time complexity 'length(query)' times 'length(records)'! _U_s_a_g_e: matchprobes(query, records, probepos=FALSE) _A_r_g_u_m_e_n_t_s: query: A character vector. For example, each element may represent a gene (transcript) of interest. See Details. records: A character vector. For example, each element may represent the probes on a DNA array. probepos: A logical value. If TRUE, return also the start positions of the matches in the query sequence. _D_e_t_a_i_l_s: 'toupper' is applied to the arguments 'query' and 'records' before matching. The intention of this is to make the matching case-insensitive. The function is embarrassingly naive. The matching is done using the C library function 'strstr'. _V_a_l_u_e: A list. Its first element is a list of the same length as the input vector. Each element of the list is a numeric vector containing the indices of the probes that have a perfect match in the query sequence. If 'probepos' is TRUE, the returned list has a second element: it is of the same shape as described above, and gives the respective positions of the matches. _A_u_t_h_o_r(_s): R. Gentleman, Laurent Gautier, Wolfgang Huber _E_x_a_m_p_l_e_s: if(require("hgu95av2probe")){ data("hgu95av2probe") seq <- hgu95av2probe$sequence[1:20] target <- paste(seq, collapse="") matchprobes(target, seq, probepos=TRUE) }