fs\_basespace
=============
Readonly `pyfilesystem2 <https://github.com/PyFilesystem/pyfilesystem2>`_ interface to `Illumina Basespace <https://developer.basespace.illumina.com/docs/content/documentation/sdk-samples/python-sdk-overview>`_
Installing
----------
::
pip install fs-basespace
Requires python3 version of `basespace-python-sdk <https://github.com/basespace/basespace-python-sdk>`_ which can be installed from
the `develop` branch.
::
pip install 'git+https://github.com/basespace/basespace-python-sdk#egg=BaseSpacePy-0.3&subdirectory=src'
Opening FS Basespace
--------------------
With class constructor
.. code-block:: python
from fs_basespace import BASESPACEFS
basespacefs = BASESPACEFS("/projects/{project-id}/appresults/{result-id}/files/{file-id}",
client_id = "{client-key}",
client_secret = "{client-secret}",
access_token = "{access_token}",
server_name = "{server_name} optional")
Default server name for Illumina is `https://api.basespace.illumina.com/ <https://api.basespace.illumina.com/>`_
With connection string
.. code-block:: python
import fs
basespacefs = fs.open_fs("basespace://{clientKey}:{clientSecret}:{appToken}@{server}")
Advanced connection strings
---------------------------
Access to server root directory:
::
basespace://{clientKey}:{clientSecret}:{appToken}@{server}
Accessing projects:
::
basespace://{clientKey}:{clientSecret}:{appToken}@{server}!/projects/{projectId}
Accessing project sample files:
::
basespace://{clientKey}:{clientSecret}:{appToken}@{server}!/projects/{projectId}/samples/{sampleId}/files/{fileId}
Accessing project appResult files (bam, vcf, ...):
::
basespace://{clientKey}:{clientSecret}:{appToken}@{server}!/projects/{projectId}/appresults/{resultId}/files/{fileId}
Downloading files
-----------------
.. code-block:: python
with open("local_file", "wb") as local_file:
basespacefs.download("path/to/remote/file/id", local_file)
Uploading files
-----------------
Only readonly access to Basespace is implemented in this package. No upload possible yet.
Raw data
{
"_id": null,
"home_page": "https://github.com/emedgene/fs_basespace",
"name": "fs-basespace",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "pyfilesystem, Illumina, Basespace",
"author": "emedgene",
"author_email": "pypi@emedgene.com",
"download_url": "https://files.pythonhosted.org/packages/83/b1/11855c775f1e92fde008d184f4276e6fba44ea8d5bb8565631993ec06164/fs-basespace-1.4.6.tar.gz",
"platform": "any",
"description": "fs\\_basespace\n=============\n\nReadonly `pyfilesystem2 <https://github.com/PyFilesystem/pyfilesystem2>`_ interface to `Illumina Basespace <https://developer.basespace.illumina.com/docs/content/documentation/sdk-samples/python-sdk-overview>`_\n\nInstalling\n----------\n\n::\n\n pip install fs-basespace\n\n\nRequires python3 version of `basespace-python-sdk <https://github.com/basespace/basespace-python-sdk>`_ which can be installed from\nthe `develop` branch.\n\n::\n\n pip install 'git+https://github.com/basespace/basespace-python-sdk#egg=BaseSpacePy-0.3&subdirectory=src'\n\n\nOpening FS Basespace\n--------------------\n\nWith class constructor\n\n.. code-block:: python\n\n from fs_basespace import BASESPACEFS\n basespacefs = BASESPACEFS(\"/projects/{project-id}/appresults/{result-id}/files/{file-id}\",\n client_id = \"{client-key}\",\n client_secret = \"{client-secret}\",\n access_token = \"{access_token}\",\n server_name = \"{server_name} optional\")\n\nDefault server name for Illumina is `https://api.basespace.illumina.com/ <https://api.basespace.illumina.com/>`_\n\n\nWith connection string\n\n.. code-block:: python\n\n import fs\n basespacefs = fs.open_fs(\"basespace://{clientKey}:{clientSecret}:{appToken}@{server}\")\n\nAdvanced connection strings\n---------------------------\n\nAccess to server root directory:\n\n::\n\n basespace://{clientKey}:{clientSecret}:{appToken}@{server}\n\nAccessing projects:\n\n::\n\n basespace://{clientKey}:{clientSecret}:{appToken}@{server}!/projects/{projectId}\n\nAccessing project sample files:\n\n::\n\n basespace://{clientKey}:{clientSecret}:{appToken}@{server}!/projects/{projectId}/samples/{sampleId}/files/{fileId}\n\nAccessing project appResult files (bam, vcf, ...):\n\n::\n\n basespace://{clientKey}:{clientSecret}:{appToken}@{server}!/projects/{projectId}/appresults/{resultId}/files/{fileId}\n\n\nDownloading files\n-----------------\n\n.. code-block:: python\n\n with open(\"local_file\", \"wb\") as local_file:\n basespacefs.download(\"path/to/remote/file/id\", local_file)\n\n\nUploading files\n-----------------\n\nOnly readonly access to Basespace is implemented in this package. No upload possible yet.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Illumina Basespace filesystem for PyFilesystem2",
"version": "1.4.6",
"project_urls": {
"Download": "https://github.com/emedgene/fs_basespace/tarball/0.2.0",
"Homepage": "https://github.com/emedgene/fs_basespace"
},
"split_keywords": [
"pyfilesystem",
" illumina",
" basespace"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "83b111855c775f1e92fde008d184f4276e6fba44ea8d5bb8565631993ec06164",
"md5": "471034519d83a9bc156fcb61a994bb55",
"sha256": "b32f0c1a2a0dce61a1676488d71f49f72df3c311718e4800c042858ac38804cc"
},
"downloads": -1,
"filename": "fs-basespace-1.4.6.tar.gz",
"has_sig": false,
"md5_digest": "471034519d83a9bc156fcb61a994bb55",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13415,
"upload_time": "2025-01-19T13:07:09",
"upload_time_iso_8601": "2025-01-19T13:07:09.729416Z",
"url": "https://files.pythonhosted.org/packages/83/b1/11855c775f1e92fde008d184f4276e6fba44ea8d5bb8565631993ec06164/fs-basespace-1.4.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-19 13:07:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "emedgene",
"github_project": "fs_basespace",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "fs-basespace"
}