On Github yumyai / 2015_experimental_bio
Preecha Patumcharoenpol
echo "Hello" # Show message echo "Hello " > greeting.txt # and put it into a file echo "Robert" > name.txt cat greeting.txt name.txt # concat cat greeting.txt name.txt > hello.txt # concat and then.
clear echo "Hello $USER" echo "Today is \c ";date echo "Number of user login : \c" ; who | wc -l echo "Calendar" cal exit 0
cat 01.fa cat 01.fa 02.fa 03.fa grep ">" 01.fa wc -l 01.fa
# same as grep ">" 0.1fa cat 01.fa | grep ">" # same as wc -l 0.1fa cat 01.fa | wc -l
grep ">" 01.fa > temp wc -l temp
cat 01.fa cat 01.fa | grep ">" cat 01.fa | grep ">" | wc -l # Success
cat 01.fa 02.fa 03.fa | grep ">" | wc -l
Most likely from the internet
http://www.kegg.jp/kegg/rest/keggapi.html
curl -s -X GET "http://www.google.com" curl -s -X GET "http://rest.kegg.jp/list/pathway"
curl -s -X POST "http://www.ebi.ac.uk/Tools/services/rest/ncbiblast/run" --data "email=yumyai%40gmail.com&stype=protein&program=blastp&database=uniprotkb&sequence=%3Eseq1%20Some%20sequence%0AMAGAKEIRSKIASVQNTQKITKAMEMVAASKMRKSQDRMAASRPYAETMRKVIG" curl -s -X GET "http://www.ebi.ac.uk/Tools/services/rest/ncbiblast/----YOUR ID----/" curl -s -X GET "http://www.ebi.ac.uk/Tools/services/rest/ncbiblast/result/----YOUR ID-----/out?format=6"
# open http://rest.kegg.jp/list/pathway/cre in browser or curl it PATHWAY="path:cre03440" curl -s http://rest.kegg.jp/get/$PATHWAY gawk '/^GENE/ {seen = 1 } seen {print}' | sed '1s/^GENE//g' | sed -n '/^[^ ]/q;p' | sed 's/^[ \t]*//' | gawk '{print $1}'
PATHWAY="path:cre03440" curl -s http://rest.kegg.jp/get/$PATHWAY
PATHWAY="path:cre03440" curl -s http://rest.kegg.jp/get/$PATHWAY | gawk '/^GENE/ {seen = 1 } seen {print}'
PATHWAY="path:cre03440" curl -s http://rest.kegg.jp/get/$PATHWAY | gawk '/^GENE/ {seen = 1 } seen {print}' | sed '1s/^GENE//g'
PATHWAY="path:cre03440" curl -s http://rest.kegg.jp/get/$PATHWAY | gawk '/^GENE/ {seen = 1 } seen {print}' | sed '1s/^GENE//g' | sed -n '/^[^ ]/q;p'
PATHWAY="path:cre03440" curl -s http://rest.kegg.jp/get/$PATHWAY | gawk '/^GENE/ {seen = 1 } seen {print}' | sed '1s/^GENE//g' | sed -n '/^[^ ]/q;p' | sed 's/^[ \t]*//'
PATHWAY="path:cre03440" curl -s http://rest.kegg.jp/get/$PATHWAY | gawk '/^GENE/ {seen = 1 } seen {print}' | sed '1s/^GENE//g' | sed -n '/^[^ ]/q;p' | sed 's/^[ \t]*//' | gawk '{print $1}' exit 0
GENE="cre:CHLREDRAFT_195401" curl -s "http://rest.kegg.jp/get/$GENE/aaseq"
See 02_kegg.sh and 03_getaa.sh
sh 02_kegg.sh cre00860 | sed 's/^/cre:/' | xargs -I{} sh 03_getaa.sh {} sh 02_kegg.sh hsa04740 | sed 's/^/hsa:/' | xargs -I{} sh 03_getaa.sh {}
The point of this lecture is to understand how programs are working together.
Test them.
The answer is maybe.
sh 02_kegg.sh hsa04740 | sed 's/^/hsa:/' | xargs -I{} sh 04_getnt.sh {}