fs-basespace


Namefs-basespace JSON
Version 1.4.2 PyPI version JSON
download
home_pagehttps://github.com/emedgene/fs_basespace
SummaryIllumina Basespace filesystem for PyFilesystem2
upload_time2024-11-11 10:16:25
maintainerNone
docs_urlNone
authoremedgene
requires_pythonNone
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": 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/5e/69/4dad6b75ef95ab01f9ce1a77b903d248551bd827d607b5183240bd63c979/fs-basespace-1.4.2.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.2",
    "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": "5e694dad6b75ef95ab01f9ce1a77b903d248551bd827d607b5183240bd63c979",
                "md5": "e6f923be3ff378af6f42d4c4e203f6d0",
                "sha256": "6dcad5998851f8efff0728f9aace71e59160515dce59732f425bd870affc239c"
            },
            "downloads": -1,
            "filename": "fs-basespace-1.4.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e6f923be3ff378af6f42d4c4e203f6d0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13409,
            "upload_time": "2024-11-11T10:16:25",
            "upload_time_iso_8601": "2024-11-11T10:16:25.110234Z",
            "url": "https://files.pythonhosted.org/packages/5e/69/4dad6b75ef95ab01f9ce1a77b903d248551bd827d607b5183240bd63c979/fs-basespace-1.4.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-11 10:16:25",
    "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: 1.19356s