[galaxy-dev] blast2html

2015-10-08 Thread Juan Carlos
Hi,

I'm new to galaxy and trying to set up a local blast tool, and maybe this
is due to a silly mistake
So far so good all is working but when trying to use blast2html i just get
a "blank" page (even if the html is being generated), this happens when
using the recommended setting in the configuration file
"sanitize_all_html = False"

Tried with "sanitize_all_html = True" and was able to see the results but
with the message of the results being stripped.to be sure that at least
was working

Thanks for any help!!
jc
___
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Re: [galaxy-dev] blast2html

2015-10-08 Thread Peter Cock
Hi Juan,

It does sounds like something in Galaxy's HTML security
code could be to blame...

Do you have any other HTML producing tools installed?
It would be useful to see how their output behaves. e.g.
The BLAST+ tools offer (very simple ugly) HTML output
directly.

Peter

On Thu, Oct 8, 2015 at 7:54 AM, Juan Carlos  wrote:
>
> Hi,
>
> I'm new to galaxy and trying to set up a local blast tool, and maybe this is
> due to a silly mistake
> So far so good all is working but when trying to use blast2html i just get a
> "blank" page (even if the html is being generated), this happens when using
> the recommended setting in the configuration file
> "sanitize_all_html = False"
>
> Tried with "sanitize_all_html = True" and was able to see the results but
> with the message of the results being stripped.to be sure that at least
> was working
>
> Thanks for any help!!
> jc
>
> ___
> 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:
>   https://lists.galaxyproject.org/
>
> To search Galaxy mailing lists use the unified search at:
>   http://galaxyproject.org/search/mailinglists/
___
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Re: [galaxy-dev] Puzzling error in program using Bioblend

2015-10-08 Thread Nicola Soranzo

Hi Mark,
it seems that one dataset in the library (probably

/usr/users/fr009/fernande/gal_exports/data/Intro Galaxy 
Training/Getting_started/NBARC/NB_domains.tabular )

is in 'error' state, so BioBlend, as a precaution, refuses to download 
it, even if it is possible to download it in Galaxy.


Hope that helps,
Nicola

On 08/10/15 15:48, mark fernandes (IFR) wrote:

Hi,
I'm hoping that the list can help me out.
I'm trying to write some tools to capture elements to ease migration from a 
course development
server to a training server. I'm using the Bioblend API which I am a newbie at 
using.

In the code for extracting the data files from shared data libraries all is 
well except for 'Tabular' data
(e.g. fasta and txt are OK). The error seems to be at the stage where the 
program calls the Bioblend
.datasets.download_dataset() function.
NB The tabular files in question can be downloaded fine from the server on the 
appropriate Galaxy page.
(My code is at the end of this message - Please forgive the quality of my 
Python code).

If a tabular data file is present then I get the following output & errors from 
my program:-
Root path:  /usr/users/fr009/fernande/gal_exports/data
Library:  Intro Galaxy Training
No. of items in library 11

/usr/users/fr009/fernande/gal_exports/data/Intro Galaxy 
Training/Getting_started/NBARC/BM361007.fasta <<
/usr/users/fr009/fernande/gal_exports/data/Intro Galaxy 
Training/Getting_started/NBARC/NB_domains.tabular <<

---
DatasetStateException Traceback (most recent call last)
 in ()
  52 filepath = 
os.path.join(rootpathplus,fname.strip("/"))
  53 print '>>',filepath,'<<'
---> 54 
gi.datasets.download_dataset(items['id'],filepath,False)

/usr/local/lib/python2.7/dist-packages/bioblend/galaxy/datasets/__init__.pyc in 
download_dataset(self, dataset_id, file_path, use_default_filename, 
wait_for_completion, maxwait)
  81 dataset = self.show_dataset(dataset_id)
  82 if not dataset['state'] == 'ok':
---> 83 raise DatasetStateException("Dataset not ready. Dataset id: %s, 
current state: %s" % (dataset_id, dataset['state']))
  84
  85 # Galaxy release_13.01 and earlier does not have file_ext in 
the dataset

DatasetStateException: u'Dataset not ready. Dataset id: 1cd8e2f6b131e891, 
current state: error'

Also note that :
g_vers = gi.config.get_config()
g_vers['version_major']

Outputs]:
u'15.03'


Any help/elucidation gratefully received  (I'm on a learning curve here) :-)

Thanks in anticipation.
Mark Fernandes
#Code omitting the template files##
-
import bioblend.galaxy
import os
# Ipython Notebook version - MAF Oct 2015
# Server specific bit. in Real code get this from environ & args (argv)
server = 'http://N85460.nbi.ac.uk:8080/'
api_key = 'secret_squirrel'

rootpath = os.path.join(os.environ['HOME'],'gal_exports/data')
print 'Root path: ',rootpath

#connect to galaxy server instance
gi = bioblend.galaxy.GalaxyInstance(url=server, key=api_key)

#fetch names info about data libraries
dl = gi.libraries.get_libraries()

# for each library, get the folder names for each set & create the sub-dirs if 
they do not exist
for libs in dl:
 print 'Library: ', libs['name']
 rootpathplus = os.path.join(rootpath,libs['name'])

# Code to check directory pre-esistence and create it if it doesn't
# Move this out to a support module in finished code
 try:
 os.makedirs(rootpathplus, 0755)
 except OSError:
 if not os.path.isdir(rootpathplus):
 raise

# for each library, get the folder names for each set & create the sub-dirs if 
they do not exist
 fold = gi.libraries.get_folders(libs['id'])
 print 'No. of items in library',len(fold)

 if len(fold) > 1:
 for items in fold:
dirpath = 
os.path.join(rootpathplus,os.path.normpath(items['name'].strip("/")))
try:
os.makedirs(dirpath, 0755)
except OSError:
if not os.path.isdir(dirpath):
 raise
#
# for each folder create the sub-dir off of user rootdir
 cl = gi.libraries.show_library(libs['id'],True)
 for items in cl:
 if items['type']=='file':
 fname = os.path.normpath(items['name'])
 file_ext = os.path.splitext(fname)[1]
#check for tabular data file and omit to avoid error message
 if file_ext != '.tabular':
#  Swap above if with this one to let the bad stuff happen...
# if file_ext != '.untrapped':
 filepath = os.path.join(rootpathplus,fname.strip("/"))
 print '>>',filepath,'<<'
 gi.datasets.download_dataset(items['id'],filepath,False)

Root path:  

Re: [galaxy-dev] User API keys with External (LDAP) authentication disabled?

2015-10-08 Thread Eric Rasche
Howdy Ryan,

The bug fix for this is now in Galaxy's dev branch, and I've opened a PR
to have it in the 15.10 release. This is the patch for your bug if you
need it sooner than the next release (assuming that PR gets merged).
https://patch-diff.githubusercontent.com/raw/galaxyproject/galaxy/pull/872.patch

Ciao,
Eric

On 10/07/2015 04:43 PM, Eric Rasche wrote:
> Not from the admin interface right now. I noted this bug just the other
> day and intended to fix it as it applied to us as well.
> Until then, you can easily change the API key manually in the database.
> 
> Cheers,
> Eric
> 
> 2015-10-07 16:20 GMT-05:00 Ryan G  >:
> 
> Hi all - I have external authentication established with our
> enterprise wide LDAP working with Galaxy.  I just noticed that I can
> no longer manage API keys for users from the Admin Page -> API
> Keys.  I get "Access to Galaxy user controls is disabled.  User
> controls are disabled when Galaxy is configured for external
> authentication"
> 
> We basically have a 'nobody' user in Galaxy that populates the Data
> Library with new data from a proprietary system.  We were using a
> user's API key (mine) to do this but want to switch over to a daemon
> style user key.  In order to do so, I need to generate an API key
> for the dummy user.
> 
> Is there no way to get API keys from the Admin interface with
> external authentication?
> 
> 
> 
> ___
> 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:
>   https://lists.galaxyproject.org/
> 
> To search Galaxy mailing lists use the unified search at:
>   http://galaxyproject.org/search/mailinglists/
> 
> 
> 
> 
> -- 
> Eric Rasche
> Programmer II
> 
> Center for Phage Technology
> Rm 312A, BioBio
> Texas A University
> College Station, TX 77843
> 404-692-2048
> e...@tamu.edu 

-- 
Eric Rasche
Programmer II

Center for Phage Technology
Rm 312A, BioBio
Texas A University
College Station, TX 77843
404-692-2048
e...@tamu.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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

[galaxy-dev] Puzzling error in program using Bioblend

2015-10-08 Thread mark fernandes (IFR)
Hi,
I'm hoping that the list can help me out.
I'm trying to write some tools to capture elements to ease migration from a 
course development 
server to a training server. I'm using the Bioblend API which I am a newbie at 
using.

In the code for extracting the data files from shared data libraries all is 
well except for 'Tabular' data 
(e.g. fasta and txt are OK). The error seems to be at the stage where the 
program calls the Bioblend
.datasets.download_dataset() function.
NB The tabular files in question can be downloaded fine from the server on the 
appropriate Galaxy page.
(My code is at the end of this message - Please forgive the quality of my 
Python code).

If a tabular data file is present then I get the following output & errors from 
my program:-
Root path:  /usr/users/fr009/fernande/gal_exports/data
Library:  Intro Galaxy Training
No. of items in library 11
>> /usr/users/fr009/fernande/gal_exports/data/Intro Galaxy 
>> Training/Getting_started/NBARC/BM361007.fasta <<
>> /usr/users/fr009/fernande/gal_exports/data/Intro Galaxy 
>> Training/Getting_started/NBARC/NB_domains.tabular <<

---
DatasetStateException Traceback (most recent call last)
 in ()
 52 filepath = 
os.path.join(rootpathplus,fname.strip("/"))
 53 print '>>',filepath,'<<'
---> 54 
gi.datasets.download_dataset(items['id'],filepath,False)

/usr/local/lib/python2.7/dist-packages/bioblend/galaxy/datasets/__init__.pyc in 
download_dataset(self, dataset_id, file_path, use_default_filename, 
wait_for_completion, maxwait)
 81 dataset = self.show_dataset(dataset_id)
 82 if not dataset['state'] == 'ok':
---> 83 raise DatasetStateException("Dataset not ready. Dataset id: 
%s, current state: %s" % (dataset_id, dataset['state']))
 84 
 85 # Galaxy release_13.01 and earlier does not have file_ext in 
the dataset

DatasetStateException: u'Dataset not ready. Dataset id: 1cd8e2f6b131e891, 
current state: error'

Also note that :
g_vers = gi.config.get_config()
g_vers['version_major']

Outputs]:
u'15.03'


Any help/elucidation gratefully received  (I'm on a learning curve here) :-)

Thanks in anticipation.
Mark Fernandes  
#Code omitting the template files##
-
import bioblend.galaxy
import os
# Ipython Notebook version - MAF Oct 2015
# Server specific bit. in Real code get this from environ & args (argv)
server = 'http://N85460.nbi.ac.uk:8080/'
api_key = 'secret_squirrel'

rootpath = os.path.join(os.environ['HOME'],'gal_exports/data')
print 'Root path: ',rootpath

#connect to galaxy server instance
gi = bioblend.galaxy.GalaxyInstance(url=server, key=api_key)

#fetch names info about data libraries
dl = gi.libraries.get_libraries()

# for each library, get the folder names for each set & create the sub-dirs if 
they do not exist
for libs in dl:
print 'Library: ', libs['name']
rootpathplus = os.path.join(rootpath,libs['name'])

# Code to check directory pre-esistence and create it if it doesn't
# Move this out to a support module in finished code
try: 
os.makedirs(rootpathplus, 0755)
except OSError:
if not os.path.isdir(rootpathplus):
raise

# for each library, get the folder names for each set & create the sub-dirs if 
they do not exist
fold = gi.libraries.get_folders(libs['id'])
print 'No. of items in library',len(fold)

if len(fold) > 1:
for items in fold:
   dirpath = 
os.path.join(rootpathplus,os.path.normpath(items['name'].strip("/")))
   try: 
   os.makedirs(dirpath, 0755)
   except OSError:
   if not os.path.isdir(dirpath):
raise
#
# for each folder create the sub-dir off of user rootdir
cl = gi.libraries.show_library(libs['id'],True)
for items in cl:
if items['type']=='file':
fname = os.path.normpath(items['name'])
file_ext = os.path.splitext(fname)[1]
#check for tabular data file and omit to avoid error message
if file_ext != '.tabular':
#  Swap above if with this one to let the bad stuff happen...
# if file_ext != '.untrapped':
filepath = os.path.join(rootpathplus,fname.strip("/"))
print '>>',filepath,'<<'
gi.datasets.download_dataset(items['id'],filepath,False)

Root path:  /usr/users/fr009/fernande/gal_exports/data
Library:  Intro Galaxy Training
No. of items in library 11
>> /usr/users/fr009/fernande/gal_exports/data/Intro Galaxy 
>> Training/Getting_started/NBARC/BM361007.fasta <<
>> /usr/users/fr009/fernande/gal_exports/data/Intro Galaxy 
>> Training/Getting_started/Pinfestans/PinfestansAVH9.fasta <<
>> 

Re: [galaxy-dev] blast2html

2015-10-08 Thread Juan Carlos
Hi Peter,

Just checked it and the HTML output from BLAST+ seems ok.
As you said I also think is related to some issue with the security of
Galaxy. Everywhere i checked they only mention the sanitize parameter, dont
know what else could be, even thinking if it could be something in the
apache2 configuration
so still trying to find out

thanks

On Thu, Oct 8, 2015 at 7:04 PM, Peter Cock 
wrote:

> Hi Juan,
>
> It does sounds like something in Galaxy's HTML security
> code could be to blame...
>
> Do you have any other HTML producing tools installed?
> It would be useful to see how their output behaves. e.g.
> The BLAST+ tools offer (very simple ugly) HTML output
> directly.
>
> Peter
>
> On Thu, Oct 8, 2015 at 7:54 AM, Juan Carlos  wrote:
> >
> > Hi,
> >
> > I'm new to galaxy and trying to set up a local blast tool, and maybe
> this is
> > due to a silly mistake
> > So far so good all is working but when trying to use blast2html i just
> get a
> > "blank" page (even if the html is being generated), this happens when
> using
> > the recommended setting in the configuration file
> > "sanitize_all_html = False"
> >
> > Tried with "sanitize_all_html = True" and was able to see the results but
> > with the message of the results being stripped.to be sure that at
> least
> > was working
> >
> > Thanks for any help!!
> > jc
> >
> > ___
> > 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:
> >   https://lists.galaxyproject.org/
> >
> > To search Galaxy mailing lists use the unified search at:
> >   http://galaxyproject.org/search/mailinglists/
>
___
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/