How to create out dir's using shell scripting to run FIMO on multiple files?
1
0
Entering edit mode
5.0 years ago
arunbodd ▴ 10

Hello everyone,

I am trying to run FIMO on my server for multiple motif files. But it cannot create output directories instead overwrites the output directory with motif outputs. So, i am trying to do the following command but it doesn't seem to work. Can you please tell me how can i create multiple out directories, so that i can direct each motif output to its respective directory?

for f in /home/arunbodd/Fimo/Encode__CLIP_HepG2_2016/*.motif; do mkdir -p "$(dirname "/home/arunbodd/Fimo/$f_out")" &&  fimo --o /home/arunbodd/Fimo/{$f}_out --max-seq-length 2.5e8 --thresh 0.05  $f  /home/arunbodd/Fimo/mart_export.txt; done

Thank You

shell script fimo command line • 1.8k views
ADD COMMENT
2
Entering edit mode
5.0 years ago
Ram 34k

Just as a good practice, always enclose bash variables in {} - in your $f_out for example - how does bash know if you're looking for $f_out or $f_out? Use ${f}_out.

ADD COMMENT
0
Entering edit mode

hey ram

thank you, It was working.

ADD REPLY
0
Entering edit mode

Glad to know it worked - please accept my answer if it was helpful.

ADD REPLY

Login before adding your answer.

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