Skip to content

Commit 9070c46

Browse files
author
lpjiang97
committed
update manual, ready for 0.1
1 parent 958b763 commit 9070c46

2 files changed

Lines changed: 68 additions & 2 deletions

File tree

docs/manual/manual.pdf

35 KB
Binary file not shown.

docs/manual/manual.tex

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,75 @@ \section{\texttt{biac2bids}}
250250

251251

252252
\section{\<helper>}
253-
For now, the \<helper> contains one helper function which creates \<series\_order\_note.tsv> automatically from user
254-
script input.
253+
The \<helper> module aims to provide some helper scripts to make the conversion process simply. If you have features which
254+
you think would be useful and the module does not cover, please let us know through GitHub
255+
\href{https://github.com/MotivatedMemoryLab/biacpype/issues}{Feature Requests}, or better, build them in your forked
256+
branch and submit \href{https://github.com/MotivatedMemoryLab/biacpype/pulls}{Pull Requests}!
257+
258+
\subsection{\<create\_series\_order\_notes.py>}
259+
If you are converting an old dataset, you may not have \<series\_order\_note.tsv> ready. This script can help you with
260+
that. You will need edit the script and tweak a few things:
261+
262+
\begin{lstlisting}[escapeinside={(*@}{@*)}]
263+
STUDY_PATH = "/Volumes/lj146/Documents/CBT.01/" (*@\tikzmark{d}@*)
264+
# translation dictionary
265+
anat_d = {
266+
"001": "fmap",
267+
"003": "Anat", (*@\tikzmark{a}@*)
268+
"005": "Anat",
269+
}
270+
271+
func_d = {
272+
"4": "LOCALIZER",
273+
"5": "TRAIN",
274+
"6": "REST", (*@\tikzmark{b}@*)
275+
"7": "FINISH"
276+
}
277+
subjs = ["20150220_19480"] # or None for all subjects (*@\tikzmark{c}@*)
278+
279+
### creation begins ###
280+
set_paths(STUDY_PATH=STUDY_PATH)
281+
populate_file("Anat", anat_d, subjs=subjs)
282+
populate_file("Func", func_d, subjs=subjs)
283+
\end{lstlisting}
284+
285+
\begin{tikzpicture}[remember picture,overlay]
286+
\node[red] (anat) at ($(pic cs:a) + (5, 0)$) {\<series\_order\_note.tsv> for \<Anat>};
287+
\draw[red, rounded corners] ($(pic cs:a) + (-4.2, 1.2)$) rectangle ($(pic cs:a) + (0, -0.84)$);
288+
\path[->, red] (anat) edge (pic cs:a);
289+
290+
\node[red] (func) at ($(pic cs:b) + (6, 0)$) {\<series\_order\_note.tsv> for \<Func>};
291+
\draw[red, rounded corners] ($(pic cs:b) + (-3.8, 1.5)$) rectangle ($(pic cs:b) + (1, -0.85)$);
292+
\path[->, red] (func) edge ($(pic cs:b) + (1, 0)$);
293+
294+
\node[red] (subj) at ($(pic cs:c) + (3, 0)$) {add to which subject};
295+
\draw[red, rounded corners] ($(pic cs:c) + (-12.2, 0.4)$) rectangle ($(pic cs:c) + (0, -0.4)$);
296+
\path[->, red] (subj) edge (pic cs:c);
297+
298+
\node[red] (study) at ($(pic cs:d) + (3, 0)$) {Your study path};
299+
\draw[red, rounded corners] ($(pic cs:d) + (-10.45, 0.4)$) rectangle ($(pic cs:d) + (0, -0.2)$);
300+
\path[->, red] (study) edge (pic cs:d);
301+
\end{tikzpicture}
302+
303+
The four red rectangles are the areas you need to change to create the files. They should be
304+
straightforward to understand. Note that to add the files to \textbf{all} subjects, set
305+
\[\text{\<subjs = None>}\]
306+
307+
After you change the fields, run
308+
\begin{lstlisting}[xleftmargin=.2\textwidth, xrightmargin=.2\textwidth, backgroundcolor=\color{lightgray}]
309+
python scripts/create_series_order_notes.py
310+
\end{lstlisting}
311+
to create the files. \par
255312

313+
Sometimes, not all of your subjects have the exactly same task code mapping. You will need to manually
314+
change these after the tsv files are populated to all folders.
256315

257316

317+
\section{Contributing and Asking for Help!}
318+
We hope you can contribute and help us develop this pipeline better through:
319+
\begin{itemize}
320+
\item Create GitHub Issues and Pull Requests to let us be aware of the uncaught bugs
321+
\item Chat on Gitter and ask for help
322+
\item Let us know what feature you wish the pipeline had
323+
\end{itemize}
258324
\end{document}

0 commit comments

Comments
 (0)