aboutsummaryrefslogtreecommitdiff
path: root/scripts/foreach.sh
diff options
context:
space:
mode:
authorlltommy2020-04-22 18:37:35 +0200
committerlltommy2020-04-22 18:37:35 +0200
commit5582ed4f4bd6bd5b03d20a0c88dc7fa27d2d5cde (patch)
tree466dfc19d583aedb44f366ddacc6fa8e0b7a890e /scripts/foreach.sh
parentb34531de1f49e4faa82a9c350f0c5d4169ccfeb4 (diff)
parentce696b41b3476891ecb05185d64c289b140a73af (diff)
downloadbh20-seq-resource-5582ed4f4bd6bd5b03d20a0c88dc7fa27d2d5cde.tar.gz
bh20-seq-resource-5582ed4f4bd6bd5b03d20a0c88dc7fa27d2d5cde.tar.lz
bh20-seq-resource-5582ed4f4bd6bd5b03d20a0c88dc7fa27d2d5cde.zip
Merge branch 'master' of https://github.com/arvados/bh20-seq-resource
Diffstat (limited to 'scripts/foreach.sh')
-rwxr-xr-xscripts/foreach.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/foreach.sh b/scripts/foreach.sh
new file mode 100755
index 0000000..35b07b8
--- /dev/null
+++ b/scripts/foreach.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+rm -rf validated fasta_and_yaml_*
+mkdir -p validated
+./from_genbank_to_fasta_and_yaml.py
+fasta_files=$(find fasta_and_yaml_20200421/ -name "*.fasta")
+for f in $fasta_files ; do
+ yaml=$(echo $f | rev | cut -c7- | rev).yaml
+ echo $f
+ echo $yaml
+ if bh20-seq-uploader --validate $f $yaml ; then
+ sz=$(stat --format=%s $f)
+ if test $sz -gt 20000 ; then
+ mv $f $yaml validated
+ else
+ echo "Fasta file too small"
+ fi
+ fi
+done