.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_HBN_download.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_HBN_download.py: Fetching the HBN example dataset ================================ This example demonstrates how to use :mod:`bids_bep16_conv.datasets` to fetch the HBN example dataset. .. GENERATED FROM PYTHON SOURCE LINES 10-27 Much of the functionality of the ``bids_bep16_conv`` toolbox relies on downloading candidate example datasets. Each dataset has its own functions to check and evaluate QC files to find suitable participants, as well as dedicated download functions that will obtain the data from the BIDS connectivity OSF project. The respective files differ between example datasets and respectively utilized pipeline/workflow but are obtained in a way that they confirm to BIDS common derivatives, specifically as input for tools that generate BEP16-related output. Here we show how the HBN example dataset was generated and can be assessed, via describing the respective workflow and utilized ``functions``. The ``HBN dataset`` and its derivatives are provided openly via the `FCP-INDI AWS bucket `_, entailing various pipeline/workflow outputs. Here, we are going to focus on the preprocessing conducted via ``QSIprep``. At first, we need to find a suitable ``participant``, in terms of overall data quality, Luckily, ``QSIprep`` provides a respective file that includes a ``quality control score`` for each ``participant``. Using the :func:`datasets.get_HBN_qc` function we can obtain and check this file: .. GENERATED FROM PYTHON SOURCE LINES 27-33 .. code-block:: default from bids_bep16_conv import datasets HBN_qc_file = datasets.get_HBN_qc(return_df=True) print(HBN_qc_file) .. rst-class:: sphx-glr-script-out .. code-block:: none Data will be downloaded to bids_bep16_datasets/HBN/source-HBN_desc-qsiprep_participants.tsv 0%| | 0/210607 [00:00`_ which were downloaded from the `FCP-INDI AWS bucket `_ and subsequently uploaded to the `dataset component `_ of the `BIDS connectivity project `_ `OSF project `_ for access and management. That being said, we can use :func:`datasets.download_HBN` ``function`` to download the respective ``data``, for example to our ``Desktop``. .. GENERATED FROM PYTHON SOURCE LINES 60-63 .. code-block:: default HBN_dataset_path = datasets.download_HBN() .. rst-class:: sphx-glr-script-out .. code-block:: none Downloading sub-NDARYM277DEA_ses-HBNsiteCBIC_acq-64dir_space-T1w_desc-preproc_dwi.bval 0%| | 0/642 [00:00`_. The latter is achieved by downloading the `respective raw data json sidecar file `_ and appending the needed ``inheritance-related`` & ``spatial reference-related`` information. With that, we have a feasible ``HBN sub-dataset``, confirming to `BIDS common derivatives `_, as well as `inputs required by BEP16 `_ and respective further processing. .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 15.515 seconds) .. _sphx_glr_download_auto_examples_plot_HBN_download.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_HBN_download.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_HBN_download.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_