Homer processing multiple files
1
0
Entering edit mode
7.4 years ago
tkygyn ▴ 30

Hi everyone,

I'm using Homer to map my bed files to genes.

annotatePeaks.pl path/to/file/file.bed mm9 > path/to/file/file_output.txt

This works great but I have a lot of bed files. I tried looping over the files in the directory but it didn't work.

> #!/usr/bin/perl -w
> 
> @files = <"/path/to/file/*.bed">;
> 
> foreach $file (@files) {   annotatePeaks.pl $file mm9 > $file.txt; }

Any ideas what I'm doing wrong?

Thank you.

ChIP-Seq • 1.6k views
ADD COMMENT
1
Entering edit mode
7.4 years ago

use SHELL

for file in /path/to/file/*.bed; do
    annotatePeaks.pl $file mm9 > $file.txt
done
ADD COMMENT
0
Entering edit mode

You are absolutely right. Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 3252 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