fs-basespace


Namefs-basespace JSON
Version 1.3.0 PyPI version JSON
download
home_pagehttps://github.com/emedgene/fs_basespace
SummaryIllumina Basespace filesystem for PyFilesystem2
upload_time2024-03-07 10:27:00
maintainer
docs_urlNone
authoremedgene
requires_python
licenseMIT
keywords pyfilesystem illumina basespace
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "pyfilesystem,Illumina,Basespace",
    "author": "emedgene",
    "author_email": "pypi@emedgene.com",
    "download_url": "https://files.pythonhosted.org/packages/6a/90/71a4ff7e0ef8dcccfb5c3f65a32db5140dd8d2fa99b3869126c2ec516a90/fs-basespace-1.3.0.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.",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Illumina Basespace filesystem for PyFilesystem2",
    "version": "1.3.0",
    "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": "6a9071a4ff7e0ef8dcccfb5c3f65a32db5140dd8d2fa99b3869126c2ec516a90",
                "md5": "58e6359409271bbc279253859f9de1d5",
                "sha256": "6d585e9d57b52605f586f515a627cf7ef9ca1b218b83a93595d1e3311739c8e9"
            },
            "downloads": -1,
            "filename": "fs-basespace-1.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "58e6359409271bbc279253859f9de1d5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11563,
            "upload_time": "2024-03-07T10:27:00",
            "upload_time_iso_8601": "2024-03-07T10:27:00.901709Z",
            "url": "https://files.pythonhosted.org/packages/6a/90/71a4ff7e0ef8dcccfb5c3f65a32db5140dd8d2fa99b3869126c2ec516a90/fs-basespace-1.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-07 10:27:00",
    "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"
}
        
Elapsed time: 0.21488s