Re: [galaxy-dev] Upload File: how to see all registered formats ?
Hi Greg, That is great, I`ll give it a try. Thank a lot, Marc From: Greg Von Kuster [g...@bx.psu.edu] Sent: Tuesday, August 14, 2012 10:38 PM To: Marc Logghe Cc: Björn Grüning; galaxy-dev@lists.bx.psu.edu Subject: Re: [galaxy-dev] Upload File: how to see all registered formats ? Hello Marc, This issue has been resolve din change set 7491:a7a0a5962648, which will be included in the next Galaxy release. It is also currently available in the Galaxy central repository in case you track that repository. The datatypes registry will load any changes you've made to the datatypes_conf.xml file installed with the emboss_datatypes tool shed repository (or any other repository that includes this file). SO display_in_upload will now function correctly for the installed proprietary datatypes. Thanks for reporting this issue, and sorry for the inconvenience. Greg Von Kuster On Aug 3, 2012, at 4:53 PM, Marc Logghe wrote: > Hi Greg, > >> You'll need to add the display_in_upload attribute to your local version of >> the datatypes_conf.xml file installed with your emboss_datatypes repository >> from the tool shed. >> > > I'am afraid this does not work. At least not in my hands. Like I indicated > before, it seems like the upload tool does not take the tool shed > emboss_datatypes into account, with or without the display_in_upload > attribute set. > > It seems to work only if you transfer the entire data type definition line to > the main galaxy datatypes_conf.xml > That is the workaround I currently use. > > Marc > > >> This may result in a merge at some point if the contents of the >> datatypes_conf.xml file changes in the emboss_datatypes repository in the >> main tool shed and you pull the updates to your >> local repository. >> >> Greg Von Kuster > > > >>> Hi Björn, >>> I think the issue is that the genbank datatype is coming in via the tool >>> shed and is not taken into account by the upload tool. The genbank datatype >>> is defined in >>> shed_tools/toolshed.g2.bx.psu.edu/repos/devteam/emboss_datatypes/a89163f31369/emboss_datatypes/datatypes_conf.xml >>> >>> I have added the display_in_upload attribute in the latter file for the >>> genbank datatype, restarted Galaxy but the type did not appear in the >>> selection. >>> Should the genbank datatype be added to the main galaxy datatypes_conf.xml >>> ? Or is it better to explicitly add the emboss' datatypes_conf.xml to the >>> universe_wsgi.ini (but this will break the tool shed update system, right) ? >>> >>> Thanks, >>> Marc > > > THIS E-MAIL MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR ENTITY > TO WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, > CONFIDENTIAL AND EXEMPT FROM DISCLOSURE. > If the reader of this E-mail message is not the intended recipient, you are > hereby notified that any dissemination, distribution or copying of this > communication is strictly prohibited. If you have received this communication > in error, please notify us immediately at abl...@ablynx.com. Thank you for > your co-operation. > "NANOBODY" and "NANOCLONE" are registered trademarks of Ablynx N.V. > > > THIS E-MAIL MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR ENTITY TO WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE. If the reader of this E-mail message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately at abl...@ablynx.com. Thank you for your co-operation. "NANOBODY" and "NANOCLONE" are registered trademarks of Ablynx N.V. ___ 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] Upload File: how to see all registered formats ?
Hello Marc, This issue has been resolve din change set 7491:a7a0a5962648, which will be included in the next Galaxy release. It is also currently available in the Galaxy central repository in case you track that repository. The datatypes registry will load any changes you've made to the datatypes_conf.xml file installed with the emboss_datatypes tool shed repository (or any other repository that includes this file). SO display_in_upload will now function correctly for the installed proprietary datatypes. Thanks for reporting this issue, and sorry for the inconvenience. Greg Von Kuster On Aug 3, 2012, at 4:53 PM, Marc Logghe wrote: > Hi Greg, > >> You'll need to add the display_in_upload attribute to your local version of >> the datatypes_conf.xml file installed with your emboss_datatypes repository >> from the tool shed. >> > > I'am afraid this does not work. At least not in my hands. Like I indicated > before, it seems like the upload tool does not take the tool shed > emboss_datatypes into account, with or without the display_in_upload > attribute set. > > It seems to work only if you transfer the entire data type definition line to > the main galaxy datatypes_conf.xml > That is the workaround I currently use. > > Marc > > >> This may result in a merge at some point if the contents of the >> datatypes_conf.xml file changes in the emboss_datatypes repository in the >> main tool shed and you pull the updates to your >> local repository. >> >> Greg Von Kuster > > > >>> Hi Björn, >>> I think the issue is that the genbank datatype is coming in via the tool >>> shed and is not taken into account by the upload tool. The genbank datatype >>> is defined in >>> shed_tools/toolshed.g2.bx.psu.edu/repos/devteam/emboss_datatypes/a89163f31369/emboss_datatypes/datatypes_conf.xml >>> >>> I have added the display_in_upload attribute in the latter file for the >>> genbank datatype, restarted Galaxy but the type did not appear in the >>> selection. >>> Should the genbank datatype be added to the main galaxy datatypes_conf.xml >>> ? Or is it better to explicitly add the emboss' datatypes_conf.xml to the >>> universe_wsgi.ini (but this will break the tool shed update system, right) ? >>> >>> Thanks, >>> Marc > > > THIS E-MAIL MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR ENTITY > TO WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, > CONFIDENTIAL AND EXEMPT FROM DISCLOSURE. > If the reader of this E-mail message is not the intended recipient, you are > hereby notified that any dissemination, distribution or copying of this > communication is strictly prohibited. If you have received this communication > in error, please notify us immediately at abl...@ablynx.com. Thank you for > your co-operation. > "NANOBODY" and "NANOCLONE" are registered trademarks of Ablynx N.V. > > > ___ 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] Upload File: how to see all registered formats ?
Hi Greg, > You'll need to add the display_in_upload attribute to your local version of > the datatypes_conf.xml file installed with your emboss_datatypes repository > from the tool shed. > I'am afraid this does not work. At least not in my hands. Like I indicated before, it seems like the upload tool does not take the tool shed emboss_datatypes into account, with or without the display_in_upload attribute set. It seems to work only if you transfer the entire data type definition line to the main galaxy datatypes_conf.xml That is the workaround I currently use. Marc > This may result in a merge at some point if the contents of the > datatypes_conf.xml file changes in the emboss_datatypes repository in the > main tool shed and you pull the updates to your > local repository. > > Greg Von Kuster >> Hi Björn, >> I think the issue is that the genbank datatype is coming in via the tool >> shed and is not taken into account by the upload tool. The genbank datatype >> is defined in >> shed_tools/toolshed.g2.bx.psu.edu/repos/devteam/emboss_datatypes/a89163f31369/emboss_datatypes/datatypes_conf.xml >> >> I have added the display_in_upload attribute in the latter file for the >> genbank datatype, restarted Galaxy but the type did not appear in the >> selection. >> Should the genbank datatype be added to the main galaxy datatypes_conf.xml ? >> Or is it better to explicitly add the emboss' datatypes_conf.xml to the >> universe_wsgi.ini (but this will break the tool shed update system, right) ? >> >> Thanks, >> Marc THIS E-MAIL MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR ENTITY TO WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE. If the reader of this E-mail message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately at abl...@ablynx.com. Thank you for your co-operation. "NANOBODY" and "NANOCLONE" are registered trademarks of Ablynx N.V. ___ 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] Upload File: how to see all registered formats ?
Hi Marc, You'll need to add the display_in_upload attribute to your local version of the datatypes_conf.xml file installed with your emboss_datatypes repository from the tool shed. This may result in a merge at some point if the contents of the datatypes_conf.xml file changes in the emboss_datatypes repository in the main tool shed and you pull the updates to your local repository. Greg Von Kuster On Aug 3, 2012, at 10:51 AM, Marc Logghe wrote: > Hi Björn, > I think the issue is that the genbank datatype is coming in via the tool shed > and is not taken into account by the upload tool. The genbank datatype is > defined in > shed_tools/toolshed.g2.bx.psu.edu/repos/devteam/emboss_datatypes/a89163f31369/emboss_datatypes/datatypes_conf.xml > > I have added the display_in_upload attribute in the latter file for the > genbank datatype, restarted Galaxy but the type did not appear in the > selection. > Should the genbank datatype be added to the main galaxy datatypes_conf.xml ? > Or is it better to explicitly add the emboss' datatypes_conf.xml to the > universe_wsgi.ini (but this will break the tool shed update system, right) ? > > Thanks, > Marc > > -Original Message- > From: Björn Grüning [mailto:bjoern.gruen...@pharmazie.uni-freiburg.de] > Sent: Friday, August 03, 2012 4:14 PM > To: Marc Logghe > Cc: galaxy-dev@lists.bx.psu.edu > Subject: Re: [galaxy-dev] Upload File: how to see all registered formats ? > > Hi Marc, > > please have a look at the datatypes_conf.xml file in your galaxy directory. > > There should be something like that: > display_in_upload="true"/> > > Try to add 'display_in_upload="true"' to the genbank datatype. > > The 'good' solution would be to define a datatype genbank, with a sniff > function, so that galaxy can guess the filetype when you are uploading it. > > Please find attached my first attempt for that. Im working on some datatypes > and converteres, but its not ready yet :( > > Cheers, > Bjoern > > > >> Hi again, >> >> Emboss_datatypes is installad via tool shed. The ‘View datatypes >> registry’ in the Adminstration page, shows all registered data types, >> including the emboss ones, like e.g. genbank. >> >> However, the ‘Upload File’ tool does not show genbank in the ‘File >> Format’ dropdown. How can one configure the upload1 tool so that all >> registered formats are listed ? >> >> I don’t understand the from_parameter hocus-pocus in this line >> (upload.xml): >> >> > from_parameter="tool.app.datatypes_registry.upload_file_formats" >> transform_lines="[ "%s%s%s" % ( line, self.separator, line ) >> for line in obj ]"> >> >> >> >> The workaround which is used up to now is upload genbank sequences as >> txt format and change the format later via the history. But that is a >> 2-step operation, guess there should be a way taking only 1 step ? >> >> Regards, >> >> Marc >> >> >> >> THIS E-MAIL MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR >> ENTITY TO WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS >> PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE. >> If the reader of this E-mail message is not the intended recipient, >> you are hereby notified that any dissemination, distribution or >> copying of this communication is strictly prohibited. If you have >> received this communication in error, please notify us immediately at >> abl...@ablynx.com. Thank you for your co-operation. >> "NANOBODY" and "NANOCLONE" are registered trademarks of Ablynx N.V. >> >> ___ >> 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/ > > -- > Björn Grüning > Albert-Ludwigs-Universität Freiburg > Institute of Pharmaceutical Sciences > Pharmaceutical Bioinformatics > Hermann-Herder-Strasse 9 > D-79104 Freiburg i. Br. > > Tel.: +49 761 203-4872 > Fax.: +49 761 203-97769 > E-Mail: bjoern.gruen...@pharmazie.uni-freiburg.de > Web: http://www.pharmaceutical-bioinformatics.org/ > > THIS E-MAIL MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR ENTITY > TO WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED,
Re: [galaxy-dev] Upload File: how to see all registered formats ?
Hi Björn, I think the issue is that the genbank datatype is coming in via the tool shed and is not taken into account by the upload tool. The genbank datatype is defined in shed_tools/toolshed.g2.bx.psu.edu/repos/devteam/emboss_datatypes/a89163f31369/emboss_datatypes/datatypes_conf.xml I have added the display_in_upload attribute in the latter file for the genbank datatype, restarted Galaxy but the type did not appear in the selection. Should the genbank datatype be added to the main galaxy datatypes_conf.xml ? Or is it better to explicitly add the emboss' datatypes_conf.xml to the universe_wsgi.ini (but this will break the tool shed update system, right) ? Thanks, Marc -Original Message- From: Björn Grüning [mailto:bjoern.gruen...@pharmazie.uni-freiburg.de] Sent: Friday, August 03, 2012 4:14 PM To: Marc Logghe Cc: galaxy-dev@lists.bx.psu.edu Subject: Re: [galaxy-dev] Upload File: how to see all registered formats ? Hi Marc, please have a look at the datatypes_conf.xml file in your galaxy directory. There should be something like that: Try to add 'display_in_upload="true"' to the genbank datatype. The 'good' solution would be to define a datatype genbank, with a sniff function, so that galaxy can guess the filetype when you are uploading it. Please find attached my first attempt for that. Im working on some datatypes and converteres, but its not ready yet :( Cheers, Bjoern > Hi again, > > Emboss_datatypes is installad via tool shed. The ‘View datatypes > registry’ in the Adminstration page, shows all registered data types, > including the emboss ones, like e.g. genbank. > > However, the ‘Upload File’ tool does not show genbank in the ‘File > Format’ dropdown. How can one configure the upload1 tool so that all > registered formats are listed ? > > I don’t understand the from_parameter hocus-pocus in this line > (upload.xml): > > from_parameter="tool.app.datatypes_registry.upload_file_formats" > transform_lines="[ "%s%s%s" % ( line, self.separator, line ) > for line in obj ]"> > > > > The workaround which is used up to now is upload genbank sequences as > txt format and change the format later via the history. But that is a > 2-step operation, guess there should be a way taking only 1 step ? > > Regards, > > Marc > > > > THIS E-MAIL MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR > ENTITY TO WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS > PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE. > If the reader of this E-mail message is not the intended recipient, > you are hereby notified that any dissemination, distribution or > copying of this communication is strictly prohibited. If you have > received this communication in error, please notify us immediately at > abl...@ablynx.com. Thank you for your co-operation. > "NANOBODY" and "NANOCLONE" are registered trademarks of Ablynx N.V. > > ___ > 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/ -- Björn Grüning Albert-Ludwigs-Universität Freiburg Institute of Pharmaceutical Sciences Pharmaceutical Bioinformatics Hermann-Herder-Strasse 9 D-79104 Freiburg i. Br. Tel.: +49 761 203-4872 Fax.: +49 761 203-97769 E-Mail: bjoern.gruen...@pharmazie.uni-freiburg.de Web: http://www.pharmaceutical-bioinformatics.org/ THIS E-MAIL MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR ENTITY TO WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE. If the reader of this E-mail message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately at abl...@ablynx.com. Thank you for your co-operation. "NANOBODY" and "NANOCLONE" are registered trademarks of Ablynx N.V. ___ 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] Upload File: how to see all registered formats ?
Hi Marc, please have a look at the datatypes_conf.xml file in your galaxy directory. There should be something like that: Try to add 'display_in_upload="true"' to the genbank datatype. The 'good' solution would be to define a datatype genbank, with a sniff function, so that galaxy can guess the filetype when you are uploading it. Please find attached my first attempt for that. Im working on some datatypes and converteres, but its not ready yet :( Cheers, Bjoern > Hi again, > > Emboss_datatypes is installad via tool shed. The ‘View datatypes > registry’ in the Adminstration page, shows all registered data types, > including the emboss ones, like e.g. genbank. > > However, the ‘Upload File’ tool does not show genbank in the ‘File > Format’ dropdown. How can one configure the upload1 tool so that all > registered formats are listed ? > > I don’t understand the from_parameter hocus-pocus in this line > (upload.xml): > > from_parameter="tool.app.datatypes_registry.upload_file_formats" > transform_lines="[ "%s%s%s" % ( line, self.separator, line ) > for line in obj ]"> > > > > The workaround which is used up to now is upload genbank sequences as > txt format and change the format later via the history. But that is a > 2-step operation, guess there should be a way taking only 1 step ? > > Regards, > > Marc > > > > THIS E-MAIL MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR > ENTITY TO WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS > PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE. > If the reader of this E-mail message is not the intended recipient, > you are hereby notified that any dissemination, distribution or > copying of this communication is strictly prohibited. If you have > received this communication in error, please notify us immediately at > abl...@ablynx.com. Thank you for your co-operation. > "NANOBODY" and "NANOCLONE" are registered trademarks of Ablynx N.V. > > ___ > 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/ -- Björn Grüning Albert-Ludwigs-Universität Freiburg Institute of Pharmaceutical Sciences Pharmaceutical Bioinformatics Hermann-Herder-Strasse 9 D-79104 Freiburg i. Br. Tel.: +49 761 203-4872 Fax.: +49 761 203-97769 E-Mail: bjoern.gruen...@pharmazie.uni-freiburg.de Web: http://www.pharmaceutical-bioinformatics.org/ """ extended sequence classes """ import gzip import data import logging import re import string import os from cgi import escape from galaxy.datatypes.metadata import MetadataElement from galaxy.datatypes import metadata import galaxy.model from galaxy import util from sniff import * import pkg_resources pkg_resources.require("simplejson") import simplejson log = logging.getLogger(__name__) class GenBank( Sequence ): """Class representing a FASTA sequence""" file_ext = "genbank" def sniff( self, filename ): """ Determines whether the file is in genbank format. GBK is also a shortcut for the genbank file format. A sequence in GenBank format shares a feature table vocabulary with the embl format. It starts with LOCUS in the first non-empty line, followed with DEFINITION and ACCESSION. After the FEATURES section a ORIGIN section is followed with the sequence data. In a multi-genbank file an entry ends with '//', normally every file will end with '//'. In single genbank file we are not so strict. For complete details see http://www.ncbi.nlm.nih.gov/Sitemap/samplerecord.html Rules for sniffing as True: We don't care about empty lines. The first non-empty line must start with 'LOCUS' and the very next line.strip() must start with DEFINITION and the next with ACCESSION. Before the sequence section start a line needs to begin with ORIGIN. We don't check the sequence, we assume the correctness if LOCUS, DEFINITION, ACCESSION and ORIGIN are present. >>> fname = get_test_fname( 'sequence.maf' ) >>> GenBank().sniff( fname ) False >>> fname = get_test_fname( 'sequence.gbk' ) >>> GenBank().sniff( fname ) True """ try: fh = open( filename ) while True: line = fh.readline() if not line: break #EOF line = line.strip() if line: #first non-empty line if line.startswith( 'LOCUS' ): #The next line.strip() must not be '', nor startwith '>' line = fh.readline().strip() if line == '': break