Reputation: 63
I am using MacOS.
I am trying to annotate Transcription factors Motifs through the fimo tool. I need to run fimo on multiple Motifs --motif $line names contained in the file MotifsList.txt. In order to work, fimo need to access at 2 other files (file.meme, file.fa) beside the MotifsList.txt one. I would run everything from the command line using a produced file.sh containing the script. All the files needed; .txt, .sh, .meme and .fa are stored in the same folder called Motifs_analysis. I would like the out-put Resultfile to be saved in the same cd.
MOTIF BU0001.Arid3a_primary
MOTIF MA0151.1 Arid3a
MOTIF MA0601.1 Arid3b
MOTIF ARNT_HUMAN.H11MO.0.B
....
#!/bin/bash
while IFS= read -r line || [[ -n $line ]]; do
fimo --thresh 1e-4 --no-qvalue --max-stored-scores 10000000 --motif $line --text file.meme genome.fa > ResultFile
done < $1
cd /Users/myho2345/Desktop/Motifs_analysis
chmod +x file.sh
./file.sh MotifsList.txt
*Error:
zsh: ./file.sh: bad interpreter: /bin/bash^M: no such file or directory
The scripts are not correct. Where am I doing wrong?
Best and thank you so much for the help!!!!
Upvotes: 0
Views: 112
Reputation: 5139
^M
is a carriage-return characters in DOS filesystems, it is "invisible".
2 options to fix:
# Option 1
dos2unix file.sh
# Option 2
sed -i 's/\r//g' file.sh
Upvotes: 1