Re: [galaxy-dev] Postgresql To Galaxy
On Feb 7, 2012, at 6:28 AM, Rehan Saleem wrote: Hi nate , thanks for reply , actually i want to know how can i add my own tool in galaxy , how can i show the output of my postgreSQL function in galaxy just asume my postgresql database is connected to galaxy . i need the python and xml code for that . thanks Hi Rehan, Your database shouldn't be connected to Galaxy, it should be connected to your tool, and then your tool will write the results as the tool's output, which will then be available in Galaxy. The documentation on how to write the tool config XML is in the wiki at: http://wiki.g2.bx.psu.edu/Admin/Tools/Add%20Tool%20Tutorial http://wiki.g2.bx.psu.edu/Admin/Tools/Tool%20Config%20Syntax I'd suggest using one of the existing tool config files in Galaxy as a reference. As for the script which queries the database, that would be a new tool to write. Two of our tools use sqlite, which may be useful as a reference when writing your tool: tools/next_gen_conversion/solid2fastq.py tools/taxonomy/find_diag_hits.py You are not limited to using Python to write the tool, however, it can be any language which you can run on the command line. --nate From: Nate Coraor n...@bx.psu.edu To: Rehan Saleem pk_re...@yahoo.com Cc: galaxy-dev@lists.bx.psu.edu galaxy-...@bx.psu.edu Sent: Monday, February 6, 2012 10:19 PM Subject: Re: [galaxy-dev] Postgresql To Galaxy On Feb 6, 2012, at 10:56 AM, Rehan Saleem wrote: Hi Nate, well i don’t want to use galaxy default database , i want to set my own tools for example, i have created a function totaloverlapcount and its work perfectly fine in my separate postgresql database called ova , now i want to add a tool in galaxy with a name Total Overlap Count , as we know whenever we want to add a tool we configure it in tool_config file. Now if a user click on Total Overlap Count then my postgresql function totaloverlapcount should be called , and that function will perform query on my own created database(ova) and then return the result into galaxy interface Hi Rehan, Please use 'reply all' to keep replies on the mailing list. Since your tool already works with a separate postgres database outside of Galaxy, you should be able to add the tool to Galaxy without modification. I presume the tool has some means of knowing what host, user and port to connect to, and the setup of this information is the same as it would be when running it on the command line (via a config file, environment, hardcoded in the tool...?). --nate From: Nate Coraor n...@bx.psu.edu To: Rehan Saleem pk_re...@yahoo.com Cc: galaxy-dev@lists.bx.psu.edu galaxy-dev@lists.bx.psu.edu Sent: Monday, February 6, 2012 8:07 PM Subject: Re: [galaxy-dev] Postgresql To Galaxy On Feb 6, 2012, at 6:37 AM, Rehan Saleem wrote: Hi , i have created postgreSQL database where i have created all functions and views which performs annotations and some other functions , how can i show my postgresql database table to galaxyas output . i have connected my database from universe_wsgi.ini to my linux host where i am running galaxy and my database is on windows host, i need the python script which take values from table and show them back to galaxy. THANKS Hi Rehan, I am a little unsure what you're trying to do. Do you want to display contents of this database in some sort of display within Galaxy, use them as tool inputs, or outputs? I would not suggest using this custom database as Galaxy's database (set in database_connection) if it contains separate data from the Galaxy application. Galaxy should live in its own database away from any other tables you use for other purposes. --nate ___ Please keep all replies on the list by using reply all in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/ ___ Please keep all replies on the list by using reply all in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
Re: [galaxy-dev] Postgresql To Galaxy
On Feb 6, 2012, at 6:37 AM, Rehan Saleem wrote: Hi , i have created postgreSQL database where i have created all functions and views which performs annotations and some other functions , how can i show my postgresql database table to galaxyas output . i have connected my database from universe_wsgi.ini to my linux host where i am running galaxy and my database is on windows host, i need the python script which take values from table and show them back to galaxy. THANKS Hi Rehan, I am a little unsure what you're trying to do. Do you want to display contents of this database in some sort of display within Galaxy, use them as tool inputs, or outputs? I would not suggest using this custom database as Galaxy's database (set in database_connection) if it contains separate data from the Galaxy application. Galaxy should live in its own database away from any other tables you use for other purposes. --nate ___ Please keep all replies on the list by using reply all in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/ ___ Please keep all replies on the list by using reply all in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
Re: [galaxy-dev] Postgresql To Galaxy
On Feb 6, 2012, at 10:56 AM, Rehan Saleem wrote: Hi Nate, well i don’t want to use galaxy default database , i want to set my own tools for example, i have created a function totaloverlapcount and its work perfectly fine in my separate postgresql database called ova , now i want to add a tool in galaxy with a name Total Overlap Count , as we know whenever we want to add a tool we configure it in tool_config file. Now if a user click on Total Overlap Count then my postgresql function totaloverlapcount should be called , and that function will perform query on my own created database(ova) and then return the result into galaxy interface Hi Rehan, Please use 'reply all' to keep replies on the mailing list. Since your tool already works with a separate postgres database outside of Galaxy, you should be able to add the tool to Galaxy without modification. I presume the tool has some means of knowing what host, user and port to connect to, and the setup of this information is the same as it would be when running it on the command line (via a config file, environment, hardcoded in the tool...?). --nate From: Nate Coraor n...@bx.psu.edu To: Rehan Saleem pk_re...@yahoo.com Cc: galaxy-dev@lists.bx.psu.edu galaxy-dev@lists.bx.psu.edu Sent: Monday, February 6, 2012 8:07 PM Subject: Re: [galaxy-dev] Postgresql To Galaxy On Feb 6, 2012, at 6:37 AM, Rehan Saleem wrote: Hi , i have created postgreSQL database where i have created all functions and views which performs annotations and some other functions , how can i show my postgresql database table to galaxyas output . i have connected my database from universe_wsgi.ini to my linux host where i am running galaxy and my database is on windows host, i need the python script which take values from table and show them back to galaxy. THANKS Hi Rehan, I am a little unsure what you're trying to do. Do you want to display contents of this database in some sort of display within Galaxy, use them as tool inputs, or outputs? I would not suggest using this custom database as Galaxy's database (set in database_connection) if it contains separate data from the Galaxy application. Galaxy should live in its own database away from any other tables you use for other purposes. --nate ___ Please keep all replies on the list by using reply all in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/ ___ Please keep all replies on the list by using reply all in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
Re: [galaxy-dev] postgresql to galaxy
Hi, Hari. You should probably make sure that you can connect to postgres from the command line before trying to connect using galaxy. In particular, it looks like you need to set up this file correctly: http://www.postgresql.org/docs/8.2/static/auth-pg-hba-conf.html Sean On Tue, Apr 12, 2011 at 7:50 AM, hari krishna pobbati.h...@gmail.com wrote: Hi, I am planning to change database from sqlite to postgresql . for this i installed postgresql 8.1.2 and created user and database at my home location. from my home i can able to login to that database psql -d galaxy -U galaxy -h 192.168.65.8 where database and user name as galaxy and hostname I modified universal.wsgi.ini file as database_connection =postgres:///galaxy?user=galaxypassword=galaxy123!@#[?host=/var/run/postgresql] database_engine_option_strategy = threadlocal database_engine_option_server_side_cursors = True database_engine_option_pool_size = 5 database_engine_option_max_overflow = 10 after these modification when i ran the server am getting error like this: * Traceback (most recent call last): File /home/gridmon/hari/galaxy_new/galaxy-central/lib/galaxy/web/buildapp.py, line 82, in app_factory app = UniverseApplication( global_conf = global_conf, **kwargs ) File /home/gridmon/hari/galaxy_new/galaxy-central/lib/galaxy/app.py, line 30, in __init__ create_or_verify_database( db_url, self.config.database_engine_options ) File /home/gridmon/hari/galaxy_new/galaxy-central/lib/galaxy/model/migrate/check.py, line 54, in create_or_verify_database dataset_table = Table( dataset, meta, autoload=True ) File /home/gridmon/hari/galaxy_new/galaxy-central/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/schema.py, line 108, in __call__ return type.__call__(self, name, metadata, *args, **kwargs) File /home/gridmon/hari/galaxy_new/galaxy-central/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/schema.py, line 236, in __init__ _bind_or_error(metadata).reflecttable(self, include_columns=include_columns) File /home/gridmon/hari/galaxy_new/galaxy-central/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/engine/base.py, line 1261, in reflecttable conn = self.contextual_connect() File /home/gridmon/hari/galaxy_new/galaxy-central/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/engine/threadlocal.py, line 194, in contextual_connect return self.session.get_connection(**kwargs) File /home/gridmon/hari/galaxy_new/galaxy-central/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/engine/threadlocal.py, line 20, in get_connection return self.engine.TLConnection(self, self.engine.pool.connect(), close_with_result=close_with_result) File /home/gridmon/hari/galaxy_new/galaxy-central/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/pool.py, line 151, in connect agent = _ConnectionFairy(self) File /home/gridmon/hari/galaxy_new/galaxy-central/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/pool.py, line 304, in __init__ rec = self._connection_record = pool.get() File /home/gridmon/hari/galaxy_new/galaxy-central/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/pool.py, line 161, in get return self.do_get() File /home/gridmon/hari/galaxy_new/galaxy-central/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/pool.py, line 639, in do_get con = self.create_connection() File /home/gridmon/hari/galaxy_new/galaxy-central/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/pool.py, line 122, in create_connection return _ConnectionRecord(self) File /home/gridmon/hari/galaxy_new/galaxy-central/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/pool.py, line 198, in __init__ self.connection = self.__connect() File /home/gridmon/hari/galaxy_new/galaxy-central/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/pool.py, line 261, in __connect connection = self.__pool._creator() File /home/gridmon/hari/galaxy_new/galaxy-central/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/engine/strategies.py, line 80, in connect raise exc.DBAPIError.instance(None, None, e) OperationalError: (OperationalError) FATAL: no pg_hba.conf entry for host [local], user galaxy, database galaxy, SSL off * Can any one help me for integrating postgresql to galaxy waiting for ur kind reply -- Thanks Regards, Hari Krishna .M ___ Please keep all replies on the list by using reply all in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/