Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRead in data from getCausalSNPs() #10
Comments
|
Hi, Hannah, no worries! I found the problem!! I'm posting it here in case other people are wondering. (feel free to close the issue) It turns out only random seed 1234 is the problem. I tried 123 and 12345, they both gave me correct format. That's the reason why I need to run twice to get the correct format because the random seed for the second time is not 1234 anymore. The one with random seed 1234 will not work! I hope these are not confusing to people and feel free to comment if you have any. |
|
Hi Blair, thank you for pointing me to this issue and providing the sample data! The problem occurred because getCausalSNPs was not designed to handle a header line when sampling from a delimited file:
The seed you choose at random happened to lead to sampling of the Thank you for raising this issue, |
|
Latest release including this fix on CRAN (v0.3.3), closing this now. |
Hi, Hannah,
Sorry to bother you again. I encountered a problem when reading data from getCausalSNPs command. My R version is 3.5.0. It seems that I must run the same command twice to get the correct format that I want it to be. To give you an idea what I have done:
library(PhenotypeSimulator)
set.seed(1234)
causalSNPsFromLines <- getCausalSNPs(10000,NrCausalSNPs=10,chr=22,genoFilePrefix="test_time_",genoFileSuffix="_10000_case_maf0.01_ld0.2_100.recodeA.raw.transpose",format="delim",delimiter=" ")
First round output:
Of which I don't want the quote and the id number twice.
If I run the exact same command again, I got the correct format like this:
I hate to run the exact same command twice to get what I want. Just wanted to know if you have encountered this before. I have uploaded my data to github in case you wanted to look at or test it:
https://github.com/blairzhang126/phenosim-sampledata (it's a space-delimiter file.)
Best,
Blair