-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #415 from pepkit/dev
Release v0.35.1
- Loading branch information
Showing
20 changed files
with
1,193 additions
and
738 deletions.
There are no files selected for viewing
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
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 +1 @@ | ||
__version__ = "0.35.0" | ||
__version__ = "0.35.1" |
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
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,60 @@ | ||
""" Configuration for modules with independent tests of models. """ | ||
|
||
import os | ||
|
||
import pandas as pd | ||
import pytest | ||
|
||
__author__ = "Michal Stolarczyk" | ||
__email__ = "[email protected]" | ||
|
||
# example_peps branch, see: https://github.com/pepkit/example_peps | ||
EPB = "master" | ||
|
||
|
||
def merge_paths(pep_branch, directory_name): | ||
return os.path.join( | ||
os.path.dirname(os.path.dirname(os.path.abspath(__file__))), | ||
"tests", | ||
"data", | ||
"example_peps-{}".format(pep_branch), | ||
"example_{}".format(directory_name), | ||
) | ||
|
||
|
||
def get_path_to_example_file(branch, directory_name, file_name): | ||
return os.path.join(merge_paths(branch, directory_name), file_name) | ||
|
||
|
||
@pytest.fixture | ||
def example_pep_cfg_path(request): | ||
return get_path_to_example_file(EPB, request.param, "project_config.yaml") | ||
|
||
|
||
@pytest.fixture | ||
def example_pep_csv_path(request): | ||
return get_path_to_example_file(EPB, request.param, "sample_table.csv") | ||
|
||
|
||
@pytest.fixture | ||
def example_pep_cfg_noname_path(request): | ||
return get_path_to_example_file(EPB, "noname", request.param) | ||
|
||
|
||
@pytest.fixture | ||
def example_peps_cfg_paths(request): | ||
""" | ||
This is the same as the ficture above, however, it lets | ||
you return multiple paths (for comparing peps). Will return | ||
list of paths. | ||
""" | ||
return [ | ||
get_path_to_example_file(EPB, p, "project_config.yaml") for p in request.param | ||
] | ||
|
||
|
||
@pytest.fixture | ||
def config_with_pandas_obj(request): | ||
return pd.read_csv( | ||
get_path_to_example_file(EPB, request.param, "sample_table.csv"), dtype=str | ||
) |
3 changes: 3 additions & 0 deletions
3
tests/data/example_peps-master/example_nextflow_config/project_config.yaml
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,3 @@ | ||
pep_version: "2.1.0" | ||
sample_table: "samplesheet.csv" | ||
|
7 changes: 7 additions & 0 deletions
7
tests/data/example_peps-master/example_nextflow_config/samplesheet.csv
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,7 @@ | ||
sample,instrument_platform,run_accession,fastq_1,fastq_2,fasta | ||
2611,ILLUMINA,ERR5766174,,,https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/data/fasta/ERX5474930_ERR5766174_1.fa.gz | ||
2612,ILLUMINA,ERR5766176,https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/data/fastq/ERX5474932_ERR5766176_1.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/data/fastq/ERX5474932_ERR5766176_2.fastq.gz, | ||
2612,ILLUMINA,ERR5766176_B,https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/data/fastq/ERX5474932_ERR5766176_B_1.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/data/fastq/ERX5474932_ERR5766176_B_2.fastq.gz, | ||
2612,ILLUMINA,ERR5766180,https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/data/fastq/ERX5474936_ERR5766180_1.fastq.gz,, | ||
2613,ILLUMINA,ERR5766181,https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/data/fastq/ERX5474937_ERR5766181_1.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/data/fastq/ERX5474937_ERR5766181_2.fastq.gz, | ||
ERR3201952,OXFORD_NANOPORE,ERR3201952,https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/data/fastq/ERR3201952.fastq.gz,, |
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
tests/data/example_peps-master/example_node_alias/README.md
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,16 @@ | ||
# YAML Aliases | ||
|
||
You can also use YAML aliases in PEPs, since the config file is just a YAML file. These allow you to define variables within the YAML file, and then re-use these in other places in the file. Unfortunately, you can't import aliases across files (each file must contain its own definitions so it's self-sufficient as a YAML file). | ||
|
||
To do it, just define a value as an anchor with the `&` character. Then, recall (duplicate) that value later with the `*` character. For example: | ||
|
||
``` | ||
list: | ||
- sandwich | ||
- drink | ||
- &thing chips | ||
- crackers | ||
- *thing | ||
``` | ||
|
||
This will have `chips` twice in the list. In the first instance, we assigned it to `thing` with the `&thing` flag. Then, we repopulate `*thing` to chips. |
8 changes: 8 additions & 0 deletions
8
tests/data/example_peps-master/example_node_alias/project_config.yaml
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,8 @@ | ||
pep_version: "2.0.0" | ||
sample_table: sample_table.csv | ||
output_dir: $HOME/hello_looper_results | ||
pipeline_dir: $HOME/pipeline_dir | ||
|
||
project_modifiers: | ||
import: | ||
- project_config1.yaml |
13 changes: 13 additions & 0 deletions
13
tests/data/example_peps-master/example_node_alias/project_config1.yaml
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,13 @@ | ||
pep_version: "2.0.0" | ||
sample_modifiers: | ||
append: | ||
imported_attr: imported_val | ||
|
||
value: &anchor Foo | ||
testvalue: *anchor | ||
anchors: | ||
- &property value | ||
- &trimmer trimmomatic | ||
- &setting 4 | ||
|
||
trimmer: *trimmer |
3 changes: 3 additions & 0 deletions
3
tests/data/example_peps-master/example_node_alias/sample_table.csv
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,3 @@ | ||
sample_name,protocol,file | ||
frog_1,anySampleType,data/frog1_data.txt | ||
frog_2,anySampleType,data/frog2_data.txt |
5 changes: 0 additions & 5 deletions
5
tests/data/example_peps-master/example_other_sample_table_index/config.yaml
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
tests/data/example_peps-master/example_other_sample_table_index/samplesheet.csv
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
tests/data/example_peps-master/example_other_sample_table_index/subsamplesheet.csv
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.