Hi Niels,

Unfortunately I’m still having the same issue. After you change TextEdit to “make plain text,” when you save it and it asks you for an encoding format, should you use “Unicode (UTF-8)” or “Western (Windows Latin 1)” or does it not matter? I tried both and got the same error.

I’m attaching all of the files. Original text files, the “_fixed” version using the code you send, and the .mat and .con files that result from running text2vest on the “_fixed” files.

I guess if you don’t see any problems with these files, then perhaps it’s the niftii files that are the issue?

Thank you!!

-Ben


Ben Chernoff
Ph.D. Student, Concepts, Actions, and Objects Lab
Rochester Center for Brain Imaging, Room 2B231
University of Rochester

On Oct 8, 2018, at 9:58 AM, Niels Bergsland <[log in to unmask]> wrote:

Hi Ben,
I am unable to recreate the issue on my Mac with going from Excel to TextEdit. However, I was able to "repair" the design.txt that you attached in the second email in this way:

tr "\015" '\n' < design.txt  > design_fixed.txt

"\015" is the escape sequence of the Control-M character. The tr command substitutes Control-M with a newline character in this case. At this point, you should be able to run Text2Vest.

Hopefully this takes care of it for you!
Niels



On Mon, Oct 8, 2018 at 3:48 PM Chernoff, Ben <[log in to unmask]> wrote:
Hi Niels,

I had been using excel and then copy pasting into TextEdit. However, before I paste into text edit I change the format to plain text in the same way you said. The original email had the wrong ones, that was a different program I tried when I couldn’t get anything else to work. I sent a second email when I replied to Matthew, but I’m not sure if you saw it. I tried to get rid of the control characters by using this command in terminal, but it didn’t help

 awk 'sub("$", "\r")' unixfile.txt > winfile.txt

-Ben


Ben Chernoff
Ph.D. Student, Concepts, Actions, and Objects Lab
Rochester Center for Brain Imaging, Room 2B231
University of Rochester

On Oct 8, 2018, at 4:54 AM, Niels Bergsland <[log in to unmask]> wrote:

Hi Ben,
How are you creating your text file? Your design.txt and the design.mat in your original email have ^M control characters. You should use just a straight plain text editor to create your design. If you are using TextEdit on your mac, you can go to the "Format" menu and select "Make plain text", which should then result in a usable file.

-Niels

On Sat, Oct 6, 2018 at 10:38 PM Chernoff, Ben <[log in to unmask]> wrote:
Sorry, that was one of several versions I tried. See attached for a different version, same error. Only difference is how i try to “convert it” to windows format before Text2Vest. I’m also attaching the .txt file

-Ben


Ben Chernoff
Ph.D. Student, Concepts, Actions, and Objects Lab
Rochester Center for Brain Imaging, Room 2B231
University of Rochester

On Oct 6, 2018, at 4:32 PM, Glasser, Matthew <[log in to unmask]> wrote:

The mat file comes across for me with a blank line in-between every line.  

Matt.

From: FSL - FMRIB's Software Library <[log in to unmask]> on behalf of "Chernoff, Ben" <[log in to unmask]>
Reply-To: FSL - FMRIB's Software Library <[log in to unmask]>
Date: Saturday, October 6, 2018 at 3:27 PM
To: "[log in to unmask]" <[log in to unmask]>
Subject: [FSL] Randomise design matrix error

Hello experts,

I'm trying to use randomise for a basic 2 sample unpaired t-test via TBSS which I ran on 78 subjects. I made my design.mat and design.con files manually and then used text2vest. But when I run randomise, I keep receiving the error

An exception has been thrown
number of rows in design matrix doesn't match number of "time points" in input data!

I looked everywhere and can't figure out why. I’m worried about my original design.txt file being mac format instead of windows and thus there are 79 rows (one blank at the end) when I convert the .mat file back to .txt with Vest2Text. But I tried several different ways to convert it to windows format such as with awk or with perl. No matter what, I get the same result. I'm attaching the mat and con files. Here is the exact command I ran from inside the stats folder, where all files (including .con and .mat) are located:

randomise -i all_FA_skeletonised -o tbss -m mean_FA_skeleton_mask -d design.mat -t design.con -n 500 --T2

Here is the output of fslinfo for all_FA_skeletonised:

data_type      FLOAT32
dim1           182
dim2           218
dim3           182
dim4           78
datatype       16
pixdim1        1.000000
pixdim2        1.000000
pixdim3        1.000000
pixdim4        1.000000
cal_max        0.0000
cal_min        0.0000
file_type      NIFTI-1+

Thank you for the help!

-Ben



To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1

 

The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.


To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1



To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1



--
Niels Bergsland
Integration Director / Research Assistant Professor of Neurology
Buffalo Neuroimaging Analysis Center / University at Buffalo
100 High St. Buffalo NY 14203
[log in to unmask]


To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1




To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1



--
Niels Bergsland
Integration Director / Research Assistant Professor of Neurology
Buffalo Neuroimaging Analysis Center / University at Buffalo
100 High St. Buffalo NY 14203
[log in to unmask]


To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1




To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1