File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ def main():
1212 import gc
1313 from multiprocessing import Process , Manager
1414 from .parser import parse_args
15- from ..utils .bids import write_derivative_description
15+ from ..utils .bids import write_derivative_description , write_bidsignore
1616
1717 parse_args ()
1818
@@ -166,6 +166,7 @@ def main():
166166 write_derivative_description (
167167 config .execution .bids_dir , config .execution .output_dir / "fmriprep"
168168 )
169+ write_bidsignore (config .execution .output_dir / "fmriprep" )
169170
170171 if failed_reports and not config .execution .notrack :
171172 sentry_sdk .capture_message (
Original file line number Diff line number Diff line change 77from pathlib import Path
88
99
10+ def write_bidsignore (deriv_dir ):
11+ bids_ignore = [
12+ "*.html" , "logs/" , "figures/" , # Reports
13+ "*_xfm.*" , # Unspecified transform files
14+ "*.surf.gii" , # Unspecified structural outputs
15+ # Unspecified functional outputs
16+ "*_boldref.nii.gz" , "*_bold.func.gii" ,
17+ "*_mixing.tsv" , "*_AROMAnoiseICs.csv" , "*_regressors.tsv" ,
18+ ]
19+ ignore_file = Path (deriv_dir ) / ".bidsignore"
20+
21+ ignore_file .write_text ("\n " .join (bids_ignore ) + "\n " )
22+
23+
1024def write_derivative_description (bids_dir , deriv_dir ):
1125 from ..__about__ import __version__ , __url__ , DOWNLOAD_URL
1226
You can’t perform that action at this time.
0 commit comments