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
e8d35587
Commit
e8d35587
authored
Feb 23, 2025
by
etowahadams
Browse files
updated script
parent
e605ec81
Changes
1
Hide 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 @
e8d35587
...
@@ -9,8 +9,8 @@
...
@@ -9,8 +9,8 @@
# output_dir:
# output_dir:
# The directory in which to construct the reformatted data
# The directory in which to construct the reformatted data
if
[
[
$#
!=
2
]
]
;
then
if
[
"$#"
-ne
2
]
;
then
echo
"
u
sage: ./flatten_roda.sh <roda_dir> <output_dir>"
echo
"
U
sage: ./flatten_roda.sh <roda_dir> <output_dir>"
exit
1
exit
1
fi
fi
...
@@ -23,25 +23,36 @@ ALIGNMENT_DIR="${OUTPUT_DIR}/alignments"
...
@@ -23,25 +23,36 @@ ALIGNMENT_DIR="${OUTPUT_DIR}/alignments"
mkdir
-p
"
${
DATA_DIR
}
"
mkdir
-p
"
${
DATA_DIR
}
"
mkdir
-p
"
${
ALIGNMENT_DIR
}
"
mkdir
-p
"
${
ALIGNMENT_DIR
}
"
for
chain_dir
in
$(
ls
"
${
RODA_DIR
}
"
)
;
do
for
chain_dir
in
"
${
RODA_DIR
}
"
/
*
;
do
CHAIN_DIR_PATH
=
"
${
RODA_DIR
}
/
${
chain_dir
}
"
if
[
!
-d
"
$chain_dir
"
]
;
then
for
subdir
in
$(
ls
"
${
CHAIN_DIR_PATH
}
"
)
;
do
continue
if
[[
!
-d
"
$subdir
"
]]
;
then
fi
echo
"
$subdir
is not directory"
chain_name
=
$(
basename
"
$chain_dir
"
)
for
subdir
in
"
$chain_dir
"
/
*
;
do
if
[
!
-d
"
$subdir
"
]
;
then
echo
"
$subdir
is not a directory"
continue
continue
elif
[[
-z
$(
ls
"
${
subdir
}
"
)
]]
;
then
fi
if
[
-z
"
$(
ls
-A
"
$subdir
"
)
"
]
;
then
continue
continue
elif
[[
$subdir
=
"pdb"
]]
||
[[
$subdir
=
"cif"
]]
;
then
fi
mv
"
${
CHAIN_DIR_PATH
}
/
${
subdir
}
"
/
*
"
${
DATA_DIR
}
"
subdir_name
=
$(
basename
"
$subdir
"
)
if
[
"
$subdir_name
"
=
"pdb"
]
||
[
"
$subdir_name
"
=
"cif"
]
;
then
mv
"
$subdir
"
/
*
"
${
DATA_DIR
}
/"
else
else
CHAIN_ALIGNMENT_DIR
=
"
${
ALIGNMENT_DIR
}
/
${
chain_
dir
}
"
CHAIN_ALIGNMENT_DIR
=
"
${
ALIGNMENT_DIR
}
/
${
chain_
name
}
"
mkdir
-p
"
${
CHAIN_ALIGNMENT_DIR
}
"
mkdir
-p
"
${
CHAIN_ALIGNMENT_DIR
}
"
mv
"
$
{
CHAIN_DIR_PATH
}
/
${
subdir
}
"
/
*
"
${
CHAIN_ALIGNMENT_DIR
}
"
mv
"
$subdir
"
/
*
"
${
CHAIN_ALIGNMENT_DIR
}
/
"
fi
fi
done
done
done
done
NO_DATA_FILES
=
$(
find
"
${
DATA_DIR
}
"
-type
f |
wc
-l
)
NO_DATA_FILES
=
$(
find
"
${
DATA_DIR
}
"
-type
f |
wc
-l
)
if
[
[
$NO_DATA_FILES
=
0
]
]
;
then
if
[
"
$NO_DATA_FILES
"
-eq
0
]
;
then
rm
-rf
${
DATA_DIR
}
rm
-rf
"
${
DATA_DIR
}
"
fi
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