{ "info": { "author": "Max Frank, Annie Ha, Hannes Roest", "author_email": "hannes.rost@utoronto.ca", "bugtrack_url": null, "classifiers": [], "description": "\ndiapysef Vignette\n=================\n\nAuthor: Max Frank, Hannes Roest Date: 2018-04-26\n\ndiapysef is a convenience package for working with DIA-PASEF data. It\nhas functionalities to convert Bruker raw files into a format that\nOpenMS can understand. Thus OpenSwath can be used to analyze the data\nand TOPPView can be used to visualize. diapysef itself has also some\nbasic visualization capability that allows to display the window setting\nof a DIA-PASEF run in the context of a precursor map.\n\nInstallation\n------------\n\nWe have not uploaded this package to pyPI, since the package contains\nsome small example data and small amounts of bruker code. You can\ninstall the package through the provided wheel. Make sure you have\npython and pip installed. Then, in your terminal command prompt, run:\n\n.. code:: bash\n\n ## Optional: if conversion with compression is required install the newest pyopenms nightly build\n ## Otherwhise, from the folder containing the .whl file run\n pip install diapysef-0.1-py2.py3-none-any.whl\n\nOn windows make sure that you add the Scripts/ folder of your python\ninstallation to your PATH to be able to call the command line tools from\nanywhere.\n\nConverting raw files\n--------------------\n\nAssuming you have added the python scripts folder to your path you can\nsimply run:\n\n.. code:: bash\n\n convertTDFtoMzML.py \n\nIf you see an output like this:\n\n::\n\n Bruker sdk not found. Some functionalities that need access to raw data will not be available. To activate that functionality place libtimsdata.so (Linux) or timsdata.dll in the src folder. \n\n This functionality can only be carried out if the bruker sdk is present. Please install it first. The sdk can be installed by installing proteowizard(version >=3, http://proteowizard.sourceforge.net), or by placing the a library file in your path (For windows this will be timsdata.dll and for Linux libtimsdata.so).\n\nYou will have to install a Bruker sdk that can handle TDF3.0. You can\neither place the sdk file in your working directory (safest option) or\nsomewhere in your PATH. Another option is to install the latest version\nof ProteoWizard which supports access to the bruker sdk.\n\n| Now you can run the tool without arguments to get the usage info:\n| ``bash convertTDFtoMzML.py``\n\n::\n\n Found Bruker sdk. Access to the raw data is possible. \n\n usage: convertTDFtoMzML.py [-h] -a ANALYSIS_DIR -o OUTPUT_FNAME\n [-m MERGE_SCANS] [-r FRAME_LIMIT FRAME_LIMIT]\n convertTDFtoMzML.py: error: the following arguments are required: -a/--analysis_dir, -o/--output_name\n\nData access and convenience functions\n-------------------------------------\n\nThe rest of the tools are available as scripts but can also be used in a\nmore modular fashion from wihtin python directly. It can access raw\nfiles from both PASEF and DIA-PASEF runs and reads in some MaxQuant txt\nfiles. Since these functions do not acutally need acess to the raw data,\nthey can also be run without the sdk.\n\nObtaining a window layout file\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis can be done with a commandline tool:\n\n.. code:: bash\n\n get_dia_windows.py 20180320_AnBr_SA_diaPASEF_200ng_HeLa_Rost_Method_4_a_01_A1_01_2143.d/ windows.csv\n\nOr in python:\n\n.. code:: python3\n\n import diapysef as dp\n\n # Open connection to a DIA-PASEF run\n dia = dp.TimsData(\"/media/max/D6E01AF3E01ADA17/code/dia-pasef/bruker/20180320_AnBr_SA_diaPASEF_200ng_HeLa_Rost_Method_4_a_01_A1_01_2143.d/\")\n # Obtain the window layout from the first frames\n win = dia.get_windows()\n # Save as csv\n win.to_csv(\"window_layout.csv\")\n print(\"File Written\")\n\n\n.. parsed-literal::\n\n File Written\n\n\nAnnotating ion mobilities\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis is useful to convert scan numbers which are corresponding to\ndifferent ion mobilities depending on the run to 1/K0 which is a more\nstandardized measure.\n\nThis is needed, for example, to generate a library for OpenSwath\ntargeted extraction. We can annotate Ion mobilities with 1/K0 values in\na maxquant output using the calibration information in the raw file.\n\n.. code:: bash\n\n annotate_mq_ionmobility.py 20180309_HeLa_MQ_combined/ 20180309_TIMS1_Metab_AnBr_SA_200ng_HELA_Bremen13_14_A1_01_2129.d/ annotated1K0\n\nOr in python:\n\n.. code:: python3\n\n import diapysef as dp\n\n #Open connection to the pasef data file\n pas = dp.PasefData(\"/media/max/D6E01AF3E01ADA17/code/dia-pasef/bruker/20180309_TIMS1_Metab_AnBr_SA_200ng_HELA_Bremen13_14_A1_01_2129.d/\")\n # Open connection to the Maxquant output from the same run\n mq = dp.PasefMQData(\"/media/max/D6E01AF3E01ADA17/code/dia-pasef/bruker/20180309_HeLa_MQ_combined/\")\n\n ## Annotate all peptides\n # Read in the allPeptides table from the output and annotate with 1/K0 using the calibration obtained from pas\n mq.get_all_peptides()\n mq.annotate_ion_mobility(pas)\n #Or more directly\n mq.get_all_peptides(pas)\n # Save the table\n all_pep = mq.all_peptides\n all_pep.to_csv(\"all_peptides_1K0.csv\")\n\n ## Annotate evidence\n # Read in the allPeptides table from the output and annotate with 1/K0 using the calibration obtained from pas\n mq.get_evidence()\n mq.annotate_ion_mobility(pas)\n #Or more directly\n mq.get_evidence(pas)\n # Save the table\n ev = mq.evidence\n ev.to_csv(\"evidence_1K0.csv\")\n\n\n\nPlotting window layouts\n~~~~~~~~~~~~~~~~~~~~~~~\n\nThe above operations let you obtain a precursor map (either with all MS1\nfeatures or with the peptide evidence) and a window layout. It is\ninformative to plot these together to get some insight into how well the\nwindows cover the precursor space.\n\nWe provide the following plotting function, as a commandline script\n\n.. code:: bash\n\n plot_dia_windows.py window_layout.csv all_peptides_1K0.csv\n\nOr in python:\n\n.. code:: python3\n\n import diapysef as dp\n import pandas as pd\n\n dia = dp.TimsData(\"/media/max/D6E01AF3E01ADA17/code/dia-pasef/bruker/20180320_AnBr_SA_diaPASEF_200ng_HeLa_Rost_Method_4_a_01_A1_01_2143.d/\")\n win = dia.get_windows()\n # Diapysef saves a precursor layout from a Pasef run internally so it is possible to quickly plot windows without\n # specifying a precursor map\n dp.plot_window_layout(windows = win)\n\n # If the windows should be plotted against a certain precursor map (e.g. all_peptides obtained above) you can specify\n # an additional dataframe\n precursors = pd.read_csv(\"all_peptides_1K0.csv\")\n\n dp.plot_window_layout(windows = win, precursor_map = precursors)\n\n\n\n\n.. image:: output_7_0.png\n\n\n\n.. image:: output_7_1.png\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Roestlab/dia-pasef", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "diapysef", "package_url": "https://pypi.org/project/diapysef/", "platform": "", "project_url": "https://pypi.org/project/diapysef/", "project_urls": { "Homepage": "https://github.com/Roestlab/dia-pasef" }, "release_url": "https://pypi.org/project/diapysef/0.3.4/", "requires_dist": [ "pandas", "numpy", "matplotlib", "statsmodels", "pyopenms", "patsy" ], "requires_python": "", "summary": "Analysis, conversion and visualization of diaPASEF data.", "version": "0.3.4" }, "last_serial": 5553191, "releases": { "0.3.3": [ { "comment_text": "", "digests": { "md5": "48c9bb68c372296a3be862b7664c48fb", "sha256": "3696bd9642e6e09074620dda9f9427011870917e283917888070f5e0e2d5ac0b" }, "downloads": -1, "filename": "diapysef-0.3.3-py3-none-any.whl", "has_sig": false, "md5_digest": "48c9bb68c372296a3be862b7664c48fb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 676422, "upload_time": "2019-06-12T20:53:36", "url": "https://files.pythonhosted.org/packages/34/67/3dc7b2961c9f9c39a6e05a09b9d66a22a260e3681f65a704b8669226e5cf/diapysef-0.3.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d10cf3f7c37ed685e1cdf3ec02525149", "sha256": "2fde7e3931cd8d93948b7e72356c0c8872db6aa6085a945bb2e93e3e6e24362f" }, "downloads": -1, "filename": "diapysef-0.3.3.tar.gz", "has_sig": false, "md5_digest": "d10cf3f7c37ed685e1cdf3ec02525149", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 672341, "upload_time": "2019-06-12T20:53:39", "url": "https://files.pythonhosted.org/packages/38/61/4fbe050f27fdce86ebdb35f444d8864b03e08efffc1b13c686585763da17/diapysef-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "8866a75fba8239fdf2a7c2efac7545ca", "sha256": "becffd8d2dbe8adea41473353f9ab38297d1ec5b6cc6f8f1477fbdfdb68344f9" }, "downloads": -1, "filename": "diapysef-0.3.4-py3-none-any.whl", "has_sig": false, "md5_digest": "8866a75fba8239fdf2a7c2efac7545ca", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 679034, "upload_time": "2019-07-18T20:28:37", "url": "https://files.pythonhosted.org/packages/22/5f/4144e36fc8337aaf3d712675bd7f390f564def070c828f109171c5693d3d/diapysef-0.3.4-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8866a75fba8239fdf2a7c2efac7545ca", "sha256": "becffd8d2dbe8adea41473353f9ab38297d1ec5b6cc6f8f1477fbdfdb68344f9" }, "downloads": -1, "filename": "diapysef-0.3.4-py3-none-any.whl", "has_sig": false, "md5_digest": "8866a75fba8239fdf2a7c2efac7545ca", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 679034, "upload_time": "2019-07-18T20:28:37", "url": "https://files.pythonhosted.org/packages/22/5f/4144e36fc8337aaf3d712675bd7f390f564def070c828f109171c5693d3d/diapysef-0.3.4-py3-none-any.whl" } ] }