Where are .motif files from homer knownResults?
1
1
Entering edit mode
7.2 years ago
Benn 8.3k

I also asked this question on SE bioinformatics, but since I didn't get any answers yet, I would like to ask it here as well. Hope you don't mind.

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.

Does anyone know of this 'bug' in the new version of homer? Any solutions?

My code:

findMotifsGenome.pl All_peaks.txt Homo_sapiens.GRCh38.dna.primary_assembly.fa Peaks.All -p 20
homer ChIP-Seq atac-seq motifs • 3.9k views
ADD COMMENT
1
Entering edit mode
7.1 years ago
Malcolm.Cook ★ 1.5k

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.

~ Similarly afflicted in Kansas USA!

ADD COMMENT
0
Entering edit mode

Wow, thanks for your hacking solution man. I didn't expect any solution anymore, I thought it was just me. So when my co-workers asked again for the motifs last week, I found out that you can also use the old method in homer (without the svg). You'll have to include -seqlogo to the findMotifsGenome.pl command. You'll have to install some other stuff first, though. Sorry didn't have time to post it here yet (I am not very active here anymore).

ADD REPLY

Login before adding your answer.

Traffic: 2301 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6