XiaoleiLiuBio / G2P

G2P: A Genome-Wide-Association-Study Simulation Tool for Genotype Simulation, Phenotype Simulation, and Power Evaluation
https://github.com/XiaoleiLiuBio/G2P
113 stars 11 forks source link

No output and no error #7

Open richelbilderbeek opened 3 years ago

richelbilderbeek commented 3 years ago

Dear G2P maintainer,

I would like to mention unexpected behavior, in which G2P produces no output files and no error. I suggest it should give an error.

I can successfully run the examples to simulate phenotypes as shown at https://github.com/XiaoleiLiuBio/G2P#linuxmac-3 :

cp ../data/AG.map . ; java -jar kG2P.jar --ped ../data/AG.ped --outgen my_output --rep 100 --dis geo 0.99 --h2 0.5 --nqtn 100 --QTNarea 1-500,1000-1500

Note that I copy the AG.map file from the data folder and use the AG.ped file which is present there as well. The output is clear:

Phenotype simulation
Congratulations! Simulation files are generated successfully!

Now, I do the same thing without the .ped file:

richel@N141CU:~/GitHubs/G2P/kG2P_linux_x86_64$ cp ../data/AG.map . ; java -jar kG2P.jar --outgen my_output_again --rep 100 --dis geo 0.99 --h2 0.5 --nqtn 100 --QTNarea 1-500,1000-1500

Which produces no output. I guess that that file is really important, so I expect an error message in text or as an exit code.

I check the exit code of the program:

echo $?

Which returns:

0

Zero is the exit code if a program ends OK, so, also here, the program signals that everything went fine.

Looking at all content of the my_output_again folder ...

find my_output_again/

... shows that no files have been created:

my_output_again/
my_output_again/210510104415

So, no files, no error, no output.

I assume I should have received an error message.

I suggest that G2P gives a proper error message when it is asked to simulate phenotypes without a pedigree file, as well as have a non-zero exit code.