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
58b7208c
Commit
58b7208c
authored
Aug 24, 2019
by
kevin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added container download
parent
6716f74d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
Snakefile
Snakefile
+26
-1
config.yml
config.yml
+3
-0
No files found.
Snakefile
View file @
58b7208c
...
@@ -9,6 +9,7 @@ localrules: impute, clean, download_container, generate_samples_file
...
@@ -9,6 +9,7 @@ localrules: impute, clean, download_container, generate_samples_file
# containing all imputed expression values
# containing all imputed expression values
rule impute:
rule impute:
input:
input:
"container.sif",
expand("{output_dir}/gene_expression/{region}.expression.txt", region = config['brain_regions'], output_dir = config['output_dir'])
expand("{output_dir}/gene_expression/{region}.expression.txt", region = config['brain_regions'], output_dir = config['output_dir'])
output:
output:
expand("{output_dir}/gene_expressions_combined.rds", output_dir = config['output_dir'])
expand("{output_dir}/gene_expressions_combined.rds", output_dir = config['output_dir'])
...
@@ -30,14 +31,36 @@ rule clean:
...
@@ -30,14 +31,36 @@ rule clean:
# download the required singularity container from zenodo.org
# download the required singularity container from zenodo.org
rule download_container:
rule download_container:
output:
"container_unchecked.sif"
shell:
"""
wget https://zenodo.org/record/{config[zenodo_record_id]}/files/container.sif -O container_unchecked.sif
"""
# check md5
rule check_container:
input:
"container_unchecked.sif"
output:
"container.sif"
singularity:
"container_unchecked.sif"
shell:
shell:
"""
"""
echo 'not implemented'
set -e
checksum=($(md5sum container_unchecked.sif))
if [ $checksum != {config[container_mdf5]} ]; then
echo md5 mismatch for container, download corrupted!
exit 1
fi
mv container_unchecked.sif container.sif
"""
"""
# extract dosages in custom PrediXcan format from vcf file
# extract dosages in custom PrediXcan format from vcf file
rule vcf_to_dosages:
rule vcf_to_dosages:
input:
input:
"container.sif",
config['input_vcf_gz_file']
config['input_vcf_gz_file']
output:
output:
"{output_dir}/dosages/chr{i}.dosage.txt.gz"
"{output_dir}/dosages/chr{i}.dosage.txt.gz"
...
@@ -63,6 +86,7 @@ rule vcf_to_dosages:
...
@@ -63,6 +86,7 @@ rule vcf_to_dosages:
# extract sample file for PrediXcan
# extract sample file for PrediXcan
rule generate_samples_file:
rule generate_samples_file:
input:
input:
"container.sif",
config['input_vcf_gz_file']
config['input_vcf_gz_file']
output:
output:
"{output_dir}/dosages/samples.txt"
"{output_dir}/dosages/samples.txt"
...
@@ -83,6 +107,7 @@ rule generate_samples_file:
...
@@ -83,6 +107,7 @@ rule generate_samples_file:
# run PrediXcan to impute gene expression for individual tissue type
# run PrediXcan to impute gene expression for individual tissue type
rule impute_gene_expression:
rule impute_gene_expression:
input:
input:
"container.sif",
samples_file = expand("{output_dir}/dosages/samples.txt", output_dir = config['output_dir']),
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'])
dosage_files = expand("{output_dir}/dosages/chr{i}.dosage.txt.gz", i = range(1, 24), output_dir = config['output_dir'])
output:
output:
...
...
config.yml
View file @
58b7208c
...
@@ -23,3 +23,6 @@ brain_regions:
...
@@ -23,3 +23,6 @@ brain_regions:
-
'
Putamen_basal_ganglia'
-
'
Putamen_basal_ganglia'
-
'
Spinal_cord_cervical_c-1'
-
'
Spinal_cord_cervical_c-1'
-
'
Substantia_nigra'
-
'
Substantia_nigra'
zenodo_record_id
:
'
3376504'
container_mdf5
:
'
1f5aada82c1aeb8e00b0328421ed009b'
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