#ifndef msm_image_tools_H #define msm_image_tools_H /* Procedures that write image files with given names. */ /* Last edited on 2013-10-22 01:39:37 by stolfilocal */ #define msm_image_tools_H_COPYRIGHT \ "Copyright © 2007 by the State University of Campinas (UNICAMP)" #include #include #include #include #include #include #include #include #include /* SEQUENCE-TO-SEQUENCE DISTANCE MAP */ void msm_image_seq_seq_score_write_named ( msm_seq_desc_t *seq0, msm_seq_desc_t *seq1, msm_rung_score_proc_t *score, msm_pairing_t *pr, char *name, char *tag ); /* Writes to disk a color (PPM) image file called "{name}{tag}.ppm" that shows the distances between all samples of sequence {seq0} and the samples of sequence {seq1}. !!! Change to take a {msm_cand_vec_t} instead of a single {msm_pairing_t} !!! If {pr} is not NULL, the rungs of {pr} are plotted over the pair score image. The image is generated by {msm_image_seq_seq_score_paint}, colorized with {msm_image_colorize}, and the rungs are painted with {msm_image_pairing_paint}. Positive scores are reddish, negative scores are bluish, zero scores are white. The image is scaled down as needed to keep its size below some reasonable maximum size. */ /* PLOTTING CANDIDATES */ void msm_image_cand_write_named ( msm_cand_t *cd, float v, char *name, char *tag ); /* Writes to disk a grayscale (PGM) image called "{name}{tag}.pgm" showing the candidate {cd}. The image scale factor {scale} is scaled down as needed to keep the image size below some reasonable maximum size. The pixel in column {i0} and row {i1} incremented with {v/scale} whenever the candidate's pairing pairs sample {i0} of sequence 0 with sample sample {i1} of sequence 1. The darkness of the pixel is proportional to the final sum of all received values. */ /* PLOTTING CANDIDATE LISTS */ void msm_image_cand_vec_write_named ( msm_cand_vec_t *cdv, msm_seq_desc_t *seq0, msm_seq_desc_t *seq1, bool_t scale, /* TRUE to adjust the scale to avoid large images. */ char *name, char *tag ); /* Writes to disk a geyscale (PGM) image called "{name}{tag}.pgm" showing the candidates of {cdv}. The image is produced with {msm_image_cand_vec_paint}. */ /* PLOTTING DYNAMIC PROGRAMMING TABLEAUS */ void msm_image_dyn_tableau_write_named ( int n0, /* Length of first sequence. */ int n1, /* Length of second sequence. */ msm_dyn_tableau_t *tb, /* Tableau to plot. */ msm_rung_t gopt, /* End-rung of optimum path, or {msm_rung_none} */ bool_t scale, /* TRUE to adjust the scale to avoid large images. */ bool_t colorize, /* TRUE to map scores to RGB colors instead of gray values. */ char *name, /* Prefix for file name. */ char *tag /* Tag for file name. */ ); /* Writes a PGM image called "{name}{tag}.pgm", with {n0} columns and {n1} rows, showing the scores of all rungs spanned by the tableau {tb}. The image is produced with {msm_image_dyn_tableau_scores_paint} and {msm_image_dyn_tableau_pairing_paint}. The image's scale is selected so that it is not too big. */ #endif