Peak-calling using homer I have a total of 78 ATAC seq samples from which Im trying to do a peak call .I tried this batchParallel.pl findPeaks peaks function but i couldn't find the output what it makes.

So I tried using loop but again the peak file is not written due to incorrect argument usage I guess.

These are my sample directories where i have all the tags

SRR2920564  SRR2920565


I used homer to make tag directories and now i using it for peakcalling.

here is my command.

for d in */ ; do findPeaks $d -style factor -o "${d}.txt" ; done 


What i need is all the peakfile should be written as the directory name.

Such as if directory is "SRR2920564" then my peak file should be written in the same directory as SRR2920564.txt

I do run the loop it runs successfully but no output written. May be a mundane mistake am not able to figure it out.

Any suggestion or help would be highly appreciated .
You just need to strip the / from $d, for which there are a number of options:

for d in */ ; do 
    dname=`basename $d`
    findPeaks $d -style factor -o ${dname}.txt
done


or

for d in */ ; do
    dname=${d%%/}
    findPeaks $d -style factor -o ${dname}.txt
done


There are likely other ways one could go about this. Having said that, since you're not running these in parallel you could simply move the default output file (peak.txt) to a file name of your choice (using one of the strategies above).