Re: [galaxy-dev] LDAP authentication

2016-06-03 Thread mark fernandes (IFR)
Don't know if this helps or not but here's the link to Novell's entry on LDAP 
support for eDirectory
https://www.novell.com/documentation/edir873/?page=/documentation/edir873/edir873/data/h007.html

Mark Fernandes  


T: +44 (0)1603 255000
Institute of Food Research, Norwich Research Park, Norwich, NR4 7UA, UK

www.ifr.ac.uk
Facebook | Twitter | LinkedIn | YouTube

The Institute of Food Research receives strategic funding from BBSRC

___
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-09 Thread mark fernandes (IFR)
And  it’s Nicola for the win…!
I deleted the two tabular files and re-uploaded them and my code works! ☺

Following on from this does this error state happen very often or have I just 
been unlucky?
If the former is true, any suggestions on how best to trap it and report back 
to user to fix?

Thanks Nicola. I was beginning to wonder if I had blundered in my Python.

Mark Fernandes  


T: +44 (0)1603 255000
Institute of Food Research, Norwich Research Park, Norwich, NR4 7UA, UK

www.ifr.ac.uk
Facebook | Twitter | LinkedIn | YouTube

The Institute of Food Research receives strategic funding from BBSRC
___
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] 20 August GalaxyAdmins Meetup: Genomic Data Management; Tool Installation Automation

2015-08-20 Thread mark fernandes (IFR)
Sounds like this will be an interesting meeting and quite germane to a 
requirement of mine.

I want to achieve an environment as follows:
1) Galaxy Docker container (Thanks Bjorn :-) )with minimal tools deliverable to 
course developers machine e.g. via Kitematic
2) Course developer adds minimal set of Galaxy tools required to deliver course
3) Developer then adds shared data, workflows, notes  materials and tests 
everything.
4) Runs tools to extract tools etc to an export set
5) Course can be then deployed to a  (local) Training server's Docker container 
using complementary set of tools to 
import from the export set (or to a user's desktop e.g.via Kitematic as part of 
an e-learning environment)

Currently working my way through Bioblend API docs  notes from  GCC 2015 
workshop to see how much of
this is achievable (also have Bjorn's notes on cloning tools from Galaxy Main 
which I hope to adapt). 

Any advice/insights welcomed along with any advances in automation from 
Development team.

Regards,
Mark Fernandes
Bioinformatics/Biomathematics Training
Training information blog: http://scicomp-training.ifr.ac.uk/
'Open door' BI/BM training surgery (i.e. just turn up) every Thursday 
2.30pm-3.30pm

T: +44 (0)1603 255000
Institute of Food Research, Norwich Research Park, Norwich, NR4 7UA, UK

www.ifr.ac.uk
Facebook | Twitter | LinkedIn | YouTube

The Institute of Food Research receives strategic funding from BBSRC


___
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/