Created
January 31, 2016 17:43
-
-
Save naphthalene/d65c92b8ece43cc66131 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -f | |
IFS=$'\n' | |
esearch -db protein -query "ybfE" |\ | |
efetch -format gpc -mode xml |\ | |
xtract -insd complete CDS coded_by > query_results.txt | |
for i in $(cat query_results.txt); | |
do echo "$i" | awk '{match($0,"([A-Z0-9\\.]+)\\s+(complement\\()?([A-Z0-9\\.]+):([0-9]+)\\.\\.([0-9]+)(\\))?",a)}END{print a[1], a[3], a[4], a[5]}' | |
done | |
unset IFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment