matlab import and export

https://uk.mathworks.com/help/matlab/ref/importtool.html

https://uk.mathworks.com/videos/importing-data-from-text-files-interactively-101489.html

https://uk.mathworks.com/videos/importing-data-from-files-programmatically-101468.html

For text files, the easies way is readtable/writetable (or readmatrix if only numeric functions), more specific functions include csvread, dlmread, textscan.

When using import tool interactively, you can also save the script or function to edit.

If you have very large data file:

https://uk.mathworks.com/help/matlab/import_export/read-and-analyze-data-in-a-tabulartextdatastore.html

Matlab supported file format:

https://uk.mathworks.com/help/matlab/import_export/supported-file-formats.html

fMRI slice order and slice timing

Slice timing metadata in BIDS:

https://bids-specification.readthedocs.io/en/latest/04-modality-specific-files/01-magnetic-resonance-imaging-data.html#fmri-task-information

I don’t know why I use dcm2bids tool, but didn’t get this metadata. Therefore, when I use fmriprep, the slicetiming step is ignored….

How to find out slice order from DICOM images?

  1. “Use dcm2niix or dicm2nii to convert your images, the slice order can be inferred by the “SliceTiming” tag in the JSON-format BIDS file. The “SliceTiming” tag lists the time each slice was acquired in seconds.” from https://en.wikibooks.org/wiki/SPM/Slice_Timing

2. DICOM fields (not sure if it works)

3. https://www.radiology.pitt.edu/extract-slice-ordering.html (not sure if it works)

Some discussion

https://practicalfmri.blogspot.com/2012/07/siemens-slice-ordering.html

https://www.cnblogs.com/h2zZhou/p/9072967.html

https://en.wikibooks.org/wiki/SPM/Slice_Timing

https://neurostars.org/t/slice-timing-question/3220

Free Images and PPT icons

Free Images:

Ref: https://buffer.com/library/free-images/#:~:text=24%2B%20websites%20to%20find%20free%20images%20for%20your,Stocksnap.io.%20…%208%20Canva.%20…%20More%20items…%20

https://zhuanlan.zhihu.com/p/66913382

1. Unsplash

  • All photos can be downloaded and used for free
  • Commercial and non-commercial purposes
  • No permission needed (though attribution is appreciated!)

2. Pexels

  • All photos and videos on Pexels are free to use.
  •  Attribution is not required. Giving credit to the photographer or Pexels is not necessary but always appreciated.
  •  You can modify the photos and videos from Pexels. Be creative and edit them as you like.

3. Pixabay

  • All content on Pixabay can be used for free for commercial and noncommercial use across print and digital, except in the cases mentioned in “What is not allowed”.
  • Attribution is not required. Giving credit to the contributor or Pixabay is not necessary but is always appreciated by our community.
  • You can make modifications to content from Pixabay.

4. Free Images

https://www.freeimages.com/license

  • Perpetual, meaning there is no expiration or end date on your rights to use the content.
  • Non-exclusive, meaning that you do not have exclusive rights to use the content. FreeImages.com can license the same content to other customers.
  • Unlimited, meaning you can use the content in an unlimited number of projects and in any media.

5. Kaboompics

  •  All photos on Kaboompics can be used for free for commercial and noncommercial use.
  •  Attribution is not required. Giving credit to the the Kaboompics is not necessary but always appreciated.
  •  You can modify the photos. Be creative and edit the photos as you like

6. 阿里巴巴图标素材库

http://www.iconfont.cn/plus

7. 搜图导航

Collections of multiple images websites

8. USEUM Interactive Fine Art Gallery & Museum

Download thousands of royalty free images of artworks from 7 museums!

matrix to vector, vector to matrix

% Get upper (or lower) matrix of p values, test for FDR, then create a FDR significant p_mask

p: significance of a N*N symmetric correlation matrix

% get FDR significant p

vec_idx = triu(true(size(p)),1);
[p_mask_vec,crit_p]=fdr_bh(p(vec_idx),0.05);

% create a FDR significant p_mask

p_mask = zeros(size(p));

p_mask(triu(true(size(p)),1))=p_mask_vec;

fMRI voxel intensity normalization

Background

http://brainvoyager.com/bv/doc/UsersGuide/StatisticalAnalysis/TimeCourseNormalization.html

For Group ICA analysis, fMRI data intensity needs to be scaled before PCA. In GIFT gICA toolbox, there are 4 ways to normalize intensity:

%% Data Pre-processing options
% 1 – Remove mean per time point
% 2 – Remove mean per voxel
% 3 – Intensity normalization
% 4 – Variance normalization

preproc_type = 4;

icatb_preproc_data.m ( icatb_runAnalysis.m >> icatb_dataReduction.m >> icatb_calculate_pca.m)

%% Intensity normalization
tmp = repmat(100./(mean(tmp) + eps), size(tmp, 1), 1) .* tmp;

%% Variance normalization
tmp = detrend(tmp);
tmp = tmp.*repmat(1./(std(tmp) + eps), size(tmp, 1), 1);

 

Explanation in GIFT Manual (p18):

’Select Type Of Data Pre-processing’ – Data is pre-processed prior to the first data reduction. Options are discussed below:
’Remove Mean Per Timepoint’ – At each time point, image mean is removed.
’Remove Mean Per Voxel’ – Timeseries mean is removed at each voxel.
’Intensity Normalization’ – At each voxel, time-series is scaled to have a mean of 100. When intensity normalization is selected as the pre-processing step, don’t use Z-scores or percent signal change for scaling components. (i.e. each voxel value divided by its mean across time, *100)
‘Variance Normalization’ – At each voxel, time-series is linearly detrended and converted to z-scores. (i.e. each voxel value divided by its std across time, *100)

p106:

Note: When using one common data reduction step on multiple subjects, data for each subject needs to be normalized using intensity normalization or variance normalization. Also, higher number of components needs to be estimated from the data when compared to two data reduction step.

 

References:

Click to access 2010_OHBM_Elena_ICAPrenormalization_submitted.pdf

https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=1263605

 

Group ICA workflow:

https://onlinelibrary.wiley.com/doi/full/10.1002/hbm.21170

Check Number of Citation

From: https://wenku.baidu.com/view/6b1cfe0b52ea551810a6870d.html

https://zhidao.baidu.com/question/424351632349458452.html

Number of Citation

1. Web of Science: http://isiknowledge.com

To count only others citation: Click Times Cited: N, Left: View Additional Times Cited Counts

2. ESI (Essential Science Indicators) highly cited papers: http://isiknowledge.com

3. Chinese publications: http://xkpg.cnki.net

4. Google Scholar, PubMed

 

Journal impact factor:  

1. Web of Science:http://apps.webofknowledge.com/

Journal Citation Reports(期刊引证报告)if your university/institute bought access

2. Scholarscope (Tools): https://www.scholarscope.cn/tools/singlesearch.html

3. Medsci: https://journal.medsci.cn/journal/index

 

Some good posts:

PubMed插件神器之PubMedy和Scholarscope https://blog.csdn.net/Qi_1996/article/details/81086381

文献检索-经验: http://7e1f5cc6.wiz03.com/share/s/1-7RP62s-QrJ2Vbofn13TuxT39F7F92GhAFx2OYp9-3B4UTs

Matlab: dummy var to categorical var

It’s easy to create dummy variables from grouping variables using dummyvar function.

How about the other way?

site   % if I have 5 subjects from 8 sites, the dummyvar is like:

0 0 0 0 0 0 0
0 0 0 0 0 0 1
1 0 0 0 0 0 0
0 0 0 0 0 0 1
0 0 0 0 0 0 1

site_idx=zeros(size(site,1),1);
for k=1:size(site,2)
site_idx(site(:,k)==1) = k;
end
site_idx(site_idx==0)=8;

site_idx  % grouping var is like

8
7
1
7
7