Skip to content
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

Peppy #8

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d34726f
initial peppy imports working
vreuter Mar 13, 2019
59eb4d4
more peppy interop
vreuter Mar 13, 2019
f92ae7c
set the index; use master config
vreuter Mar 13, 2019
484976b
cleanup
vreuter Mar 13, 2019
b3661dc
remove additional print
vreuter Mar 13, 2019
ba4debb
more cleanup
vreuter Mar 13, 2019
e1af9a1
peppy files
vreuter Mar 14, 2019
d5b6d46
minimize changes, shorten names
vreuter Mar 14, 2019
5964ecf
remove unused import
vreuter Mar 14, 2019
6b54e14
get back validate
vreuter Mar 14, 2019
37ded42
need to check files entry
vreuter Mar 14, 2019
ca76544
guards and cleanup
vreuter Mar 14, 2019
e85a876
clear unused KV in project config
vreuter Mar 14, 2019
6711da2
condense and explain
vreuter Mar 14, 2019
6fde15f
peppy-compatible subannotation / units sheet
vreuter Mar 14, 2019
72ba626
Merge branch 'master' of github.com:snakemake-workflows/dna-seq-gatk-…
vreuter Apr 26, 2019
bd8f36b
see about adding units dynamically
vreuter Apr 26, 2019
6e49167
using SnakeProject
vreuter Apr 26, 2019
682bb5d
use Snakemake naming
vreuter Apr 29, 2019
0d2fc1f
use base anns file due to identical content
vreuter Apr 29, 2019
e7301f3
add prj cfg that uses the base files
vreuter Apr 29, 2019
1750ab6
use the native encoding
vreuter Apr 29, 2019
6192d29
condense config files
vreuter Apr 29, 2019
f728c37
update to reflect peppy updates; https://github.com/snakemake-workflo…
vreuter Jun 21, 2019
0e37cfb
fix name mistake; https://github.com/snakemake-workflows/dna-seq-gatk…
vreuter Feb 19, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions prjcfg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
metadata:
sample_table: samples.tsv
subsample_table: units.tsv

snake_config: "config.yaml"
12 changes: 7 additions & 5 deletions rules/common.smk
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import pandas as pd
from peppy import SnakeProject
from snakemake.utils import validate

report: "../report/workflow.rst"

###### Config file and sample sheets #####
configfile: "config.yaml"
p = SnakeProject("prjcfg_native.yaml")
configfile: p.snake_config
validate(config, schema="../schemas/config.schema.yaml")

samples = pd.read_table(config["samples"]).set_index("sample", drop=False)
samples = p.sample_table

validate(samples, schema="../schemas/samples.schema.yaml")

units = pd.read_table(config["units"], dtype=str).set_index(["sample", "unit"], drop=False)
units.index = units.index.set_levels([i.astype(str) for i in units.index.levels]) # enforce str in index
units = p.subsample_table
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice! What about always converting the subsample_table index into string inside peppy (in order to get rid of the line below)?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi johannes, it looks like this has been done (the line is now gone).


validate(units, schema="../schemas/units.schema.yaml")

# contigs in reference genome
Expand Down
4 changes: 4 additions & 0 deletions units_peppy.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sample_name platform fq1 fq2
A ILLUMINA data/reads/a.chr21.1.fq data/reads/a.chr21.2.fq
B ILLUMINA data/reads/b.chr21.1.fq data/reads/b.chr21.2.fq
B ILLUMINA data/reads/b.chr21.1.fq