Giter VIP home page Giter VIP logo

lesymap's People

Contributors

dorianps avatar muschellij2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lesymap's Issues

output image orientation

Dear Dorian
We have normalized the brain lesions in SPM (Matlab) and would like to try now (after having analysed the data with NPM from MRIcron) the analyses with LESYMAP.
A first analysis with method ='sccan' and fixed sparseness (sparseness = 0.045) gave some output that seemed reasonable (image on the left). However, when I overlayed the stat_img.nii on a template in MRIcron the result seems flipped (image on the right).

Could it be that the orientation of the result output image might be flipped? As we did not follow the registerLesionToTemplate procedure but did the normalisation elsewhere, could this be the reason for this unexpected lateralization of the results?

Thank you very much!

Kind regards
Wiebke

Bildschirmfoto 2020-05-15 um 14 49 20

Installation issue

Hi!

Thanks for putting this package on Github! I am very excited to give it a try...

I have tried to install the package via the four suggested methods, but have run into the same error each time:

The error I get looks something like this:

ld: warning: directory not found for option '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [LESYMAP.so] Error 1
ERROR: compilation failed for package ‘LESYMAP’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/LESYMAP’
    Installation failed: Command failed (1)

I am trying to do this installation via RStudio on a Mac running OS 10.12.6.

Thanks in advance!
Avi

Info.txt File is Empty

Hi Dr. Pustina,

A minor issue that my colleagues and I have run into is that when the new version of LESYMAP produces Info.txt files that are empty. The procedure runs properly and produces stat_img.nii.gz files correctly. However, as it finishes and saves the analysis it says that a script was out of bounds for Info.txt.

Thank you!

Mark Bowren

explaination for negative weight in VLSM stat.img

hello,
I noticed that there is postive and negative value in stat_img.nii in the SCCAN results. what is the difference between the postive and negative value? dose it mean that postive value is postively related to the behaviour score and nagetive value is nagetively related to the behavior score?

Besides, I noticed that values of stat_im.nii is normalized from the raw_data. I don't know the formulation which translate the raw_data to stat_img data. so, it is difficult to interpret the postive and negative weight values.

Example dataset

Hi,

I am new to lesion-symptom mapping and excited to try out the mulitvariate LSM.

I am running LESYMAP on a windows machine, under the Linux subsystem. I was able to run the two demo scripts available online, one with the univariate VLSM and the other one with the multivariate LSM. I can replicate the results and generate the same figures as shown online.

However, I found something strange after carrying out some testing. The demo scripts can still run smoothly even after I deleted all the .nii.gz files from the "lesions" folder (see the screenshot below). As you can see, the variable "filenames" should have been empty, but it was not. The output looked the same as before. The file path seems fine...

aaa

R (version 3.6.2) might have already loaded the files into the workspace or something. So I restarted Ubuntu/R and repeated the process. I got the same output.

I am wondering what might be causing that.

Thanks,
Michael

Issue with controlling for lesion volume

Hi Dr. Pustina,

I have an issue with LESYMAP results when I control for lesion volume and use “sccan” method. It seems to give opposite results to the expected one. I have a dataset of 195 subjects (48 affected, binary score of 0 being affected and 1 non-affected) and I ran LESYMAP using these parameters:
(method = 'sccan', correctByLesSize = "behavior", minSubjectPerVoxel = "5%")

The results I got were in the area that is reserved in affected subjects when we do a proportional difference map (affected subjects lesion overlap subtracted from non-affected lesion overlap).

LESYMAP stat_img with control for lesion volume (stat_img has only positive values):

d

Proportional difference map showing areas that are more damaged in non-affected subjects:

c

I used the same dataset and ran LESYMAP again without controlling for lesion volume, using these parameters:
(method = 'sccan', minSubjectPerVoxel = "5%")

The results I got are as expected from the literature and similar to the proportional difference map.

LESYMAP stat_img without control for lesion volume (stat_img has only negative values):

b

Proportional difference map showing areas that are more damaged in affected subjects:

a

Thank you!
Fatimah

LESYMAP v0.0.0.9201 (Release date: 2018-09-14) questions

Hello-

I am a new LESYMAP user and am trying to get a better grasp on what my output means. I understand that LESYMAP now allows for SCCAN weights to show a directional relationship to behavior. In the "what's new" explanation of this update you write:

"The stat.img map produced from SCCAN will now contain correctly oriented voxel weights with respect to behavior. Negative weights are inversely related to behavioral scores (1-lesion = lower behavioral score), and positive weights are directly related to behavioral scores (0-healthy = lower behavioral score). While stat.img contains normalized voxels weights between -1 and 1, raw voxel weights can be found in rawWeights.img."

I am confused what you mean when you say "1-lesion=lower behavioral score and 0-healthy=lower behavioral score." Further explanation of this would be very useful.

Thanks!

Potential Problem with Voxel Sign

Hi Dr. Pustina,

I am using the newest version of lesymap's SCCAN routine, which searches for both positive and negative correlations with the behavior. I have a large patient sample in which some patients have left-sided damage and others have right-sided damage. I am using the SCCAN method to find the neural correlates of a lateralized behavior among the entire sample. For example, I have a language factor generated through factor analysis (language is classically associated with the left-hemisphere). The program produces a stat_img.nii.gz file that shows negative correlations with damage to left-hemisphere regions (as you would expect), but the same map also shows positive correlations with damage to right-hemisphere regions. One interpretation is that damage to right-hemisphere regions improves language ability. However, this obviously seems like an unlikely explanation. The same thing happens for visuospatial abilities; this variable should be negatively associated with right-hemisphere damage, but SCCAN produces a map that also includes positive associations with left-hemisphere damage.

I think that what may be happening is that having both positive and negative voxel weights helps SCCAN to maximize the correlation between voxel values and behavioral scores in this situation. This is because having unilateral right-sided damage, for example, means that you by definition do not have left-sided damage.

Do you have any thoughts about the best way to overcome this? I was thinking that it would be useful to be able to restrict SCCAN to finding only negative associations (that is, we can assume subtractivity after brain lesions). However, that is NOT what the old version of SCCAN did (i.e. setting directionalSCCAN to FALSE will not fix this problem). The old version will sometimes output a result that shows only voxels with a positive association if the positive association is stronger than the negative (which happened to me with the language analysis, where it produces a result with only right-sided findings). But because the old version did not tell you the direction of the correlation, you might be misled. I assume that setting directionalSCCAN to TRUE and then getting rid of the positive voxels afterwards is not appropriate since the entire map was evaluated for statistical significance, not just the negative voxels. So the cross-validation does not apply to only the negative voxels. This makes me think that it would be helpful to limit SCCAN to finding only negative correlations (i.e., cross-validate and produce maps with only negative voxel weights).

Thank you for your hard work on this program. It does a fantastic job in most cases and has been a valuable contribution to the lesion analysis community.

Mark Bowren

LSM quesion: minimum number of subjects lesioned

Dear Pustina,

I am planning to use the LESYMAP tool to perform a LSM analysis. In LSM analysis context, is there a general rule about what should be the minimum number of subject lesioned at a voxel for that voxel to be included in the analysis (in LESYMAP the default option of minSubjectPerVoxel is 10%) ? I did not find a consensus about this point in the literature and would like if there is a recommended minimum threshold based on empirical evidence.

Thank you very much in advance.

Best regards,

Error in makeImage(mask, voxval = statistic[voxindx]) : unused argument (voxval = statistic[voxindx])

Dear team,

I seem to be getting an error with preparing the statistic images, please see below: What could be causing this? Thanks.

23:25:29 Running LESYMAP 0.0.0.9221
23:25:29 Checking a few things...
23:25:30 Searching voxels lesioned in >= 5 subjects... 7173 found
23:25:30 Computing unique patches...
23:25:33 Found 108 patches in 7173 voxels - 66.4 times more voxels
23:25:33 Using existing lesion matrix... 50x108
23:25:33 Correcting for lesion size: behavior...
23:25:35 Correcting for lesion size: voxel...
23:25:38 Running analysis: regresfast ...
FWERperm 1000 permutations - expected run = 0.2 secs
WARNING: Infinite values detected in zscore.
23:25:38 Preparing images...
Error in makeImage(mask, voxval = statistic[voxindx]) :
unused argument (voxval = statistic[voxindx])

Post-sccan cluster thresholding removed all voxels

Hello,
I have been trying to perform SCCAN using dataset of 83 unilateral thalamic lesions, either with aphasia or without aphasia. I am trying to find out which thalamic site is specifically involved in aphasia.

I segmented the DWI-lesions manually (using MRICron) and standardized them into MNI space (using FSL).
After the SCCAN analysis is done I get the following warning:

WARNING: Post-sccan cluster thresholding removed all voxels.

Here is a complete output in the console:

13:08:32 Running LESYMAP 0.0.0.9221
13:08:32 Checking a few things...
13:08:32 Filenames as input, checking lesion values on 1st image...
13:08:32 SCCAN method: ignoring patch, nperm, and multiple comparison...
13:08:32 Searching voxels lesioned in >= 10% subjects... 97 found
13:08:48 noPatch true - Patches will not be used...
13:08:48 Computing lesion matrix... 83x97
13:08:49 Checking matrix values are binary 0/1...
13:08:49 Running analysis: sccan ...
Searching for optimal sparseness:
lower/upper bound: -0.9 / 0.9
cvRepetitions: 3
nFolds: 4
sparsenessPenalty: 0.03
optim tolerance: 0.03
13:08:49 Checking sparseness -0.212 . . . CV correlation 0.295 (0.423) (cost=0.711)
13:15:38 Checking sparseness 0.212 . . . CV correlation 0.298 (0.423) (cost=0.709)
13:22:31 Checking sparseness 0.475 . . . CV correlation 0.325 (0.410) (cost=0.690)
13:28:59 Checking sparseness 0.637 . . . CV correlation 0.338 (0.415) (cost=0.681)
13:41:56 Checking sparseness 0.738 . . . CV correlation 0.344 (0.413) (cost=0.678)
13:46:01 Checking sparseness 0.8 . . . CV correlation 0.344 (0.417) (cost=0.680)
13:51:54 Checking sparseness 0.728 . . . CV correlation 0.343 (0.413) (cost=0.679)
13:55:55 Checking sparseness 0.76 . . . CV correlation 0.346 (0.416) (cost=0.677)
14:00:57 Checking sparseness 0.775 . . . CV correlation 0.343 (0.417) (cost=0.681)
14:06:31 Checking sparseness 0.75 . . . CV correlation 0.345 (0.416) (cost=0.678)
14:11:10 Checking sparseness 0.76 . . . CV correlation 0.346 (0.416) (cost=0.677)
Found optimal sparsenes 0.76 (CV corr=0.346 p=0.00136)
Calling SCCAN with:
Components: 1
Use ranks: 1
Sparseness: 0.76
Cluster threshold: 150
Smooth sigma: 0.4
Iterations: 20
maxBased: FALSE
directionalSCCAN: TRUE
optimizeSparseness: TRUE
validateSparseness: FALSE
WARNING: Post-sccan cluster thresholding removed all voxels.
14:16:20 Preparing images...
14:16:20 Logging call details...
14:16:20 Done! 1.1 hours
Lesymap Summary:
Version :0.0.0.9221
Subjects :83
Method :sccan
Voxels in mask :97
Multiple comparison :none
P-threshold :0.05
Statistic range :0 0
Significant voxels :0
Runtime :1.1 hours
... save the output for more info ...

I was wondering what is the reason that my analysis fails. I have seen some published Lesion-Symptom-Mapping analyses using thalamic lesions with way less cases (n=20 or so), so I suppose it is not about the sample size ..? When I performed a simple subtraction analysis (aphasia-causing lesions minus lesions without aphasia) there was a significant overlap in each group, so I was surprised that this does not seem to be the case with SCCAN.

Any suggestions on how to approach this problem would be much appreciated.

Best regards,

Ida

LESYMAP Errors - Mask in different Space & antsAverageImages

Hello Dorian,

I have been trying to use lesymap for some analysis but have run into some errors that a colleague and I have not been able to figure out. I am hoping that you can help!

The first error I received (attached) stated that the lesion files and mask are in different spaces. However, as far as I can tell, they are in the same space. Even after using 3dresample to be sure that the lesion files and mask are in the same space, I continue to receive this error. Have you encountered this problem before?

Additionally, I tried to run the analysis without my mask file and simply inputed a number into minSubjectPerVoxel and received the attached error. A colleague and I tried to troubleshoot and cannot seem to understand what it may be referring to. Have you encountered this error before?

Thank you!
Best,
Holly
LESYMAP_error2
LESYMAP_error_mask

checkmask

Dear Dorian,

I am kind of a newbie when it comes to lesion registration. registerLesionToTemplate throws the error in checkMask(subImg, subLesion) : Mismatch directions of mask and 4D input. antsGetDirection indeed shows a (very slight) mismatch between the directions of the lesion and the, in this case T1 image. I am in the dark as to why this would occur (as I followed your really clear youtube instruction video) Is there anything I could do about this?

          antsGetDirection('anat_t1.nii.gz')

[,1] [,2] [,3]
[1,] -0.999606716 -0.003673195 0.02780145
[2,] 0.004524308 -0.999521065 0.03061325
[3,] 0.027675688 0.030726996 0.99914459

antsGetDirection('lesion_left_new.nii.gz')
[,1] [,2] [,3]
[1,] -0.999606716 -0.003673195 0.02780145
[2,] 0.004524308 -0.999521065 0.03061325
[3,] 0.027675687 0.030726993 0.99914459

Thanx!

Tim

Applying Model Weights to Out-of-Sample Data

Hi Dr. Pustina,

Is there a way to extract the final model from the sccan method? I want to apply the model parameters from one sample to a new sample of patients (i.e. cross-validate with out-of-sample data).

We have been doing this in the past by simply multiplying each lesion mask for each patient in the new sample by the stat_img.nii.gz file from lesymap's sccan routine. We then sum the remaining (weighted) voxels for each subject and correlate this sum score with the behavioral score in the new sample. Is this an appropriate way to cross-validate the model?

Thanks!

Mark

SCCAN result interpretation

Hi,I run SCCAN for my data, and I got a stat_img of two clusters. It was descripted in the info.txt document. I want to get the coordinate information of peak voxels in the two clusters. However, when I running the stat_img_bin in the fsl, I can only get one cluster, although I have try different threthhold. The script I used in the fsl is as follows:

"cluster -i /home/siying/sharefolder/VLSMdata/lsm/stat_img_bin.nii -t 0.02 -o cluster_index --osize=cluster_size > /home/siying/sharefolder/VLSMdata/lsm/cluster_info.txt"

I don't know how to address the problem. Thank you so much.

BLAS/LAPACK routine 'DLASCL' gave error code -4

Hi,

I have tried running lesymap method 'regresfast' on a 100 subjects with 1 behavioural vector. I have tried using the following combinations:

run a ULSM on GM roi

for (r in lesioned_gm_names) {
lesymap(eval(parse(text = qq(paste0("lesion_f_@{sample}")))), behavload_gm[, r], mask = NA, patchinfo = NA,
method = "regresfast", correctByLesSize = "both",
multipleComparison = "FWERperm", pThreshold = 0.05, flipSign = F,
minSubjectPerVoxel = 5, nperm = 1000, saveDir = paste0(qq("/lesymap_results/left/samples/@{sample}/smooth/@{smooth}/noise/@{errorw}/regress/"), r),
binaryCheck = FALSE, noPatch = FALSE, showInfo = TRUE)
}

  1. Ubuntu 22.04 LTS with Docker- no error messages thrown but no results showing after > 24 h.
  2. Mac Intel i9 with Docker- no error messages thrown but no results showing after > 24 h.
  3. I then downloaded Lesymap on Ubuntu 22.04 LTS locally via R and ran the same command resulting in:

warning: solve(): system is singular; attempting approx solution
Error in regresfast(lesmat, behavior, covariates, hascovariate) :
BLAS/LAPACK routine 'DLASCL' gave error code -4

I am surprised since SCCAN runs fine, only regrefast results in this error?

LESYMAP Compilation Failure (Mac OS 10.15.6, R version 4.0.3)

I keep getting the error below when I try to compile LESYMAP from GitHub. I've tried all three methods to no avail. Compliation of ANTsR, ANTsRCore and ITKR work fine.

In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo:21: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/compiler_check.hpp:50:4: error: "*** C++11 compiler required; enable C++11 mode in your compiler, or use an earlier version of Armadillo" #error "*** C++11 compiler required; enable C++11 mode in your compiler, or use an earlier version of Armadillo"

I believe the issue is that this command
clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c BMfast.cpp -o BMfast.o

needs to start with clang ++ -std=c++11 but I don't know how to do that
Any help would be very appreciated! Thank you

LESYMAP BIDS App

See dorianps/LINDA#5 (comment) for context.

This is as simple as writing a short script parsing input BIDS dataset and putting everything in a docker container. The big advantage of this approach is that it would allow us to host this (for free) on http://OpenNeuro.org. This new platform lets users run long and computationally expensive workflows in the cloud. It's free and will remain this way - the goal is to get people to share more data.

This approach have benefits for you - it makes your software more accessible (and we make sure appropriate credit is given to each app) and easier to debug (since you can interrogate all files and logs online). Building a BIDS App is fairly easy (more info here and an example here).

More resources:

Let me know if you are interested - I would be happy to help.

Is there any way to create a nifti file?

Hello developers,
thank you for providing this wonderful program.
And I want to use it on tumor patients.
As a very beginner, I don't know if this program just supply image result or there is any way that I could get a '.nii' format file to overlay it on T1 image?
Looking forward to your reply.
Thanks again.

Best regards,
Ziqian Wang

Effect size

Dear Dorian

We were wondering if Lesymap provides also effect sizes for the SCCAN solutions? Or there a possibility to calculate them?
Thank you very much for your reply!

Kind regards
Wiebke

Ability to estimate RAM usage from input parameters? (help with memory issues)

Dr. Pustina-

I'm trying to run LESYMAP using sccan but am running into memory limits and my jobs are unable to finish processing. My data is 2mm isotropic (91x109x91) using an initial 5% minimum threshold. I ran "sink()" in R to capture output before the session terminated:

12:49:06 Running LESYMAP 0.0.0.9202
12:49:06 Checking a few things...
12:49:06 Loading behavioral data...402 scores found.
12:49:11 Filenames as input, checking lesion values on 1st image...
12:49:11 SCCAN method: ignoring patch, nperm, and multiple comparison...
12:49:11 Searching voxels lesioned >= 5% subjects...31717 found
12:50:17 noPatch true - Patches will not be used...
12:50:17 Computing lesion matrix... 402x31717
12:50:25 Running analysis: sccan ...
Searching for optimal sparseness:
lower/upper bound: -0.9 / 0.9
cvRepetitions: 3
nFolds: 4
sparsenessPenalty: 0.03
optim tolerance: 0.03
12:50:26 Checking sparseness -0.212 ... CV correlation 0.246 (0.364) (cost=0.760)
13:01:32 Checking sparseness 0.212 ... CV correlation 0.250 (0.362) (cost=0.756)
13:12:37 Checking sparseness 0.475 ... CV correlation 0.254 (0.356) (cost=0.761)
13:24:11 Checking sparseness 0.121 ... CV correlation 0.244 (0.359) (cost=0.760)
13:35:39 Checking sparseness 0.313 ... CV correlation 0.255 (0.361) (cost=0.755)
13:48:01 Checking sparseness 0.357 ... CV correlation 0.253 (0.361) (cost=0.758)
14:00:24 Checking sparseness 0.276 ... CV correlation 0.254 (0.364) (cost=0.755)
14:13:16 Checking sparseness 0.293 ...

I'm running this on our high performance computing cluster and I'm tapping out the max memory allotment at 423 GB. I've reached out to the admins for the cluster and, unfortunately, this is the max memory I can use. They had asked if LESYMAP could or is written around support for MPI uage. I couldn't see in the documentation if it was or how I would even go about using that option.

Other options I can think to test:

  1. Differing input thresholds to fit under my memory limitations. Is there a way to calculate, given the matrix (e.g. 402x31717), an estimate RAM usage? Do you know of a way in R to do this?

  2. Given the sparseness values before the kill, set the lower/upperSpareseness ranges as a starting point. Given the above, do you have any recommendations?

I would prefer not to go this route as I would need to wait for a job to die before being able to hone in on a range later. It generally takes between 2-3 hours to either complete or terminate.

Does LESYMAP clear up RAM between sparseness checks or is it retained at each level? It looks to bounce up and down until it can figure a real range then looks to hone in on that result but if it's keeping the 3/4 to 1/4 results for every stage, that would eat up a lot of memory.

  1. Is it possible to do sparseness checks at different resolutions? Similar to what, for example, antsRegistration does with convergence settings, could this downsample input masks into levels of less resolution to run sparseness checks, then use that result to inform the next level (now at a higher resolution) and so on up until full resolution?

Thanks in advance to any help you could offer me.

Thanks,
Joel

Setup for Lesymap V0.0.0.9221

Hi
After spending many hours trying to install Lesymap and its dependencies we are more than a bit frustrated ;-)
We tried the following:

Test 1

The pre-compiled packages were manually copied into the folder .\R\win-library\3.6

  • R version 3.6.3
  • ANTsR 0.4.9 (ANTsR_0.4.9_R3.6.tgz)
  • ANTsRCore 0.7.0.0.0 (ANTsRCore_0.7.0_R3.6.tgz)
  • ITKR 0.5.3.2 (ITKR_0.5.3.2.0_R3.6.tgz)

Output (detailed output see below):

Fehler: Paket 'ANTsR' wurde für x86_64-apple-darwin15.6.0 erstellt
Ausführung angehalten
ERROR: lazy loading failed for package 'LESYMAP'

Test 2

The packages are build and installed by > devtools::install_github('dorianps/LESYMAP')

Output (detailed output see below):

Fehler in cmaker::cmake() : cmake command not found
Ausführung angehalten
./configure.win: line 73: -G: command not found
** libs
Fehler: (konvertiert von Warnung) this package has a non-empty 'configure.win' file,
so building only the main architecture
* removing 'C:/Users/Nadia/Documents/R/win-library/3.6/ITKR'
Fehler: Failed to install 'LESYMAP' from GitHub:
  Failed to install 'ANTsR' from GitHub:
  Failed to install 'ITKR' from GitHub:
  (konvertiert von Warnung) installation of package ‘C:/Users/Nadia/AppData/Local/Temp/RtmpEbz4VP/file25d01e6b5fc3/ITKR_0.5.3.2.0.tar.gz’ had non-zero exit status

Is there a valid version set of R, ANTsR, ANTsRCore and ITKR which should work without errors? Do you have any recommendations to solve the problem?

Thanks for your help!
Daniel

Detailed Outputs of Test 1

We got the following output
> devtools::install_github('dorianps/LESYMAP')
Downloading GitHub repo dorianps/LESYMAP@master
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?
1: All                                       
2: CRAN packages only                        
3: None                                      
4: ANTsR     (0.4.9 -> 06b68dacf...) [GitHub]
5: ANTsRCore (0.7.0 -> 2acba92f0...) [GitHub]
Enter one or more numbers, or an empty line to skip updates:
3
   checking for file 'C:\Users\Nadia\AppData\Local\Temp\RtmpEbz4VP\remotes25d07ab15c06\dorianps-LESYMAP-fc7786c/DESCRIPTION' ...
  
√  checking for file 'C:\Users\Nadia\AppData\Local\Temp\RtmpEbz4VP\remotes25d07ab15c06\dorianps-LESYMAP-fc7786c/DESCRIPTION' (1.5s)

  
  
  
-  preparing 'LESYMAP': (1.9s)
   checking DESCRIPTION meta-information ...
  
   checking DESCRIPTION meta-information ... 
  
√  checking DESCRIPTION meta-information
-  cleaning src

  
  
  
-  checking for LF line-endings in source and make files and shell scripts

  
  
  
-  checking for empty or unneeded directories

  
  
  
-  building 'LESYMAP_0.0.0.9221.tar.gz'

  
Warnung in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, 
  
   Warnung in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, 
     storing paths of more than 100 bytes is not portable:
     'LESYMAP/inst/extdata/template/other_templates/MNI152_2009c/mni_icbm152_t1_tal_nlin_sym_09c_mask.nii.gz'

  
Warnung in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, 
  
   Warnung in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, 
     storing paths of more than 100 bytes is not portable:
     'LESYMAP/inst/extdata/template/other_templates/MNI152_2009c/mni_icbm152_t1_tal_nlin_sym_09c_mask_skullnoface.nii.gz'

  
   

Installing package into ‘C:/Users/Nadia/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package 'LESYMAP' ...
** using staged installation
** libs

*** arch - i386
C:/Rtools/mingw_32/bin/g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG  -I"C:/Users/Nadia/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/Nadia/Documents/R/win-library/3.6/RcppArmadillo/include"        -O2 -Wall  -mtune=core2 -c BMfast.cpp -o BMfast.o
BMfast.cpp: In function 'Rcpp::List BMfast(const mat&, const colvec&)':
BMfast.cpp:47:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int v=0; v<dupli.size(); ++v) {
                    ^
BMfast.cpp:78:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int v=0; v<dupli.size(); ++v) {
                      ^
C:/Rtools/mingw_32/bin/g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG  -I"C:/Users/Nadia/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/Nadia/Documents/R/win-library/3.6/RcppArmadillo/include"        -O2 -Wall  -mtune=core2 -c BMfast2.cpp -o BMfast2.o
BMfast2.cpp: In function 'Rcpp::List BMfast2(const mat&, const colvec&, bool)':
BMfast2.cpp:60:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int v=0; v<dupli.size(); ++v) {
                    ^
BMfast2.cpp:91:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int v=0; v<dupli.size(); ++v) {
                      ^
C:/Rtools/mingw_32/bin/g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG  -I"C:/Users/Nadia/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/Nadia/Documents/R/win-library/3.6/RcppArmadillo/include"        -O2 -Wall  -mtune=core2 -c BMfast2_dualmatrix.cpp -o BMfast2_dualmatrix.o
BMfast2_dualmatrix.cpp: In function 'Rcpp::List BMfast2_dualmatrix(const mat&, const mat&, bool)':
BMfast2_dualmatrix.cpp:86:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int v=0; v<dupli.size(); ++v) {
                      ^
BMfast2_dualmatrix.cpp:111:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int v=0; v<dupli.size(); ++v) {
                      ^
C:/Rtools/mingw_32/bin/g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG  -I"C:/Users/Nadia/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/Nadia/Documents/R/win-library/3.6/RcppArmadillo/include"        -O2 -Wall  -mtune=core2 -c BMperm.cpp -o BMperm.o
BMperm.cpp: In function 'Rcpp::List BMperm(const mat&, const colvec&, bool, int, int)':
BMperm.cpp:74:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int v=0; v<dupli.size(); ++v) {
                    ^
BMperm.cpp:113:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int v=0; v<dupli.size(); ++v) {
                        ^
C:/Rtools/mingw_32/bin/g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG  -I"C:/Users/Nadia/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/Nadia/Documents/R/win-library/3.6/RcppArmadillo/include"        -O2 -Wall  -mtune=core2 -c RcppExports.cpp -o RcppExports.o
C:/Rtools/mingw_32/bin/g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG  -I"C:/Users/Nadia/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/Nadia/Documents/R/win-library/3.6/RcppArmadillo/include"        -O2 -Wall  -mtune=core2 -c TTfast.cpp -o TTfast.o
C:/Rtools/mingw_32/bin/g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG  -I"C:/Users/Nadia/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/Nadia/Documents/R/win-library/3.6/RcppArmadillo/include"        -O2 -Wall  -mtune=core2 -c regresfast.cpp -o regresfast.o
C:/Rtools/mingw_32/bin/g++ -std=gnu++11 -shared -s -static-libgcc -o LESYMAP.dll tmp.def BMfast.o BMfast2.o BMfast2_dualmatrix.o BMperm.o RcppExports.o TTfast.o regresfast.o -LC:/PROGRA~1/R/R-36~1.3/bin/i386 -lRlapack -LC:/PROGRA~1/R/R-36~1.3/bin/i386 -lRblas -lgfortran -lm -lquadmath -LC:/PROGRA~1/R/R-36~1.3/bin/i386 -lR
installing to C:/Users/Nadia/Documents/R/win-library/3.6/00LOCK-LESYMAP/00new/LESYMAP/libs/i386

*** arch - x64
C:/Rtools/mingw_64/bin/g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG  -I"C:/Users/Nadia/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/Nadia/Documents/R/win-library/3.6/RcppArmadillo/include"        -O2 -Wall  -mtune=core2 -c BMfast.cpp -o BMfast.o
BMfast.cpp: In function 'Rcpp::List BMfast(const mat&, const colvec&)':
BMfast.cpp:47:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int v=0; v<dupli.size(); ++v) {
                    ^
BMfast.cpp:78:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int v=0; v<dupli.size(); ++v) {
                      ^
C:/Rtools/mingw_64/bin/g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG  -I"C:/Users/Nadia/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/Nadia/Documents/R/win-library/3.6/RcppArmadillo/include"        -O2 -Wall  -mtune=core2 -c BMfast2.cpp -o BMfast2.o
BMfast2.cpp: In function 'Rcpp::List BMfast2(const mat&, const colvec&, bool)':
BMfast2.cpp:60:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int v=0; v<dupli.size(); ++v) {
                    ^
BMfast2.cpp:91:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int v=0; v<dupli.size(); ++v) {
                      ^
C:/Rtools/mingw_64/bin/g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG  -I"C:/Users/Nadia/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/Nadia/Documents/R/win-library/3.6/RcppArmadillo/include"        -O2 -Wall  -mtune=core2 -c BMfast2_dualmatrix.cpp -o BMfast2_dualmatrix.o
BMfast2_dualmatrix.cpp: In function 'Rcpp::List BMfast2_dualmatrix(const mat&, const mat&, bool)':
BMfast2_dualmatrix.cpp:86:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int v=0; v<dupli.size(); ++v) {
                      ^
BMfast2_dualmatrix.cpp:111:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int v=0; v<dupli.size(); ++v) {
                      ^
C:/Rtools/mingw_64/bin/g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG  -I"C:/Users/Nadia/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/Nadia/Documents/R/win-library/3.6/RcppArmadillo/include"        -O2 -Wall  -mtune=core2 -c BMperm.cpp -o BMperm.o
BMperm.cpp: In function 'Rcpp::List BMperm(const mat&, const colvec&, bool, int, int)':
BMperm.cpp:74:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int v=0; v<dupli.size(); ++v) {
                    ^
BMperm.cpp:113:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int v=0; v<dupli.size(); ++v) {
                        ^
C:/Rtools/mingw_64/bin/g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG  -I"C:/Users/Nadia/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/Nadia/Documents/R/win-library/3.6/RcppArmadillo/include"        -O2 -Wall  -mtune=core2 -c RcppExports.cpp -o RcppExports.o
C:/Rtools/mingw_64/bin/g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG  -I"C:/Users/Nadia/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/Nadia/Documents/R/win-library/3.6/RcppArmadillo/include"        -O2 -Wall  -mtune=core2 -c TTfast.cpp -o TTfast.o
C:/Rtools/mingw_64/bin/g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG  -I"C:/Users/Nadia/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/Nadia/Documents/R/win-library/3.6/RcppArmadillo/include"        -O2 -Wall  -mtune=core2 -c regresfast.cpp -o regresfast.o
C:/Rtools/mingw_64/bin/g++ -std=gnu++11 -shared -s -static-libgcc -o LESYMAP.dll tmp.def BMfast.o BMfast2.o BMfast2_dualmatrix.o BMperm.o RcppExports.o TTfast.o regresfast.o -LC:/PROGRA~1/R/R-36~1.3/bin/x64 -lRlapack -LC:/PROGRA~1/R/R-36~1.3/bin/x64 -lRblas -lgfortran -lm -lquadmath -LC:/PROGRA~1/R/R-36~1.3/bin/x64 -lR
installing to C:/Users/Nadia/Documents/R/win-library/3.6/00LOCK-LESYMAP/00new/LESYMAP/libs/x64
** R
** inst
** byte-compile and prepare package for lazy loading
Fehler: Paket 'ANTsR' wurde für x86_64-apple-darwin15.6.0 erstellt
Ausführung angehalten
ERROR: lazy loading failed for package 'LESYMAP'
* removing 'C:/Users/Nadia/Documents/R/win-library/3.6/LESYMAP'
Fehler: Failed to install 'LESYMAP' from GitHub:
  (konvertiert von Warnung) installation of package ‘C:/Users/Nadia/AppData/Local/Temp/RtmpEbz4VP/file25d031502c67/LESYMAP_0.0.0.9221.tar.gz’ had non-zero exit status

Detailed Outputs of Test 2

> devtools::install_github('dorianps/LESYMAP')
Downloading GitHub repo dorianps/LESYMAP@master
Downloading GitHub repo ANTsX/ANTsR@master
Downloading GitHub repo stnava/ITKR@master
  
  
  
   checking for file 'C:\Users\Nadia\AppData\Local\Temp\RtmpEbz4VP\remotes25d02d55601\stnava-ITKR-9bdd5f8/DESCRIPTION' ...
  
   checking for file 'C:\Users\Nadia\AppData\Local\Temp\RtmpEbz4VP\remotes25d02d55601\stnava-ITKR-9bdd5f8/DESCRIPTION' ... 
  
√  checking for file 'C:\Users\Nadia\AppData\Local\Temp\RtmpEbz4VP\remotes25d02d55601\stnava-ITKR-9bdd5f8/DESCRIPTION' (2.2s)

  
  
  
-  preparing 'ITKR': (946ms)
   checking DESCRIPTION meta-information ...
  
   checking DESCRIPTION meta-information ... 
  
√  checking DESCRIPTION meta-information
-  cleaning src

  
  
  
-  checking for LF line-endings in source and make files and shell scripts

  
  
  
-  checking for empty or unneeded directories

  
-  looking to see if a 'data/datalist' file should be added

  
  
  
-  building 'ITKR_0.5.3.2.0.tar.gz'

  
Warnung:
  
   Warnung: file 'ITKR/cleanup' did not have execute permissions: corrected

  
   Warnung: file 'ITKR/configure' did not have execute permissions: corrected

  
   

Installing package into ‘C:/Users/Nadia/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package 'ITKR' ...
** using non-staged installation via StagedInstall field
Lade nötigen Namensraum: git2r
cloning into './itks'...
Receiving objects:   1% (4758/475794), 2081 kb
Receiving objects:  11% (52338/475794), 14464 kb
Receiving objects:  21% (99917/475794), 50887 kb
Receiving objects:  31% (147497/475794), 75766 kb
Receiving objects:  41% (195076/475794), 106416 kb
Receiving objects:  51% (242655/475794), 124515 kb
Receiving objects:  61% (290235/475794), 136619 kb
Receiving objects:  71% (337814/475794), 145528 kb
Receiving objects:  81% (385394/475794), 149843 kb
Receiving objects:  91% (432973/475794), 154270 kb
Receiving objects: 100% (475794/475794), 162021 kb, done.
Fehler in revparse_single(object, branch) : 
  Error in 'git2r_revparse_single': Requested object could not be found
Ruft auf: <Anonymous> ... checkout_git_object -> is_branch -> revparse_single
Ausführung angehalten
Fehler in cmaker::cmake() : cmake command not found
Ausführung angehalten

./configure.win: line 73: -G: command not found
** libs
Fehler: (konvertiert von Warnung) this package has a non-empty 'configure.win' file,
so building only the main architecture
* removing 'C:/Users/Nadia/Documents/R/win-library/3.6/ITKR'
Fehler: Failed to install 'LESYMAP' from GitHub:
  Failed to install 'ANTsR' from GitHub:
  Failed to install 'ITKR' from GitHub:
  (konvertiert von Warnung) installation of package ‘C:/Users/Nadia/AppData/Local/Temp/RtmpEbz4VP/file25d01e6b5fc3/ITKR_0.5.3.2.0.tar.gz’ had non-zero exit status

Lesymap errors - problem with mask

Dear Dorian

We have been running analyses with Lesymap and we now wanted to restrict the analyses with a predefined mask (from the WFU Pickatlas) to certain ROIs. However, we keep getting error messages.
We made sure that the mask image is binary and is in the same space as the lesion images (mask image was coregistered (resliced) with SPM). And according to one previous issue mentioned here we also copied the header information from one of the lesions for the mask (in Matlab). However, the analysis runs without any problem when we used a dummy mask (one of the lesions itself).
To test the analysis with mask we always set optimizeSparseness to false for the moment.
Please find the error output below. Would you have an idea what we do wrong?
Thank you very much in advance!
Best,
Wiebke

rm (list = ls (all = TRUE) )
library(LESYMAP)

lesydata_template = file.path(find.package('LESYMAP'),'extdata')
lesydata = '/home/nadia/Documents/Gedächtnis/FACscores_mitSDTGohneinkl/'
filenames = Sys.glob(file.path(lesydata, 'lesions', 'VOI_*.nii'))
behavior = Sys.glob(file.path(lesydata, 'behavior', 'FAC2_mitSDTGohneinkl.txt'))
mask=Sys.glob(file.path(lesydata, 'mask', 'Papez_circuit_resliced_headercopy.nii'))
mask=thresholdImage(mask, 0.1, Inf)
template = antsImageRead(Sys.glob(file.path(lesydata_template, 'template', 'ch2.nii.gz')))
lsm = lesymap(filenames, behavior, mask, method = 'sccan', optimizeSparseness=FALSE)
10:33:07 Running LESYMAP 0.0.0.9221
10:33:07 Checking a few things...
10:33:07 Loading behavioral data... 113 scores found.
10:33:07 Filenames as input, checking lesion values on 1st image...
10:33:07 SCCAN method: ignoring patch, nperm, and multiple comparison...
10:33:07 Using predefined mask...
10:33:07 noPatch true - Patches will not be used...
10:33:07 Computing lesion matrix... 113x170063
10:33:10 Checking matrix values are binary 0/1...
10:33:10 Running analysis: sccan ...
Calling SCCAN with:
Components: 1
Use ranks: 1
Sparseness: 0.045
Cluster threshold: 150
Smooth sigma: 0.4
Iterations: 20
maxBased: FALSE
directionalSCCAN: TRUE
optimizeSparseness: FALSE
validateSparseness: FALSEError in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
0 (non-NA) cases
plot(template, lsm$stat.img, window.overlay = range(lsm$stat.img))
Error in plot.antsImage(template, lsm$stat.img, window.overlay = range(lsm$stat.img)) :
object 'lsm' not found
save.lesymap(lsm, saveDir = "/home/nadia/Documents/Gedächtnis/FACscores_mitSDTGohneinkl/results")
Error in "callinfo" %in% names(lsm) : object 'lsm' not found

Error in antsImageRead(lesions.list[1]): argument "r_pixeltype" is missing, with no default

Hello team,
Thank you so much for sharing the code! I encountered a small problem during the execution and hope to get your guidance.

While testing "example (lesymap)," I encountered an error:

22:20:40 Running LESYMAP 0.0.0.9221
22:20:40 Checking afew things...
22:20:40 Loading behavioral data...131 scores found.
22:20:40 Filenames as input,checking lesion values on ist image...
Error in antsImageRead(lesions.list[1]):
argument "r_pixeltype" is missing, with no default

However, when I run the command "antsImageRead(lesions.list[1])" individually, there is no problem:

antsImageRead(lesions.list[1])
antsImage
Pixel Type :float
Components Per Pixel :1
Dimensions :181x217x181
Voxel spacing :1x1x1.
Origin :90 125 -71
Direction :-1 0 0 0 -1 0 0 0 1
Filename :/usr/local/lib/R/site-library/LESMAP/extdata/lesions/Subject_001.nii.gz

Do you know how to solve this problem? Looking forward to your reply, thank you!!!

Error in registration

Hello, I am having issues completing the registration of a couple of my participants. I have successfully run numerous other ones but there are three participants where I get the following error :

Error in checkMask(subImg, subLesion) :
Mismatch directions of mask and 4D input.

I have tried to get the Direction of the mask and the lesion to check if thats the problem but when I try to run the command getDirection from the ANTs package I get this in return : Error in getDirection(mask) : could not find function "getDirection".

I also tried a different package (oro.niftii) which has a similar command but I get the following error when it tries to read my niftii file: Error in performPermutation(trans, real.dimensions, data, verbose) :
Transformation is not simple, cannot reorient!

Do you have any ideas as to how I could resolve this issue which is particulalry troubling because the registration of all the other participants worked and it just those three that are getting this error.

Thank you in advance

LESYMAP results stable when run locally, vary on compute cluster

We are noticing that repeated runs of LESYMAP using the same input (lesion masks and behavioral data) produces slightly different results each time when run on a high performance computing cluster but produces identical, stable results each time it is run locally. The packages are identical in both environments, copied below.

ANTsR, 0.5.6.0.0, 2019-11-06
ANTsRCore, 0.7.4.6, 2020-04-12
ITKR, 0.5.3.2.0, 2020-03-04
LESYMAP, 0.0.0.9221, 2019-07-30

When the results differ on the HPC cluster it occurs as early as the first sparseness check with differing CV, cost values, then differing results from that point on. The results are similar but can vary in terms of resulting in a significant map versus non-significant.

Is there a reason why the results would differ between these two ways of running LESYMAP? Is there a way we can verify which is the intended, valid result?

Thanks!

LESYMAP: register to Template WARNING message

Dear Dorian,

Before ran the SCCAN analysis I tried to register the binary lesions to the default LESYMAP's template. It seems that all worked fine. However, the following warning message appeared in my terminal:

WARNING: In /home/miguel/R/x86_64-pc-linux-gnu-library/3.6/ITKR/libs/include/ITK-5.1/itkMultiStartOptimizerv4.hxx, line 186
MultiStartOptimizerv4Template (0x7fad1c037560): An exception occurred in sub-optimization number 0. If too many of these occur, you may need to set a different set of initial parameters.

WARNING: In /home/miguel/R/x86_64-pc-linux-gnu-library/3.6/ITKR/libs/include/ITK-5.1/itkMultiStartOptimizerv4.hxx, line 186
MultiStartOptimizerv4Template (0x7fad1c037560): An exception occurred in sub-optimization number 1. If too many of these occur, you may need to set a different set of initial parameters.

WARNING: In /home/miguel/R/x86_64-pc-linux-gnu-library/3.6/ITKR/libs/include/ITK-5.1/itkMultiStartOptimizerv4.hxx, line 186
MultiStartOptimizerv4Template (0x7fad1c037560): An exception occurred in sub-optimization number 2. If too many of these occur, you may need to set a different set of initial parameters.

Is this relevant?. In that case, how could I fix this issue?

Thanks for your time.

Best,

Miguel.

error using antsImageRead on ICBM skull mask

Hi Dorian. I'm a graduate student working with Chris Rorden. I've encountered a very peculiar error when running registerLesionToTemplate.

The script seems to fail when it gets to the line reading in the ICBM skull mask (using R 3.4.4. haven't testing with another version). ANTsR and ANTsRCore were installed through LESYMAP per your install instructions for LESYMAP.

I have downloaded the suspect image directly from the LESYMAP repo separately (I was hoping that maybe just my installed version was corrupt), and it still results in a fatal R session crash with the following command:

antsImageRead('/home/research/Downloads/mni_icbm152_t1_tal_nlin_sym_09c_mask_skullnoface.nii.gz')

However, if I change the data type to short (int16) using FSL:

fslmaths /home/research/Downloads/mni_icbm152_t1_tal_nlin_sym_09c_mask_skullnoface.nii.gz -add 0 /home/research/Downloads/mni_icbm152_t1_tal_nlin_sym_09c_mask_skullnoface_int16.nii.gz -odt short

the image can be read in with no problem and the image data types now match the brain mask template from your same folder as well

antsImageRead('/home/research/Downloads/mni_icbm152_t1_tal_nlin_sym_09c_mask_skullnoface_int16.nii.gz')

The fixed file is attached if you want to add it to the repo. I couldn't get anything to work in LESYMAP until I fixed this problem. Might be helpful to others.
mni_icbm152_t1_tal_nlin_sym_09c_mask_skullnoface_int16.nii.gz

Error with multiple comparisons correction

I am trying to replicate some of my previous results that I have found with NPM using the lesymap toolbox, but I am getting strange outputs depending on what I set for the multiple comparisons option.

When I ask for BM tests or t-tests using FDR, Bonferroni or holm (I haven't tried all the options), lesymmap produces z-maps with uniform zeros. Like below:

Lesymap Summary:
Subjects : 27
Method : ttest
Voxels in mask : 107372
Method : ttest
Multiple comparison : fdr
P-threshold : 0.05
Statistic range : 0 0
Significant voxels : 0
Runtime : 8.1 secs

Version : 0.0.0.9003

If I change the multiple comparisons option to a meaningless string ("hjhjh"), I get non-zero values. Here is an example with t-tests :

Lesymap Summary:
Subjects : 27
Method : ttest
Voxels in mask : 107372
Method : ttest
Multiple comparison : hjhjh
P-threshold : 0.05
Statistic range : -3.6 3.2
Significant voxels : 107372
Runtime : 8.1 secs
Version : 0.0.0.9003

With this meaningless string, the t-test values look reasonable to me, but the BM Z-scores are on an unreasonably wide range:

Lesymap Summary:
Subjects : 27
Method : BM
Voxels in mask : 107372
Method : BM
Multiple comparison : hjhjh
P-threshold : 0.05
Statistic range : -50.9 14
Significant voxels : 105444
Runtime : 14 secs
Version : 0.0.0.9003

Not sure what I might be doing wrong here?

Thanks again,
Avi

lesymap.predict() subscript out of bounds

Hi Dr. Pustina,

I noticed that in the new version of lesymap, lesymap.predict() gives me this error:

Error in input[[i]] : subscript out of bounds

Thank you for your time!

Mark

Travis fail

@muschellij2 ,

I am compiling Lesymap on Travis based on the script you prepared sometime ago:
http://bit.ly/antsr_travis_sh

but it fails:
https://travis-ci.org/dorianps/LESYMAP/jobs/244766485

Is http://bit.ly/antsr_travis_sh the most recent script to test packages that depend on ANTsR (it may have outdated info like ants_user=stnava)?

Any other suggestion how to resolve Travis fails? Here is the current travis file for Lesymap:
https://github.com/dorianps/LESYMAP/blob/master/.travis.yml

Thank you.

Setting number of cross-validation folds

Dear Dorian,

thank you for the great package!

I am trying to implement a cross-validation of lesion symptom mapping between lesion and cognitive data with lesymap. Given your comments in this issue (#33) I understand that lesymap already does a cross-validation and I can simply report "CVcorrelation.stat" as a measure of out-of-sample prediction performance, right? To achieve a 10-times repeated 10-fold cross-validation I can set cvRepetitions=10 and nFolds=10 as in lsm = lesymap(filenames_attention, behavior_attention, method = 'sccan', optimizeSparseness=TRUE, validateSparseness=TRUE, correctByLesSize="voxel", minSubjectPerVoxel = 5, cvRepetitions=10, nFolds=10), correct? Just checking to be on the safe side. :)

Is it possible to extract the Pearson correlations for each of the 100 folds? I would like to plot the distribution.

Best,
Marvin

Installation issues (R Studio 2023.03.0; R 4.0.4)

Hi,

I'm trying to install LESYMAP on R Studio (2023.03.0, R 4.0.4) but I get an error from the very beginning (see below). My understanding is that the issue starts here "Error in cmaker::cmake() : cmake command not found".

I've tried to look for a R package called "cmaker" but I couldn't find it.
I've also tried to install CMake for Windows (not sure this actually helps) but nothing.

A note (which might be relevant): RStudio asks me to update many packages. I tried both ways (updating the packages as recommended, not updating anything) and the installation fails anyways.

Any suggestions?
Thanks a lot!

Error:

  • installing source package 'ITKR' ...
    ** using non-staged installation via StagedInstall field
    Loading required namespace: git2r
    cloning into './itks'...
    Receiving objects: 1% (5359/535851), 2481 kb
    Receiving objects: 11% (58944/535851), 20548 kb
    Receiving objects: 21% (112529/535851), 65094 kb
    Receiving objects: 31% (166114/535851), 96240 kb
    Receiving objects: 41% (219699/535851), 122936 kb
    Receiving objects: 51% (273285/535851), 149288 kb
    Receiving objects: 61% (326870/535851), 164321 kb
    Receiving objects: 71% (380455/535851), 175599 kb
    Receiving objects: 81% (434040/535851), 180314 kb
    Receiving objects: 91% (487625/535851), 185245 kb
    Receiving objects: 100% (535851/535851), 196820 kb, done.
    Error in cmaker::cmake() : cmake command not found
    Execution halted

./configure.win: line 73: -G: command not found
** libs
Warning: this package has a non-empty 'configure.win' file,
so building only the main architecture

"C:/rtools40/mingw64/bin/"g++ -std=gnu++11 -I"C:/PROGRA1/R/R-401.4/include" -DNDEBUG -I'C:/Users/nicol/Documents/R/win-library/4.0/Rcpp/include' -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c dummy.cpp -o dummy.o
cd itkb && mingw32-make -j 2 ||
mingw32-make install ||
/usr/bin/make VERBOSE=1 -j 2 ||
/usr/bin/make install && ls ../ && rm -rf ../itks &&
rm -rf ITKInternalEigen3-build/Makefile &&
rm -rf CMakeFiles/ && rm -rf Modules/ && rm -rf CMakeTmp/ &&
rm -f Makefile &&
rm -rf Utilities/Doxygen
sh: line 1: mingw32-make: command not found
sh: line 2: mingw32-make: command not found
make[1]: Entering directory '/c/Users/nicol/AppData/Local/Temp/RtmpcDGhs4/R.INSTALL2b30699fef5/ITKR/src/itkb'
make[1]: *** No targets specified and no makefile found. Stop.
make[1]: Leaving directory '/c/Users/nicol/AppData/Local/Temp/RtmpcDGhs4/R.INSTALL2b30699fef5/ITKR/src/itkb'
make[1]: Entering directory '/c/Users/nicol/AppData/Local/Temp/RtmpcDGhs4/R.INSTALL2b30699fef5/ITKR/src/itkb'
make[1]: *** No rule to make target 'install'. Stop.
make[1]: Leaving directory '/c/Users/nicol/AppData/Local/Temp/RtmpcDGhs4/R.INSTALL2b30699fef5/ITKR/src/itkb'
make: *** [Makevars.win:13: libs] Error 2
ERROR: compilation failed for package 'ITKR'

  • removing 'C:/Users/nicol/Documents/R/win-library/4.0/ITKR'

question on interpretation of results

Hi,
I note there is CVcorrelation and CVcorrelation p values in the results. I have read the meaning of CVcorrelation p in the documentation. However, the meaning of CVcorrelation p is not well explained. Dose it mean the correlation between the VLSM map and behavior? And a larger value refer to a strong relationship?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.