get_maps.sh 722 Bytes
Newer Older
samuel hanot's avatar
samuel hanot committed
1
2
3
#!/bin/bash


4
5
6
bindir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
rec_gmconvert=${bindir}/recursive_gmconvert.sh
echo "rec_gmconvert=${rec_gmconvert}"
samuel hanot's avatar
samuel hanot committed
7
8
9
10
11
12
13
source ${bindir}/modules.sh

for f in $(cat)
do
	echo $f
	rsync -a -v -z --delete rsync.ebi.ac.uk::pub/databases/emdb/structures/EMD-${f}/ $f
	cd $f
14
15
	curl http://www.ebi.ac.uk/pdbe/entry/emdb/EMD-$f/analysis > header/map_analysis.html
	cutoff=$(awk '/contour/{print 3}' < header/map_analysis.html)
samuel hanot's avatar
samuel hanot committed
16
17
18
19
	resolution=$(sed -ne 's/[<>/ ]//g' -ne 's/resolutionByAuthor//gp' header/emd-${f}.xml)
	echo ${cutoff} > cutoff.txt
	echo ${resolution} > resolution.txt
	gunzip -c map/emd_${f}.map.gz > emd_${f}.map
20
	${rec_gmconvert} -f emd_${f}.map -t $cutoff -n $1 -N $2
samuel hanot's avatar
samuel hanot committed
21
22
	cd -
done