From 9bd021f5228c062c80b3e8d1122c40fa9e19b6d0 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 28 Sep 2023 11:01:28 -0400 Subject: [PATCH 1/3] Add shebang to the launch_parsers_on_nidm.py script and use it without prepending python in a workflow --- .github/workflows/parsers_test_on_nidmexamples.yml | 2 +- launch_parser_on_nidm.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) mode change 100644 => 100755 launch_parser_on_nidm.py diff --git a/.github/workflows/parsers_test_on_nidmexamples.yml b/.github/workflows/parsers_test_on_nidmexamples.yml index a4da1b24d..3c924f2aa 100644 --- a/.github/workflows/parsers_test_on_nidmexamples.yml +++ b/.github/workflows/parsers_test_on_nidmexamples.yml @@ -80,7 +80,7 @@ jobs: wget https://raw.githubusercontent.com/afni/apaper_highlight_narps/main/scripts_suppl_proc_teams/do_04_make_imgs_A.tcsh -O nidmresults-examples/narps_do_04_make_imgs_A.tcsh wget https://raw.githubusercontent.com/afni/apaper_highlight_narps/main/scripts_suppl_proc_teams/do_02_pc_with_sign0.tcsh -O nidmresults-examples/narps_do_02_pc_with_sign0.tcsh - python launch_parser_on_nidm.py --input_dir nidmresults-examples --output_dir examples/from_parsers + ./launch_parser_on_nidm.py --input_dir nidmresults-examples --output_dir examples/from_parsers - name: push on the repo the dir "examples/from_parsers" run: | diff --git a/launch_parser_on_nidm.py b/launch_parser_on_nidm.py old mode 100644 new mode 100755 index 99540d500..5981f889f --- a/launch_parser_on_nidm.py +++ b/launch_parser_on_nidm.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + import argparse import os import random From d6dd3c78d065b967f6db45a1a1afdb3bfff0342a Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 28 Sep 2023 11:04:10 -0400 Subject: [PATCH 2/3] Extract fetching of the examples to run conversion into a separate script so developers could also easily do that! --- .../parsers_test_on_nidmexamples.yml | 59 +----------------- fetch_nidmresults-examples | 60 +++++++++++++++++++ 2 files changed, 61 insertions(+), 58 deletions(-) create mode 100755 fetch_nidmresults-examples diff --git a/.github/workflows/parsers_test_on_nidmexamples.yml b/.github/workflows/parsers_test_on_nidmexamples.yml index 3c924f2aa..e492618e9 100644 --- a/.github/workflows/parsers_test_on_nidmexamples.yml +++ b/.github/workflows/parsers_test_on_nidmexamples.yml @@ -23,65 +23,8 @@ jobs: sudo apt-get install graphviz - name: SPM/FSL/AFNI parsing on nidm-examples run: | - mkdir -p nidmresults-examples - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_group_ols/batch.m -O nidmresults-examples/spm_group_ols_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_thr_voxelunct4/batch.m -O nidmresults-examples/spm_thr_voxelunct4_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_thr_clustfwep05/batch.m -O nidmresults-examples/spm_thr_clustfwep05_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_covariate/batch.m -O nidmresults-examples/spm_covariate_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_group_wls/batch.m -O nidmresults-examples/spm_group_wls_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_contrast_mask/batch.m -O nidmresults-examples/spm_contrast_mask_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_thr_clustunck10/batch.m -O nidmresults-examples/spm_thr_clustunck10_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_thr_voxelfwep05/batch.m -O nidmresults-examples/spm_thr_voxelfwep05_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_hrf_fir/batch.m -O nidmresults-examples/spm_hrf_fir_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_explicit_mask/batch.m -O nidmresults-examples/spm_explicit_mask_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_2_t_test/batch.m -O nidmresults-examples/spm_2_t_test_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_conjunction/batch.m -O nidmresults-examples/spm_conjunction_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_con_f/batch.m -O nidmresults-examples/spm_con_f_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_default/batch.m -O nidmresults-examples/spm_default_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_HRF_informed_basis/batch.m -O nidmresults-examples/spm_HRF_informed_basis_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_partial_conjunction/batch.m -O nidmresults-examples/spm_partial_conjunction_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_thr_voxelfdrp05/batch.m -O nidmresults-examples/spm_thr_voxelfdrp05_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_temporal_derivative/batch.m -O nidmresults-examples/spm_temporal_derivative_batch.m - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_non_sphericity/batch.m -O nidmresults-examples/spm_non_sphericity_batch.m - - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_con_f/report_log.html -O nidmresults-examples/fsl_con_f_report_log.html - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_con_f_multiple/report_log.html -O nidmresults-examples/fsl_con_f_multiple_report_log.html - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_contrast_mask/report_log.html -O nidmresults-examples/fsl_contrast_mask_report_log.html - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_default/report_log.html -O nidmresults-examples/fsl_default_report_log.html - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_full_examples001/report_log.html -O nidmresults-examples/fsl_full_examples001_report_log.html - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_gamma_basis/report_log.html -O nidmresults-examples/fsl_gamma_basis_report_log.html - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_gaussian/report_log.html -O nidmresults-examples/fsl_gaussian_report_log.html - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_group_btw/report_log.html -O nidmresults-examples/fsl_group_btw_report_log.html - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_group_ols/report_log.html -O nidmresults-examples/fsl_group_ols_report_log.html - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_group_wls/report_log.html -O nidmresults-examples/fsl_group_wls_report_log.html - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_hrf_fir/report_log.html -O nidmresults-examples/fsl_hrf_fir_report_log.html - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_hrf_gammadiff/report_log.html -O nidmresults-examples/fsl_hrf_gammadiff_report_log.html - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_motion_reg/report_log.html -O nidmresults-examples/fsl_motion_reg_report_log.html - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_motion_reg_der/report_log.html -O nidmresults-examples/fsl_motion_reg_der_report_log.html - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_thr_clustfwep05/report_log.html -O nidmresults-examples/fsl_thr_clustfwep05_report_log.html - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_thr_voxelfwep05/report_log.html -O nidmresults-examples/fsl_thr_voxelfwep05_report_log.html - - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_default/subject_results/group.DS0011/subj.sub_001/proc.sub_001 -O nidmresults-examples/afni_default_proc.sub_001 - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_hrf_gammadiff/subject_results/group.DS0011/subj.sub_001/proc.sub_001 -O nidmresults-examples/afni_hrf_gammadiff_proc.sub_001 - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_hrf_tent/subject_results/group.DS0011/subj.sub_001/proc.sub_001 -O nidmresults-examples/afni_hrf_tent_proc.sub_001 - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_thr_clustfwep05/proc.sub_001 -O nidmresults-examples/afni_thr_clustfwep05_proc.sub_001 - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_other_template/subject_results/group.DS0011/subj.sub_001/proc.sub_001 -O nidmresults-examples/afni_other_template_proc.sub_001 - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_gam/subject_results/group.DS000011/subj.sub_001/proc.sub_001 -O nidmresults-examples/afni_gam_proc.sub_001 - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_clustconn_18/proc.sub_001 -O nidmresults-examples/afni_clustconn_18_proc.sub_001 - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_clustconn_26/proc.sub_001 -O nidmresults-examples/afni_clustconn_26_proc.sub_001 - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_con_f/proc.sub_001 -O nidmresults-examples/afni_con_f_proc.sub_001 - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_thr_clustunck10/proc.sub_001 -O nidmresults-examples/afni_thr_clustunck10_proc.sub_001 - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_thr_voxelfdrp05/proc.sub_001 -O nidmresults-examples/afni_thr_voxelfdrp05_proc.sub_001 - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_alt_onesided/proc.sub_001 -O nidmresults-examples/afni_alt_onesided_proc.sub_001 - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_bi_sided_t_test/proc.sub_001 -O nidmresults-examples/afni_bi_sided_t_test_proc.sub_001 - wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_thr_voxelunct4/proc.sub_001 -O nidmresults-examples/afni_thr_voxelunct4_proc.sub_001 - - wget https://raw.githubusercontent.com/afni/apaper_highlight_narps/main/scripts_suppl_proc_vox/do_13_view_zoom.tcsh -O nidmresults-examples/narps_do_13_view_zoom.tcsh - wget https://raw.githubusercontent.com/afni/apaper_highlight_narps/main/scripts_suppl_proc_teams/do_04_make_imgs_A.tcsh -O nidmresults-examples/narps_do_04_make_imgs_A.tcsh - wget https://raw.githubusercontent.com/afni/apaper_highlight_narps/main/scripts_suppl_proc_teams/do_02_pc_with_sign0.tcsh -O nidmresults-examples/narps_do_02_pc_with_sign0.tcsh - + ./fetch_nidmresults-examples ./launch_parser_on_nidm.py --input_dir nidmresults-examples --output_dir examples/from_parsers - - name: push on the repo the dir "examples/from_parsers" run: | git config user.name "GitHub Actions Bot" diff --git a/fetch_nidmresults-examples b/fetch_nidmresults-examples new file mode 100755 index 000000000..6455902d5 --- /dev/null +++ b/fetch_nidmresults-examples @@ -0,0 +1,60 @@ +#!/bin/sh + +set -eu + +mkdir -p nidmresults-examples +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_group_ols/batch.m -O nidmresults-examples/spm_group_ols_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_thr_voxelunct4/batch.m -O nidmresults-examples/spm_thr_voxelunct4_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_thr_clustfwep05/batch.m -O nidmresults-examples/spm_thr_clustfwep05_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_covariate/batch.m -O nidmresults-examples/spm_covariate_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_group_wls/batch.m -O nidmresults-examples/spm_group_wls_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_contrast_mask/batch.m -O nidmresults-examples/spm_contrast_mask_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_thr_clustunck10/batch.m -O nidmresults-examples/spm_thr_clustunck10_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_thr_voxelfwep05/batch.m -O nidmresults-examples/spm_thr_voxelfwep05_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_hrf_fir/batch.m -O nidmresults-examples/spm_hrf_fir_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_explicit_mask/batch.m -O nidmresults-examples/spm_explicit_mask_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_2_t_test/batch.m -O nidmresults-examples/spm_2_t_test_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_conjunction/batch.m -O nidmresults-examples/spm_conjunction_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_con_f/batch.m -O nidmresults-examples/spm_con_f_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_default/batch.m -O nidmresults-examples/spm_default_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_HRF_informed_basis/batch.m -O nidmresults-examples/spm_HRF_informed_basis_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_partial_conjunction/batch.m -O nidmresults-examples/spm_partial_conjunction_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_thr_voxelfdrp05/batch.m -O nidmresults-examples/spm_thr_voxelfdrp05_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_temporal_derivative/batch.m -O nidmresults-examples/spm_temporal_derivative_batch.m +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/spm_non_sphericity/batch.m -O nidmresults-examples/spm_non_sphericity_batch.m + +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_con_f/report_log.html -O nidmresults-examples/fsl_con_f_report_log.html +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_con_f_multiple/report_log.html -O nidmresults-examples/fsl_con_f_multiple_report_log.html +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_contrast_mask/report_log.html -O nidmresults-examples/fsl_contrast_mask_report_log.html +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_default/report_log.html -O nidmresults-examples/fsl_default_report_log.html +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_full_examples001/report_log.html -O nidmresults-examples/fsl_full_examples001_report_log.html +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_gamma_basis/report_log.html -O nidmresults-examples/fsl_gamma_basis_report_log.html +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_gaussian/report_log.html -O nidmresults-examples/fsl_gaussian_report_log.html +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_group_btw/report_log.html -O nidmresults-examples/fsl_group_btw_report_log.html +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_group_ols/report_log.html -O nidmresults-examples/fsl_group_ols_report_log.html +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_group_wls/report_log.html -O nidmresults-examples/fsl_group_wls_report_log.html +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_hrf_fir/report_log.html -O nidmresults-examples/fsl_hrf_fir_report_log.html +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_hrf_gammadiff/report_log.html -O nidmresults-examples/fsl_hrf_gammadiff_report_log.html +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_motion_reg/report_log.html -O nidmresults-examples/fsl_motion_reg_report_log.html +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_motion_reg_der/report_log.html -O nidmresults-examples/fsl_motion_reg_der_report_log.html +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_thr_clustfwep05/report_log.html -O nidmresults-examples/fsl_thr_clustfwep05_report_log.html +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/fsl_thr_voxelfwep05/report_log.html -O nidmresults-examples/fsl_thr_voxelfwep05_report_log.html + +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_default/subject_results/group.DS0011/subj.sub_001/proc.sub_001 -O nidmresults-examples/afni_default_proc.sub_001 +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_hrf_gammadiff/subject_results/group.DS0011/subj.sub_001/proc.sub_001 -O nidmresults-examples/afni_hrf_gammadiff_proc.sub_001 +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_hrf_tent/subject_results/group.DS0011/subj.sub_001/proc.sub_001 -O nidmresults-examples/afni_hrf_tent_proc.sub_001 +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_thr_clustfwep05/proc.sub_001 -O nidmresults-examples/afni_thr_clustfwep05_proc.sub_001 +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_other_template/subject_results/group.DS0011/subj.sub_001/proc.sub_001 -O nidmresults-examples/afni_other_template_proc.sub_001 +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_gam/subject_results/group.DS000011/subj.sub_001/proc.sub_001 -O nidmresults-examples/afni_gam_proc.sub_001 +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_clustconn_18/proc.sub_001 -O nidmresults-examples/afni_clustconn_18_proc.sub_001 +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_clustconn_26/proc.sub_001 -O nidmresults-examples/afni_clustconn_26_proc.sub_001 +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_con_f/proc.sub_001 -O nidmresults-examples/afni_con_f_proc.sub_001 +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_thr_clustunck10/proc.sub_001 -O nidmresults-examples/afni_thr_clustunck10_proc.sub_001 +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_thr_voxelfdrp05/proc.sub_001 -O nidmresults-examples/afni_thr_voxelfdrp05_proc.sub_001 +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_alt_onesided/proc.sub_001 -O nidmresults-examples/afni_alt_onesided_proc.sub_001 +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_bi_sided_t_test/proc.sub_001 -O nidmresults-examples/afni_bi_sided_t_test_proc.sub_001 +wget https://raw.githubusercontent.com/incf-nidash/nidmresults-examples/master/afni_thr_voxelunct4/proc.sub_001 -O nidmresults-examples/afni_thr_voxelunct4_proc.sub_001 + +wget https://raw.githubusercontent.com/afni/apaper_highlight_narps/main/scripts_suppl_proc_vox/do_13_view_zoom.tcsh -O nidmresults-examples/narps_do_13_view_zoom.tcsh +wget https://raw.githubusercontent.com/afni/apaper_highlight_narps/main/scripts_suppl_proc_teams/do_04_make_imgs_A.tcsh -O nidmresults-examples/narps_do_04_make_imgs_A.tcsh +wget https://raw.githubusercontent.com/afni/apaper_highlight_narps/main/scripts_suppl_proc_teams/do_02_pc_with_sign0.tcsh -O nidmresults-examples/narps_do_02_pc_with_sign0.tcsh From a23088dbafc096efc790038fa043fe92a513f64f Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 28 Sep 2023 11:14:49 -0400 Subject: [PATCH 3/3] Do not rely on order of files of os.walk RNG is seeded but order could change from run to run causing irreproducible results --- launch_parser_on_nidm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launch_parser_on_nidm.py b/launch_parser_on_nidm.py index 5981f889f..8596dbfc2 100755 --- a/launch_parser_on_nidm.py +++ b/launch_parser_on_nidm.py @@ -81,8 +81,8 @@ def main(): context_write.write("Processing files...\n") # Iteration on each example - for root, _, files in os.walk(opt.input_dir): - for file in files: + for root, _, files in sorted(os.walk(opt.input_dir)): + for file in sorted(files): if file.endswith("batch.m"): # spm filename_ss_ext = file.split(".m")[0]