diff --git a/+nla/+edge/+permutationMethods/README.txt b/+nla/+edge/+permutationMethods/README.txt index 8a6db3bb..d50e1c9c 100755 --- a/+nla/+edge/+permutationMethods/README.txt +++ b/+nla/+edge/+permutationMethods/README.txt @@ -18,7 +18,7 @@ If you do the following: newStruct.scanData.id = randperm(1:100); that second line changes the id of scanData in both newStruct and origStruct, -since they both have just a reference to the scanData obejct rather than a unique copy +since they both have just a reference to the scanData object rather than a unique copy SOLUTION If you do want to permute data that is in a class that inherits from handle, diff --git a/+nla/+gfx/+chord/ChordPlot.m b/+nla/+gfx/+chord/ChordPlot.m index ca1486d5..776b649e 100644 --- a/+nla/+gfx/+chord/ChordPlot.m +++ b/+nla/+gfx/+chord/ChordPlot.m @@ -392,7 +392,7 @@ function connectNetworks(obj) inner = obj.generateArcSegmentWithCatch(chord_inner_radius, chord_inner_start_end_radian,... chord_inner_origin, chord2_start_cartesian, chord2_end_cartesian, 50); - % We reverse the end and start because we want them to be a continuous shape, not two seperate shapes + % We reverse the end and start because we want them to be a continuous shape, not two separate shapes % Without this, the arcs that are close to a straight line will be a straight line, and the other half of % it will be an arc. Putting two chords (half the size) in place of one outer = obj.generateArcSegmentWithCatch(chord_outer_radius, [chord_outer_start_end_radian(2),... diff --git a/+nla/+gfx/+plots/MatrixPlot.m b/+nla/+gfx/+plots/MatrixPlot.m index 8c11af34..7dd8b615 100644 --- a/+nla/+gfx/+plots/MatrixPlot.m +++ b/+nla/+gfx/+plots/MatrixPlot.m @@ -483,7 +483,7 @@ function addCallback(obj, x) obj.applyColorToData(position_x, position_y, chunk_height, chunk_width, chunk_color); if isequal(initial_render, true) - % plot signifance marker + % plot significance marker if ~isequal(obj.marked_networks, false) && isequal(obj.marked_networks(network, x), true) obj.plotSignificanceMark(chunk_width, chunk_height, position_x, position_y); end diff --git a/+nla/+gfx/drawCortex.m b/+nla/+gfx/drawCortex.m index 9cfc495d..129aeb7f 100755 --- a/+nla/+gfx/drawCortex.m +++ b/+nla/+gfx/drawCortex.m @@ -19,7 +19,7 @@ function drawCortex(ax, anat, ctx, mesh_alpha, view_pos, color_l, color_r) % Re-position meshes for standard transverse orientation etc. [mesh_l, mesh_r] = nla.gfx.anatToMesh(anat, ctx, view_pos); - % Set lighting and persepctive + % Set lighting and perspective if view_pos == ViewPos.LAT || view_pos == ViewPos.MED view(ax, [-90,0]); light(ax, 'Position', [-100,200,0], 'Style', 'local'); diff --git a/+nla/+gfx/drawMatrixOrg.m b/+nla/+gfx/drawMatrixOrg.m index bce7675d..42816f07 100755 --- a/+nla/+gfx/drawMatrixOrg.m +++ b/+nla/+gfx/drawMatrixOrg.m @@ -16,7 +16,7 @@ % draw_colorbar: Whether to display a colorbar % color_map: color map to use for the matrix % marked_networks: networks to mark with a symbol - % discrete_colorbar: whether to display the colorbar as continous or + % discrete_colorbar: whether to display the colorbar as continuous or % discrete. % net_clicked_callback: button function to add to each network, for clickable % networks. diff --git a/+nla/+gfx/pointDist.m b/+nla/+gfx/pointDist.m index 8303849f..44276bb1 100755 --- a/+nla/+gfx/pointDist.m +++ b/+nla/+gfx/pointDist.m @@ -1,5 +1,5 @@ function d = pointDist(p1, p2) - %POINTDIST Calculate euclidian distance between points + %POINTDIST Calculate euclidean distance between points % p1: 2-tuple containing x and y coordinates of point % p2: 2-tuple containing x and y coordinates of point d_x = p1(1) - p2(1); diff --git a/+nla/+helpers/+stdError/UnconstrainedBlocks.m b/+nla/+helpers/+stdError/UnconstrainedBlocks.m index 18944e06..7392c409 100755 --- a/+nla/+helpers/+stdError/UnconstrainedBlocks.m +++ b/+nla/+helpers/+stdError/UnconstrainedBlocks.m @@ -65,7 +65,7 @@ function throwErrorIfVEntirelyFull(obj, uniqueGroupIds) %If V is entirely full, throw an error if length(uniqueGroupIds) == 1 - error(['Standard Error Calculation must include some contraints on error covariance.\n',... + error(['Standard Error Calculation must include some constraints on error covariance.\n',... 'If only one group is in data passed to UnconstrainedBlock calculator, covariance of beta reduces to zero.',... ' Fix by either separating data into different group IDs, or using a different standard error calculator strategy',... ' (Homoskedastic, Heteroskedastic, etc)\n\n']); diff --git a/+nla/+helpers/+stdError/UnconstrainedBlocks_Sparse.m b/+nla/+helpers/+stdError/UnconstrainedBlocks_Sparse.m index 477cb756..c8e12fc1 100755 --- a/+nla/+helpers/+stdError/UnconstrainedBlocks_Sparse.m +++ b/+nla/+helpers/+stdError/UnconstrainedBlocks_Sparse.m @@ -39,7 +39,7 @@ %determine which elements of V will be non-zero based on %grouping. %First reorganize data so that observations within groups are - %next to eachother + %next to each other [pinvDesignMtx_grp, residual_grp, groupIds_grp] = obj.reorderDataByGroup(pinvDesignMtx, residual, groupIds); diff --git a/+nla/+helpers/wildBootstrap.m b/+nla/+helpers/wildBootstrap.m index d366a5e3..b88d7311 100755 --- a/+nla/+helpers/wildBootstrap.m +++ b/+nla/+helpers/wildBootstrap.m @@ -32,7 +32,7 @@ function outVec = getRademacherVector(numPts) %Returns a vector [numPts x 1] long of samples from a rademacher - %distribution (ie +/-1 with equal probabilty) + %distribution (ie +/-1 with equal probability) randVec = rand(numPts,1); vecIsPos = randVec>0.5; outVec = (vecIsPos - 0.5) * 2; diff --git a/+nla/+lib/fdr_bh.m b/+nla/+lib/fdr_bh.m index c4dc3377..fa1c443a 100755 --- a/+nla/+lib/fdr_bh.m +++ b/+nla/+lib/fdr_bh.m @@ -94,7 +94,7 @@ % if ~isnan(adj_ci_cvrg), % sigIds=find(h); % fcr_adj_cis(:,sigIds)=tCIs(data(:,sigIds),adj_ci_cvrg); % tCIs.m is available on the -% %Mathworks File Exchagne +% %Mathworks File Exchange % end % % diff --git a/+nla/+net/+result/+chord/ChordPlotter.m b/+nla/+net/+result/+chord/ChordPlotter.m index c1017361..550d136e 100644 --- a/+nla/+net/+result/+chord/ChordPlotter.m +++ b/+nla/+net/+result/+chord/ChordPlotter.m @@ -2,7 +2,7 @@ % CHORDPLOTTER Draws network test results in Chord Figures % Object takes the brain network atlas and the edge test results to initialize % generateChordFigure creates the chord plots for the network test results -% The parameters used as an input are fron NetworkResultPlotParameter +% The parameters used as an input are from NetworkResultPlotParameter % Chord type is coming from the test options/input_struct. properties (Constant) diff --git a/+nla/+net/+result/NetworkResultPlotParameter.m b/+nla/+net/+result/NetworkResultPlotParameter.m index 16be532f..99dd5642 100644 --- a/+nla/+net/+result/NetworkResultPlotParameter.m +++ b/+nla/+net/+result/NetworkResultPlotParameter.m @@ -138,7 +138,7 @@ function brainFigureButtonCallback(network1, network2) end function result = plotProbabilityVsNetworkSize(obj, test_method, plot_statistic) - % Two convience methods + % Two convenience methods network_size = obj.getNetworkSizes(); statistic_input = obj.getStatsFromMethodAndName(test_method, plot_statistic, obj.updated_test_options.ranking_method); diff --git a/+nla/+net/CohenDTest.m b/+nla/+net/CohenDTest.m index 45dfc175..0818d2a8 100644 --- a/+nla/+net/CohenDTest.m +++ b/+nla/+net/CohenDTest.m @@ -19,7 +19,7 @@ %DETERMINED THAT CURRENT COHEN'S D CALC IS INVALID %RETURN WITHOUT MODIFYING EXISTING D PLACEHOLDER VALUE FROM 0 - %RECOMMEND THAT, WHEN REENABLED, THIS FN BE CHANGED TO ACCEPT + %RECOMMEND THAT, WHEN RE-ENABLED, THIS FN BE CHANGED TO ACCEPT %VECTOR OF INPUT AND RETURN VECTOR OF OUTPUT RATHER THAN %RESULTS CLASS %ADE 2025MAR24 diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000..e21712e4 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,25 @@ +# Codespell configuration is within pyproject.toml +--- +name: Codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Annotate locations with typos + uses: codespell-project/codespell-problem-matcher@v1 + - name: Codespell + uses: codespell-project/actions-codespell@v2 diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index e1ce2534..cc092e20 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -7,7 +7,7 @@ Running with example data 1. First, open the NLA software (as described in :doc:`setup`). Select ``Pearson's r`` as the edge-level test from the edge-level test dropdown. -2. Click :guilabel:`Select` to choose a network atlas, navigating to the ``support_files`` folder withing your +2. Click :guilabel:`Select` to choose a network atlas, navigating to the ``support_files`` folder within your NetworkLevelAnalysis installation and selecting ``Wheelock_2020_CerebralCortex_15nets_288ROI_on_MNI.mat``. This file is used to parcellate the data. diff --git a/docs/source/network_level_results.rst b/docs/source/network_level_results.rst index edc91855..f0a819bb 100644 --- a/docs/source/network_level_results.rst +++ b/docs/source/network_level_results.rst @@ -50,7 +50,7 @@ In NLA this is referred to as "ranking" since it is simply counting values in a ranking is referred to as the "uncorrected" *p*-value. There are two other options for ranking in NLA. These account for :abbr:`FWER (family-wise error rate)`. The first method is based off the "randomise" method :cite:p:`FreedmanD,WinklerA`. This is referred to as the "Winkler method". The second method is called "Westfall-Young" in NLA described by -an alogrithm :cite:p:`WestfallP` by Westfall and Young. +an algorithm :cite:p:`WestfallP` by Westfall and Young. Result Rank --------------------------------------------- diff --git a/docs/source/network_level_tests.rst b/docs/source/network_level_tests.rst index db40d8a8..2916565f 100644 --- a/docs/source/network_level_tests.rst +++ b/docs/source/network_level_tests.rst @@ -31,7 +31,7 @@ Provided Tests * **Hypergeomtric** - * MATLAB's `hypercdf `_ used to find the probablity + * MATLAB's `hypercdf `_ used to find the probability *Inputs:* * :math:`O_i`: non-permuted, nominally thresholded, and binarized edge-level *p*-values for the network-pair of interest diff --git a/docs/source/refs.bib b/docs/source/refs.bib index ff0ce1d4..e86fdadb 100644 --- a/docs/source/refs.bib +++ b/docs/source/refs.bib @@ -67,7 +67,7 @@ @Article{PowerJ } @Article{GrattonC, - title = {Funcational Brain Networks Are Dominated by Stable Group and Individual Factors, + title = {Functional Brain Networks Are Dominated by Stable Group and Individual Factors, Not Cognitive or Daily Variation}, author = {Gratton C.}, journal = {Neuron}, @@ -77,7 +77,7 @@ @Article{GrattonC } @Article{FormanS, - title = {Improved Assessment of Significant Activation in Funcational Magnetic Resonance Imaging + title = {Improved Assessment of Significant Activation in Functional Magnetic Resonance Imaging (fMRI): Use of Cluster-Size Threshold.}, author = {Forman, S.D.}, journal = {Magn Reson Med}, @@ -221,7 +221,7 @@ @Article{McKinnonC } @Article{MarekS, - title = {Identifying reproducible individual differences in childhood funcational brain networks: + title = {Identifying reproducible individual differences in childhood functional brain networks: An ABCD study}, author = {Marek, S.}, journal = {Dev Cogn Neurosci}, diff --git a/docs/source/using_the_gui.rst b/docs/source/using_the_gui.rst index 14480b11..7ed519f9 100644 --- a/docs/source/using_the_gui.rst +++ b/docs/source/using_the_gui.rst @@ -18,7 +18,7 @@ Or, in the file browser section of the MATLAB window, right click on ``NLA_GUI.m Usually there are selectors for functional connectivity, network atlas, and behavior files. There may also be other options depending on the test. If "Precalculated data" is selected, there will be selectors for data instead. (See: :ref:`Precalculated data loader `) #. Behavior table - This will display the table when the behavior file is loaded. The table is used to select the behvaior to test, co-variates used (optional), and + This will display the table when the behavior file is loaded. The table is used to select the behavior to test, co-variates used (optional), and permutation groupings (optional). (See: :doc:`Behavior Table <../behavior_table>`) #. Network-level test pane Selection of network-level test(s). One can be selected, or multiple with Ctrl/Shift + left click. diff --git a/pyproject.toml b/pyproject.toml index e69de29b..f625e180 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -0,0 +1,7 @@ + +[tool.codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = '.git*' +check-hidden = true +ignore-regex = '\b(Brain Mapp|Reson Med|FPR|Hendler)' +# ignore-words-list = ''