-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add configurable protocol support to ensembl reference download #2649
Open
pettyalex
wants to merge
5
commits into
snakemake:master
Choose a base branch
from
belowlab:add_http_protocol_support_vep_ensembl
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
16e9da4
Add the support for configurable protocol, ftp, http, or https to ens…
pettyalex d82fa78
Add tests for getting reference data over http
pettyalex 94cdbfd
Run snakefmt over reference download tools.
pettyalex 17d4d28
Split off https into different snakemake files to avoid name collisio…
pettyalex 1a84082
Fix tests for annotation and make https protocol output gzipped.
pettyalex File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
bio/reference/ensembl-annotation/test/ensembl_annotation_https.smk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
rule get_annotation_https_protocol_gz: | ||
output: | ||
"refs/annotation.gtf.gz", | ||
params: | ||
species="homo_sapiens", | ||
release="105", | ||
build="GRCh37", | ||
flavor="", | ||
protocol="https", | ||
log: | ||
"logs/get_annotation.log", | ||
cache: "omit-software" # save space and time with between workflow caching (see docs) | ||
wrapper: | ||
"master/bio/reference/ensembl-annotation" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
bio/reference/ensembl-sequence/test/ensembl_sequence_https.smk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
rule get_genome_http_protocol: | ||
output: | ||
"refs/genome.fasta", | ||
params: | ||
species="saccharomyces_cerevisiae", | ||
datatype="dna", | ||
build="R64-1-1", | ||
release="98", | ||
protocol="http", | ||
log: | ||
"logs/get_genome.log", | ||
cache: "omit-software" # save space and time with between workflow caching (see docs) | ||
wrapper: | ||
"master/bio/reference/ensembl-sequence" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
rule get_variation: | ||
output: | ||
vcf="refs/variation.vcf.gz" | ||
vcf="refs/variation.vcf.gz", | ||
params: | ||
species="homo_sapiens", | ||
release="104", | ||
build="GRCh38", | ||
type="all", # one of "all", "somatic", "structural_variation" | ||
type="all", # one of "all", "somatic", "structural_variation" | ||
chromosome="21", | ||
log: | ||
"logs/get_variation.log" | ||
"logs/get_variation.log", | ||
wrapper: | ||
"master/bio/reference/ensembl-variation" |
14 changes: 14 additions & 0 deletions
14
bio/reference/ensembl-variation/test/ensembl_variation_https.smk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
rule get_variation_https_protocol: | ||
output: | ||
vcf="refs/variation.vcf.gz", | ||
params: | ||
species="saccharomyces_cerevisiae", | ||
release="98", | ||
build="R64-1-1", | ||
type="all", | ||
protocol="https", | ||
log: | ||
"logs/get_variation.log", | ||
cache: "omit-software" # save space and time with between workflow caching (see docs) | ||
wrapper: | ||
"master/bio/reference/ensembl-variation" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
rule get_variation_with_contig_lengths: | ||
input: | ||
fai="refs/grch37.fasta.fai" | ||
fai="refs/grch37.fasta.fai", | ||
output: | ||
vcf="refs/variation.vcf.gz" | ||
vcf="refs/variation.vcf.gz", | ||
params: | ||
species="homo_sapiens", | ||
release="100", | ||
build="GRCh37", | ||
type="all" # one of "all", "somatic", "structural_variation" | ||
type="all", # one of "all", "somatic", "structural_variation" | ||
log: | ||
"logs/get_variation.log" | ||
"logs/get_variation.log", | ||
wrapper: | ||
"master/bio/reference/ensembl-variation" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
rule get_variation: | ||
output: | ||
vcf="refs/variation.vcf.gz" | ||
vcf="refs/variation.vcf.gz", | ||
# optional: add fai to get VCF with annotated contig lengths (as required by GATK) | ||
# fai="refs/genome.fasta.fai" | ||
params: | ||
species="saccharomyces_cerevisiae", | ||
release="98", | ||
build="R64-1-1", | ||
type="all" # one of "all", "somatic", "structural_variation" | ||
type="all", # one of "all", "somatic", "structural_variation" | ||
log: | ||
"logs/get_variation.log" | ||
"logs/get_variation.log", | ||
wrapper: | ||
"master/bio/reference/ensembl-variation" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
rule get_variation_with_contig_lengths: | ||
input: | ||
fai="refs/genome.fasta.fai" | ||
fai="refs/genome.fasta.fai", | ||
output: | ||
vcf="refs/variation.vcf.gz" | ||
vcf="refs/variation.vcf.gz", | ||
params: | ||
species="saccharomyces_cerevisiae", | ||
release="98", | ||
build="R64-1-1", | ||
type="all" # one of "all", "somatic", "structural_variation" | ||
type="all", # one of "all", "somatic", "structural_variation" | ||
log: | ||
"logs/get_variation.log" | ||
"logs/get_variation.log", | ||
wrapper: | ||
"master/bio/reference/ensembl-variation" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
rule get_vep_cache_https_protocol: | ||
output: | ||
directory("resources/vep/cache"), | ||
params: | ||
species="saccharomyces_cerevisiae", | ||
build="R64-1-1", | ||
release="98", | ||
protocol="https", | ||
log: | ||
"logs/vep/cache.log", | ||
cache: "omit-software" # save space and time with between workflow caching (see docs) | ||
wrapper: | ||
"master/bio/vep/cache" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -5329,6 +5329,22 @@ def test_ensembl_sequence_old_release(): | |||||
) | ||||||
|
||||||
|
||||||
@skip_if_not_modified | ||||||
def test_ensembl_sequence_https(): | ||||||
run( | ||||||
"bio/reference/ensembl-sequence", | ||||||
[ | ||||||
"snakemake", | ||||||
"-s", | ||||||
"ensembl_sequence_https.smk", | ||||||
"--cores", | ||||||
"1", | ||||||
"--use-conda", | ||||||
"-F", | ||||||
], | ||||||
) | ||||||
|
||||||
|
||||||
@skip_if_not_modified | ||||||
def test_ensembl_sequence_chromosome(): | ||||||
run( | ||||||
|
@@ -5378,6 +5394,23 @@ def test_ensembl_annotation_gtf_gz(): | |||||
) | ||||||
|
||||||
|
||||||
@skip_if_not_modified | ||||||
def test_ensembl_annotation_gtf_https_gz(): | ||||||
run( | ||||||
"bio/reference/ensembl-annotation", | ||||||
[ | ||||||
"snakemake", | ||||||
"--cores", | ||||||
"1", | ||||||
"refs/annotation.gtf.gz", | ||||||
"--use-conda", | ||||||
"-F", | ||||||
"-s", | ||||||
"ensembl_annotation_https.smk", | ||||||
], | ||||||
) | ||||||
|
||||||
|
||||||
@skip_if_not_modified | ||||||
def test_ensembl_variation(): | ||||||
run( | ||||||
|
@@ -5428,17 +5461,26 @@ def test_ensembl_variation_with_contig_lengths(): | |||||
|
||||||
|
||||||
@skip_if_not_modified | ||||||
def test_ega_fetch(): | ||||||
def test_ensembl_variation_old_release(): | ||||||
run( | ||||||
"bio/ega/fetch", | ||||||
"bio/reference/ensembl-variation", | ||||||
[ | ||||||
"snakemake", | ||||||
"-s", | ||||||
"ensembl_variation_https.smk", | ||||||
"--cores", | ||||||
"1", | ||||||
"--use-conda", | ||||||
"-F", | ||||||
"data/EGAF00007243774.cram" | ||||||
] | ||||||
], | ||||||
) | ||||||
|
||||||
|
||||||
@skip_if_not_modified | ||||||
def test_ega_fetch(): | ||||||
run( | ||||||
"bio/ega/fetch", | ||||||
["snakemake", "--cores", "1", "--use-conda", "-F", "data/EGAF00007243774.cram"], | ||||||
) | ||||||
|
||||||
|
||||||
|
@@ -5801,11 +5843,28 @@ def test_vep_cache(): | |||||
) | ||||||
|
||||||
|
||||||
@skip_if_not_modified | ||||||
def test_vep_cache_https_protocol(): | ||||||
run( | ||||||
"bio/vep/cache", | ||||||
["snakemake", "--cores", "1", "resources/vep/cache", "--use-conda", "-F"], | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
) | ||||||
|
||||||
|
||||||
@skip_if_not_modified | ||||||
def test_vep_plugins(): | ||||||
run( | ||||||
"bio/vep/plugins", | ||||||
["snakemake", "--cores", "1", "resources/vep/plugins", "--use-conda", "-F"], | ||||||
[ | ||||||
"snakemake", | ||||||
"--cores", | ||||||
"1", | ||||||
"resources/vep/plugins", | ||||||
"--use-conda", | ||||||
"-F", | ||||||
"-s", | ||||||
"vep_cache_https.smk", | ||||||
Comment on lines
+5865
to
+5866
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
], | ||||||
) | ||||||
|
||||||
|
||||||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.