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
36e4a0ef
Commit
36e4a0ef
authored
Sep 02, 2019
by
Kevin Kunzmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
ba722fac
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
19 deletions
+29
-19
README.md
README.md
+27
-17
Snakefile
Snakefile
+2
-2
No files found.
README.md
View file @
36e4a0ef
...
...
@@ -16,6 +16,7 @@ Nat Genet. doi:10.1038/ng.3367.
2.
`wget`
(pre-installed or via distribution package manager)
3.
`singularity`
container software (tested on 3.3.0, https://sylabs.io/guides/3.3/user-guide)
4.
`git`
(https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
5.
for data download fimm GCP bucket access to
`fimm-horizon-outgoing-data/CENTER_TBI_data_freeze_190829/Imputed_data`
### Optional
...
...
@@ -39,6 +40,15 @@ Download the container image
bash scripts/download_container.sh
Obtain the imputed genomes (GCP bucket: fimm-horizon-outgoing-data/CENTER_TBI_data_freeze_190829/Imputed_data).
`gsutils`
is pre-installed in the container image, to authenticate with your
GCP account run and follow the interactive instructions
singularity shell container.sif
gcloud auth login
snakemake download_imputed_genotypes
exit
Execute the workflow inside the container on a single core (takes a while!)
singularity exec container.sif snakemake impute
...
...
Snakefile
View file @
36e4a0ef
...
...
@@ -70,7 +70,7 @@ rule vcf_to_dosages:
export prefix={wildcards.output_dir}/dosages
mkdir -p $prefix
echo "extracting and computing MAFs ..."
bcftools +fill-tags {input
s
.vcf_gz_file} > $prefix/chr{wildcards.i}.vcf
bcftools +fill-tags {input.vcf_gz_file} > $prefix/chr{wildcards.i}.vcf
echo 'querying dosages ...'
bcftools query -e 'MAF[0]>{config[min_MAF]} | INFO>{config[min_INFO]} | TYPE!="snp" | N_ALT!=1' -f '%CHROM %ID %POS %REF %ALT %INFO/MAF [%DS ]\n' $prefix/chr{wildcards.i}.vcf > $prefix/chr{wildcards.i}.dosage.txt
echo 'compressing ...'
...
...
@@ -94,7 +94,7 @@ rule generate_samples_file:
"""
export prefix={wildcards.output_dir}/dosages
mkdir -p $prefix
bcftools query -l {input
s
.vcf_gz_file} >> $prefix/samples_.txt
bcftools query -l {input.vcf_gz_file} >> $prefix/samples_.txt
# family ID = individual ID
awk {params.format} < $prefix/samples_.txt > $prefix/samples.txt
rm $prefix/samples_.txt
...
...
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