Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
impute-gene-expression
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Kevin Kunzmann
impute-gene-expression
Commits
6716f74d
Commit
6716f74d
authored
Aug 24, 2019
by
kevin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commenting and renaming
parent
421e49a2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
11 deletions
+33
-11
Snakefile
Snakefile
+33
-11
scripts/slurm-snakemake.sh
scripts/slurm-snakemake.sh
+0
-0
No files found.
Snakefile
View file @
6716f74d
singularity: "container.sif"
# edit configuration here (see cluster.json for running on slurm scheduler)
configfile: "config.yml"
localrules: impute, clean, generate_samples_file
localrules: impute, clean, download_container, generate_samples_file
# this rule runs the entire pipeline and creates a R data set file (rds)
# containing all imputed expression values
rule impute:
input:
expand("{output_dir}/gene_expression/{region}.expression.txt", region = config['brain_regions'], output_dir = config['output_dir'])
output:
expand("{output_dir}/gene_expressions_combined.rds", output_dir = config['output_dir'])
singularity:
"container.sif"
shell:
"""
Rscript scripts/combine_expression_data.R
"""
# delete output and logs (if run on slurm cluster)
rule clean:
shell:
"""
rm -rf {config[output_dir]}
rm -rf logs
rm -rf nohup.out
"""
# download the required singularity container from zenodo.org
rule download_container:
shell:
"""
echo 'not implemented'
"""
# extract dosages in custom PrediXcan format from vcf file
rule vcf_to_dosages:
input:
config['input_vcf_gz_file']
output:
"{output_dir}/dosages/chr{i}.dosage.txt.gz"
singularity:
"container.sif"
shell:
"""
export prefix={wildcards.output_dir}/dosages
...
...
@@ -36,11 +60,14 @@ rule vcf_to_dosages:
printf "done.\n\r\n\r"
"""
# extract sample file for PrediXcan
rule generate_samples_file:
input:
config['input_vcf_gz_file']
output:
"{output_dir}/dosages/samples.txt"
singularity:
"container.sif"
params:
format = "\'{ printf(\"%s %s\\n\", $1, $1); }\'"
shell:
...
...
@@ -53,12 +80,15 @@ rule generate_samples_file:
rm $prefix/samples_.txt
"""
# run PrediXcan to impute gene expression for individual tissue type
rule impute_gene_expression:
input:
samples_file = expand("{output_dir}/dosages/samples.txt", output_dir = config['output_dir']),
dosage_files = expand("{output_dir}/dosages/chr{i}.dosage.txt.gz", i = range(1, 24), output_dir = config['output_dir'])
output:
"{output_dir}/gene_expression/{region}.expression.txt"
singularity:
"container.sif"
shell:
"""
mkdir -p {wildcards.output_dir}/gene_expression
...
...
@@ -72,11 +102,3 @@ rule impute_gene_expression:
mv {wildcards.output_dir}/gene_expression/{wildcards.region}_predicted_expression.txt \
{wildcards.output_dir}/gene_expression/{wildcards.region}.expression.txt
"""
rule clean:
shell:
"""
rm -rf {config[output_dir]}
rm -rf logs
rm -rf nohup.out
"""
scripts/slurm
_snakemake
→
scripts/slurm
-snakemake.sh
View file @
6716f74d
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment