diff options
author | LLTommy | 2020-04-23 20:18:36 +0200 |
---|---|---|
committer | GitHub | 2020-04-23 20:18:36 +0200 |
commit | 7049cd5d29acd601ccbbc9d04f001b84a51e9bd5 (patch) | |
tree | 34a1254d81c2e526427fedb1deaa9f8441e8b260 /scripts/foreach.sh | |
parent | f38b9c6f22b82327df9648938a5a4bcf863d8c41 (diff) | |
parent | c7612e7eda5cd38bfbb2d293bebf732893a41b6c (diff) | |
download | bh20-seq-resource-7049cd5d29acd601ccbbc9d04f001b84a51e9bd5.tar.gz bh20-seq-resource-7049cd5d29acd601ccbbc9d04f001b84a51e9bd5.tar.lz bh20-seq-resource-7049cd5d29acd601ccbbc9d04f001b84a51e9bd5.zip |
Merge branch 'master' into patch-3
Diffstat (limited to 'scripts/foreach.sh')
-rwxr-xr-x | scripts/foreach.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/foreach.sh b/scripts/foreach.sh new file mode 100755 index 0000000..ddc9387 --- /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/ -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 |