Re: [Freesurfer] almost empty mask.mgh with glmfit

2021-01-14 Thread Greve, Douglas N.,Ph.D.
A 0 value usually indicates a bad or uninterpretable voxel which you would not 
want to include in your analysis. You can, of course, by not pruning. But I 
think you need to answer the question as to why the values are 0. Is 0 
interpretable in this case?

On 1/11/2021 6:15 PM, Julie Ottoy wrote:

External Email - Use Caution

Dear Doug,

I was wondering why the flag --prune is recommended (petsurfer website) when 
creating a stacked pet file and during surface-smoothing. If I understood 
correctly, this would set all vertices that are 0 in at least one subject to 0 
("set vox to 0 unless all frames are non-zero")? In my non-pvc data, it seems 
as though a lot of the surface-projected values are 0. Hence, when I perform a 
surface-based regression between PET and a regressor and I use the --prune flag 
during mri_concat, I don't get any results.

Thank you!
best regards
Julie



___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] matrix is ill-conditioned or badly scaled

2021-01-14 Thread Greve, Douglas N.,Ph.D.
NaN will not work for this. You can't do incomplete designs with an FSGD. You 
can create your own design matrix and pass it with --X, otherwise you'll have 
to exclude those subjects or put some reasonable (eg, imputed) value

On 1/12/2021 6:35 PM, Julie Ottoy wrote:

External Email - Use Caution

Hi freesurfer experts,

I am trying to run a GLM fit between cortical thickness and some other 
continuous marker. My cortical thickness were stacked before using the 
mris_preproc and surf2surf commands.
I have an FSGD file with the same subjects as used during the stacking of the 
thickness maps, but I added a new continuous regressor (my independent variable 
of interest). However, some subjects have a missing value for this regressor, 
so I added NaN. This makes me run into the following error. When I replace the 
NaN values by random numbers in the FSGD, it all runs fine.

M = [ ...
 1.0  0.99577  0.70711  0.98278  0.97547 -0.97111  nan
 0.99577  1.0  0.70628  0.97775  0.97819 -0.95833  nan
 0.70711  0.70628  1.0  0.68252  0.70488 -0.70032  nan
 0.98278  0.97775  0.68252  1.0  0.95399 -0.96466  nan
 0.97547  0.97819  0.70488  0.95399  1.0 -0.92863  nan
-0.97111 -0.95833 -0.70032 -0.96466 -0.92863  1.0  nan
 nan  nan  nan  nan  nan  nan  nan  ]
Normalized matrix condition is 1e+08
Design matrix --

ERROR: matrix is ill-conditioned or badly scaled, condno = 1e+08

Possible problem with experimental design:
Check for duplicate entries and/or lack of range of
continuous variables within a class.


I made sure that my FSGD file does not have any weird characters, so i applied 
the cat fsgd.txt | sed 's/\r/\n/g' > new.fsgd.txt, but this also didn't help.

Thank you for your help,
Julie





___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Segmentation Fault During mri_convert running FS 5.0

2021-01-14 Thread Greve, Douglas N.,Ph.D.
Sorry, I have no idea what could be wrong. Version 5.0 was 10 years ago:). You 
can try copying the v5.3  mri_convert into v5.0, but I suspect that the error 
will crop up in other places. The other thing you can try is to convert the 
file with 5.3 and then see if 5.0 runs on that file

On 1/12/2021 8:54 PM, Dowling, Kevin Francis wrote:
Hi Dr. Greve,

Thanks so much for your reply. I ran the command as instructed (bolded) in 5.0 
(and again in 5.3 for comparison, since that ran fine in my earlier 
troubleshooting efforts) and have placed the terminal outputs below.

In 5.0 the output I received in the terminal:

(nmr-stable5.0-env) mri_convert 
/autofs/cluster/deplin/chris/data/Selected_Scans/3800033/MPRAGE/003/MEMPRAGE.nii
 deleteme.mgz
mri_convert 
/autofs/cluster/deplin/chris/data/Selected_Scans/3800033/MPRAGE/003/MEMPRAGE.nii
 deleteme.mgz
$Id: mri_convert.c,v 1.166.2.6 2010/11/24 15:19:30 nicks Exp $
reading from 
/autofs/cluster/deplin/chris/data/Selected_Scans/3800033/MPRAGE/003/MEMPRAGE.nii...
Segmentation fault (core dumped)

And in 5.3 this was the result, which seemed to run normally:

(nmr-stable53-env) mri_convert 
/autofs/cluster/deplin/chris/data/Selected_Scans/3800033/MPRAGE/003/MEMPRAGE.nii
 deleteme.mgz
mri_convert 
/autofs/cluster/deplin/chris/data/Selected_Scans/3800033/MPRAGE/003/MEMPRAGE.nii
 deleteme.mgz
$Id: mri_convert.c,v 1.179.2.7 2012/09/05 21:55:16 mreuter Exp $
reading from 
/autofs/cluster/deplin/chris/data/Selected_Scans/3800033/MPRAGE/003/MEMPRAGE.nii...
TR=2530.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-0.101076, -0.994877, 0.0017413)
j_ras = (-0.0677184, 0.0051337, -0.997691)
k_ras = (-0.992571, 0.10096, 0.0678903)
writing to deleteme.mgz...

Thank you very much for your help, and for any thoughts you might have.

Kind regards,
Kevin

Date: Tue, 12 Jan 2021 15:45:37 +
From: "Greve, Douglas N.,Ph.D." 
mailto:dgr...@mgh.harvard.edu>>
Subject: Re: [Freesurfer] Segmentation Fault During mri_convert
running FS 5.0
To: "freesurfer@nmr.mgh.harvard.edu" 
mailto:freesurfer@nmr.mgh.harvard.edu>>
Message-ID: 
<63bb4542-e9df-d7cc-926b-0731b6009...@mgh.harvard.edu>
Content-Type: text/plain; charset="utf-8"

For some reason, it is not capturing the terminal output in the log files. Can 
you just run
mri_convert 
/autofs/cluster/deplin/chris/data/Selected_Scans/3800033/MPRAGE/003/MEMPRAGE.nii
 deleteme.mgz
and send me the terminal output?

On 1/2/2021 2:23 PM, Dowling, Kevin Francis wrote:
Hello FreeSurfer experts,

We have some old clinical structural data we processed using version 5.0 and 
had extensively edited manually. We?re now hoping to re-process the data in 
version 5 to regenerate copies of the subjects that are free of manual edits. 
So far (because of the below core dump error), I?ve tried doing this two ways, 
first by running recon-all -autorecon-all -clean -s  on copies of our 
manually edited data and, secondly, by using from the original, unaltered 
MPRAGE files and running recon-all -i ./path/to/MEMPRAGE.nii -s  
(which fails before we would then run recon-all -autorecon-all -s ). 
In both cases I?ve run into an error I never encountered when last working with 
this data 2 years ago in version 5. Specifically I get a ?Segmentation fault 
(core dumped)? when mri_convert is invoked. I?ve enclosed a copy of the 
recon-all.log and recon-all.error files as attachments and provided the 
specific commands that seem to trigger the core dump below (from 
recon-all.error f
ile). I looked on the mail archive but I wasn?t able to find any answers.

I?m running version 5.0 (as that is the version our manually edited data was 
processed in):
setenv USE_STABLE_5_0_0
source /usr/local/freesurfer/nmr-stable50-env

build stamp: freesurfer-Linux-centos4_x86_64-stable-v5.0.0-20110319
I?m running Red Hat Enterprise Linux Release 6.7 (Santiago)

The specific commands that appear to be causing the (Segmentation fault) core 
dump in each of the two different cases are below (taken from recon error log):

When running: recon-all -i ./path/to/MEMPRAGE.nii -s  the error occurs 
with..
mri_convert 
/autofs/cluster/deplin/chris/data/Selected_Scans/3800033/MPRAGE/003/MEMPRAGE.nii
 /autofs/cluster/roffman2/users/RPDR_FromRaw_No_Edits/00033/mri/orig/001.mgz

When running: recon-all -autorecon-all -clean -s  the error occurs 
with..
mri_convert 
/autofs/cluster/roffman2/users/RPDR_No_Manual_Edits/00033_E/mri/rawavg.mgz 
/autofs/cluster/roffman2/users/RPDR_No_Manual_Edits/00033_E/mri/orig.mgz 
--conform

Notably, when I tried running the same commands (bolded above) in version 5.3 
(source/usr/local/freesurfer/nmr-stable53-env) they both exit without errors, 
leading me to wonder if this is a software-version interaction issue. (In case 
it has any bearing, I?m running all of this while ssh?d into the Martinos 
servers.)

I suspect I may have missed something very simp

Re: [Freesurfer] Qdec crash while analysis almost finished

2021-01-14 Thread Greve, Douglas N.,Ph.D.
I'm not sure I understand. Are you using v6 qdec with a 5.3 license file?

On 1/13/2021 2:54 AM, 
chenb...@mail.sysu.edu.cn wrote:

External Email - Use Caution

Hi, dear Freesurfer experts,


I recently came across an invalid Freesurfer license key error while using 
v5.3, and I tried apply for another license key, it just sent me the same 
license key as I have apply before. Then I put the licence file to 
/usr/local/freesurfer and has changed the name to .license as well. But it 
still doesn't work. Owing to the version I used last time was v6.0, so I 
reinstall a v6.0 and use the same license file.

But here comes the new problem, when the analysis almost finished, qdec just 
crash and disappear, parts of the contents in the command window are:

""

Writing results
  lh-Avg-Intercept-thickness
maxvox sig=1e+10  F=3846.45  at  index 14 0 0seed=1611502349
  lh-Diff-PCE-CON-Intercept-thickness
maxvox sig=3.52355  F=15.3058  at  index 11472 0 0seed=1611502349
mri_glmfit done
ninputs = 2
Checking inputs
nframestot = 2
Allocing output
Done allocing
nframes = 2
Writing to /media/lava/DATA/ESSAY/FirstWave/qdec/Untitled/contrasts.sig.mgh

--
ERROR: Invalid FreeSurfer license key found in license file 
/usr/local/freesurfer/license.txt
  If you are outside the NMR-Martinos Center,
  go to http://surfer.nmr.mgh.harvard.edu to
  get a valid license file (it's free).
  If you are inside the NMR-Martinos Center,
  make sure to source the standard environment.

"""

I wonder what was the question?  Appreciate for any suggestions.



[http://secure-web.cisco.com/1N7MvMMUAzUFVKiAhFS9HCZFHP0gkEQEMQAsYuTzXoEKRkoOuKB_AhEFB5zdNZFwnwH1DDVYl51OHr_EAEKrId7WN2vAOxQBV-lDKsqXFn_p9CKX_lv11fVyPy5KfbZ23_0OORgctDnyFj7pGLqIWfs0fM6QZL9yLZaurVYO_UIHuoqvLNQwCYuCPv9rJ-E-usUU9SEhYghI_jvtqq1aoADY_Quq9q3OSCPfqOg_5ASng6npTQhe3j2sIudyil2cpJFrsVrjrJwjMkILJ55skNg/http%3A%2F%2Fwww.sysu.edu.cn%2F2012%2Fimages%2Fsysu-mail-logo.png]

本邮件及其附件含有发送给特定个人和用于特定目的的信息。如果您不是预期的收件人,请立即删除本邮件并通知发件人。严禁任何非预期的收件人使用、传播、分发或复制本邮件或其附件。
This email and its attachments may contain confidential information intended 
for a specific individual and purpose. If you are not the intended recipient, 
you should delete this email and notify the sender immediately. Any use, 
dissemination, distribution, or copying of this email or its attachments by 
persons other than the intended recipient(s), is strictly prohibited.



___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] almost empty mask.mgh with glmfit

2021-01-14 Thread Julie Ottoy
External Email - Use Caution

Hi Doug, thank you for your reply!
When I look at my surface-projected non-pvc data per subject, initially it
seemed as there were a lot of values zero, but when I go to configure > and
replace the threshold to 0, the whole surface is  covered with non-zero pet
values, as would be expected. Hence, I do not understand why the stacking
of these images over all subjects gives me an almost empty mask.mgh (only
about 1500 vertices with a pet value left) and thus an almost empty stacked
4D pet file.

This is my command for projection of the non-pvc data:
mri_vol2surf --mov
${in_dir}/${session}.gtmnopvc.output.pons/mgx.ctxgm.nii.gz --reg
${in_dir}/${session}.gtmnopvc.output.pons/aux/bbpet2anat.lta --hemi lh
--projfrac 0.5 \
--o ${in_dir}/lh.mgx.ctxgm.${session}.fsaverage.sm00.nopvc.pons.nii.gz
--cortex --trgsubject fsaverage

for the stacking, I am using:
mri_concat --f "$lhmgxctxgm" --prune --o
${results_dir}/all.lh.mgx.ctxgm.fsaverage.sm00.nopvc.pons.nii.gz

When I omit the prune flag with the mri_concat, I get a good result.

Do you recognize any issues here?
Thank you!
best regards
Julie

On Thu, 14 Jan 2021 at 10:57, Greve, Douglas N.,Ph.D. <
dgr...@mgh.harvard.edu> wrote:

> A 0 value usually indicates a bad or uninterpretable voxel which you would
> not want to include in your analysis. You can, of course, by not pruning.
> But I think you need to answer the question as to why the values are 0. Is
> 0 interpretable in this case?
>
> On 1/11/2021 6:15 PM, Julie Ottoy wrote:
>
> External Email - Use Caution
> Dear Doug,
>
> I was wondering why the flag --prune is recommended (petsurfer website)
> when creating a stacked pet file and during surface-smoothing. If I
> understood correctly, this would set all vertices that are 0 in at least
> one subject to 0 ("set vox to 0 unless all frames are non-zero")? In my
> non-pvc data, it seems as though a lot of the surface-projected values are
> 0. Hence, when I perform a surface-based regression between PET and a
> regressor and I use the --prune flag during mri_concat, I don't get any
> results.
>
> Thank you!
> best regards
> Julie
>
> ___
> Freesurfer mailing 
> listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://secure-web.cisco.com/1h9TaaGM0shk3pzyFd7Y9YQIwpTwy5oZ93L8lWYf1AFBqWeWh-wyPKozuVt5UQkDNBeHpGT3ba6WKDCvrD7XxtTq6sbXsR7ZzWZ9tHPZzNMRBLSjxts6YsIIjhPSWzaC5GeCyORmwfICq1zoUFfVIdJtkX5yu5KF_KafGRbwghAqOkcCfR5ddp-GlC255akz1zeeHKwccio2x1l1lMmvfvtXoeSrdTtuHAzDzGGgxXTA4d6YcK0rgeOPpGQk4sKGfpJEMsBz0pEXH_Ak-uOG0yw/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] 3D reconstruction of brain MRI

2021-01-14 Thread Fleur GAUDFERNAU
External Email - Use Caution

Dear all,

I have just started using Freesurfer. I have an issue when trying to perform 
volumetric reconstruction from MRI files. Sorry if my question is naive.
Data description: for each subject, 3 DICOM folders, each one containing 2D MRI 
slices along one axis. (I also have them in nifti format.)
Goal: volume reconstruction to obtain a single 3D volume of the subject brain.
What I did: recon-all -all -i path/to/mri_axial.nii -i path/to/mri_coronal.nii 
-i path/to/mri_sagittal.nii -s subject
Error message: inputs have mismatched dimensions!
512 x 512 x 50 / 512 x 512 x 14 / 512 x 512 x 22

(The mismatched dimensions being totally normal, considering the number of 
slices along each axis does not have to be the same.)
However, if I use recon-all on only 1 of the 3 files, it works perfectly. I 
think I misunderstood the use of recon-all: it does not really perform volume 
reconstruction, i.e. transforming 3 series of 2D slices into a single 3D volume?
If not, could someone tell me which software can perform this task?
(So far the only one I know, NiftyMIC, is dedicated to fetal brain MRIs - but 
the task remains the same).

Thanks in advance,
Fleur Gaudfernau
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] 3D reconstruction of brain MRI

2021-01-14 Thread Fischl, Bruce
Hi Fleur

FreeSurfer provides tools that take an approximately isotropic T1-weighted 
input volume with voxel dimensions around .7-1.5mm and reconstructs models of 
most macroscopically visible structures. There are other algorithms around that 
take a set of orthogonal anisotropic acquisitions and estimate an isotropic one 
using some type of optimality criterion (e.g. max likelihood), but we don't do 
that directly. If you find one and generate something isotropic you can give 
that to FreeSurfer

Cheers
Bruce

From: freesurfer-boun...@nmr.mgh.harvard.edu 
 On Behalf Of Fleur GAUDFERNAU
Sent: Thursday, January 14, 2021 11:48 AM
To: freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] 3D reconstruction of brain MRI


External Email - Use Caution
Dear all,

I have just started using Freesurfer. I have an issue when trying to perform 
volumetric reconstruction from MRI files. Sorry if my question is naive.
Data description: for each subject, 3 DICOM folders, each one containing 2D MRI 
slices along one axis. (I also have them in nifti format.)
Goal: volume reconstruction to obtain a single 3D volume of the subject brain.
What I did: recon-all -all -i path/to/mri_axial.nii -i path/to/mri_coronal.nii 
-i path/to/mri_sagittal.nii -s subject
Error message: inputs have mismatched dimensions!
512 x 512 x 50 / 512 x 512 x 14 / 512 x 512 x 22

(The mismatched dimensions being totally normal, considering the number of 
slices along each axis does not have to be the same.)
However, if I use recon-all on only 1 of the 3 files, it works perfectly. I 
think I misunderstood the use of recon-all: it does not really perform volume 
reconstruction, i.e. transforming 3 series of 2D slices into a single 3D volume?
If not, could someone tell me which software can perform this task?
(So far the only one I know, NiftyMIC, is dedicated to fetal brain MRIs - but 
the task remains the same).

Thanks in advance,
Fleur Gaudfernau
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] Open Ph.D. position

2021-01-14 Thread Rosalia Dacosta Aguayo
External Email - Use Caution

The Institut d’Investigació en Atenció Primària Jordi Gol i Gurina is
looking to cover *a Ph.D. position *for the Grenssap Group (led by Dra.
Concepció Violán). This is a multidisciplinary team formed by medical
doctors, nurses, statisticians, pharmacist, psychologist- and junior
researchers. The main research lines of the group are (1) Evaluation of the
use of Primary Care services, programs and interventions; (2) Evaluation of
drug use; (3) Community interventions to reduce the effect of health
issues; (4) Health Services Research: classification of multimorbidity
patterns, implications of multimorbidity for the health services,
validation and improvement of current information systems in PC and
validation of questionnaires.



Grenssap group information
https://secure-web.cisco.com/186oGLgiF4R4PrU_gPjsxFfnddSX0mMyppqzVvMVC9YqwelBTCVO_rs-VKyo5ql2M1EXpZTKDz_h-B5JK34Ji3xXVWUXyq38Ch00p_53-NfE9e3SCqJwsjIN6fqVK_iyXtJX2HTC0dkRGfPLfVkdwoG7M3FpzhK4NyIdmjDLWcLtDRWPNU2fCRBtxuDDJk4s9Cgo67UfZAroqNBqanMrIu0uUPXTOQXDSTBTn7ntH3BHXnNiFf5Q5Ai65MlMiRJt1prRrH4sZRPBdBd-Lx_hTZQ/https%3A%2F%2Fwww.idiapjgol.org%2Findex.php%2Fen%2Fresearch-groups%2FGRENSSAP




Essential Selection Criteria:

·   Bachelor’s Degree in Statistics or Mathematics.

·   Experience in data management and statistical analysis.

·   Good understanding of the English language.


Responsibilities:

·   Management of big databases.

·   Statistical and methodological assessment of projects: design,
sample size calculation, analysis plan, data analysis and presentation of
results.

·   Database creation, cleaning and restructuring. Quality control and
validation of data.


Desirable Selection Criteria:

·   Experience in research projects using electronic health records
databases.

·   Participation in research projects within the health sciences,
particularly regarding the design and analysis of cohort and case-control
studies.

·   Experience in the development of analytical projects: design and
plan of analysis, data capture and preparation, statistical analysis,
validation and presentation of results, sample size calculation for complex
samples.

·   Expertise in statistical programmes and data analyses: SPSS, Stata,
R and/or other programmes.

·   Experience in the management and cleaning of databases (packages in
R *plyr*, *bash programming*

of Linux, Python).

·   Experience in primary care research.

·   Knowledge of the Catalan language.

·   Knowledge of the Spanish language.

·   Ability to contribute to the team and active participation in
discussions. Open to acquire new skills and knowledge.

·   Problem-solving skills, self-sufficient.

·   Dynamic, active involvement in the projects, innovative. Easily
adaptable to different working conditions and technologies.

·   Based on the characteristics and academic merits of the candidate,
he/she will be able to enter a PhD program.

Contract Type:

*Hours*: 40 hours/week

*Salary*: Based on hours/week and experience (junior/senior)

*Contract*: Fixed term/Service

*Location*: Barcelona, IDIAPJGol headquarters

*Start*: May 2020

*Duration*: 1 year with a possibility of extension



*Selection Process:*



*Send your applications to:*

Applicants should register on the IDIAPJGol website (work with us/open
calls) or via the following link: *LINK TO REGISTRATION*




*Until**: May 1, 2020*

Final candidates will be interviewed.

* CONTACT: rdacos...@gmail.com *
Evaluation of final candidates:

Will be conducted in accordance to the Selection Process Manual of the
IDIAPJGol (IT-085) available in our website.

The contract will follow the applicable agreement and the current statutes
of workers.

The selection process will follow the principles of merit, equality and
capacity and will adjust to the characteristics and requirements needed to
carry out the responsibilities specified in the job offer.

The contract will not take effect if the merits alleged in the cv cannot be
documented.



In compliance with the GDPR (EU) and the Organic Law 3/2018, December 5,
regarding the protection of personal data and digital rights, we inform you
that your email address and other personal data provided by yourself will
be automatically included in our database for the selection process. Once
the selection process finishes (for whichever cause), your data will be
eliminated.



The IDIAPJGol is responsible for the processing of data and the Data
Protection Officer is Mr. Josuè Sallent Ribes (d...@ticsalutsocial.cat). T