Answers.Body: <p>I have provided a <a href="https://www.biostars.org/p/269966/#280121" rel="nofollow noreferrer">solution</a> in Biostars:</p>
  
  <p>If you edit the file <code>findKnownMotifs.pl</code> and move the call to <code>printMotif</code> to come before testing <code>$svgFlag</code> you will find that <code>.motif</code> files are printed again. </p>
  
  <p>In the following I have commented out the call from where it need not be, and introduced it as the first line, right before the <code>if</code> block:</p>
  
  <pre><code>   printMotif($_, $directory . "/$knownDir/$matrixFile"); # this should be done regardless of $svgFlag                                                                                                        
      if ($svgFlag) {
          my $str = HomerSVGLogo::motif2svg($_,$bitFlag,$rnaFlag2);
              open SVG, "&gt;$directory/$knownDir/$logoFile.svg";
              print SVG $str;
              close SVG;
              print MAIN "$str\n";
      } else {
    #printMotif($_, $directory . "/$knownDir/$matrixFile"); # this should be done regardless of $svgFlag                                                                                               
              `profile2seq.pl "$directory/$knownDir/$matrixFile" 100 &gt; "$tmpFile"`;
              my $width = $widthFactor * $_-&gt;{'len'};
              `seqlogo -a $bits -f "$tmpFile" -F PNG -S -c -o "$directory/$knownDir/$logoFile" -h $height -w $width`;
    `seqlogo -a $bits -f "$tmpFile" -F PDF -S -c -o "$directory/$knownDir/$logoFile" -h $height -w $width 2&gt; /dev/null`;
    print MAIN "&lt;IMG src=\"$knownDir/$logoFile.png\"/&gt;";
  }
  </code></pre>
  
  <p>I expect this change was mistakenly introduced while refactoring the code to support svg as alternate output format for logos.</p>
  
  <p>I have reported this to the author of this code.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-27T13:44:54.003Z
Answers.Text: Please consider adding the relevant parts of your answer here too, in case Biostars isn't accessible and to prevent rotten links.
Answers.UserDisplayName: llrs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-28T09:01:30.460Z
Answers.Text: Great job, malcook! Upvote from me!
Answers.UserDisplayName: benn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-26T22:19:13.753Z
Answers.LastActivityDate: 2017-10-27T16:09:43.360Z
Answers.LastEditDate: 2017-10-27T16:09:43.360Z
Answers.UserDisplayName: malcook
Answers.Body: <p>The relevant help page of homer seems to be this <a href="http://homer.ucsd.edu/homer/motif/index.html" rel="nofollow noreferrer">one</a>.</p>
  
  <p>On section 13 it says:</p>
  
  <blockquote>
    <p>An HTML page is created in the output directory named homerResults.html along with a directory named "homerResults/" that contains all of the image and other support files to create the page.  These pages are explicitly created by running a subprogram called "compareMotifs.pl".</p>
  </blockquote>
  
  <p>You seeem to have this images on the expected folder.<br>
  Also on section 12 it says:</p>
  
  <blockquote>
    <p>They [The *.motifs files] are reported in the output directories from findMotifs.pl and findMotifsGenome.pl</p>
  </blockquote>
  
  <p>So you'll need to specify the output directory for findMotifsGenome.pl.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-03T09:35:24.473Z
Answers.Text: Thanks again, I appreciate it. Section 13 is about homerResults, which is the de novo results folder. This seems fine, they contain .motif files. However, my question is about the knownResults folder, which is for known motifs, not de novo. As mentioned in my question they do not contain .motifs files, but according to the help page you sent me they should contain them.
Answers.UserDisplayName: benn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-02T10:18:37.603Z
Answers.LastActivityDate: 2017-09-02T10:18:37.603Z
Answers.UserDisplayName: llrs
Body: <p>I have been using homer's <code>findMotifsGenome.pl</code>, but with my new version (v4.9.1) of <code>homer</code> I don't get <code>.motif</code> files in the <code>knownResults</code> folder. I do get them in the <code>homerResults</code> (<em>de novo</em>) folder, though. With my previous version of <code>homer</code> I did get them and used them to find which peaks are in which motif. Which is what I would like to do</p>
  
  <p>Does anyone know why there are no <code>.motif</code> files? I have only <code>.svg</code> files. I have seen that for the <code>homerResults</code> the <code>.motif</code> files are concatenated already into a file called <code>homerMotifs.all.motifs</code>, but no such file for <code>knownResults</code>.</p>
  
  <p>PS. I tried to call Chuck for help, but he was not answering his phone...</p>
  
  <p>PS2. I will ask this question on Biostars to hopefully get more response than here.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-29T15:55:48.160Z
Comments.Text: You seem to have (relative easy) access to the code, have you checked it?
Comments.UserDisplayName: llrs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-29T20:18:02.400Z
Comments.Text: What do you mean Llopis?
Comments.UserDisplayName: benn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-30T07:53:36.887Z
Comments.Text: who is Chuck :')
Comments.UserDisplayName: aechchiki
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-30T08:08:47.037Z
Comments.Text: Norris, it's a running gag thru out the homer user guide ;P
Comments.UserDisplayName: benn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-31T09:46:06.780Z
Comments.Text: @b.nota findMotifsGenome.pl is a perl script, so you could read the code and see what happens.
Comments.UserDisplayName: llrs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-31T09:49:58.913Z
Comments.Text: Sorry Llopis, that is not helpful. Thanks anyway.
Comments.UserDisplayName: benn
Tags: <chip-seq><motifs><homer><atac-seq>
Title: Where are .motif files from homer knownResults?
ThreadText: # Where are .motif files from homer knownResults?
  
  (Asked by: username_0 on 2017-08-29)
  
  I have been using homer's `findMotifsGenome.pl`, but with my new version (v4.9.1) of `homer` I don't get `.motif` files in the `knownResults` folder. I do get them in the `homerResults` (*de novo*) folder, though. With my previous version of `homer` I did get them and used them to find which peaks are in which motif. Which is what I would like to do
  
  Does anyone know why there are no `.motif` files? I have only `.svg` files. I have seen that for the `homerResults` the `.motif` files are concatenated already into a file called `homerMotifs.all.motifs`, but no such file for `knownResults`.
  
  PS. I tried to call Chuck for help, but he was not answering his phone...
  
  PS2. I will ask this question on Biostars to hopefully get more response than here.
  
  **Tags:** chip-seq, motifs, homer, atac-seq
  
  > **Comments:**
  > **username_1**: You seem to have (relative easy) access to the code, have you checked it?  
  > **username_0**: What do you mean Llopis?  
  > **username_2**: who is Chuck :')  
  > **username_0**: Norris, it's a running gag thru out the homer user guide ;P  
  > **username_1**: @b.nota findMotifsGenome.pl is a perl script, so you could read the code and see what happens.  
  > **username_0**: Sorry Llopis, that is not helpful. Thanks anyway.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2017-10-26. Score: 3
  
  I have provided a [solution](https://www.biostars.org/p/269966/#280121) in Biostars:
  
  If you edit the file `findKnownMotifs.pl` and move the call to `printMotif` to come before testing `$svgFlag` you will find that `.motif` files are printed again.
  
  In the following I have commented out the call from where it need not be, and introduced it as the first line, right before the `if` block:
  
  ```
     printMotif($_, $directory . "/$knownDir/$matrixFile"); # this should be done regardless of $svgFlag                                                                                                        
      if ($svgFlag) {
          my $str = HomerSVGLogo::motif2svg($_,$bitFlag,$rnaFlag2);
              open SVG, ">$directory/$knownDir/$logoFile.svg";
              print SVG $str;
              close SVG;
              print MAIN "$str\n";
      } else {
    #printMotif($_, $directory . "/$knownDir/$matrixFile"); # this should be done regardless of $svgFlag                                                                                               
              `profile2seq.pl "$directory/$knownDir/$matrixFile" 100 > "$tmpFile"`;
              my $width = $widthFactor * $_->{'len'};
              `seqlogo -a $bits -f "$tmpFile" -F PNG -S -c -o "$directory/$knownDir/$logoFile" -h $height -w $width`;
    `seqlogo -a $bits -f "$tmpFile" -F PDF -S -c -o "$directory/$knownDir/$logoFile" -h $height -w $width 2> /dev/null`;
    print MAIN "<IMG src=\"$knownDir/$logoFile.png\"/>";
  }
  
  ```
  
  I expect this change was mistakenly introduced while refactoring the code to support svg as alternate output format for logos.
  
  I have reported this to the author of this code.
  
  > **Comments:**
  > **username_1**: Please consider adding the relevant parts of your answer here too, in case Biostars isn't accessible and to prevent rotten links.  
  > **username_0**: Great job, username_3! Upvote from me!  
  
  ---
  
  ### Answer by username_1 on 2017-09-02. Score: 1
  
  The relevant help page of homer seems to be this [one](http://homer.ucsd.edu/homer/motif/index.html).
  
  On section 13 it says:
  
  > An HTML page is created in the output directory named homerResults.html along with a directory named "homerResults/" that contains all of the image and other support files to create the page. These pages are explicitly created by running a subprogram called "compareMotifs.pl".
  
  You seeem to have this images on the expected folder.  
  Also on section 12 it says:
  
  > They [The \*.motifs files] are reported in the output directories from findMotifs.pl and findMotifsGenome.pl
  
  So you'll need to specify the output directory for findMotifsGenome.pl.
  
  > **Comments:**
  > **username_0**: Thanks again, I appreciate it. Section 13 is about homerResults, which is the de novo results folder. This seems fine, they contain .motif files. However, my question is about the knownResults folder, which is for known motifs, not de novo. As mentioned in my question they do not contain .motifs files, but according to the help page you sent me they should contain them.  
  
  ---
  
  