LTS5 / cmp_nipype

This repository is meant to host a beta version for the future release of the ConnectomeMapper.
Other
13 stars 5 forks source link

Parcellation error #23

Open MarcRamos opened 10 years ago

MarcRamos commented 10 years ago

I have selected Lausanne2008 parcellation and when the program looks for this file: MRISread(/home/marc/TOC/TOC_cmp2//home/marc/TOC/TOC_cmp2/FREESURFER /surf/rh.smoothwm): could not open file

It says: No such file or directory mris_ca_label: could not read surface file /home/marc/TOC/TOC_cmp2//home/marc/TOC/TOC_cmp2/FREESURFER/surf/rh.smoothwm for /home/marc/TOC/TOC_cmp2/FREESURFER

The error seems to be that it is not structuring the path well, it repeats the base directory twice. Do you know why this is happening?

Thank you! Marc.

davidrs06 commented 10 years ago

Hello Marc,

Do you also get this error if you select the "Use existing freesurfer data" option in the segmentation stage ?

MarcRamos commented 10 years ago

I think the segmentation stage failed aswell and I get this error: Command:\nrecon-all -i /home/marc/TOC/TOC_cmp2/NIPYPE/diffusion_pipeline/segmentation_stage/mgz_convert/T1.mgz -all -subjid /home/marc/TOC/TOC_cmp2/FREESURFER -sd /home/marc/TOC/TOC_cmp2\nStandard output:\n\nWARNING: tcsh v6.17.06 has an exit code bug! Please update tcsh!\n\nERROR: You are trying to re-run an existing subject with (possibly)\n new input data (-i). If this is truly new input data, you should delete\n the subject folder and re-run, or specify a different subject name.\n If you are just continuing an analysis of an existing subject, then \n omit all -i flags.\nStandard error:\n\nReturn code: 1', '\nInterface ReconAll failed to run.

Is the same error I had before, didn't you have fixed this? I did download the last commit now and I still have it.

2014-02-03 davidrs06 notifications@github.com:

Hello Marc,

Do you also get this error if you select the "Use existing freesurfer data" option in the segmentation stage ?

Reply to this email directly or view it on GitHubhttps://github.com/LTS5/cmp_nipype/issues/23#issuecomment-33937483 .

davidrs06 commented 10 years ago

Sorry, I have to recompute the Freesurfer data, this will take a bit, I'll come back to you tomorrow...

MarcRamos commented 10 years ago

Ok, thank you David =)

2014-02-03 davidrs06 notifications@github.com:

Sorry, I have to recompute the Freesurfer data, this will take a bit, I'll come back to you tomorrow...

Reply to this email directly or view it on GitHubhttps://github.com/LTS5/cmp_nipype/issues/23#issuecomment-33942066 .

davidrs06 commented 10 years ago

Dear Marc,

Thanks for reporting the bug in the parcellation stage. There was indeed a redundancy in the input paths. I think it is fixed now in the last commit.

Now regarding the error for the segmentation step (Freesurfer complains that the "FREESURFER" folder already exists). Did the segmentation step complete ? You should have a file named "result_reconall.pklz" in the folder /NIPYPE/diffusion_pipeline/segmentation_stage/reconall. If not, then the segmentation stage might have failed for some reason. To check for errors you can look into the "Terminal output" section in the /NIPYPE/diffusion_pipeline/segmentation_stage/reconall/_report/report.rst file. Processes that ended without errors dispay a "recon-all -s FREESURFER finished without error at <Data&Time>" message at the end. Is it the case for you ?

Best regards, David

MarcRamos commented 10 years ago

Dear David, I tried to run and I got some errors, there were some write-protected folders now, I will start the process again and I will tell you when segmentation finishes. Thanks!

2014-02-04 davidrs06 notifications@github.com:

Dear Marc,

Thanks for reporting the bug in the parcellation stage. There was indeed a redundancy in the input paths. I think it is fixed now in the last commit.

Now regarding the error for the segmentation step (Freesurfer complains that the "FREESURFER" folder already exists). Did the segmentation step complete ? You should have a file named "result_reconall.pklz" in the folder /NIPYPE/diffusion_pipeline/segmentation_stage/reconall. If not, then the segmentation stage might have failed for some reason. To check for errors you can look into the "Terminal output" section in the /NIPYPE/diffusion_pipeline/segmentation_stage/reconall/_report/report.rst file. Processes that ended without errors dispay a "recon-all -s FREESURFER finished without error at " message at the end. Is it the case for you ?

Best regards, David

Reply to this email directly or view it on GitHubhttps://github.com/LTS5/cmp_nipype/issues/23#issuecomment-34082887 .

MarcRamos commented 10 years ago

Had to add -cw256 option in segmentation step to run it. Then in failed because the FREESURFER folder exists, I would check before starting segmentation stage if the folder exists, and delete it, and somehow avoid the problem again.

I tell you if it finishes =)

2014-02-05 Marc Ramos m4rklar@gmail.com:

Dear David, I tried to run and I got some errors, there were some write-protected folders now, I will start the process again and I will tell you when segmentation finishes. Thanks!

2014-02-04 davidrs06 notifications@github.com:

Dear Marc,

Thanks for reporting the bug in the parcellation stage. There was indeed a redundancy in the input paths. I think it is fixed now in the last commit.

Now regarding the error for the segmentation step (Freesurfer complains that the "FREESURFER" folder already exists). Did the segmentation step complete ? You should have a file named "result_reconall.pklz" in the folder /NIPYPE/diffusion_pipeline/segmentation_stage/reconall. If not, then the segmentation stage might have failed for some reason. To check for errors you can look into the "Terminal output" section in the /NIPYPE/diffusion_pipeline/segmentation_stage/reconall/_report/report.rst file. Processes that ended without errors dispay a "recon-all -s FREESURFER finished without error at " message at the end. Is it the case for you ?

Best regards, David

Reply to this email directly or view it on GitHubhttps://github.com/LTS5/cmp_nipype/issues/23#issuecomment-34082887 .

MarcRamos commented 10 years ago

Segmentation did end well, but parcellation still gives this error, duplicate path name. MRISread(_/home/marc/TOC/TOC_cmp2//home/marc/TOC/TOC_cmp2/_FREESURFER/surf/rh.smoothwm): could not open file

After that I put the option: use existing freesurfer data. Now the parcellation stage seems to continue nicely. I let you know if it finishes well.

Cheers, Marc.

2014-02-05 11:46 GMT+01:00 Marc Ramos m4rklar@gmail.com:

Had to add -cw256 option in segmentation step to run it. Then in failed because the FREESURFER folder exists, I would check before starting segmentation stage if the folder exists, and delete it, and somehow avoid the problem again.

I tell you if it finishes =)

2014-02-05 Marc Ramos m4rklar@gmail.com:

Dear David,

I tried to run and I got some errors, there were some write-protected folders now, I will start the process again and I will tell you when segmentation finishes. Thanks!

2014-02-04 davidrs06 notifications@github.com:

Dear Marc,

Thanks for reporting the bug in the parcellation stage. There was indeed a redundancy in the input paths. I think it is fixed now in the last commit.

Now regarding the error for the segmentation step (Freesurfer complains that the "FREESURFER" folder already exists). Did the segmentation step complete ? You should have a file named "result_reconall.pklz" in the folder /NIPYPE/diffusion_pipeline/segmentation_stage/reconall. If not, then the segmentation stage might have failed for some reason. To check for errors you can look into the "Terminal output" section in the /NIPYPE/diffusion_pipeline/segmentation_stage/reconall/_report/report.rst file. Processes that ended without errors dispay a "recon-all -s FREESURFER finished without error at " message at the end. Is it the case for you ?

Best regards, David

Reply to this email directly or view it on GitHubhttps://github.com/LTS5/cmp_nipype/issues/23#issuecomment-34082887 .

MarcRamos commented 10 years ago

Hey, it finished correctly! The results are really nice. Could you tell me when the bug is fixed,please? Thanks a lot! Marc

2014-02-06 9:44 GMT+01:00 Marc Ramos m4rklar@gmail.com:

Segmentation did end well, but parcellation still gives this error, duplicate path name. MRISread(_/home/marc/TOC/TOC_cmp2//home/marc/TOC/TOC_cmp2/_FREESURFER/surf/rh.smoothwm): could not open file

After that I put the option: use existing freesurfer data. Now the parcellation stage seems to continue nicely. I let you know if it finishes well.

Cheers, Marc.

2014-02-05 11:46 GMT+01:00 Marc Ramos m4rklar@gmail.com:

Had to add -cw256 option in segmentation step to run it. Then in failed

because the FREESURFER folder exists, I would check before starting segmentation stage if the folder exists, and delete it, and somehow avoid the problem again.

I tell you if it finishes =)

2014-02-05 Marc Ramos m4rklar@gmail.com:

Dear David,

I tried to run and I got some errors, there were some write-protected folders now, I will start the process again and I will tell you when segmentation finishes. Thanks!

2014-02-04 davidrs06 notifications@github.com:

Dear Marc,

Thanks for reporting the bug in the parcellation stage. There was indeed a redundancy in the input paths. I think it is fixed now in the last commit.

Now regarding the error for the segmentation step (Freesurfer complains that the "FREESURFER" folder already exists). Did the segmentation step complete ? You should have a file named "result_reconall.pklz" in the folder /NIPYPE/diffusion_pipeline/segmentation_stage/reconall. If not, then the segmentation stage might have failed for some reason. To check for errors you can look into the "Terminal output" section in the /NIPYPE/diffusion_pipeline/segmentation_stage/reconall/_report/report.rst file. Processes that ended without errors dispay a "recon-all -s FREESURFER finished without error at " message at the end. Is it the case for you ?

Best regards, David

Reply to this email directly or view it on GitHubhttps://github.com/LTS5/cmp_nipype/issues/23#issuecomment-34082887 .

davidrs06 commented 10 years ago

The new commit now deletes the FREESURFER folder when re-running the analysis (if the segmentation failed previously). Can you try it and tell me if everything is ok now ? The repeated path issue should also be fixed.

MarcRamos commented 10 years ago

Hello,

I am on it! Thanks.

Marc.

2014-02-10 14:01 GMT+01:00 davidrs06 notifications@github.com:

The new commit now deletes the FREESURFER folder when re-running the analysis (if the segmentation failed previously). Can you try it and tell me if everything is ok now ? The repeated path issue should also be fixed.

Reply to this email directly or view it on GitHubhttps://github.com/LTS5/cmp_nipype/issues/23#issuecomment-34628253 .

MarcRamos commented 10 years ago

Hi again, unfortunately, the parcellation error is still there. MRISread(/home/marc/TOC/TOC_cmp2//home/marc/TOC/TOC_cmp2/FREESURFER/surf/rh.smoothwm): could not open file. No such file or directory.

For this project I will use a different parcellation scheme (not Lausanne2008), I have the nifti file but not the graphml. Is there any example of one used for connectome mapper so I could make my own? In the website instrucionts it says:

"The Graphml file must contain at least a "dn_correspondence_id" field for each node. This field should contain the region's label in the nifti file. "

So with somethin like this:

1 2

Can it be done? Thanks!! Marc

2014-02-10 14:16 GMT+01:00 Marc Ramos m4rklar@gmail.com:

Hello,

I am on it! Thanks.

Marc.

2014-02-10 14:01 GMT+01:00 davidrs06 notifications@github.com:

The new commit now deletes the FREESURFER folder when re-running the

analysis (if the segmentation failed previously). Can you try it and tell me if everything is ok now ? The repeated path issue should also be fixed.

Reply to this email directly or view it on GitHubhttps://github.com/LTS5/cmp_nipype/issues/23#issuecomment-34628253 .

davidrs06 commented 10 years ago

Hello Marc,

Can you check what are the "subject_id" and "subjects_dir" in the "execution outputs" section of the NIPYPE/diffusion_pipeline/segmentation_stage/reconall/_report/report.srt" file ?

Also, line 66 in parcellation.py should have "os.path.basename" somewhere. To find the parcellation.py file that is actually used during the execution of cmp, open python and type "import cmp.stages.parcellation.parcellation as parcellation" and "parcellation.file". The parcellation.py file should be in the same folder as the .pyc file. Do the .py file has the "os.path.basename" call in line 66 ?

For the graphml file, try rather the following syntax:

1 2 " Also, if you intend to save the network as graphml files, the "dn_fsname", "dn_hemisphere", "dn_name" and "dn_region" keys are required. The graphml files that we use for the native freesurfer and Lausanne2008 parcellations are available in cmtklib/data/parcellation folder. You can use them as example. One last comment, the custom parcellation is currently not intended to be used on Freesurfer data processed by the CMP. If you want to use a custom graphml file on the freesurfer atlas, you should compute the freesurfer atlas separately and use it as a custom atlas (set the path in the nifti variable of the parcellation stage). Use of custom graphml files with Freesurfer processing might be implementable in further commits. Let me know what you have regarding the subjects_dir and subject_id, and if os.path.basename is indeed in the parcellation.py file. Cheers, David
MarcRamos commented 10 years ago

Line 66

(inputnode,parc_node,[("subjects_dir","subjects_dir"),("subject_id","subject_id")]),

2014-02-11 17:42 GMT+01:00 davidrs06 notifications@github.com:

Hello Marc,

Can you check what are the "subject_id" and "subjects_dir" in the "execution outputs" section of the NIPYPE/diffusion_pipeline/segmentation_stage/reconall/_report/report.srt" file ?

Also, line 66 in parcellation.py should have "os.path.basename" somewhere. To find the parcellation.py file that is actually used during the execution of cmp, open python and type "import cmp.stages.parcellation.parcellation as parcellation" and "parcellation.file". The parcellation.py file should be in the same folder as the .pyc file. Do the .py file has the "os.path.basename" call in line 66 ?

For the graphml file, try rather the following syntax:

12

Also, if you intend to save the network as graphml files, the "dn_fsname", "dn_hemisphere", "dn_name" and "dn_region" keys are required. The graphml files that we use for the native freesurfer and Lausanne2008 parcellations are available in cmtklib/data/parcellation folder. You can use them as example.

One last comment, the custom parcellation is currently not intended to be used on Freesurfer data processed by the CMP. If you want to use a custom graphml file on the freesurfer atlas, you should compute the freesurfer atlas separately and use it as a custom atlas (set the path in the nifti variable of the parcellation stage). Use of custom graphml files with Freesurfer processing might be implementable in further commits.

Let me know what you have regarding the subjects_dir and subject_id, and if os.path.basename is indeed in the parcellation.py file.

Cheers, David

Reply to this email directly or view it on GitHubhttps://github.com/LTS5/cmp_nipype/issues/23#issuecomment-34773348 .

davidrs06 commented 10 years ago

Good evening Marc,

It seems that you don't have the last commit of the CMP installed. Can you download the last commit and run "sudo python setup.py install" ? This should add the os.path.basename call in line 66, which trims out the path to the FREESURFER directory before concatenating with the subjects_dir variable.

Let me know if it works.

Cheers, David

MarcRamos commented 10 years ago

From here https://github.com/LTS5/nipype ? I have downloaded the last commit but the line 66 is still the same.

2014-02-12 13:26 GMT+01:00 davidrs06 notifications@github.com:

Good evening Marc,

It seems that you don't have the last commit of the CMP installed. Can you download the last commit and run "sudo python setup.py install" ? This should add the os.path.basename call in line 66, which trims out the path to the FREESURFER directory before concatenating with the subjects_dir variable.

Let me know if it works.

Cheers, David

Reply to this email directly or view it on GitHubhttps://github.com/LTS5/cmp_nipype/issues/23#issuecomment-34863858 .

davidrs06 commented 10 years ago

From here : https://github.com/LTS5/cmp_nipype

MarcRamos commented 10 years ago

Hi there,

I found the graphml you told me: https://github.com/LTS5/cmp_nipype/blob/master/cmtklib/data/parcellation/lausanne2008/resolution83/resolution83.graphml

I am searching over the internet the AAL (90 regions) graphml but I cannot find it. As it is a commonly used parcellation scheme I thought maybe you know where to find it or someone has it. Thanks, Marc.

2014-02-12 14:27 GMT+01:00 davidrs06 notifications@github.com:

From here : https://github.com/LTS5/cmp_nipype

Reply to this email directly or view it on GitHubhttps://github.com/LTS5/cmp_nipype/issues/23#issuecomment-34868108 .

davidrs06 commented 10 years ago

Sorry, I wasn't able to find it either, I'm afraid you'll have to write it yourself... If you don't need to save the connectivity matrices as graphml files, you can write a file with the "dn_correspondence_id" attribute only, something like:

1 2 etc...

Although more complete information as node name, etc... might be helpful for further analysis, but it will take more time to write the graphml file.

Good luck !

David

MarcRamos commented 10 years ago

Thanks for the help!

2014-02-14 12:11 GMT+01:00 davidrs06 notifications@github.com:

Sorry, I wasn't able to find it either, I'm afraid you'll have to write it yourself... If you don't need to save the connectivity matrices as graphml files, you can write a file with the "dn_correspondence_id" attribute only, something like:

1 2 etc...

Although more complete information as node name, etc... might be helpful for further analysis, but it will take more time to write the graphml file.

Good luck !

David

Reply to this email directly or view it on GitHubhttps://github.com/LTS5/cmp_nipype/issues/23#issuecomment-35074948 .