generated from Quantum-Accelerators/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
22 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,33 @@ | ||
#!/bin/tcsh | ||
|
||
################################################################# | ||
# # | ||
# This script extracts the docking scores for all the drugs and # | ||
# sorts them. # | ||
# # | ||
################################################################# | ||
################################################################### | ||
# # | ||
# This script extracts the docking scores for all the drugs and # | ||
# sorts them. # | ||
# # | ||
################################################################### | ||
|
||
# Remove existing allScores.txt file | ||
rm -f allScores.txt | ||
|
||
# Navigate to the rDock_inputs directory | ||
cd rDock_inputs/ | ||
foreach mol(`cat ../moleculeLists/fileList.txt | xargs`) | ||
|
||
# Loop through each molecule in the fileList.txt | ||
foreach mol (`cat ../moleculeLists/fileList.txt | xargs`) | ||
cd $mol | ||
set score = `grep -iwA1 "<SCORE>" "$mol"_docking_out_sorted.sd | tail -1` | ||
echo "$mol $score" >> ../../allScores.txt | ||
|
||
# Extract the docking score for the current molecule | ||
set score = `grep -iwA1 "<SCORE>" "${mol}_docking_out_sorted.sd" | tail -1` | ||
|
||
# Write the molecule name and its score to allScores.txt | ||
echo "$mol $score" >> ../../allScores.txt | ||
|
||
cd .. | ||
end | ||
end | ||
|
||
# Navigate back to the main directory | ||
cd .. | ||
|
||
# Sort the allScores.txt file based on the docking scores and save it to sorted_allScores.txt | ||
sort -k2g allScores.txt > sorted_allScores.txt | ||
|
||
|