Browse Source

GN1 running in a container

master
GN1 user 8 months ago
parent
commit
5c18a853e8
  1. 22
      .guix-deploy
  2. 37
      README.md
  3. 102
      etc/httpd.conf
  4. 4
      web/webqtl/base/webqtlConfigLocal.py
  5. 2
      web/webqtl/collection/ExportSelectionDetailInfoPage.py
  6. 2
      web/webqtl/compareCorrelates/trait.py
  7. 2
      web/webqtl/dataSharing/SharingInfo2.py
  8. 2
      web/webqtl/pairScan/DirectPlotPage.py
  9. 2
      web/webqtl/updateTrait/DataUpdatePage.py
  10. 2
      web/webqtl/utility/Plot.py

22
.guix-deploy

@ -1,16 +1,24 @@
# Requires a symlink from /gnshare and /tmp/guix-gn1
# mkdir /srv/http
mkdir -pv /tmp/guix-gn1
mkdir -pv ~/tmp/guix-gn1
mkdir -pv ~/srv/http
echo httpd -f $(~/opt/guix/bin/guix build -L /home/gn1/guix-past/modules/ -L /home/gn1/guix-bioinformatics/ -e '(@ (gn services gn1-httpd-config) GN1-httpd-config)')
~/opt/guix/bin/guix environment \
-L ~/guix-past/modules/ \
-L ~/guix-bioinformatics/ \
--pure \
-C --network \
genenetwork1 \
--ad-hoc \
vim procps binutils inetutils \
--network \
--expose=/gnshare/gn/web/genotypes \
--expose=/home/gn1/tmp=/tmp \
-- httpd -f \
$(~/opt/guix/bin/guix build -L /home/gn1/guix-past/modules/ -L /home/gn1/guix-bioinformatics/ \
-e '(@ (gn services gn1-httpd-config) GN1-httpd-config)')
--expose=/gnu \
--expose=/home/gn1/srv=/srv \
--expose=/home/gn1/production/gnshare=/gnshare \
--share=/home/gn1/production/gnshare/gn/web/tmp=/gnshare/gn/web/tmp \
--share=/home/gn1/production/gnshare/gn/web/image=/gnshare/gn/web/image \
--share=/home/gn1/tmp=/tmp
# -- httpd -f \
# $(~/opt/guix/bin/guix build -L /home/gn1/guix-past/modules/ -L /home/gn1/guix-bioinformatics/ \
# -e '(@ (gn services gn1-httpd-config) GN1-httpd-config)')

37
README.md

@ -38,39 +38,14 @@ some of the old (deprecated) packages are either maintained in
[guix-bioinformatics](http://git.genenetwork.org/guix-bioinformatics/guix-bioinformatics.git/).
To host genenetwork1 in a guix container, simply run:
To host genenetwork1 in a guix container using [.guix-deploy](./.guix-deploy), run:
```sh
#!/bin/sh
# Modify paths accordingly; or if you have your channels configured
# appropriately, you don't need to include the "-L" flags
/path/to/pre-inst-env guix environment \
-L /path/to/guix-past/modules/ \
-L /path/to/guix-bioinformatics/ \
--pure \
genenetwork1 \
--ad-hoc \
httpd-with-mod-python \
python2@2.4 \
python24-htmlgen-GN1 \
python24-json-GN1 \
python24-mysqlclient \
python24-numarray \
python24-piddle \
python24-pp-GN1 \
python24-pyx \
python24-pyxlwriter \
python24-qtlreaper \
python24-rpy2 \
python24-svg-GN1 \
-- \
httpd \
-f \
$(/path/to/pre-inst-env guix build -L /path/to/guix-past/modules/ -L /path/to/guix-bioinformatics/ -e '(@ (gn services gn1-httpd-config) GN1-httpd-config)') \
-T
```
source .guix-deploy
httpd -f httpd.conf
```
where the last command needs to be pasted.
This runs genenetwork1 on port 8042. To change the default port,
modify: GN1-httpd-config in

102
etc/httpd.conf

@ -0,0 +1,102 @@
LoadModule python_module modules/mod_python.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbd_module modules/mod_authn_dbd.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule dbd_module modules/mod_dbd.so
LoadModule dumpio_module modules/mod_dumpio.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule include_module modules/mod_include.so
LoadModule filter_module modules/mod_filter.so
LoadModule substitute_module modules/mod_substitute.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule ident_module modules/mod_ident.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imagemap_module modules/mod_imagemap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
ServerRoot /gnu/store/qqwmxqcp4vi0m0n3c4d632lhvwgkqyvz-httpd-with-mod-python-2.2.34
ServerName gn1-new.genenetwork.org
DocumentRoot /srv/http
Listen 8042
Pidfile /tmp/guix-gn1/httpd-gn1-source.pid
ErrorLog /tmp/guix-gn1/httpd-gn1-source-error-log
User gn1
Group users
TypesConfig /gnu/store/qqwmxqcp4vi0m0n3c4d632lhvwgkqyvz-httpd-with-mod-python-2.2.34/etc/httpd/mime.types
DefaultType application/octet-stream
# DocumentRoot MUST NOT be in the PythonPath. Because gn1-source must be in PythonPath we leave the document-root keyword above unset.
PythonPath "sys.path+['/run/current-system/profile/lib/python2.4', '/run/current-system/profile/lib/python2.4/site-packages', '/home/gn1/production/gnshare/gn/web/webqtl']"
# same as 'listen' above
NameVirtualHost *:8042
<VirtualHost *:8042>
DocumentRoot /home/gn1/production/gnshare/gn/web/
Alias /images /home/gn1/production/gnshare/gn/web/images/
Alias /javascript /home/gn1/production/gnshare/gn/web/javascript/
Alias /css /home/gn1/production/gnshare/gn/web/css/
<Directory /home/gn1/production/gnshare/gn/web/images>
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory /home/gn1/production/gnshare/gn/web/javascript>
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory /home/gn1/production/gnshare/gn/web/css>
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<Directory /home/gn1/production/gnshare/gn/web/webqtl>
#what is the difference between these two?
AddHandler mod_python .py
#SetHandler python-program
#publisher has more debug information
PythonHandler /home/gn1/production/gnshare/gn/web/webqtl/main.py
#PythonHandler mod_python.publisher
#PythonHandler mod_python.cgihandler
# only while debugging:
PythonOption mod_python.session.session_type MemorySession
PythonDebug On
</Directory>
# only while debugging:
<Location /mpinfo>
SetHandler python-program
PythonHandler mod_python.testhandler
</Location>

4
web/webqtl/base/webqtlConfigLocal.py

@ -3,7 +3,7 @@
#########################################
# sql_host = 'tux02.uthsc.edu'
sql_host = 'localhost'
sql_host = '127.0.0.1'
SERVERNAME = sql_host
MYSQL_SERVER = sql_host
@ -17,5 +17,5 @@ DB_UPDUSER = 'webqtlout'
DB_UPDPASSWD = 'webqtlout'
GNROOT = '/gnshare/gn/'
PythonPath = '/usr/bin/python'
PythonPath = 'python'
PIDDLE_FONT_PATH = '/usr/lib/python2.4/site-packages/piddle/truetypefonts/'

2
web/webqtl/collection/ExportSelectionDetailInfoPage.py

@ -80,7 +80,7 @@ class ExportSelectionDetailInfoPage(templatePage):
self.searchResult = string.split(self.searchResult,'\t')
strainlist = fd.f1list + fd.strainlist
debug_file = open("/gnshare/gn/web/debug_file.txt", "w")
debug_file = open("/gnshare/gn/web/tmp/debug_file.txt", "w")
if self.searchResult:
traitList = []

2
web/webqtl/compareCorrelates/trait.py

@ -210,7 +210,7 @@ class ProbeSetTrait(Trait):
Look up the data id for this trait given which
freeze it came from.
"""
debug_file=open("/gnshare/gn/web/debug_file2.txt", "w")
debug_file=open("/gnshare/gn/web/tmp/debug_file2.txt", "w")
cursor.execute('''
SELECT
ProbeSetXRef.DataId

2
web/webqtl/dataSharing/SharingInfo2.py

@ -45,7 +45,7 @@ class SharingInfo2:
self.InfoPageName = InfoPageName
def getInfo(self, create=False):
debug_file = open("/gnshare/gn/web/debug_file123.txt", "w")
debug_file = open("/gnshare/gn/web/tmp/debug_file123.txt", "w")
cursor = webqtlDatabaseFunction.getCursor()
debug_file.write("AFTER GET CURSOR")
if (not cursor):

2
web/webqtl/pairScan/DirectPlotPage.py

@ -135,7 +135,7 @@ class DirectPlotPage(templatePage):
prtmuTblIntro1 = HT.Paragraph("The following table gives threshold values for Suggestive (P=0.63) and Significant associations (P=0.05) defined by Lander & Kruglyak and for the slightly more stringent P=0.01 level. (The Highly Significant level of Lander & Kruglyak corresponds to P=0.001 and cannot be estimated with 500 permutations.)")
prtmuTblIntro2 = HT.Paragraph("If the full model exceeds the permutation-based Significant threshold, then different models for those locations can be tested by conventional chi-square tests at P<0.01. Interaction is significant if LRS Interact exceeds 6.64 for RI strains or 13.28 for an F2. If interaction is not significant, the two-QTL model is better than a one-QTL model if LRS Additive exceeds LRS 1 or LRS 2 by 6.64 for RI strains or 9.21 for an F2.")
debug_file = open("/gnshare/gn/web/debug_file.txt", "w")
debug_file = open("/gnshare/gn/web/tmp/debug_file.txt", "w")
debug_file.write(genofile)
ResultFull, ResultInteract, ResultAdd = direct.permu(webqtlConfig.GENODIR, _vals, _strains, genofile + ".geno", 500) #XZ, 08/14/2008: add module name webqtlConfig

2
web/webqtl/updateTrait/DataUpdatePage.py

@ -333,7 +333,7 @@ class DataUpdatePage(templatePage):
recordDataChange = HT.Blockquote('Trait data updating is disabled')
recordDataTable = ""
debug_file = open("/gnshare/gn/web/debug_file.txt", "w")
debug_file = open("/gnshare/gn/web/tmp/debug_file.txt", "w")
modifiedVals = []
modifiedVars = []

2
web/webqtl/utility/Plot.py

@ -1151,7 +1151,7 @@ def detScaleOld(min,max):
return [low,high,round((high-low)/c)]
def detScale(min=0,max=0,bufferSpace=3):
debug_file = open("/gnshare/gn/web/debug_file.txt", "w")
debug_file = open("/gnshare/gn/web/tmp/debug_file.txt", "w")
if min>max:
return None
elif min == -1.0 and max == 1.0:

Loading…
Cancel
Save