Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Stefan Blaschke, MD
    @blaschkes
    David Wright
    @dwrightAus_gitlab
    Getting the following error on OSX when trying to run preprocessing via gui on the supplied test data: "SyntaxError: Non-ASCII character '\xcb' in file preProcessing_T2.py on line 49, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details"
    Markus Aswendt
    @maswendt
    Looks like an ASCII error which appears between different Python versions. Which version of Python do you use?
    David Wright
    @dwrightAus_gitlab
    I'm on os x so native is 2.7 but I run AIDA with python3.8...
    i.e. "python3.8 AIDA_gui.py"
    David Wright
    @dwrightAus_gitlab
    ok, so the gui gives the required command but calls "python preprocessing..." which is still set to old version obviously. Runs when I input "python3.8 preProcessing_T2...."

    Thanks! What do I put in my bash_profile to get 3.8 to run by default? Currently have: # Setting PATH for Python 3.8

    The original version is saved in .bash_profile.pysave

    PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}"
    export PATH

    cowry09
    @cowry09
    image.png
    Hi, my name is Taotao. I was able to try out this wonderful tool in ubuntu. It works nicely but I see the mask for DTI data was off a little bit.
    I was using the testdata
    Markus Aswendt
    @maswendt
    Hi Taotao, please give us some more information: at which processing step in the pipeline did that happen, is that a manually drawn mask?
    cowry09
    @cowry09
    Thank you for the quick reply. I just started trying this tool today, so I didn't see the comments in the python script. It seems I don't need "np.flip" in the T2w and DTI preprocessing. I was at the reconstruction step for fiber tractography using the automatically generated mask.
    image.png
    It looks correct after I commented all the "np.flip" lines
    Markus Aswendt
    @maswendt
    Great that you found a workaround. If you comment np.flip e.g. in registration_DTI.py you should check if the mask and the atlas are still superimposed correctly. We are about to release v1.1 and it would help if you file an issue and upload one of your files on https://github.com/maswendt/AIDAmri so that we can look into it in more detail.
    cowry09
    @cowry09
    Sorry, I missed the reply. I will file an issue on github
    I am trying AIDA on some new mice data, but in that dataset, the T2w and DTI are not initially aligned. Do you know any tools that can help me align the images first in order to apply this pipeline?
    1 reply
    Markus Aswendt
    @maswendt
    Ok, thanks! Regarding the alignment of T2w and DTI: do you mean that the orientation of the two scans is completely different (e.g. coronal vs. horizontal?) or that there is a small shift in geometry between them? in the first case we cannot really help because we have tested everything on coronal images only, it will work for any other orientation (because the atlas is isotropic 3D) but you need to adjust many things manually. in the second case the sequential registraiton of T2w and DTI should compensate for it.
    rangengxin
    @rangengxin
    image.png
    1 reply
    Dear Aida experts,
    I have the same question about T2w Convert raw data. When call function , File"pv_parseBruker_md_np.py", line71, in parsePV
    tmp = line[32].split('#Name,')
    IndexError: list index out of range And we found that when read "subject", after offseting with"",itjust31linescanbeused;butifchange"", it just 31 lines can be used; but if change "" to "##$", it will appear another error: File"pv_parseBruker_md_np.py", line72, in parsePV params['coilname'] = tmp[1].split('#$Id')[0]
    IndexError: list index out of range If I skip the step, use spm12 convert dicom to nii.gz, and run the next step like preprocessing, it also has problems like the pictures. Could you please help me with this?
    achamess
    @achamess
    Hi all. This is a really impressive database. I've been trying to do something similar in Airtable. It's super useful to see your organization. I hadn't used Ninox before. Some questions for you. (1) How do you represent multilevel hierarchical relationships. I'm mostly thinking of making aliquots from parents sample (say brain -> RNA extraction -> multiple aliquots of RNA). The data entry for this will be onerous I fear if it's possible to model. (2) Do you all have labwide naming conventions for things? (3) How do you link up your database with your documentation? Are you using paper lab notebooks or something else? I use RMarkdown files in dropbox. Do you drop Ninox links into your documentation? Thanks for your thoughts!
    Markus Aswendt
    @maswendt
    image.png
    @achamess: Thanks for your interest in our database. 1) we link every test (behavior, molecular biology etc.) with the subject (in our case: mice). For the subject we use subject IDs - codes for both to identify a mouse in a cage but also to blind the experimenter on the type of intervention. In terms of mRNA samples it looks like this.
    Markus Aswendt
    @maswendt
    image.png
    @achamess: With the search and filter function it is easy to sort or show only specific samples. (2) Yes there is strict naming conventions, starting with the study IDs. Most of it is no free text field but pull down menus with pre-defined names/values. (3) We use Evernote in addition but 99% of the documentation is in Ninox. For everything which needs to be written in plane text (comments about study desing etc.) or where additional figures are needed we write it down in a richt text field related to the specific study (image above). All raw data and everything outside Ninox is linked with hard linkes (either to a central data repository or a website. However currently manually, so no automatic referencing which should be possible because Ninox provides a well documented API with Zapier support and integration of almost everything - GoogleDocs, Calendars, Slack, ..
    achamess
    @achamess
    @maswendt Thank you for answering my questions. Very impressive setup you've got, and I'm sure it is already paying dividends to you all in terms of ability to find your data and reuse. You've basically created your own LIMS and ELN setup that is infinitely flexible. I'm going to keep trying to make AirTable work for me, but may need to switch to Ninox.
    @maswendt I see the mRNA example. That's OK for one tube, but let's say you make 5-10 aliquots of that initial RNA sample. Do you have a way to represent that? The hierarchical nature of derivatives (Tissue sample → RNA → RNA aliquots) i find difficult to model in a database like Airtable or Ninox
    Markus Aswendt
    @maswendt
    Thanks to @lscharwaechter AIDAmri v1.1 is online including a new bruker2nii converter, small bug fixes and updated manual. We are still working on the full release notes. In the meantime, check it out and let us know if you encounter any issues. If anyone is using Linux please let us know, we need help with a workflow for installation.
    Markus Aswendt
    @maswendt
    @achamess try this template RNA.ninox
    MarkPlatt
    @MarkPlatt

    Dear AIDA Experts,

    I'm having some issues when carrying out the T2 Postprocessing. I have found myself stuck at the same point when using both the test data and my own images.

    I have followed the manual and have completed the preprocessing and registration steps.

    However, when I select Postprocessing in the GUI as shown in figure 6 of the manual, I get the error message:

    cd 3.1_T2Processing
    python getIncidenceSize.py -i /home/mark/Desktop/AIDAmri/testData/T2w/testData.5.1.nii.gz
    Error: '/home/mark/Desktop/AIDAmri/testData/T2w/testData.5.1.nii.gz' has no affected or masked regions.

    This is true regardless of what .nii file I give as an input. I'm confused because on page 5 of the manual, it suggests that the user enters a path to the whole T2w folder rather than a file, but the GUI does not allow this and figure 6 shows the original test data being selected.

    If I don't use the GUI and try to run getIncidenceSize_par.py or the other script, with just the folder as an argument I get :

    getIncidenceSize.py: error: unrecognized arguments: /home/mark/Desktop/AIDAmri/testData/T2w

    I'm also a little unsure of what step/how I'm supposed to input the stroke mask.

    Any help you can give would be very appreciated.

    Best wishes,

    Mark

    @MarkPlatt Forgot to add that I'm using Ubuntu 18.04
    Markus Aswendt
    @maswendt
    @MarkPlatt Thanks for sharing the issue with incidence size. The stroke mask needs to be placed into the T2w folder BEFORE registration_T2.py. In the command line and AFTER preProcessing_T2.py and registration_T2.py are finished, this should work: python getIncidenceSize.py -i /testData_proc/T2w . For the GUI I have to check separately (will let you know when I found the issue).
    MarkPlatt
    @MarkPlatt

    @maswendt Thanks for your reply. Following your instructions I was able to run the postprocessing on the test data. However, the out put was only affectedRegions.txt and affectedRegions.nii.gz I do not have the Parental Atlas files that the manual suggests I will have.

    Also, how would I input an ROI mask on my own data? Does AIDA search for any binary mask in the folder and use that?

    I am also getting an error message when running the DTI preprocessing:

    Traceback (most recent call last):
    File "preProcessing_DTI.py", line 16, in <module>
    import applyMICO
    File "/home/mark/Desktop/AIDAmri/bin/2.2_DTIPreprocessing/applyMICO.py", line 28, in <module>
    import cv2
    ModuleNotFoundError: No module named 'cv2'

    Thank you once again for your help in setting this up

    MarkPlatt
    @MarkPlatt

    Update:

    It looked like there was an error running opencv, I installed opencv with anaconda and pip, but there seems to be some path error.

    I was eventually able to run preProcessing_DTI.py by creating a new environment with :

    conda create --name myenv
    conda activate myenv

    Once in this active environment, I installed openCV with:
    conda install -c conda-forge opencv

    then did the same for nipype, progressbar and lmfit

    Once this was done, I ran the preprocessing script through the GUI, which worked but gave me the message:

    cd 2.2_DTIPreprocessing
    python preProcessing_DTI.py -i /home/mark/Desktop/AIDAmri/testData/DTI/testData.7.1.nii.gz
    preProcessing_DTI.py:65: DeprecationWarning: get_data() is deprecated in favor of get_fdata(), which has a more predictable return type. To obtain get_data() behavior going forward, use numpy.asanyarray(img.dataobj).

    • deprecated from version: 3.0
    • Will raise <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 5.0
      vol = data.get_data()
      100% |#########################################################################|
      preProcessing_DTI.py:24: DeprecationWarning: get_data() is deprecated in favor of get_fdata(), which has a more predictable return type. To obtain get_data() behavior going forward, use numpy.asanyarray(img.dataobj).

    • deprecated from version: 3.0

    • Will raise <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 5.0
      imgTemp = data.get_data()
      preProcessing_DTI.py:50: DeprecationWarning: get_data() is deprecated in favor of get_fdata(), which has a more predictable return type. To obtain get_data() behavior going forward, use numpy.asanyarray(img.dataobj).

    • deprecated from version: 3.0

    • Will raise <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 5.0
      imgOut = dataOut.get_data()
      DTI Preprocessing COMPLETED

    The message looks like an issue with numpy, I get it after all my T2 Processing steps too, however, the process seems to have worked when inspecting the data.

    Leon Scharwächter
    @lscharwaechter

    @MarkPlatt Hi! Seems like some functions we used in our script will be replaced in future versions of some python modules like numpy and nibabel. To prevent this we strongly recommend to download the module versions we mentioned in the AIDAmri manual. I for example use an environment which has numpy version 1.19.4 installed. However, as you also have mentioned, I can see in the last line that DTI Processing actually has been completed. So in this case, you may ignore the warning messages. Just to recap, as @maswendt said before, it is necessary to first place the stroke mask into the T2w folder, then run preProcessing_T2.py, registration_T2.py and getIncidenceSize_par.py and then preProcessing_DTI.py should work.

    Greetings! Leon

    Javier Arcos Hódar
    @ArcosHodar_twitter
    Greetings. I'd like to see if I can clarify a couple things with the issues I'm currently having with installing AIDA on a Ubuntu virtual machine (physical machine is Windows, but I started doing all related work within the Virtual Machine after having trouble using FSL in Windows). In the first place, I find that my install of CMake does not match the options provided in figure 2 of the manual (clicking Tools gives me a list that goes directly from Show My Changes to Regular Expression Explorer, skipping the How to Install For Command Line Use option). I wondered if this could be a matter of how I installed CMake, but what I followed originally seems to me the second method here https://www.fosslinux.com/38392/how-to-install-cmake-on-ubuntu.htm and the first one gives the same result, while I'm still trying to figure out a problem with the third method. Either way, maybe the installations that work are enough? I'm not sure if this the missing option I mentioned is an issue and would like confirmation of whether the commands in figure 2b could still work just fine in the Ubuntu console despite missing the option in the GUI itself. Secondly, while trying to install NiftyRef I'm given 15 options (from Green Hills MULTI to Sublime Text 2 - Unix Makefiles) in the CMakeSetup, and since this is the first time I use this software I'm not sure about the differences between them and which one is optimal. Thanks in advance
    Stefan Blaschke, MD
    @blaschkes
    Hi Javier, first, I think the initialization of cmake for command line use is not necessary for linux. Also, seems like you have successfully called cmake from the commandline. For the options, I recommend to follow the instructions given here: http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftyReg_install
    Alex Li
    @Alex_X_Li_twitter

    @maswendt Hello Markus, AIDAmri is a wonderful program for rodent MRI. I have tried the example dataset (I only used T2w and fMRI), the program was running smoothly to the end. I ran T2 prep, registration, fMRI prep, registration and postprocessing. It was perfect. We I tried my own dataset (T2 and fMRI only), I can run T2 prep, registration, fMRI prep, registration, but had some issues when ran fMRI postprocessing. The folders rawMonData, rs-fMRI_mcf, rs-fMRI_niiData were created, but not the regr folder. And the following message was shown on the screen:
    python process_fMRI.py -i /Users/alexli/My_PythonProj/AIDAmri_test1/fMRI/Test1fmri.nii.gz
    process_fMRI.py:186: SyntaxWarning: "is" with a literal. Did you mean "=="?
    if len(relatedPhysioData) is 0:
    process_fMRI.py:253: SyntaxWarning: "is not" with a literal. Did you mean "!="?
    if len(relatedPhysioFolder) is not 0:
    process_fMRI.py:77: DeprecationWarning: get_data() is deprecated in favor of get_fdata(), which has a more predictable return type. To obtain get_data() behavior going forward, use numpy.asanyarray(img.dataobj).

    • deprecated from version: 3.0
    • Will raise <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 5.0
      imgData = file_data.get_data()
      process_fMRI.py:46: DeprecationWarning: get_data() is deprecated in favor of get_fdata(), which has a more predictable return type. To obtain get_data() behavior going forward, use numpy.asanyarray(img.dataobj).

    • deprecated from version: 3.0

    • Will raise <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 5.0
      imgTemp = data.get_data()
      Traceback (most recent call last):
      File "process_fMRI.py", line 292, in <module>
      mcfFile_name = startProcess(input)
      File "process_fMRI.py", line 250, in startProcess
      relatedPhysioFolder = copyRawPhysioData(Rawfile_name,i32_Path)
      File "process_fMRI.py", line 176, in copyRawPhysioData
      scanNo = file_name.split('.')[-4]+'.I32'
      IndexError: list index out of range

    The last line: IndexError: list index out of range, i have tried to figure out the reasons but no luck, hope you have some thoughts for that.

    Thanks

    Alex

    aswendtlab
    @aswendtlab
    Hi Alex, thanks for using AIDAmri. the problem is probably due to the missing or different physio data. We can have a look into this. Please send example data (T2+fMRI). Markus
    Alex Li
    @Alex_X_Li_twitter
    Hello Markus, thanks for the quick reply. I tried the sample dataset (T2w and fMRI, no Physico data), the program had no question to pass the test. My data were acquired using PV6, T2: 0.1x0.1x0.5mm^3, fMRI, 0.2x0.2x0.5mm^3, 31 slices for both T2 and fMRI. 600 volume for fMRI. Wondering How to send the dataset to you? Alex
    Markus Aswendt
    @maswendt
    The repetitions are quite high (which is of course good), not sure if that produces an error. I will check
    Alex Li
    @Alex_X_Li_twitter
    Hi Markus, just sent you an email (and link) to download the data. I have tried using 105 volumes as the example data, but same error every time. Wonder whether the fmri SNR is not high enough? Alex
    2 replies
    Markus Aswendt
    @maswendt
    image.png
    I was not able to completely reproduce you error but it is definityl an issue with the missing physio folder which is producing the problem. Short solution to this: in process_fMRI.py (see screenshot). With that your data is processed correctly. Please file an issue on GitHub so that we can solve the problem for the next version correctly.
    Markus Aswendt
    @maswendt
    One more thing: for process_fMRI.py it is important to make use of the optional arguments. optional arguments (especially TR):
    -h, --help show this help message and exit
    -t TR, --TR TR Current TR value
    -c CUTOFF_SEC, --cutOff_sec CUTOFF_SEC
    High-pass filter cutoff sec
    -f FWHM, --FWHM FWHM Full width at half maximum
    -s, --slice_time Perform a slice time correction
    A more general note to all: check the result of bet and registration which is required for all processing steps!
    MarkPlatt
    @MarkPlatt

    Hello Aida Experts.

    I have successfully been able to run the T2 and DTI Preprocessing Steps, but am now stuck during the DTI Postprocessing stage. I can't get the final step to work with either the test dataset nor my own data.

    When using AIDA's GUI, I select the data, it seems to run initially, it creates folders for src and fib tracking, but then stops, the DSI Studio GUI opens and nothing else happens. This is my terminal when this occurs (edited to fit this comment box):

    python dsi_main.py -i/home/mark/Desktop/AIDAmri/testData/DTI/testData.7.1.nii.gz
    fslsplit /home/mark/Desktop/AIDAmri/testData/DTI/fslScaleTemp.nii.gz testData -z
    For all slices ...
    mcflirt -in /home/mark/Desktop/AIDAmri/bin/3.2_DTIConnectivity/testData0000.nii.gz -out /home/mark/Desktop/AIDAmri/testData/DTI/mcf_Folder/testData0000.nii.gz -plots
    mcflirt -in /home/mark/Desktop/AIDAmri/bin/3.2_DTIConnectivity/testData0001.nii.gz -out /home/mark/Desktop/AIDAmri/testData/DTI/mcf_Folder/testData0001.nii.gz -plots
    mcflirt -in /home/mark/Desktop/AIDAmri/bin/3.2_DTIConnectivity/testData0002.nii.gz -out /home/mark/Desktop/AIDAmri/testData/DTI/mcf_Folder/testData0002.nii.gz -plots

    [Continues until]

    fslmerge -z /home/mark/Desktop/AIDAmri/testData/DTI/testData_mcf.nii.gz /home/mark/Desktop/AIDAmri/testData/DTI/mcf_Folder/testData0000.nii.gz /home/mark/Desktop/AIDAmri/testData/DTI/mcf_Folder/testData0001.nii.gz /home/mark/Desktop/AIDAmri/testData/DTI/mcf_Folder/testData0002.nii.gz /home/mark/Desktop/AIDAmri/testData/DTI/mcf_Folder/testData0003.nii.gz

    [Then]

    Create directory "/home/mark/Desktop/AIDAmri/testData/DTI/src"
    Create directory "/home/mark/Desktop/AIDAmri/testData/DTI/fib_map"
    Generate src-File ~/Desktop/AIDAmri/dsistudio/dsi_studio
    --action=src --source=testData_mcf.nii.gz --output=/home/mark/Desktop/AIDAmri/testData/DTI/src/testData_mcf.nii.src.gz --b_table=/home/mark/Desktop/AIDAmri/lib/DTI_Jones30.txt:

    Then the GUI opens and nothing else happens, the folders remain empty. Any help you can give in overcoming this would be greatly appreciated.

    1 reply
    araikes
    @araikes
    Hi,
    I'm excited about this tool as a better option to what I'm currently using for mouse brain analyses. I'm trying to build this into a Singularity image for use on our HPC. Is there a particular release of DSI Studio that I need?
    4 replies