mkanai / fujiplot

:mount_fuji: Fuji plot—a circos representation of multiple GWAS results— :mount_fuji:
https://www.nature.com/articles/s41588-018-0047-6
GNU General Public License v3.0
73 stars 19 forks source link

Problems with running the script #4

Closed MuBulut closed 4 years ago

MuBulut commented 4 years ago

Hi, I was trying to reproduce your plots, with your data on Github, however it seems to not work.

I am running your current script on Github in Rstudio with only changing the line 13 into :

CIRCOS_PATH = "C:/Users/bulut/Desktop/Fuji_Plot/circos-0.69-6-kanai/bin/"

[where my circus is located; I am unsing the one that you provide on Github with the patch]

And I get following warning:

The following warning messages in line 42 & 43:

input_fname = normalizePath(args[1]) traitlist_fname = normalizePath(args[2])

Warning message: In normalizePath(path.expand(path), winslash, mustWork) : path[1]=NA

And therefore in the following steps at line 58 & 59 following error:

df = read.table(input_fname, T, sep = '\t', as.is = T, quote = '', comment.char = '')

traitlist = read.table(traitlist_fname, T, sep = '\t', as.is = T, quote = '', comment.char = '', fileEncoding='utf-8')

Error in file(file, "rt") : invalid 'description' argument

And followed with more errors originating I guess from upstream errors.

More information on circus and perl:

I am running the script on a windows machine.

So far, I installed circos, strawberry perl (incl. All the modules needed for circus via CPAN client).

BUT when I am trying to run circus via perl on CMD it shows an error in not able to find the config file.

I run following line in CMD:

C:\Strawberry\perl\bin>perl C:\Users\bulut\Desktop\Fuji_Plot\circos-0.69-6-kanai\bin\circos

CONFIGURATION FILE ERROR

Circos could not find the configuration file []. To run Circos, you need to

specify this file using the -conf flag. The configuration file contains all

the parameters that define the image, including input files, image size,

formatting, etc.

Thanks a lot, mustafa

mkanai commented 4 years ago

Hi Mustafa,

Would you mind providing how did you run the script? It seems like args are empty somehow. Also, I haven't tested on Windows...

MuBulut commented 4 years ago

Hi, I just loaded the fujiplot.R script in RStudio version 3.6.2 and run it there. Do I need to change the following line : args = file.path(script_dir, "input_example", c("input.txt", "traitlist.txt"))

according to the path where the files are located or does it fit when downloading the whole datafiles?

mkanai commented 4 years ago

I see. Would you mind trying the following on Terminal? Paths are automatically filled from args

Rscript fujiplot.R input_example/input.txt input_example/traitlist.txt output_example
MuBulut commented 4 years ago

I tried running in Windows Command prompt which lead to this output: atleast now it loads the input files, but still in the end [line 127] an error is occuring [see below]

`C:\Program Files\R\R-3.6.1\bin>Rscript C:\Users\bulut\Desktop\Fuji_Plot\fujiplot-master\fujiplot.R C:\Users\bulut\Desktop\Fuji_Plot\fujiplot-master\input_example\input.txt C:\Users\bulut\Desktop\Fuji_Plot\fujiplot-master\input_example\traitlist.txt C:\Users\bulut\Desktop\Fuji_Plot\fujiplot-master\output_example


Excluded 5 traits because of no significant SNPs (IVS,PW,LVM,LVMI,EA).

Generating configuration and data files for circos...

Calling circos to plot...

[1] 127 Warning message: In system(cmd) : 'C:/Users/bulut/Desktop/Fuji_Plot/circos-0.69-6-kanai/bin/' not found Warning messages: 1: In system(sprintf("mv %s %s", file.path(script_dir, "output", sprintf("circos.%s", : 'mv' not found 2: In system(sprintf("mv %s %s", file.path(script_dir, "output", sprintf("circos.%s", : 'mv' not found

Finished at 2020-07-20 18:45:06. `

mkanai commented 4 years ago

I think your circos path should be:

CIRCOS_PATH = "C:/Users/bulut/Desktop/Fuji_Plot/circos-0.69-6-kanai/bin/circos"

Thanks!

MuBulut commented 4 years ago

Thanks a lot Masahiro, I was now able to reproduce your fujiplot. Now I will try to adjust all files accordingly, to be able to run it for my bean dataset. I highly appreciate your support for helping me out. Mustafa

mkanai commented 4 years ago

No problem at all. Please let me know if you have any other questions!