Guide for Advanced Users ======================== If you have **a solid background in MATLAB**, you can turn off the GUI mode (line 76, change 1 to 0) and instead manually enter the required information prior to running the `MEApipeline.m` script for batch analysis of your experimental data. By customizing parameters in `MEApipeline.m`, users can tailor their data analysis to align with the specific requirements of your experiments. Advanced users may also find leaving the GUI mode on to be convenient, particularly for running MEA-NAP again on the same data with different parameters. The Save and Load Parameters buttons on the GUI are particularly useful. Advanced users can also conveniently edit additional parameters by checking "Show Advanced Settings" on the General settings tab in the GUI. This will create additional tabs at the end of the GUI (use right arrow to navigate). This "Guide for Advanced Users" provides explanations of some of the parameters. However, advanced users may also need to examine the individual functions in MATLAB. ========================= .. _custom_layout: Creating a Custom MEA Layout ----------------------------- If your MEA has a different number of electrodes than currently supported in MEA-NAP, you can modify the biAdvancedSettings.m function (starting at line 250) and then select 'Custom' layout when you run MEA-NAP using the GUI. Note that if your MEA has more than 64 electrodes, you may need a computer with higher RAM (or a HPC) for Step 3 where the functional connectivity is calculated. A 64-electrode array has 2,048 possible undirected edges (functional connections). A 256-electrode array has 32,768 possible undirected edges. To determine which functional connections are significant, MEA-NAP repeats this calculation with circular shifts 200 times for each potential edge (pair of electrodes). Thus, an increase from 64 to 256 electrodes increases the number of computations per recording from 400K to over 6.5 million. For high density (HD) MEA recordings, which may have 4096 electrodes, it is important to note that there is fundamental difference in the network analysis for HD MEA data from our standard density (SD) MEA data in MEA-NAP. For SD MEAs, each electrode is treated a node in the network, although there may be more than one neuron near that electrode. In contrast, in HD MEAs, there may be more than one electrode per cell. Thus, it would not be appropriate to treat the 4096 electrodes each as nodes. Instead, first the cells need to be identified and a single spike train per cell extracted. Once this has been done, a custom layout in MEA-NAP could be created where each cells spatial location is indicated by the x,y coordinates of its location on the HD MEA. Once that is complete, MEA-NAP could be used starting at Step 2 (Comparison of neuronal activity) or Step 3 (Inferring functional connectivity). .. _overview: Overview of MEA-NAP ---------------------------------------------------------------- The pipeline has the following steps: 1. Spike detection (this step can be skipped if done previously) 2. Comparison of the neuronal activity (e.g., firing rates, burst rates) 3. Inferring the functional connectivity 4. Comparison of the network activity (e.g., graph theoretical metrics) 5. Statistical analysis (e.g., feature correlation and classification) Starting MEA-NAP -------------------------------- - Make sure all of the recordings are in the correct `*.mat` format and saved in the same folder first. - To use the pipeline, open ``MEApipeline.m`` in MATLAB. Required user input in the first section of MEA-NAP ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - The first section of ``MEApipeline.m`` sets many of the parameters that instruct MEA-NAP on how to do the following: - Find your data - Select which parts of the analysis pipeline to run - Save your outputs - Follow the prompts to set-up MEA-NAP for analysing a single or multiple MEA recording files in the same experiment. This section is also well annotated and does not require understanding of MATLAB in order to edit. Save your edits and run. - **Descriptions and line numbers for each parameter can be found below.** - N.B. As we continue to update and improve MEA-NAP, some of the line numbers in the ``MEApipeline.m`` may change**. There may be a lag before we update those line numbers in this documentation. If the line numbers do not match, you can search for the function in the ``MEApipeline.m`` file in matlab to find the new line number. .. list-table:: :widths: 15 25 50 :header-rows: 1 * - Line - Variable - User input required * - 13 - HomeDir - Set the location of the folder with the AnalysisPipeline scripts. N.B. Best not to save in Program Files. * - 14 - Params.outputDataFolder - Set the location of where your output data will be saved. Leave as '' if the same as HomeDir. * - 15 - rawData - Set the location of the folder with the raw data .mat files. * - 20, 21 - spreadsheet_file_type, spreadsheet_filename - Input file with a list of recordings with their age and genotype. Specify if the input file is ``*.csv`` or ``*.xlsx`` (line 17) and the name of your input file (line 18). * - 22 - sheet - Specify whether you are using an Excel sheet. If you are using one, set this setting equal to "1". Otherwise, set it equal to "0". * - 23 - xlRange (optional) - If using an .xlsx file type, you can specify all or a subset of the filenames to analyze by changing the sheet number (if more than one sheet in the spreadsheet) and/or xlRange (e.g., ``A2:C3`` would analyze the first two files listed in the sheet). * - 24 - csvRange (optional) - If using a .csv file type, you can specify all or a subset of the filenames to analyze by only reading data in the range [StartRow EndRow]. (e.g. ``[2 Inf]`` would start reading data from row 2). * - 25 - Params.output_spreadsheet_file_type - Option to choose .csv or .xlsx as the output file type for your data analysis from the pipeline. Default is ``.csv`` * - 39 - Params.fs - Confirm the sampling frequency is correct for your recording. We acquire data on the MCS 60 channel system at 25000 Hz and on the Axion Maestro at 12500 Hz. * - 40 - Params.dSampF - Down-sampling factor for plotting spike detection checks in Step 1B. For most analyses, no down sampling is necessary. Thus, set this to be equal to ``Params.fs`` * - 42 - Params.channelLayout - Confirm the correct channel layout for your recording. Options: ``MCS60``, ``Axion64``, ``MCS60old`` * - 76 - Params.guiMode - Set ``Params.guiMode`` equal to 1 if you wish to use an interactive, tutorial GUI for MEANAP pipeline. Otherwise, set ``Params.guiMode`` equal to 0 if you wish to run the non-interactive default version of the MEANAP pipeline, which does not include the tutorial GUI. Options to start the pipeline at different steps ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (e.g., save time by running functional connectivity for different time lags without having to rerun the spike detection). .. list-table:: :widths: 15 25 50 :header-rows: 1 * - Line - Variable - User input required * - 16, 28, 29 - Params.priorAnalysisPath, Params.priorAnalysisDate,Params.priorAnalysis - If you have already run the pipeline previously and wish to use some of the outputs from the earlier steps, set equal to 1 and give the location and date for the prior analysis (this format should match the folder name of the previous data analysis). N.B. If a previous OutputData folder for the Date already exists, the pipeline will prompt you when running to add a suffix to the previous version (e.g. “v1”). The pipeline will then rename the old folder and remove it from the path. * - 30 - Params.startAnalysisStep - If you would like to start running the pipeline at a later step than spike detection (step 1) using the prior data, change to the corresponding number. See Section 3.1 for an overview of pipeline functions. If ``Params.priorAnalysis=0``, the default is to start with spike detection. N.B. Steps 2-5 all require spike detection to run. Step 4 requires Step 3. Step 5 requires step 4. If you want to start with Step 1B (spike detection checks), enter 1 here, set detectSpikes (line 37) to 0, and Params.runSpikeCheckOnPrevSpikeData (line 38) * - 31 - Params.optionalStepsToRun - If you have completed steps 1-4 of the pipeline, use this step to run optional downstream steps of the pipeline. You can set this setting equal to 'runStats' (Step 5) to perform statistical analysis that looks at feature correlations and classification across groups. You can also set it equal to 'combineDIVplots' to combine plots across DIVs, if the filenames for recordings from the same culture have the same filename except for the number (age) after DIV in the filenames (e.g, NGN2230408_P1A1_DIV14, NGN2230408_P1A1_DIV21, NGN2230408_P1A1_DIV28). Spike detection parameters ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. list-table:: :widths: 15 25 50 :header-rows: 1 * - Line - Variable - User input required * - 15 - rawData - This is the folder where your recordings are (*.mat format). Mac uses / for filenames. PC uses \ for file names. * - 17 - spikeDetectedData - If you are using previous spike detection .mat files for the pipeline, put the folder location here. This allows you to run downstream parts of the pipeline again without having to redo spike detection (saves computational time). Spike detection files are also much smaller file size than raw so easier to share/run on less powerful computers. * - 37 - detectSpikes - If you are starting with a .mat file of a raw recording, set to “1” to run spike detection. If starting with a .mat file of detected spikes, or have previously run spike detection, set equal to “0”. * - 38 - Params.runSpikeCheckOnPrevSpikeData - If you were unable to generate spike detection check figures during step 1 of the pipeline to visualize the performance of your spike detection methods, set equal to "1". You must have already generated spike files for all of your recordings before using this setting. * - 43 - Params.thresholds - Choose one or more mean absolute deviations (MAD) if running threshold-based spike detection. This method identifies negative voltage deflections that exceed the threshold set based on the MAD of the voltage signal. This method is fast. It works well for electrodes with a high signal-to-noise ratio and for recordings with similar firing rates. Threshold-based methods can underestimate spikes in electrodes with high firing rates and are susceptible to counting artifacts as spikes. * - 44 - Params.wnameList - Choose one or more wavelets for template-based spike detection. We routinely use MATLAB built-in wavelets bior1.5, bior1.3, and db2 (db2 is least spike-like). For custom electrode-specific templates created from 50 spikes detected by the threshold method, use mea. This may require further tuning by advanced users to calibrate for your data. The published SWTTEO method is also available (swetteo), but we have not tested it extensively with our data. * - 45 - Params.costList - Cost parameter for wavelets in templated-based spike detection. Determines balance of false positives to false negatives. Can tune for your dataset. We have found that -0.12 to -0.2 works well for most of our MEA data (when comparing spike detection pre- and post-TTX). * - 46 - Params.SpikesMethod - Choose spike detection method to use for steps 2-4 of the pipeline (e.g., 'bior1p5', 'thr4', 'mergedAll', or 'mergedWavelet'). mergedAll combines all spike detection methods and parameters selected above. mergedWavelets combines only the spikes detected by one or more of the wavelets selected above. Functional connectivity parameters ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. list-table:: :widths: 15 25 50 :header-rows: 1 * - Line - Variable - User input required * - 49 - Params.FuncConLagval - The pipeline uses the spike time tiling coefficient (STTC; Cutts & Eglen, 2014) to estimate pairwise correlations between spiking activity observed in electrodes. Select one or more lag values (in milliseconds) for detecting coincident activity. For most neuronal cultures, 10 or 25 ms is a good starting point. Pipeline works best if you choose 2 or 3 different lags to compare (although the computational time is longer). * - 50, 51 - Params.TrunRec, Params.TrunLength - Calculating the functional connectivity can be computationally intensive. If you wish to shorten (truncate) the recording change TrunRec to 1 and select a length in seconds. N.B. Shortening the recording can significantly change the connectivity estimates. * - 52 - Params.adjMtype - We use weighted networks. The strength of the connectivity between two electrodes is determined by the STTC. Changing to binary would treat weak and strong connections the same. * - 55, 56, 57, 58 - Params.ProbThresRepNum, Params.ProbThresTail, Params.ProbThresPlotChecks, Params.ProbThresPlotChecksN - Probabilistic thresholding is a method for determining above-chance correlation between activity observed in the electrodes. It works by shuffling the real data many times (RepNum default = 200) and then calculating the STTC. If the STTC value for the real data is greater than expected by chance for a given electrode pair from the shuffles (e.g., Tail 0.1, aka 90%-tile), that pair is functionally connected. Depending on the number of shuffles and STTC lag, we may use ``Params.ProbThreshTail = 0.01`` (aka 99%-tile). To determine whether the number of shuffles (RepNum) is sufficient in a sample of the recordings, set ``Params.ProbThreshPlotChecks = 1`` (otherwise 0) and indicate the number of recordings to examine (PlotChecksN). Node cartography parameters ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. list-table:: :widths: 15 25 50 :header-rows: 1 * - Line - Variable - User input required * - 61 - Params.autoSetCartographyBoudariesPerLag - During step 4, our pipeline generates figures related to node cartography. Use this setting to choose whether there are separate boundaries per STTC lag value. * - 62 - Params.cartographyLagVal - If ``Params.autoSetCartographyBoudariesPerLag = 0``, specifiy lag values (in ms) that you want to use to calculate the hub boundaries (based on the PC-Z distribution). * - 63 - Params.autoSetCartographyBoundaries - This setting specifies whether the pipeline should automatically determine the boundaries for hubs or use custom ones for the node cartography. Statistics and machine learning parameters ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. list-table:: :widths: 15 25 50 :header-rows: 1 * - Line - Variable - User input required * - 66 - Params.classificationTarget - Specify which property of your recordings that you wish to classify using machine-learning-based classification and regression models during step 5 (statisical analysis) of the pipeline. * - 67 - Params.classification_models - Specify the classification models that you wish to classify recording property that you previously specified with ``Params.classificationTarget``. * - 68 - Params.regression_models - Specify the regression models that you wish to use to classify recording property that you previously specified with ``Params.classificationTarget``. Pipeline output preferences ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. list-table:: :widths: 15 25 50 :header-rows: 1 * - Line - Variable - User input required * - 71 - Params.figExt - The pipeline output includes a large number of figures which allow you to look at network features within individual networks and to compare across multiple recordings. You can have these figures in .fig (can edit in MATLAB), .png (standard image), and/or .svg (can edit colors, font sizes in graphics programs). Specify which extensions to include as a cell array in this line. More file types selected increases pipeline run time. * - 72 - Params.fullSVG - You can choose whether to use .svg format for all plots, including ones with large numbers of elements. * - 73 - Params.showOneFig - You can choose whether to show plots as the pipeline Run and wait ^^^^^^^^^^^^^^ After completing this list, no further changes are necessary to run the pipeline. Save your changes. Press RUN and then wait! The length of time will depend on the acquisition rate, length of recordings, number of files and processing power of the computer. Cluster computing when available is recommended for larger batch datasets. Pipeline parameters ------------------ Overview ^^^^^^^^^^ Folder paths: * :ref:`HomeDir ` * :ref:`rawData ` * :ref:`Params.priorAnalysisPath ` * :ref:`spikeDetectedData ` * :ref:`spreadsheet_filename ` Input and output filetypes: * :ref:`spreadsheet_file_type ` * :ref:`Params.output_spreadsheet_file_type ` Analysis step settings: * :ref:`Params.priorAnalysisDate ` * :ref:`Params.priorAnalysis ` * :ref:`Params.startAnalysisStep ` * :ref:`Params.optionalStepsToRun ` * :ref:`Params.Date ` Spike detection: * :ref:`Params.detectSpikes ` * :ref:`Params.fs ` * :ref:`Params.dSampF ` * :ref:`Params.potentialDifferenceUnit ` * :ref:`Params.channelLayout ` * :ref:`Params.coords ` * :ref:`Params.wnameList ` * :ref:`Params.SpikesMethod ` * :ref:`Params.costList ` * :ref:`Params.refPeriod ` * :ref:`Params.filterLowPass ` * :ref:`Params.filterHighPass ` * :ref:`Params.runSpikeCheckOnPrevSpikeData ` * :ref:`Params.threshold_calculation_window ` * :ref:`Params.remove_artifacts ` * :ref:`Params.minPeakThrMultiplier ` * :ref:`Params.maxPeakThrMultiplier ` * :ref:`Params.posPeakThrMultiplier ` * :ref:`Params.multiplier ` Functional connectivity: * :ref:`Params.FuncConLagval ` * :ref:`Params.TruncRec ` * :ref:`Params.TruncLength ` * :ref:`Params.adjMtype ` * :ref:`Params.ProbThreshRepNum ` * :ref:`Params.ProbThreshTail ` * :ref:`Params.ProbThreshPlotChecks ` * :ref:`Params.ProbThreshPlotChecksN ` Network analysis: * :ref:`Params.netMetToCal ` * :ref:`Params.minNumberOfNodesToCalNetMet ` * :ref:`Params.autoSetCartographyBoundaries ` * :ref:`Params.networkLevelNetMetToPlot ` * :ref:`Params.networkLevelNetMetLabels ` * :ref:`Params.includeNMFcomponents ` * :ref:`Params.effRankCalMethod ` * :ref:`Params.NMFdownsampleFreq ` * :ref:`Params.hubBoundaryWMdDeg ` * :ref:`Params.periPartCoef ` * :ref:`Params.proHubpartCoef ` * :ref:`Params.nonHubconnectorPartCoef ` * :ref:`Params.connectorHubPartCoef ` Plot settings * :ref:`Params.figExt ` * :ref:`Params.fullSVG ` * :ref:`Params.showOneFig ` * :ref:`Params.groupColors ` * :ref:`Params.GrpNm ` * :ref:`Params.DivNm ` Folder paths ^^^^^^^^^^^^^^^^^^^ .. _HomeDir: ``HomeDir`` """""""""""""""""""" * Argument type : char * The location of the folder with the AnalysisPipeline scripts * This will also be the default location in which the analysis pipeline outputs will be saved .. _rawData: ``rawData`` """""""""""""""""""" * Argument type : char * The location of the folder with the raw .mat files to be analyzed .. _Params.priorAnalysisPath: ``Params.priorAnalysisPath`` """""""""""""""""""""""""""""""" * Optional (can leave as empty string) * Argument type : char * Path to previous network pipeline analysis folder .. _spikeDetectedData: ``spikeDetectedData`` """"""""""""""""""""""""""" * Optional (can leave as empty string) * Argument type : char * Path to previously spike-detected data .. _spreadsheet_filename: ``spreadsheet_filename`` """"""""""""""""""""""""""""""" * The name of spreadsheet containing information about the data to be analysed, including the file extension, usually in the form of 'spreadhsheet.csv' or 'spreadsheet.xlsx' * this spreadsheet file is assumed to be located in the main analysis pipeline folder * argument type: string or character array Input and output filetypes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. _spreadsheet_file_type: ``spreadsheet_file_type`` """"""""""""""""""""""""""" * Filetype of file which contains a table of recording data * Options: 'csv' or 'excel' * Default: 'csv' .. _Params.output_spreadsheet_file_type: ``Params.output_spreadsheet_file_type`` """"""""""""""""""""""""""""""""""""""""" * Filetype of output file to create which contains a table of calculated features * Options: 'csv' or 'xlsx' * Default: 'csv' Analysis step settings ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. _Params.priorAnalysisDate: ``Params.priorAnalysisDate`` """""""""""""""""""""""""""""" * Date of prior analysis, can leave empty or ignore this line if no prior analysis was performed * Format: 'DDMonthYYYY', eg. '27Sep2021' .. _Params.priorAnalysis: ``Params.priorAnalysis`` """""""""""""""""""""""""""""" * Whether to use previously analysed data * Options : 1 = yes, 0 = no .. _Params.startAnalysisStep: ``Params.startAnalysisStep`` """""""""""""""""""""""""""""" * Which step to start analysis * Options : 1 = spike detection, 2 = neuronal activity, 3 = functional connectivity, 4 = network activity * Default : 1 .. _Params.optionalStepsToRun: ``Params.optionalStepsToRun`` """"""""""""""""""""""""""""" * Which optional steps to run (after the main steps are performed) * Argument type : cell array with strings / characters * Options : 'runstats' = obtained feature correlations and do classification, 'getDensityLandscape' = get density landscape plot of participation coefficient and within module z-score * Default : {} .. _Params.Date: ``Params.Date`` """""""""""""""""""" * This specifies the date in which the analysis was performed * Normally, no user input is required for this parameter, it is automatically set to the date detected on the computer's system clock * This also informs what to name the output folder of the pipeline, which will be of the form 'OutputDataDDMonthYYYY' Spike detection ^^^^^^^^^^^^^^^^^^^ .. _params.detectspikes: ``Params.detectSpikes`` """""""""""""""""""""""""""""" * Determines whether to run spike detection in the pipeline * argument type: boolean * options: 0 : do not detect spikes, 1 : detect spikes .. _Params.fs: ``Params.fs`` """"""""""""""""""""""""""""""""' * Sampling rate of the recording electrodes, in samples per second (Hz) * argument type: int * default : 25000 .. _Params.dSampF: ``Params.dSampF`` """""""""""""""""""""""""""""""""" * The down-sampling factor for plotting spike detection checks in Step 1B. For most analyses, no down sampling is necessary. Thus, set this to be equal to ``Params.fs``. * normally, this should be kept as the same value as `Params.fs` * argument type: int * default: 25000 .. _Params.potentialDifferenceUnit: ``Params.potentialDifferenceUnit`` """"""""""""""""""""""""""""""""""""""" * the unit of potential difference in which you are recording electrical signals * options: 'V' for volt, 'mV' for millivolt, 'uV' for microvolt * default : 'uV' .. _Params.channelLayout: ``Params.channelLayout`` """"""""""""""""""""""""""""""" * The channel layout to use for plotting firing rate heatmaps, and other plots related to the layout of the electrodes * options: 'MCS60' = multichannel systems layout with 59 recording electrodes + 1 grounding electrode, 'Axion64' = axion recording layout in a 8 x 8 grid with 64 electrodes, 'Custom' = provide own custom layout by specifying the coordinate of each electrode in biAdvantedSettings.m, you will need to edit the block of code under strcmp(Params.channelLayout, 'Custom') .. _Params.coords: ``Params.coords`` """""""""""""""""""""""""""""" * The x and y coordinates of each electrode to be used for visualisation purposes * this is automatically set of Params.channelLayout is one of the provided options 'MCS60' or 'Axion64', but will require to be set by the user if the option chosen the 'Custom' option * argument type : nUnit x 2 matrix where nUnit is the number of recorded units, such that each row contains the x and y coordinate of the corresponding recorded unit .. _Params.wnameList: ``Params.wnameList`` """""""""""""""""""""""""""""" * Determines which wavelets to run the spike detection with * argument type: either string or a cell array of strings * options: bior1p5, bior1p3, db2, mea, .. _Params.SpikesMethod: ``Params.SpikesMethod`` """""""""""""""""""""""""""""" * The spike method to used in downstream analysis * argument type : char * options : 'bior1p5', 'bior1p3', 'merged', 'thr3p0', or other available wavelet names If 'merged' is used, then all wavelet-based spike detection methods are combined. 'mea' uses spikes from electrode-specific custom wavelets (adapted from putative spikes detected using the threshold method) 'thr3p0' means using a threshold-based method with a multiplier of 3.0, you can specify other thresholds by replacing the decimal place '.' with 'p', eg. 'thr4p5' means a threhold multiplier of 4.5. .. _Params.costList: ``Params.costList`` """""""""""""""""""""""""""" * The false positive / false negative tradeoff for wavelet spike detection * argument type : float value between -2 to 2 * default value : -0.12 More negative values leads to less false negative but more false positives, recommended range is between -2 to 2, but usually we use -1 to 0. Note that this is in a log10 scale, meaning -1 will lead to 10 times more false positive compared to -0.1 .. _Params.threshold_calculation_window: ``Params.threshold_calculation_window`` """"""""""""""""""""""""""""""""""""""""""" * Which part of the recording to do spike detection * 0 : start of recording, 0.5 : middle of recording, 1 : end of recording * argument type : a matlab double with 2 elements * This is an advanced setting, modify this in biAdvancedSettings.m .. _Params.refPeriod: ``Params.refPeriod`` """"""""""""""""""""""" * The refractory period of spikes in milliseconds * spikes that are smaller than this time period apart will be excluded * argument type : float * default value : 0.2 * This is an advanced setting, modify this in biAdvancedSettings.m .. _Params.filterLowPass: ``Params.filterLowPass`` """"""""""""""""""""""""""" * The low pass frequency (Hz) to use on the raw signal before spike detection * argument type : float * default value : 600 .. _Params.filterHighPass: ``Params.filterHighPass`` """"""""""""""""""""""""""" * The high pass frequency (Hz) to use on the raw signal before spike detection * argument type : float * default value : 8000 .. _Params.runSpikeCheckOnPrevSpikeData: ``Params.runSpikeCheckOnPrevSpikeData`` """""""""""""""""""""""""""""""""""""""""" * Whether to run spike detection check without spike detection * argument type : bool * default value : 0 * options : 0 or 1 Note that setting this to 1 automatically sets `detectSpikes` to 0. .. _Params.remove_artifacts: ``Params.remove_artifacts`` """""""""""""""""""""""""""""" * Whether to run process to remove artifacts from recording * argument type : bool * options : 1 = yes, 0 = no * default : 0 .. _Params.minPeakThrMultiplier: ``Params.minPeakThrMultiplier`` """""""""""""""""""""""""""""""""" * The minimal spike amplitude that is used for artifact removal * After spike detection, spikes with an amplitude smaller than `Params.minPeakThrMultiplier` will be removed * This is used in `alignPeaks.m` * This is only used if `Params.remove_artifacts = 1` .. _Params.maxPeakThrMultiplier: ``Params.maxPeakThrMultiplier`` """""""""""""""""""""""""""""""""""" * The maximal spike amplitude in terms of negative peak that is used for artifact removal * After spike detection, spikes with a negative peak greater than `Params.maxPeakThrMultiplier` will be removed * This is used in `alignPeaks.m` * This is only used if `Params.remove_artifacts = 1` .. _Params.posPeakThrMultiplier: ``Params.posPeakThrMultiplier`` """"""""""""""""""""""""""""""""""""" * The maximal spike amplitude in terms of positive peak that is used for artifact removal * After spike detection, spikes with a positive peak lower than this value will be removed * This is used in `alignPeaks.m` * This is only used if `Params.remove_artifacts = 1` .. _Params.multiplier: ``Params.multiplier`` """"""""""""""""""""""""""""" * The multiplier to use for extracting spikes for wavelet adaptation method (not for the spike detection itself) * this is an advanced setting, and can be found in biAdvancedSettings.m * argument type: float * default: 3 Functional connectivity ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. _Params.FuncConLagval: ``Params.FuncConLagval`` """""""""""""""""""""""""" * List of lag values (in ms) to use to infer correlation of spike trains * Default : [10, 15, 25] .. _Params.TruncRec: ``Params.TruncRec`` """""""""""""""""""""""""" * Whether or not to truncate the recording * Options: 1 = yes, 0 = no * Default: 0 .. _Params.TruncLength: ``Params.TruncLength`` """""""""""""""""""""""""" * The duration (in seconds) of the recording to truncate * Default: 120, but not applied since Params.TruncRec = 0 .. _Params.adjMtype: ``Params.adjMtype`` """""""""""""""""""""""""" * The type of adjacency matrix to obtain * Options: 'weighted' or 'binary' * Default : 'weighted' .. _Params.ProbThreshRepNum: ``Params.ProbThreshRepNum`` """""""""""""""""""""""""""""" * Number of random shuffles to obtain for probabilistic thresholding * Default : 200 .. _Params.ProbThreshTail: ``Params.ProbThreshTail`` """""""""""""""""""""""""""""" * The percentile threshold to use for probabilistic thresholding * Argument type: float between 0 and 1 * Default : 0.05 .. _ProbThreshPlotChecks: ``ProbThreshPlotChecks`` """""""""""""""""""""""""""""""""""" * Whether or not to plot probabilistic thresholding check * Options : 1 = yes, 0 = no * Default : 1 .. _Params.ProbThreshPlotChecks: ``Params.ProbThreshPlotChecks`` """""""""""""""""""""""""""""""""""" * Whether to randomly sample recordings to plot probabilistic thresholding check * Options : 1 = yes, 0 = no * Default : 1 .. _Params.ProbThreshPlotChecksN: ``Params.ProbThreshPlotChecksN`` """""""""""""""""""""""""""""""""""""" * Number of recordings to check (selected randomly) for probabilistic thresholding * Argument type : integer value greater than or equal to 1 * Default : 5 Network analysis ^^^^^^^^^^^^^^^^^^^^^ .. _Params.netMetToCal: ``Params.netMetToCal`` """"""""""""""""""""""""""" * List of network metrics to calculate * argument type : cell containing strings * options : ND, MEW, NS, aN, etc. .. _Params.minNumberOfNodesToCalNetMet: ``Params.minNumberOfNodesToCalNetMet`` """""""""""""""""""""""""""""""""""""""" * Minimum number of nodes required to calculate network metrics * argument type : int * options : any integer value from 2 to the maximum number of nodes in your network * default value : 25 .. _Params.networkLevelNetMetToPlot: ``Params.networkLevelNetMetToPlot`` """"""""""""""""""""""""""""""""""""""""""" * List of network metrics to plot, this should be the same or a subset as the list of network metrics to calculate, which is specified in Params.netMetToCal * argument type: cell array of strings / characters * eg. {'aN', 'Dens', 'effRank'} .. _Params.networkLevelNetMetLabels: ``Params.networkLevelNetMetLabels`` """""""""""""""""""""""""""""""""""""""""""" * List of labels corresponding to the network level metrics to plot * eg. 'aN' denotes network size and so the label given is 'network size' * argument type: cell array of strings / characters with the same length as `Params.networkLevelNetMetToPlot` .. _Params.includeNMFcomponents: ``Params.includeNMFcomponents`` """""""""""""""""""""""""""""""""""" * Whether to include the components as output when performing non-negative matrix factorisation on the spike rate matrix, which outputs a matrix of size (num_components, num_time_samples) and a matrix of size (num_components, num_units) * argument type : bool * options : 0 = no, 1 = yes * default : 0 .. _Params.NMFdownsampleFreq: ``Params.NMFdownSampleFreq`` """"""""""""""""""""""""""""""""""""" * How mcuh to downsample the spike rate matrix before performing non-negative matrix factorisation * eg. 10 will mean downsampling from 25000 Hz to 2500 Hz * argument type : int * default : 10 .. _Params.effRankCalMethod: ``Params.effRankCalMethod`` """"""""""""""""""""""""""""""" * Whether to use the covariance or correlation matrix for effective rank calculation * options: 'covariance' or 'correlation' * default: 'covariance' * this is an advanced setting and is located in biAdvancedSettings.m .. _Params.autoSetCartographyBoundaries: ``Params.autoSetCartographyBoundaries`` """"""""""""""""""""""""""""""""""""""""""""""" * Whether or not to automatically determine bounds in the participation coefficient vs. within module z-score space to classify different nodes (eg. hubs versus non-hubs) * Options : 1 = yes, 0 = no, use either default or custom coded boundary values .. _Params.hubBoundaryWMdDeg: ``Params.hubBoundaryWMdDeg`` """""""""""""""""""""""""""""""""" * Boundary that separtes hub and non-hubs * default value: 0.25 * argument type: float * this argument has no effect if Params.autoSetCartographyBoundaries = 1 .. _Params.periPartCoef: ``Params.periPartCoef`` """"""""""""""""""""""""""""" * Boundary (in terms of participation coefficient) that separates peripheral node and non-hub connector * default value: 0.525 * argument type : float * this argument has no effect if Params.autoSetCartographyBoundaries = 1 .. _Params.proHubPartCoef: ``Params.proHubPartCoef`` """""""""""""""""""""""""""""" * Boundary (in terms of participation coefficient) that separates provincial hub and connector hub * default value: 0.45 * argument type: float * this argument has no effect if Params.autoSetCartographyBoundaries = 1 .. _Params.nonHubConnectorPartCoef: ``Params.nonHubConnectorPartCoef`` """""""""""""""""""""""""""""""""""""" * Boundary (in terms of participation coefficient) that separates non-hub connector and non-hub kinless node * default value: 0.8 * argument type: float * this argument has no effect if Params.autoSetCartographyBoundaries = 1 .. _Params.connectorHubPartCoef: ``Params.connectorHubPartCoef`` """"""""""""""""""""""""""""""""""""""" * Boundary that separates connector hub and kinless hub * default value: 0.75 * argument type : float * this argument has no effect if Params.autoSetCartographyBoundaries = 1 Plot settings ^^^^^^^^^^^^^^^^^ .. _Params.figExt: ``Params.figExt`` """""""""""""""""""""""""" * Which file formats to export figures as * Argument type : cell array for string / character arrays * Default : {'.png'} * Options : '.png', '.svg', '.fig' .. _Params.fullSVG: ``Params.fullSVG`` """""""""""""""""""""""""" * Whether to insist matlab to export to SVG in plots with large number of elements, otherwise matlab will compress figure as an image before saving to an SVG file * Options : 1 = yes, 0 = no * Default : 1 .. _Params.showOneFig: ``Params.showOneFig`` """""""""""""""""""""""""""""" * Whether to do all the plotting in the pipeline in one figure handle, this prevents multiple figure from popping out as the code runs, which may interrupt the user using the computer * Options : 0 = pipeline show plots as it runs, 1 = only one plot, so pipeline runs in the background * Default : 1 .. _Params.groupColors: ``Params.groupColors`` """""""""""""""""""""""""""""""" * Colors to use for each group in group comparison plots * this should be an nGroup x 3 matrix where nGroup is the number of groups you have, and each row is a RGB value (scaled from 0 to 1) denoting the color .. _Params.GrpNm: ``Params.GrpNm`` """""""""""""""""""""""" * List of names corresponding to the different groups * this is automatically generated through the provided spreadsheet and requires no user input in most cases * argument type : cell array of string / characters with number of entries equal to the number of unique groups .. _Params.DivNm: ``Params.DivNm`` """""""""""""""""""""""""" * List of numbers corresponding to the days in vitro (or any quantification of development time point) * this is automatically generated through the provided spreadsheet and requires no user input in most cases * argument type : cell array of integers or float with number of entries equal to the number of unique developmental time points