{"push_id":917657996,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"9cdb2327991d53030bebeab1a42c7bb4ad89bf10","before":"b80b1c3565492c3f3974991fe68260ada1a09c27","commits":[{"sha":"9cdb2327991d53030bebeab1a42c7bb4ad89bf10","author":{"email":"552ad2f980550061ebf6c23cf725330cd75002a6@med.kuleuven.be","name":"Gert Hulselmans"},"message":"Make parsing of STAMP specific TRANSFAC file more robust in \"PlatformSupport::ReadTransfacFile\" function.\n\nMake parsing of STAMP specific TRANSFAC file more robust in\n\"PlatformSupport::ReadTransfacFile\" function.\n\nBefore this patch STAMP only processes TRANSFAC files correctly when they look\nexactly like this:\n\n  - motif starts with tag \"DE  motif_name\".\n  - \"DE\" tag is directly followed by matrix lines\n    (no \"P0\" or \"PO\" tag allowed).\n  - matrix lines are directly followed by a \"XX\" tag line.\n  - if other tags are present between \"DE\" and matrix lines or between matrix\n    lines and \"XX\", STAMP adds for each of those lines \"0.0  0.0  0.0  0.0\"\n    to the matrix.\n\n    DE  motif_name\n    01     74     12     13      0      A\n    02     73      3     19      3      A\n    03      0     80      2     16      C\n    04      2     83      0     13      C\n    05     54     36      1      7      M\n    06     27      3     64      5      G\n    07     11     52      6     29      Y\n    08     60     33      1      4      M\n    XX\n\nAfter this patch it accepts TRANSFAC files in which matrix lines are separated\nby a tag that does not start with a number. The \"DE\" tag is now also optional.\nIf the \"DE\" tag is not present, the name after the \"ID\" or \"AC\" tag is used\nas motif name.\n\n    DE  motif_name1\n    P0      A      C      G      T\n    01     74     12     13      0      A\n    02     73      3     19      3      A\n    03      0     80      2     16      C\n    04      2     83      0     13      C\n    05     54     36      1      7      M\n    06     27      3     64      5      G\n    07     11     52      6     29      Y\n    08     60     33      1      4      M\n    AC  motif_name2\n    XX\n    ID  motif_name2\n    XX\n    DE  motif_name2\n    XX\n    P0       A      C     G      T\n    1      248     39   681     29\n    2        3      0     0    996\n    3        2      6     0    991\n    4       37      0     0    962\n    5       22    378   247    350\n    6       12    160   826      0\n    7        6    773     6    213\n    8       43    820   136      0\n    9      999      0     0      0\n    10     972      0    24      3\n    11     796      0    62    140\n    12      30    156    39    773\n    XX\n    //\n    CC  some comment before a motif without any name\n    01      2     83      0     13      C\n    02     54     36      1      7      M\n    03     27      3     64      5      G\n    04     11     52      6     29      Y\n    AC  motif_name3\n    P0      A      C      G      T\n    0       15     7      1     15\n    1       4      9      1     24\n    2       3      2      0     33\n    3       0      0     37      1\n    4       1     14      0     23\n    5       0      0     38      0\n    6       0      0     38      0\n    7       1      1      1     35\n    8       5     14      1     18\n\nThe commands below where used to check the correctness and robustness of the\nnew TRANFSFAC parsing code implemented in \"PlatformSupport::ReadTransfacFile\".\n\nmkdir test test/stamp_old test/stamp_new\n\ncp sample.motifs test/sample.motifs\n\nsed -e 's/^DE/AC/' sample.motifs > test/sample_noDE_but_AC.motifs\n\nsed -e 's/^DE/ID/' sample.motifs > test/sample_noDE_but_ID.motifs\n\nsed -e '/^XX/d' sample.motifs > test/sample_no_XX.motifs\n\nsed -e 's/^DE\\t\\(.*\\)/DE\\t\\1\\nP0\\tA\\tC\\tG\\tT/' sample.motifs > test/sample_P0.motifs\n\nsed -e 's/^DE\\t\\(.*\\)/AC\\tAC_\\1\\nDE\\t\\1/' sample.motifs > test/sample_AC_before_DE.motifs\n\nsed -e 's/^DE\\t\\(.*\\)/DE\\t\\1\\nAC\\tAC_\\1/' sample.motifs > test/sample_AC_after_DE.motifs\n\nsamples='sample sample_noDE_but_AC sample_noDE_but_ID sample_no_XX sample_P0 sample_AC_before_DE sample_AC_after_DE'\n\nfor sample in ${samples} ; do\n    ./stamp-old \\\n        -tf test/${sample}.motifs \\\n        -sd ./ScoreDists/JaspRand_PCC_SWU.scores \\\n        -cc PCC \\\n        -align SWU \\\n        -ma IR \\\n        -printpairwise \\\n        -match jaspar.motifs \\\n        -out test/stamp_old/${sample}\ndone\n\nfor sample in ${samples} ; do\n    ./stamp \\\n        -tf test/${sample}.motifs \\\n        -sd ./ScoreDists/JaspRand_PCC_SWU.scores \\\n        -cc PCC \\\n        -align SWU \\\n        -ma IR \\\n        -printpairwise \\\n        -match jaspar.motifs \\\n        -out test/stamp_new/${sample}\ndone\n\nprintf 'Output files generated with old STAMP:\\n'\nmd5sum test/stamp_old/* | sort\nprintf '\\nOutput files generated with new STAMP:\\n'\nmd5sum test/stamp_new/* | sort\n\nThis is the output of the \"Calculate md5sum of all output\" part:\n\nOutput files generated with old STAMP:\n2fdf6d0ac5526f1b6833a5a1824bec62  test/stamp_old/sample_AC_before_DE_matched.transfac\n2fdf6d0ac5526f1b6833a5a1824bec62  test/stamp_old/sample_matched.transfac\n3d59d2b9bcd23c1ab8a6d8c426f5992e  test/stamp_old/sample_AC_before_DE_match_pairs.txt\n3d59d2b9bcd23c1ab8a6d8c426f5992e  test/stamp_old/sample_match_pairs.txt\n52691b02d89bc073c7b6c12635ccbafa  test/stamp_old/sample_AC_after_DE_matched.transfac\n52691b02d89bc073c7b6c12635ccbafa  test/stamp_old/sample_P0_matched.transfac\n5840fa5221521a6a1c63c89263db04ff  test/stamp_old/sample_AC_after_DE_match_pairs.txt\n5840fa5221521a6a1c63c89263db04ff  test/stamp_old/sample_P0_match_pairs.txt\n82e322911571d9b612739c76c806f291  test/stamp_old/sample_AC_before_DE.tree\n82e322911571d9b612739c76c806f291  test/stamp_old/sample.tree\n8ec1e1092b027e94dc9d9fe9e0a6043e  test/stamp_old/sample_AC_before_DEFBP.txt\n8ec1e1092b027e94dc9d9fe9e0a6043e  test/stamp_old/sampleFBP.txt\n90b5c3458b876f0b4ead09ca09b73059  test/stamp_old/sample_AC_after_DE.tree\n90b5c3458b876f0b4ead09ca09b73059  test/stamp_old/sample_P0.tree\na4e2e5fbc3e43dc5cbf711b9f1f0ddc0  test/stamp_old/sample_AC_after_DEFBP.txt\na4e2e5fbc3e43dc5cbf711b9f1f0ddc0  test/stamp_old/sample_P0FBP.txt\nd41d8cd98f00b204e9800998ecf8427e  test/stamp_old/sample_noDE_but_AC_matched.transfac\nd41d8cd98f00b204e9800998ecf8427e  test/stamp_old/sample_noDE_but_AC_match_pairs.txt\nd41d8cd98f00b204e9800998ecf8427e  test/stamp_old/sample_noDE_but_ID_matched.transfac\nd41d8cd98f00b204e9800998ecf8427e  test/stamp_old/sample_noDE_but_ID_match_pairs.txt\nd41d8cd98f00b204e9800998ecf8427e  test/stamp_old/sample_no_XX_matched.transfac\nd41d8cd98f00b204e9800998ecf8427e  test/stamp_old/sample_no_XX_match_pairs.txt\n\nOutput files generated with new STAMP:\n2fdf6d0ac5526f1b6833a5a1824bec62  test/stamp_new/sample_AC_after_DE_matched.transfac\n2fdf6d0ac5526f1b6833a5a1824bec62  test/stamp_new/sample_AC_before_DE_matched.transfac\n2fdf6d0ac5526f1b6833a5a1824bec62  test/stamp_new/sample_matched.transfac\n2fdf6d0ac5526f1b6833a5a1824bec62  test/stamp_new/sample_noDE_but_AC_matched.transfac\n2fdf6d0ac5526f1b6833a5a1824bec62  test/stamp_new/sample_noDE_but_ID_matched.transfac\n2fdf6d0ac5526f1b6833a5a1824bec62  test/stamp_new/sample_no_XX_matched.transfac\n2fdf6d0ac5526f1b6833a5a1824bec62  test/stamp_new/sample_P0_matched.transfac\n3d59d2b9bcd23c1ab8a6d8c426f5992e  test/stamp_new/sample_AC_after_DE_match_pairs.txt\n3d59d2b9bcd23c1ab8a6d8c426f5992e  test/stamp_new/sample_AC_before_DE_match_pairs.txt\n3d59d2b9bcd23c1ab8a6d8c426f5992e  test/stamp_new/sample_match_pairs.txt\n3d59d2b9bcd23c1ab8a6d8c426f5992e  test/stamp_new/sample_noDE_but_AC_match_pairs.txt\n3d59d2b9bcd23c1ab8a6d8c426f5992e  test/stamp_new/sample_noDE_but_ID_match_pairs.txt\n3d59d2b9bcd23c1ab8a6d8c426f5992e  test/stamp_new/sample_no_XX_match_pairs.txt\n3d59d2b9bcd23c1ab8a6d8c426f5992e  test/stamp_new/sample_P0_match_pairs.txt\n82e322911571d9b612739c76c806f291  test/stamp_new/sample_AC_after_DE.tree\n82e322911571d9b612739c76c806f291  test/stamp_new/sample_AC_before_DE.tree\n82e322911571d9b612739c76c806f291  test/stamp_new/sample_noDE_but_AC.tree\n82e322911571d9b612739c76c806f291  test/stamp_new/sample_noDE_but_ID.tree\n82e322911571d9b612739c76c806f291  test/stamp_new/sample_no_XX.tree\n82e322911571d9b612739c76c806f291  test/stamp_new/sample_P0.tree\n82e322911571d9b612739c76c806f291  test/stamp_new/sample.tree\n8ec1e1092b027e94dc9d9fe9e0a6043e  test/stamp_new/sample_AC_after_DEFBP.txt\n8ec1e1092b027e94dc9d9fe9e0a6043e  test/stamp_new/sample_AC_before_DEFBP.txt\n8ec1e1092b027e94dc9d9fe9e0a6043e  test/stamp_new/sampleFBP.txt\n8ec1e1092b027e94dc9d9fe9e0a6043e  test/stamp_new/sample_noDE_but_ACFBP.txt\n8ec1e1092b027e94dc9d9fe9e0a6043e  test/stamp_new/sample_noDE_but_IDFBP.txt\n8ec1e1092b027e94dc9d9fe9e0a6043e  test/stamp_new/sample_no_XXFBP.txt\n8ec1e1092b027e94dc9d9fe9e0a6043e  test/stamp_new/sample_P0FBP.txt\n\nThe new code generates the same results for all provided input samples,\nwhile the old code doesn't do that at all.","distinct":true,"url":"https://api.github.com/repos/aertslab/stamp/commits/9cdb2327991d53030bebeab1a42c7bb4ad89bf10"}]}