/*********************************************************************** * Duplicates and reverse complements the motif ***********************************************************************/ MOTIF_T* dup_rc_motif (MOTIF_T *motif) { MOTIF_T *rc_motif; rc_motif = mm_malloc(sizeof(MOTIF_T)); copy_motif(motif, rc_motif); reverse_complement_motif(rc_motif); return rc_motif; }
/************************************************************************** * Generate logos for a motif * Warning, this may modify the path and motif arguments. **************************************************************************/ static void generate_motif_logos(OPTIONS_T *options, STR_T *path, MOTIF_T *motif) { int path_len; char name[MAX_MOTIF_ID_LENGTH + 1]; copy_and_sanatise_name(name, get_motif_id(motif), MAX_MOTIF_ID_LENGTH); name[MAX_MOTIF_ID_LENGTH] = '\0'; path_len = str_len(path); str_appendf(path, "logo%s", name); CL_create1(motif, FALSE, FALSE, "MEME (no SSC)", str_internal(path), options->eps, options->png); if (options->rc) { str_truncate(path, path_len); str_appendf(path, "logo_rc%s", name); reverse_complement_motif(motif); CL_create1(motif, FALSE, FALSE, "MEME (no SSC)", str_internal(path), options->eps, options->png); } str_truncate(path, path_len); }