Statistiques
| Branche: | Révision :

root / doc / index.rst @ 4fcefb60

Historique | Voir | Annoter | Télécharger (11,6 ko)

1
*****************************************
2
Readme / Documentation for `MyLabStocks`
3
*****************************************
4

    
5

    
6
`MyLabStocks` is a web application allowing to easily store, share and retrieve 
7
information about molecular biology materials stored in a laboratory. 
8

    
9
License
10
=======
11

    
12
Copyright CNRS 2012-2013                                                 
13
                                                                          
14
- Florent CHUFFART                                                         
15
- Gael YVERT                                                               
16
                                                                          
17
The Software is provided “as is” without warranty of any kind, either express or implied, including without limitation any implied warranties of condition, uninterrupted use, merchantability, fitness for a particular purpose, or non-infringement. You use this software at your own risk.
18

    
19
This software is governed by the CeCILL license under French law and abiding by the rules of distribution of free software.  You can  use, modify and/ or redistribute the software under the terms of the CeCILL license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".                                                
20
                                                                          
21
As a counterpart to the access to the source code and  rights to copy, modify and redistribute granted by the license, users are provided only  with a limited warranty  and the software's author,  the holder of the economic rights,  and the successive licensors  have only  limited liability.                                                               
22
                                                                          
23
In this respect, the user's attention is drawn to the risks associated with loading,  using,  modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean  that it is complicated to manipulate,  and  that  also therefore means  that it is reserved for developers  and  experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and,  more generally, to use and operate it in the same conditions as regards security.                                     
24
                                                                          
25
The fact that you are presently reading this means that you have had knowledge of the CeCILL license and that you accept its terms.           
26

    
27
Installation Instructions
28
=========================
29

    
30
This installation has been fully tested on:
31
  -  Debian 7.2.0 amd64 netinst [1], running on virtual machine using Oracle VM VirtualBox [2] for macosx (dev)
32
  -  Ubuntu Server 12.04.3 LTSUbuntu server LTS [3], running on physical machine (prod)
33
  
34
[1] http://cdimage.debian.org/debian-cd/7.2.0/amd64/iso-cd/debian-7.2.0-amd64-netinst.iso
35

    
36
[2] https://www.virtualbox.org
37

    
38
[3] http://www.ubuntu.com/download/server
39

    
40
Prerequisites
41
-------------
42

    
43
Prior to installing MyLabStocks, a number of packages must be installed on your system. Git is used to retrieve MyLabStocks sources. MySQL, Apache and phpMyAdmin ensure web and database services, it needs php5 and php5-curl packages. Tomcat6 will support advanced plasmid visualisation services (PlasMapper), it needs openjdk-6-jdk and ant. Finally, Blast is used to analyse sequences, it needs csh.
44

    
45
On the targeted server, you can install these packages by typing the following command in a terminal.
46

    
47
.. code:: bash
48

    
49
  sudo apt-get install git apache2 mysql-server php5 php5-curl phpmyadmin tomcat6 ant openjdk-6-jdk blast2 csh  
50
..
51

    
52

    
53
Get MyLabStocks Sources
54
------------------------
55

    
56
The first installation step is to retrieve the source code of MyLabStocks. You can do this by typing the following command in a terminal.
57

    
58
.. code:: bash
59

    
60
  git clone http://forge.cbp.ens-lyon.fr/git/mylabstocks
61
..
62

    
63

    
64
Install wwwblast
65
----------------
66

    
67
MyLabStocks uses Blast queries for several of its features, wwwblast is a web interface which provides access to this feature in a user-friendly way.
68

    
69
MyLabStocks is distributed with wwwblast working on a x64 architecture.
70
For other architectures, please refer to the NCBI repositories
71
http://mirrors.vbi.vt.edu/mirrors/ftp.ncbi.nih.gov/blast/executables/release/LATEST
72

    
73
On the targeted server type the following commands in a terminal.
74

    
75
.. code:: bash
76

    
77
  cd mylabstocks/opts/
78
  tar xfvz wwwblast-2.2.26-x64-linux.tar.gz
79
  sudo cp -r blast /var/www/.
80
  sudo chown www-data:www-data /var/www/blast/TmpGifs /var/www/blast/*.log /var/www/blast/db/
81
  echo "<Directory /var/www/blast/>" > /tmp/blast.conf 
82
  echo "   Options +ExecCGI" >> /tmp/blast.conf 
83
  echo "</Directory>" >> /tmp/blast.conf 
84
  echo "AddHandler cgi-script .cgi" >> /tmp/blast.conf 
85
  sudo cp /tmp/blast.conf /etc/apache2/conf.d/blast.conf 
86
  rm /tmp/blast.conf
87
  sudo /etc/init.d/apache2 restart
88
  sudo sed -i 's/<option VALUE.*test_na_db/<option VALUE=oligostock_db>oligostock_db<option VALUE=plasmidstock_db>plasmidstock_db<option VALUE=plfeatstock_db>plfeatstock_db/g' /var/www/blast/blast.html
89
  sudo sed -i 's/<option VALUE.*test_aa_db//g' /var/www/blast/blast.html
90
  cat /var/www/blast/blast.rc > /tmp/blast.rc
91
  echo "blastn oligostock_db" >> /tmp/blast.rc
92
  echo "tblastn oligostock_db" >> /tmp/blast.rc
93
  echo "tblastx oligostock_db" >> /tmp/blast.rc
94
  echo "blastn plasmidstock_db" >> /tmp/blast.rc
95
  echo "tblastn plasmidstock_db" >> /tmp/blast.rc
96
  echo "tblastx plasmidstock_db" >> /tmp/blast.rc
97
  echo "blastn plfeatstock_db" >> /tmp/blast.rc
98
  echo "tblastn plfeatstock_db" >> /tmp/blast.rc
99
  echo "tblastx plfeatstock_db" >> /tmp/blast.rc
100
  sudo cp /tmp/blast.rc /var/www/blast/blast.rc
101
  rm /tmp/blast.rc
102
  cd ../..
103
..
104

    
105

    
106
Now you have a wwwblast instance available here: http://your_server/blast.
107

    
108

    
109
Install PlasMapper
110
------------------
111

    
112
PlasMapper provides advanced plasmid visualisation features. We use it to produced annoted plasmid maps. To install it, type the following command under a targeted server terminal.
113

    
114
.. code:: bash
115

    
116
  cd mylabstocks/opts/
117
  tar xfvz PlasMapper_download.tar.gz
118
  cd PlasMapper
119
  # modify installdir as /var/lib/tomcat6
120
  sed -i 's/\/home\/tomcat/\/var\/lib\/tomcat6/g' build.xml 
121
  # modify servletjar as /usr/share/tomcat6/lib/servlet-api.jar
122
  sed -i 's/${installdir}\/common\/lib\/servlet-api.jar/\/usr\/share\/tomcat6\/lib\/servlet-api.jar/g' build.xml 
123
  # change /home/tomcat for /var/lib/tomcat6
124
  sed -i 's/\/home\/tomcat/\/var\/lib\/tomcat6/g' src/ca/ualberta/xdong/plasMapper/annotate/plasMapConfiguration_en_CA.properties
125
  # and set blastallDir=/usr/bin/
126
  sed -i 's/\/usr\/local\/bin\//\/usr\/bin\//g' src/ca/ualberta/xdong/plasMapper/annotate/plasMapConfiguration_en_CA.properties
127
  # After these steps, PlasMapper is ready to be configured
128
  ant clean
129
  ant build 
130
  sudo ant install 
131
  sudo rm -Rf /var/lib/tomcat6/webapps/PlasMapper/tmp
132
  sudo ln -s /tmp/tomcat6-tomcat6-tmp/ /var/lib/tomcat6/webapps/PlasMapper/tmp
133
  echo '<?xml version="1.0" encoding="UTF-8"?><Context path="/myapp" allowLinking="true"></Context>' > context.xml
134
  sudo mv context.xml /var/lib/tomcat6/webapps/PlasMapper/META-INF/
135
  sudo /etc/init.d/tomcat6 restart
136
  # After these steps, PlasMapper works on your server at the url http://myserver:8080/PlasMapper
137
  sudo chown root:www-data /var/lib/tomcat6/webapps/PlasMapper/dataBase/db_vectorFeature/*.*
138
  sudo chmod 664 /var/lib/tomcat6/webapps/PlasMapper/dataBase/db_vectorFeature/*.*
139
  sudo chown root:www-data /var/lib/tomcat6/webapps/PlasMapper/dataBase/db_vectorFeature/
140
  sudo chmod 775 /var/lib/tomcat6/webapps/PlasMapper/dataBase/db_vectorFeature/
141
  sudo chown root:www-data /var/lib/tomcat6/webapps/PlasMapper/html/feature.html
142
  sudo chmod 664 /var/lib/tomcat6/webapps/PlasMapper/html/feature.html
143
  #  Now, plasmid features are ready to be searched by MyLabStocks via Blast queries.
144
  cd ../../..
145
..
146

    
147
Now you have a PlasMapper instance available here: http://your_server:8080/PlasMapper.
148

    
149

    
150
Install MyLabStocks
151
-------------------
152

    
153
Now your are ready to install the core of MyLabStocks. It consists of a set of php scripts that you have to deploy on your apache server. To do that, type the following commands in a targeted server terminal.
154

    
155
.. code:: bash
156

    
157
  sudo rsync -cauvz mylabstocks/src/ /var/www/labstocks/
158
  sudo rm /var/www/labstocks/install_db.phpsh
159
  sudo touch /var/www/labstocks/formatdb.log
160
  sudo chmod 440 /var/www/labstocks/connect_entry.php 
161
  sudo mkdir /var/www/labstocks/plasmid_files 
162
  sudo mkdir /var/www/labstocks/raw_dirs
163
  sudo mkdir /var/www/labstocks/collections
164
  sudo chown -R www-data:www-data /var/www/labstocks/connect_entry.php /var/www/labstocks/formatdb.log  /var/www/labstocks/plasmid_files /var/www/labstocks/raw_dirs
165
..
166

    
167
Configure MyLabStocks
168
---------------------
169

    
170
For obvious security reasons, it is essential that you now update connexion parameters by editing the script: /var/www/labstocks/connect_entry.php
171

    
172
In this script you have to update the following constants: 
173

    
174
  - SERVEUR
175
  - NOM
176
  - BASE
177
  - PASSE
178
  - LABNAME
179
  
180

    
181
.. code:: bash
182

    
183
  sudo vi /var/www/labstocks/connect_entry.php 
184
..
185

    
186
We have prepared the following script to help you define passwords and instantiate the database. This script will ask you to choose a password for basic and administrative access. To use this script, simply type the following command line:
187

    
188
.. code:: bash
189

    
190
  sudo php mylabstocks/src/install_db.phpsh 
191
..
192

    
193
Congratulations! Your MyLabStocks instance is now available here: http://your_server/labstocks.
194

    
195
Go to http://your_server/labstocks/wwwblast.php to initialize blast databases.
196

    
197
Links
198
-----
199

    
200
`MyLabStocks` home, repository and documentation: http://forge.cbp.ens-lyon.fr/redmine/projects/mylabstocks
201

    
202
Gael Yvert lab: http://www.ens-lyon.fr/LBMC/gisv/
203

    
204

    
205

    
206

    
207

    
208
Usage
209
=====
210

    
211
Advanced Search
212
---------------
213

    
214
In the strain section, the form `Search in genotype` filters strains where the 
215
fields `locus1`, `locus2`, `locus3`, `locus4`, `locus5`, `ADE2`, `HIS3`, `LE  U2`, 
216
`LYS2`, `MET15`, `TRP1`, `URA3`, `HO_`, `Cytoplasmic_Character` or 
217
`extrachromosomal_plasmid` contain the given expression. This filter is case 
218
insensitive.
219

    
220
Plasmids Sequences Management
221
-----------------------------
222

    
223
Even in edit mode, users are not granted permission to directly edit a plasmid 
224
sequence, nor the URL to the plasmid sequence file. If a new sequence must be 
225
entered instead of the current one, users must upload a new sequence file, in 
226
.gb or .gb.gz format. MyLabStocks then automatically reads the file and update 
227
the sequence field and the URL. This ensures consistency between URL, sequence 
228
and the file itself.
229

    
230

    
231
Backing up the Mysql Database and Stored Files
232
----------------------------------------------
233

    
234
We provide two level of backup. The first only dump the mySQL database and the second also add the uploaded files (plasmid_files raw_dirs directories in your /var/www/labstocks directory). These two features are available on the *home* page. The two links in the sentence *Backup the entire system or only the database NOW!* allow any user to download the requested backups. It could be use full for an admin to integrate it in a robust file backup system using for example a cron that regularly pull the archives (*wget http://.../labstocks/backup.php?FULL_BACK=1*). 
235

    
236

    
237

    
238
Reporting Bugs
239
--------------
240

    
241
If you think you have found a bug and would like to report the problem, then please ensure you have applied all applicable updates. Else, 
242
send a description of your problem and some screenshot to florent.chuffart on its ens-lyon.fr email. Thank you for your contribution.
243

    
244

    
245

    
246