Skip to content

Commit

Permalink
Updated readme and dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
msauria committed Jul 19, 2024
1 parent 3d8bd5d commit 3513894
Show file tree
Hide file tree
Showing 10 changed files with 172 additions and 158 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion bin/plot_genes.R
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ tidy_genes_in_region <- if(ann_type == "bcsq") {
# path = glue::glue("{analysis_trait}_{cq}_{sq}-{eq}_{ann_type}_genes_{args[5]}.tsv"))

write_tsv(tidy_genes_in_region,
file = glue::glue("{analysis_trait}_{cq}_{output_sq}-{output_eq}_{ann_type}_genes_{args[5]}.tsv"))
path = glue::glue("{analysis_trait}_{cq}_{output_sq}-{output_eq}_{ann_type}_genes_{args[5]}.tsv"))


for(r in 1:length(unique(ugly_genes_in_region$start_pos))){
Expand Down
18 changes: 18 additions & 0 deletions env/gcta.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM mambaorg/micromamba:1.5.0

COPY --chown=$MAMBA_USER:$MAMBA_USER gcta_conda.yml .

RUN micromamba install -n base -f gcta_conda.yml -y \
&& micromamba clean -a -y

ARG MAMBA_DOCKERFILE_ACTIVATE=1

USER root

RUN apt-get --allow-releaseinfo-change update && apt-get install -y procps && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

USER $MAMBA_USER

ENTRYPOINT source /usr/local/bin/_entrypoint.sh
13 changes: 13 additions & 0 deletions env/gcta_conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: base
channels:
- defaults
- bioconda
- r
- biobuilds
- conda-forge
dependencies:
- plink=1.90b6.12
- gcta
- bcftools
- tabix
- gsl==2.5
4 changes: 2 additions & 2 deletions env/nemascan.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM continuumio/miniconda
MAINTAINER Katie Evans <[email protected]>

COPY conda.yml .
COPY nemascan_conda.yml .
RUN \
conda env update -n root -f conda.yml \
conda env update -n root -f nemascan_conda.yml \
&& conda clean -a

RUN Rscript -e "install.packages('valr', dependencies=TRUE, repos='http://cran.us.r-project.org')"
Expand Down
File renamed without changes.
37 changes: 0 additions & 37 deletions env/nemascan_new.Dockerfile

This file was deleted.

215 changes: 132 additions & 83 deletions main.nf

Large diffs are not rendered by default.

32 changes: 2 additions & 30 deletions modules/mapping.nf
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,7 @@ process gcta_lmm_exact_mapping {
gcta64 --grm ${TRAIT}_gcta_grm \\
--pca 1 \\
--out ${TRAIT}_sparse_grm \\
--thread-num ${task.cpus}
gcta64 --mlma-loco \\
--grm ${TRAIT}_sparse_grm \\
--bfile ${TRAIT} \\
--out ${TRAIT}_lmm-exact \\
--pheno ${traits} \\
--maf ${params.maf} \\
--thread-num ${task.cpus}
--thread-num ${task.cpus}\
gcta64 --mlma-loco \\
--grm ${TRAIT}_sparse_grm \\
--bfile ${TRAIT} \\
Expand All @@ -137,13 +130,6 @@ process gcta_lmm_exact_mapping {
--pca 1 \\
--out ${TRAIT}_sparse_grm_inbred \\
--thread-num ${task.cpus}
gcta64 --fastGWA-lmm-exact \\
--grm-sparse ${TRAIT}_sparse_grm_inbred \\
--bfile ${TRAIT} \\
--out ${TRAIT}_lmm-exact_inbred \\
--pheno ${traits} \\
--maf ${params.maf} \\
--thread-num ${task.cpus}
gcta64 --fastGWA-lmm-exact \\
--grm-sparse ${TRAIT}_sparse_grm_inbred \\
--bfile ${TRAIT} \\
Expand Down Expand Up @@ -184,13 +170,6 @@ process gcta_lmm_exact_mapping_nopca {
--pheno ${traits} \\
--maf ${params.maf} \\
--thread-num ${task.cpus}
gcta64 --mlma-loco \\
--grm ${TRAIT}_sparse_grm \\
--bfile ${TRAIT} \\
--out ${TRAIT}_lmm-exact \\
--pheno ${traits} \\
--maf ${params.maf} \\
--thread-num ${task.cpus}
gcta64 --grm ${TRAIT}_gcta_grm_inbred \\
--make-bK-sparse ${params.sparse_cut} \\
Expand All @@ -203,13 +182,6 @@ process gcta_lmm_exact_mapping_nopca {
--pheno ${traits} \\
--maf ${params.maf} \\
--thread-num ${task.cpus}
gcta64 --fastGWA-lmm-exact \\
--grm-sparse ${TRAIT}_sparse_grm_inbred \\
--bfile ${TRAIT} \\
--out ${TRAIT}_lmm-exact_inbred \\
--pheno ${traits} \\
--maf ${params.maf} \\
--thread-num ${task.cpus}
"""
}

Expand All @@ -222,7 +194,7 @@ process gcta_intervals_maps {
publishDir "${params.out}/LOCO/Mapping/Processed", mode: 'copy', pattern: "*_loco.tsv"

input:
tuple val(TRAIT), file(pheno), file(tests), file(geno), val(P3D), val(sig_thresh), \
tuple val(TRAIT), file(pheno), file(tests), file(geno), val(sig_thresh), \
val(qtl_grouping_size), val(qtl_ci_size), file(lmmexact_inbred), file(lmmexact_loco), \
file(find_aggregate_intervals_maps)

Expand Down
9 changes: 4 additions & 5 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@ params {
debug = false
download_vcf = false
finemap = true
fix = "fix"
fix = true
maf = 0.05
sparse_cut = 0.05
group_qtl = 1000
ci_size = 150
p3d = "TRUE"
pca = false
mapping = false
mapping = true
matrix = false
simulate = true
simulation = false
species = "c_elegans"
mediation = false

Expand Down Expand Up @@ -72,7 +71,7 @@ process {
}

withLabel: gcta {
container = 'msauria/gcta:060624'
container = 'andersenlab/gcta:060624'
}

withLabel: assess_sims {
Expand Down

0 comments on commit 3513894

Please sign in to comment.