Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error generating phenotype: running phenoalg #24

Open
cro280 opened this issue Mar 27, 2023 · 1 comment
Open

Error generating phenotype: running phenoalg #24

cro280 opened this issue Mar 27, 2023 · 1 comment

Comments

@cro280
Copy link

cro280 commented Mar 27, 2023

Hi guys, I'm very excited about the work that you are doing and all the potential that comes with HAPNEST.

I'm going through your tutorial now, but I am running into an error in the step for generating phenotype.

I run the commands

  1. singularity exec --bind data/:/data/ containers/intervene-synthetic-data_latest.sif generate_geno 1 data/config.yaml
  2. singularity exec --bind data/:/data/ containers/intervene-synthetic-data_latest.sif generate_pheno data/config.yaml

The only difference I made to the files supplied in the tutorial was to the config.yaml file where I changed the chromosome to-be generated to 19 instead of 1.

However, when I try to run the generate phenotype command I get this error:

vagrant@vagrant:~$ singularity exec --bind data/:/data/ containers/intervene-synthetic-data_latest.sif generate_pheno data/config.yaml
[ Info: Creating output directories
Running pipelines:
optimisation => false
phenotype => true
evaluation => false
preprocessing => false
genotype => false
[ Info: Using 1 thread/s for computations
[ Info: Generating synthetic phenotype data
[ Info: Processing chromosome 19
[ Info: No superpopulation specified
ERROR: LoadError: failed process: Process(phenoalg data/outputs/test/test_chr.parfile 123, ProcessSignaled(11)) [0]

Stacktrace:
[1] pipeline_error
@ ./process.jl:525 [inlined]
[2] run(::Cmd; wait::Bool)
@ Base ./process.jl:440
[3] run
@ ./process.jl:438 [inlined]
[4] synthetic_pheno(filepaths::Filepaths, options::Dict{Any, Any}, genetics_prefix::String, out_prefix::String, seed::Int64, chromosome::Int64)
@ Main /opt/intervene/scripts/algorithms/phenotype/phenotype_algorithm.jl:54
[5] create_synthetic_phenotype(options::Dict{Any, Any})
@ Main /opt/intervene/scripts/algorithms/phenotype/phenotype_algorithm.jl:79
[6] macro expansion
@ /opt/intervene/scripts/run_program.jl:39 [inlined]
[7] macro expansion
@ ./timing.jl:287 [inlined]
[8] run_program(pipelines::Dict{String, Bool}, options::Dict{Any, Any})
@ Main /opt/intervene/scripts/run_program.jl:38
[9] main()
@ Main /opt/intervene/scripts/run_program.jl:113
[10] top-level scope
@ /opt/intervene/scripts/run_program.jl:117
in expression starting at /opt/intervene/scripts/run_program.jl:117

Any idea on what might be causing this and what I can try to do differently?

best,
Cato

@sophiewharrie
Copy link
Collaborator

Hi, apologies for the delay in responding to your question. The code appears to crash when it tries to run the phenoalg command - this is a standalone C program that can also be run outside of the main Julia pipeline (see here for documentation). I'm unable to replicate the error you describe but I would suggest trying out the following steps to help better understand the issue:

  1. Check if the code generated the file data/outputs/test/test_chr.parfile before it crashed and check that the contents of the file matches the output below:
nPopulation 6
nTrait 1
a -0.4
b -1
c 0.5
nComponent 1
PropotionGeno 0.1,0.1,0.1,0.1,0.1,0.1
PropotionCovar 0,0,0,0,0,0
SampleList data/outputs/test/test_chr-19.sample
Polygenicity 0.005
Pleiotropy 1
TraitCorr 1
PopulationCorr 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Prevalence 0.5,0.5,0.5,0.5,0.5,0.5
Reference data/inputs/processed/1KG+HGDP/Africa.Annot
GenoFile data/outputs/test/test_chr
Output data/outputs/test/test_chr
CompWeight 1,5,10
  1. Start a shell inside of the container image:
singularity shell --bind data/:/data/,$PWD containers/intervene-synthetic-data_latest.sif
  1. Run the command to generate phenotypes:
phenoalg data/outputs/test/test_chr.parfile 123

If this still doesn't work, hopefully you will at least get a more informative error message to understand what the problem may be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants