shiny install error

Thank you Paul.
It works perfectly now.
Another question is about the following error while running this command @afni_R_package_install -shiny -circos

"Fatal error: cannot open file ‘/usr/bin/shiny/misc/OmicCircos_pkg_install.R’: No such file or directory”

Please let me know how to rectify it.


Hi, Naveed-

This is a separate question, so I have forked it to a separate discussion thread.

I will ping someone else who knows more about Shiny on this.


Thank you Paul

Hi AFNI experts,
I am still waiting for the response on this question.

Thank you.

I am certainly no expert on this either, but you can see if you can install these two packages - shiny and circos inside R. Start R with just “R” on the command line, then install packages with “install.packages(“shiny”)” and then similarly for circos.

If this doesn’t work inside R, then update your version of R to a recent version (OS specific instructions). Update the installed packages to the most recent versions.

update.packages(checkBuilt=TRUE, ask=FALSE)

Sorry for the delay…
What operating system and afni version are you using?

The @afni_R_package_install looks for the afni binaries folder and the “shiny” subdirectory in there to run OmicCircos_pkg_install.R for the -circos option.
It seems like your main afni GUI program is in /usr/bin/ but the other afni files are elsewhere.
I can modify the shiny programs to look elsewhere for the shiny subdirectory if not found, but in the meantime, you can run this:

In R you can run the following:
For the -shiny option:


for the -circos:


You may run into the same problem actually running the shiny programs as they also look for the shiny folders in the subdirectory of the afni binary folder.
So it would be good to know what operating system and operating system you are running so I can fix it more permanently.

And what shiny program are you trying to run? With the -circos, do you want to run the FATCAT_matplot program?
If so, you should be able to get around the problem by finding the “shiny/FATCAT_matplot_shiny” folder wherever your afni installation lives.
Then you can start FATCAT_matplot like this:

FATCAT_matplot -ShinyFolder <path_to_afni>/shiny/FATCAT_matplot_shiny my_corr_files

With <path_to_afni> being replaced by wherever your afni installation lives.
That folder should contain the shiny/FATCAT_matplot_shiny folders.
And my_corr_files being replaced by a folder with .netcc and/or .grid files.

Let me know how it goes.

Thanks, Justin

Hi Raj,

Thanks for your detailed reply, however, the problem is still not solved.
Following are my system details:

AFNI version: Precompiled binary Debian-x86_64-1-gnu: May 17 2018 (Version Debian-18.0.05+git24-gb25b21054~dfsg.1-1~nd17.10+1+nd18.04+1)
OS: Ubuntu 18.04.1 LTS
AFNI installation is here: /usr/lib/afni/
I ran the following command but it can not find FATCAT_matplot command in my computer, Shiny installation path is given in the command

$ FATCAT_matplot -ShinyFolder /home/naveed/R/x86_64-pc-linux-gnu-library/3.4/shiny/FATCAT_matplot_shiny netcorr_000.netcc
FATCAT_matplot: command not found

Then I tried this command below:
$ @FATCAT_matplot_shiny -ShinyFolder /home/naveed/R/x86_64-pc-linux-gnu-library/3.4/shiny/FATCAT_matplot_shiny netcorr_000.netcc

Error: netcorr_000.netcc does not exist.

But it exists as you can see below

results$ @FATCAT_matplot_shiny -ShinyFolder /home/naveed/R/x86_64-pc-linux-gnu-library/3.4/shiny/FATCAT_matplot_shiny
netcorr_000.netcc netcorr_000.netts

Please let me know how to make it work.

Getting close.
That looks like an old version of afni, but that should be fine.
(I dropped the @ in later versions because of osx tab completion failures…)

The program will look for a folder containing the .netcc files.
Try just having the last argument point to the folder instead of the files.
There was a bug some time ago that caused the program to choke if there were non matrix type files in the folder.
It was fixed awhile back so let me know if that happens and I can get you a work around.
Otherwise it is best to update afni.

thanks, Justin

Hi Justin,
Thanks for your reply.

It doesn’t work even with the folder path for .netcc files

naveed@cmfisher:/data/data05/naveed/1.Projects/7.MCSA_rs-fMRI$ @FATCAT_matplot_shiny -ShinyFolder /home/naveed/R/x86_64-pc-linux-gnu-library/3.4/shiny BS0001MC_20180315.results/netcorr_000.netcc

Error: BS0001MC_20180315.results/netcorr_000.netcc does not exist.

This file exists and I already used the .netcc file to generate the connectivity matrix with the following command -m netcorr_000.netcc -P “FZ” --A_plotmin=0.27 --B_plotmax=1 --Tight_layout_on --dpi_file=75 -L 2 -d 300 -S 2

Is there any way to get it working without updating the AFNI.


try this:

@FATCAT_matplot_shiny -ShinyFolder /home/naveed/R/x86_64-pc-linux-gnu-library/3.4/shiny/FATCAT_matplot_shiny BS0001MC_20180315.results

It is designed to read all of the matrix like files in that folder.
Also the -ShinyFolder needs the folder with the shiny app in it.
The -ShinyFolder is mainly for testing different versions of the app.

Here is a link to the latest FATCAT_matplot:

You can right click the link and “save link as”. But remember to remove the “.txt” extension.
You should be able to put it in the same location of your current @FATCAT_matplot and use the new one instead.
It should find the shiny/FATCAT_matplot_shiny folder correctly for your system.

Let me know if either works for you.
Thanks, Justin

naveed@cmfisher:/data/data05/naveed/1.Projects/7.MCSA_rs-fMRI$ @FATCAT_matplot_shiny -ShinyFolder /home/naveed/R/x86_64-pc-linux-gnu-library/3.4/shiny/FATCAT_matplot_shiny BS0001MC_20180315.results
[1] 20006
naveed@cmfisher:/data/data05/naveed/1.Projects/7.MCSA_rs-fMRI$ Error in shinyAppDir(x) : App dir must contain either app.R or server.R.
Calls: … as.shiny.appobj → as.shiny.appobj.character → shinyAppDir
Execution halted

Still not working

This folder seems to be wrong:
That does not seem to be one of our folders. It looks like an R library folder.

Were you able to download the new FATCAT_matplot?
It should find the correct folder for you now.
If that doesn’t work, I can send you the most up to date FATCAT_matplot_shiny folder.
thanks, Justin

I have installed the latest version of AFNI now, but still error is same, please see below

naveed@cmfisher:/data/data05/naveed/1.Projects/7.MCSA_rs-fMRI/BS0001MC_20180315.results$ /data/data02/vfonov/AFNI/abin/FATCAT_matplot -ShinyFolder /home/naveed/R/x86_64-pc-linux-gnu-library/3.4/shiny/FATCAT_matplot_shiny /data/data05/naveed/1.Projects/7.MCSA_rs-fMRI/BS0001MC_20180315.results
[1] 419
naveed@cmfisher:/data/data05/naveed/1.Projects/7.MCSA_rs-fMRI/BS0001MC_20180315.results$ Error in shinyAppDir(x) : App dir must contain either app.R or server.R.
Calls: … as.shiny.appobj → as.shiny.appobj.character → shinyAppDir
Execution halted

Can you please send me the updated folder?


If you are up to date on afni, you should be able to run the FATCAT_matplot without the -ShinyFolder option.
I can upload the current shiny folder, but you already have it and FATCAT_matplot will find it by default.

FATCAT_matplot  /data/data05/naveed/1.Projects/7.MCSA_rs-fMRI/BS0001MC_20180315.results

And the tutorial is here:
Let me know how it goes.

Thanks, Justin

Thanks Justin.

It start working now.