iplantcollaborativeopensource / python-irodsclient Goto Github PK
View Code? Open in Web Editor NEWA python API for iRODS
License: Other
A python API for iRODS
License: Other
When fetching a non-existant resource:
sess.collections.get ('/iplant/home/ZZZ')
raises CollectionDoesNotExist
BUT a non-existant file gets a weird error
sess.data_objects.get ('/iplant/home/ZZZ')
AttributeError: 'iRODSDataObject' object has no attribute 'id'
Expected to get an exception DataObjectDoesNotExist
The README.md
claims that this package requires Python 2.7. So I assume it is not compatible with recent Python 3 versions. Are there any plans to provide Python 3 compatibility any soon?
Even if it is not fully clear from the documentation, I'd assume this feature is not yet available.
When running the Python client on Windows in Python 2.7, a call to
coll = sess.collections.get("...")
yields the following error:
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\site-packages\irods\resource_manager\collection_manager.py", line 12, in get
result = query.one()
File "C:\Python27\lib\site-packages\irods\query.py", line 132, in one
results = self.execute()
File "C:\Python27\lib\site-packages\irods\query.py", line 118, in execute
with self.sess.pool.get_connection() as conn:
File "C:\Python27\lib\site-packages\irods\pool.py", line 20, in get_connection
conn = Connection(self, self.account)
File "C:\Python27\lib\site-packages\irods\connection.py", line 19, in init
self.connect()
File "C:\Python27\lib\site-packages\irods\connection.py", line 67, in connect
version_msg = self.recv()
File "C:\Python27\lib\site-packages\irods\connection.py", line 37, in recv
msg = iRODSMessage.recv(self.socket)
File "C:\Python27\lib\site-packages\irods\message__init.py", line 23, in recv
rsp_header_size = sock.recv(4, socket.MSG_WAITALL)
AttributeError: 'module' object has no attribute 'MSG_WAITALL'
Perhaps this is a limitation of the socket object on Windows?
I was attempting to use Biopython in combination with the python-irodsclient and ran into an issue when reading sequences from a fasta file. Here is some sample code:
from Bio import SeqIO
from irods.session import iRODSSession
HOST = 'data.iplantcollaborative.org'
PORT = 1247
ZONE = 'iplant'
sess = iRODSSession(host=HOST, port=PORT, user='xxxx', password='xxxx', zone=ZONE)
irods_file = sess.data_objects.get('/iplant/home/dboss/test/POV_SMS_reads.fa')
handle = irods_file.open('r')
print irods_file.id
print irods_file.name
print handle.readline()
handle.close()
The print handle.readline() returns None. The fasta parser in Biopython (http://biopython.org/DIST/docs/api/Bio.SeqIO.FastaIO-pysrc.html) then bails in this line:
if line[0] == ">":
because line is doesn't exist.
is possible to do PAM Authentication?
On line
https://github.com/iPlantCollaborativeOpenSource/python-irodsclient/blob/master/irods/query.py#L51
It has
new_q.limit = self._limit
it should be
new_q._limit = self._limit
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.