4
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ You seem to have (relative easy) access to the code, have you checked it? $\endgroup$ – llrs Aug 29 '17 at 15:55
  • $\begingroup$ What do you mean Llopis? $\endgroup$ – benn Aug 29 '17 at 20:18
  • $\begingroup$ who is Chuck :') $\endgroup$ – aechchiki Aug 30 '17 at 7:53
  • 1
    $\begingroup$ Norris, it's a running gag thru out the homer user guide ;P $\endgroup$ – benn Aug 30 '17 at 8:08
  • $\begingroup$ @b.nota findMotifsGenome.pl is a perl script, so you could read the code and see what happens. $\endgroup$ – llrs Aug 31 '17 at 9:46
3
$\begingroup$

I have provided a solution 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.

$\endgroup$
  • $\begingroup$ Please consider adding the relevant parts of your answer here too, in case Biostars isn't accessible and to prevent rotten links. $\endgroup$ – llrs Oct 27 '17 at 13:44
  • $\begingroup$ Great job, malcook! Upvote from me! $\endgroup$ – benn Oct 28 '17 at 9:01
1
$\begingroup$

The relevant help page of homer seems to be this one.

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.

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – benn Sep 3 '17 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.