Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
OpenFold
Commits
26d1a5da
Unverified
Commit
26d1a5da
authored
Feb 24, 2025
by
Jennifer Wei
Committed by
GitHub
Feb 24, 2025
Browse files
Merge pull request #520 from etowahadams/etowahadams/update-script
Fix RODA flatten script
parents
a1192c8d
e8d35587
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
15 deletions
+26
-15
scripts/flatten_roda.sh
scripts/flatten_roda.sh
+26
-15
No files found.
scripts/flatten_roda.sh
View file @
26d1a5da
...
...
@@ -9,8 +9,8 @@
# output_dir:
# The directory in which to construct the reformatted data
if
[
[
$#
!=
2
]
]
;
then
echo
"
u
sage: ./flatten_roda.sh <roda_dir> <output_dir>"
if
[
"$#"
-ne
2
]
;
then
echo
"
U
sage: ./flatten_roda.sh <roda_dir> <output_dir>"
exit
1
fi
...
...
@@ -23,25 +23,36 @@ ALIGNMENT_DIR="${OUTPUT_DIR}/alignments"
mkdir
-p
"
${
DATA_DIR
}
"
mkdir
-p
"
${
ALIGNMENT_DIR
}
"
for
chain_dir
in
$(
ls
"
${
RODA_DIR
}
"
)
;
do
CHAIN_DIR_PATH
=
"
${
RODA_DIR
}
/
${
chain_dir
}
"
for
subdir
in
$(
ls
"
${
CHAIN_DIR_PATH
}
"
)
;
do
if
[[
!
-d
"
$subdir
"
]]
;
then
echo
"
$subdir
is not directory"
for
chain_dir
in
"
${
RODA_DIR
}
"
/
*
;
do
if
[
!
-d
"
$chain_dir
"
]
;
then
continue
elif
[[
-z
$(
ls
"
${
subdir
}
"
)
]]
;
then
fi
chain_name
=
$(
basename
"
$chain_dir
"
)
for
subdir
in
"
$chain_dir
"
/
*
;
do
if
[
!
-d
"
$subdir
"
]
;
then
echo
"
$subdir
is not a directory"
continue
elif
[[
$subdir
=
"pdb"
]]
||
[[
$subdir
=
"cif"
]]
;
then
mv
"
${
CHAIN_DIR_PATH
}
/
${
subdir
}
"
/
*
"
${
DATA_DIR
}
"
fi
if
[
-z
"
$(
ls
-A
"
$subdir
"
)
"
]
;
then
continue
fi
subdir_name
=
$(
basename
"
$subdir
"
)
if
[
"
$subdir_name
"
=
"pdb"
]
||
[
"
$subdir_name
"
=
"cif"
]
;
then
mv
"
$subdir
"
/
*
"
${
DATA_DIR
}
/"
else
CHAIN_ALIGNMENT_DIR
=
"
${
ALIGNMENT_DIR
}
/
${
chain_
dir
}
"
CHAIN_ALIGNMENT_DIR
=
"
${
ALIGNMENT_DIR
}
/
${
chain_
name
}
"
mkdir
-p
"
${
CHAIN_ALIGNMENT_DIR
}
"
mv
"
$
{
CHAIN_DIR_PATH
}
/
${
subdir
}
"
/
*
"
${
CHAIN_ALIGNMENT_DIR
}
"
mv
"
$subdir
"
/
*
"
${
CHAIN_ALIGNMENT_DIR
}
/
"
fi
done
done
NO_DATA_FILES
=
$(
find
"
${
DATA_DIR
}
"
-type
f |
wc
-l
)
if
[
[
$NO_DATA_FILES
=
0
]
]
;
then
rm
-rf
${
DATA_DIR
}
if
[
"
$NO_DATA_FILES
"
-eq
0
]
;
then
rm
-rf
"
${
DATA_DIR
}
"
fi
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment