These are the steps I took to install WebApollo on the prebuilt AWS image. Some steps need only be performed once, such as installing the custom valves in Tomcat or installing BLAT, to ensure that the system is ready. These steps will be denoted with an asterisk (*).
Note: These notes follow along with the general WebApollo installation guide (). The guide below details the steps I used to set up the GMOD Summer School 2013 AMI.
For more information about using WebApollo, please see the user guide, located here: http://genomearchitect.org/webapollo/docs/webapollo_user_guide.pdf
mkdir ~/dataHome/WebApollo2
cd ~/dataHome/WebApollo2
wget https://apollo-web.googlecode.com/files/WebApollo-2013-05-16.tgz
wget http://genomearchitect.org/webapollo/data/pyu_data.tgz
tar -xvzf WebApollo-2013-05-16.tgz
tar -xvzf pyu_data.tgz
$ sudo su postgres
$ createuser -P web_apollo_users_admin
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
$ createdb -U web_apollo_users_admin web_apollo_users
$ exit
cd /data/dataHome/WebApollo2/WebApollo-2013-05-16/tools/user
psql -U web_apollo_users_admin web_apollo_users < \
user_database_postgresql.sql
./add_user.pl -D web_apollo_users -U web_apollo_users_admin -P \
web_apollo_users_admin -u web_apollo_admin -p web_apollo_admin
cd /data/dataHome/WebApollo2/WebApollo-2013-05-16/tools/user
mkdir /data/dataHome/WebApollo2/pyu_data/scratch/
./extract_seqids_from_fasta.pl -p Annotations- \
-i /data/dataHome/WebApollo2/pyu_data/scf1117875582023.fa \
-o /data/dataHome/WebApollo2/pyu_data/scratch/seqids.txt
cd /data/dataHome/WebApollo2/WebApollo-2013-05-16/tools/user
./add_tracks.pl -D web_apollo_users -U web_apollo_users_admin \
-P web_apollo_users_admin -t /data/dataHome/WebApollo2/pyu_data/scratch/seqids.txt
cd /data/dataHome/WebApollo2/WebApollo-2013-05-16/tools/user
./set_track_permissions.pl -D web_apollo_users \
–U web_apollo_users_admin -P web_apollo_users_admin -a \
-u web_apollo_admin -t /data/dataHome/WebApollo2/pyu_data/scratch/seqids.txt
sudo cp \
~/dataHome/WebApollo2/WebApollo-2013-05-16/tomcat/custom-valves.jar \
/usr/share/tomcat7/lib/
$ less /var/lib/tomcat7/conf/server.xml
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
errorReportValveClass="org.bbop.apollo.web.ErrorReportValve">
</Host>
sudo mkdir /var/lib/tomcat7/webapps/WebApollo2
cd /var/lib/tomcat7/webapps/WebApollo2
sudo jar xvf ~/dataHome/WebApollo2/WebApollo-2013-05-16/war/WebApollo.war
sudo mkdir /var/lib/tomcat7/webapps/WebApollo2/tmp
sudo chown tomcat7:tomcat7 /var/lib/tomcat7/webapps/WebApollo2/tmp
cd /data/dataHome/WebApollo2
mkdir Pyu Pyu/Blat Pyu/Blat/tmp Pyu/Annotations Pyu/data
sudo chown -R tomcat7:tomcat7 /data/dataHome/WebApollo2/Pyu/Annotations
sudo chown -R tomcat7:tomcat7 /data/dataHome/WebApollo2/Pyu/Blat/tmp
cd /var/lib/tomcat7/webapps/WebApollo2/jbrowse
sudo ln -s /data/dataHome/WebApollo2/Pyu/data/ .
sudo ln -s /data/dataHome/WebApollo2/pyu_data .
cp /data/dataHome/WebApollo2/WebApollo-2013-05-16/json/* ./data/
cd /var/lib/tomcat7/webapps/WebApollo2/jbrowse/pyu_data
mkdir scratch/split_gff
~/dataHome/WebApollo2/WebApollo-2013-05-16/tools/data/split_gff_by_source.pl -i scf1117875582023.gff \
-d scratch/split_gff
cd /data/dataHome/WebApollo2/Pyu/Blat
ln -s ../../pyu_data/scf1117875582023.fa
faToTwoBit scf1117875582023.fa Pyu.2bit
cd /var/lib/tomcat7/webapps/WebApollo2/jbrowse
sudo chmod +x bin/*
bin/prepare-refseqs.pl --fasta pyu_data/scf1117875582023.fa
bin/flatfile-to-json.pl --gff pyu_data/scratch/split_gff/maker.gff \
--arrowheadClass trellis-arrowhead --getSubfeatures \
--subfeatureClasses '{"wholeCDS": null, "CDS":"brightgreen-80pct", "UTR": "darkgreen-60pct", "exon":"container-100pct"}' \
--cssClass container-16px --type mRNA --trackLabel maker \
--webApollo --renderClassName gray-center-20pct
for i in $(ls pyu_data/scratch/split_gff/*.gff | grep -v maker); do
j=$(basename $i)
j=${j/.gff/}
echo "Processing $j"
bin/flatfile-to-json.pl --gff $i --arrowheadClass webapollo-arrowhead \
--getSubfeatures --subfeatureClasses "{\"match_part\": \"darkblue-80pct\"}" \
--cssClass container-10px --trackLabel $j \
--webApollo --renderClassName gray-center-20pct
done
### Output
#Processing blastn
#Processing blastx
#Processing est2genome
#Processing protein2genome
#Processing repeatmasker
#Processing repeatrunner
#Processing snap_masked
bin/generate-names.pl
mkdir data/bam
cp pyu_data/*.bam* data/bam
bin/add_bam_track.pl --bam_url bam/simulated-sorted.bam --label \
simulated_bam --key "simulated BAM"
mkdir data/bigwig
cp pyu_data/*.bw data/bigwig/
bin/add_bw_track.pl --bw_url bigwig/simulated-sorted.coverage.bw \
--label simulated_bw --key "simulated BigWig"
sudo chown ubuntu:ubuntu *
<datastore_directory>ENTER_DATASTORE_DIRECTORY_HERE</datastore_directory>
<datastore_directory>/data/dataHome/WebApollo2/Pyu/Annotations</datastore_directory>
<url>ENTER_USER_DATABASE_JDBC_URL</url>
<url>jdbc:postgresql://localhost/web_apollo_users</url>
<username>ENTER_USER_DATABASE_USERNAME</username>
<username>web_apollo_users_admin</username>
<password>ENTER_USER_DATABASE_PASSWORD</password>
<password>web_apollo_users_admin</password>
<refseqs>ENTER_PATH_TO_REFSEQS_JSON_FILE</refseqs>
<refseqs>/var/lib/tomcat7/webapps/WebApollo2/jbrowse/data/refSeqs.json</refseqs>
<organism>ENTER_ORGANISM</organism>
<organism>Pythium ultimum</organism>
<sequence_type>ENTER_CVTERM_FOR_SEQUENCE</sequence_type>
<sequence_type>sequence:contig</sequence_type>
<blat_bin>ENTER_PATH_TO_BLAT_BINARY</blat_bin>
<blat_bin>/opt/bin/blat</blat_bin>
<tmp_dir>ENTER_PATH_FOR_TEMPORARY_DATA</tmp_dir>
<tmp_dir>/data/dataHome/WebApollo2/Pyu/Blat/tmp</tmp_dir>
<database>ENTER_PATH_TO_BLAT_DATABASE</database>
<database>/data/dataHome/WebApollo2/Pyu/Blat/Pyu.2bit</database>
<blat_options>ENTER_ANY_BLAT_OPTIONS</blat_options>
<blat_options>-minScore=100 -minIdentity=60</blat_options>
sudo service tomcat7 restart
http://YOUR _HOST:8080/WebApollo2
http://YOUR _HOST:8080/WebApollo2/jbrowse
There are several pre-defined track styles included with the WebApollo release. If you’d like to use an included style, replace the subfeature section with the style name:
whatever-80pct
green-80pct
blue-80pct
purple-80pct
springgreen-80pct
blueviolet-80pct
mediumpurple-80pct
orange-80pct
darkorange-60pct
For example, to style a match type track with light green, adjust the load command like this:
--subfeatureClasses "{\"match_part\": \"darkblue-80pct\"}"
Becomes:
--subfeatureClasses "{\"match_part\": \"springgreen-80pct\"}"
These styles are located in the custom_track_styles.css file:
jbrowse/plugins/WebApollo2/css/custom_track_styles.css
You can also edit the styles after loading. The information on track styles are located in
jbrowse/data/trackList.json