Coder Social home page Coder Social logo

genomics-research's Introduction

NOTE: the content of this research code repository (i) is not intended to be a
medical device; and (ii) is not intended for clinical use of any kind, including
but not limited to diagnosis or prognosis.

genomics-research's People

Contributors

cmclean avatar fhormoz avatar justincosentino avatar tedyun avatar yuchen-95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

genomics-research's Issues

ValueError for non-integer FIDs / IIDs

Hi,

I'm encountering the following error when trying to run DeepNull:

ValueError: invalid literal for int() with base 10 (see screenshot)

The offending line seems to be

if (values[mask] == values[mask].astype(int)).all():
.

I guess it's a remnant from all person IDs in the UK Biobank being integers. I suspect I'm not the only one who will run into this problem, though, so it might be worthwhile to allow for non-integer FIDs/IIDs.

image

Model configuration is nonetype

Hi,

I am running DeepNull with my own phenocovar file with the following command:

python -m deepnull.main \
  --input_tsv="/home/usr/folder/DeepNull/my_phenocovar.tsv" \
  --output_tsv="/home/usr/folder/DeepNull/my_phenocovar_output.tsv" \
  --target="Pheno" \
  --covariates="Sex,PC1,PC2,PC3,PC4,PC5,PC6,PC7,PC8,PC9,PC10"

The columns of the file my_phenocovar.tsv are the folowing and I don't have GPU.

FID	IID	Pheno	Sex	PC1	PC2	PC3	PC4	PC5	PC6	PC7	PC8	PC9	PC10

Running the model with the defeault settings gives me this error

I0118 10:17:24.925369 139753410072768 main.py:72] Loading data from /home/usr/folder/DeepNull/my_phenocovar.tsv
Traceback (most recent call last):
  File "/data/usr/conda/envs/deepnull/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/data/usr/conda/envs/deepnull/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/data/usr/conda/envs/deepnull/lib/python3.8/site-packages/deepnull/main.py", line 114, in <module>
    app.run(main)
  File "/data/usr/conda/envs/deepnull/lib/python3.8/site-packages/absl/app.py", line 312, in run
    _run_main(main, args)
  File "/data/usr/conda/envs/deepnull/lib/python3.8/site-packages/absl/app.py", line 258, in _run_main
    sys.exit(main(argv))
  File "/data/usr/conda/envs/deepnull/lib/python3.8/site-packages/deepnull/main.py", line 76, in main
    if _MODEL_CONFIG.value is None:
AttributeError: 'NoneType' object has no attribute 'value'

It seems as if DeepNull cannot detect a model configuration file, so I have tried to specify it explicitly as such, but this gives the exact same error message:

python -m deepnull.main \
  --model_config="/data/usr/conda/envs/deepnull/lib/python3.8/site-packages/deepnull/config.py:deepnull" \
  --input_tsv="/home/usr/folder/DeepNull/my_phenocovar.tsv" \
  --output_tsv="/home/usr/folder/DeepNull/my_phenocovar_output.tsv" \
  --target="Pheno" \
  --covariates="Sex,PC1,PC2,PC3,PC4,PC5,PC6,PC7,PC8,PC9,PC10"

Does anyone know what is going on here, and why the model configuration keep getting defines as a nontype?

Categorical covariates with more than two levels

Hi,

My input file contains several categorical covariates with more than two levels. For example, the covariate smoker has three levels: "non-smoker", "past smoker" and "current smoker". When running DeepNull, I got this error:

Cast string to float is not supported

After a long search, I realised that only numbers are accepted in regression. It seems that converting strings to numbers has not been embedded in DeepNull yet. Therefore, my questions are:

  • If I want to include categorical covariates with more than two levels, should I recode these categorical covariates before running DeepNull?
  • If yes, which encoding type is more proper for unordered categorical variable, one-hot encoding, dummy encoding or anything else?

Thanks!

Using deepnull with multiple phenotypes

Hi,
Some GWAS tools like plink2 recommend running with multiple phenotypes at once rather than multiple runs of single phenotypes.

If you have multiple quantitative phenotypes with either no missing values, or missing values for the same samples, analyze them all in a single --glm run!

In the deepnull paper as well, there are multiple listed phenotypes tested (ALP, ALT, AST, etc.). It looks like the target flag only accepts a single value, so was this achieved by running multiple instances of deepnull on a per-phenotype basis? If so, is it possible to the concatenate the "phenoN_deepnull" covariates so e.g. plink2 can run with all at once, or would that introduce some bias?

The idea for say phenotypes pheno1, pheno2, pheno3 would be something like

for N in {1..3}
do
python -m deepnull.main \
  --input_tsv=/input/YOUR_PHENO${N}COVAR_TSV \
  --output_tsv=/output/YOUR_OUTPUT${N}_TSV \
  --target=pheno${N} \
  --covariates="age,sex,genotyping_array"
done
paste /input/ALL_COVAR_TSV $(cut -f last_column /output/YOUR_OUTPUT${N}_TSV )...) > COVARS_PLUS_DEEPNULL
plink2 ... --covar COVARS_PLUS_DEEPNULL

Best,
Alex

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.