Skip to content

Commit

Permalink
fix #356, fix #354 (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
siebrenf authored Jun 9, 2020
1 parent 8dd5d56 commit cbaa457
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
4 changes: 2 additions & 2 deletions seq2science/rules/gene_counts.smk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
def get_counts(wildcards):
quant_dirs = []
for replicate in treps.index:
quant_dirs.append(f"{{result_dir}}/{{quantifier}}/{wildcards.assembly}-{replicate}")
for sample in treps[treps['assembly'] == wildcards.assembly].index:
quant_dirs.append(f"{{result_dir}}/{{quantifier}}/{wildcards.assembly}-{sample}")
return expand(quant_dirs, **config)

if config['quantifier'] == 'salmon':
Expand Down
21 changes: 7 additions & 14 deletions tests/dag_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,11 @@ if [ $1 = "rna-seq" ]; then
printf "\nmultiple assemblies with DEA\n"
seq2science run rna_seq -n --cores $CORES --configfile tests/$WF/rna_seq_config.yaml --snakemakeOptions dryrun=True quiet=True config={quantifier:star,technical_replicates:keep,samples:tests/rna_seq/complex_samples.tsv} | tee tests/local_test_results/${1}_dag
assert_rulecount $1 star_index 2
# TODO: bug: quantifier runs 2x too many times (2 assemblies)
#assert_rulecount $1 star_quant 10
assert_rulecount $1 star_quant 10

printf "\nmultiple assemblies with DEA - trackhubs\n"
# TODO: error!
#seq2science run rna_seq -n --cores $CORES --configfile tests/$WF/rna_seq_config.yaml --snakemakeOptions dryrun=True quiet=True config={quantifier:star,technical_replicates:keep,samples:tests/rna_seq/complex_samples.tsv,create_trackhub:True} | tee tests/local_test_results/${1}_dag
#assert_rulecount $1 bam_bigwig 20
seq2science run rna_seq -n --cores $CORES --configfile tests/$WF/rna_seq_config.yaml --snakemakeOptions dryrun=True quiet=True config={quantifier:star,technical_replicates:keep,samples:tests/rna_seq/complex_samples.tsv,create_trackhub:True} | tee tests/local_test_results/${1}_dag
assert_rulecount $1 bam_bigwig 10

printf "\nmultiple assemblies with DEA - multiqc\n"
seq2science run rna_seq -n --cores $CORES --configfile tests/$WF/rna_seq_config.yaml --snakemakeOptions dryrun=True quiet=True config={quantifier:star,technical_replicates:keep,samples:tests/rna_seq/complex_samples.tsv,create_qc_report:True} | tee tests/local_test_results/${1}_dag
Expand All @@ -380,25 +378,20 @@ if [ $1 = "rna-seq" ]; then
printf "\nmultiple assemblies and replicates with DEA \n"
seq2science run rna_seq -n --cores $CORES --configfile tests/$WF/rna_seq_config.yaml --snakemakeOptions dryrun=True quiet=True config={quantifier:star,technical_replicates:keep,samples:tests/rna_seq/complex_samples.tsv} | tee tests/local_test_results/${1}_dag
assert_rulecount $1 merge_replicates 0
# TODO: bug: quantifier runs 2x too many times (2 assemblies)
#assert_rulecount $1 star_quant 10
assert_rulecount $1 star_quant 10
seq2science run rna_seq -n --cores $CORES --configfile tests/$WF/rna_seq_config.yaml --snakemakeOptions dryrun=True quiet=True config={quantifier:star,technical_replicates:merge,samples:tests/rna_seq/complex_samples.tsv} | tee tests/local_test_results/${1}_dag
# TODO: bug: quantifier runs 2x too many times (2 assemblies)
#assert_rulecount $1 star_quant 8
assert_rulecount $1 star_quant 8
seq2science run rna_seq -n --cores $CORES --configfile tests/$WF/rna_seq_config.yaml --snakemakeOptions dryrun=True quiet=True config={quantifier:salmon,technical_replicates:merge,samples:tests/rna_seq/complex_samples.tsv} | tee tests/local_test_results/${1}_dag
# TODO: bug: quantifier runs 2x too many times (2 assemblies)
#assert_rulecount $1 salmon_quant 8
assert_rulecount $1 salmon_quant 8

printf "\nmultiple assemblies and replicates with DEA - trackhub\n"
seq2science run rna_seq -n --cores $CORES --configfile tests/$WF/rna_seq_config.yaml --snakemakeOptions dryrun=True quiet=True config={quantifier:salmon,technical_replicates:merge,samples:tests/rna_seq/complex_samples.tsv,create_trackhub:True} | tee tests/local_test_results/${1}_dag
# TODO: bug: quantifier runs 16 (2x8) times, aligner runs 8 times.
#assert_rulecount $1 salmon_quant 8
assert_rulecount $1 salmon_quant 8
assert_rulecount $1 star_align 8
assert_rulecount $1 bam_bigwig 8

printf "\nmultiple assemblies and replicates with DEA - multiqc report\n"
seq2science run rna_seq -n --cores $CORES --configfile tests/$WF/rna_seq_config.yaml --snakemakeOptions dryrun=True quiet=True config={quantifier:star,technical_replicates:merge,samples:tests/rna_seq/complex_samples.tsv,create_qc_report:True} | tee tests/local_test_results/${1}_dag
# TODO: bug: quantifier runs 16 (2x8) times, aligner runs 8 times.
assert_rulecount $1 fastqc 24

test_ran=1
Expand Down

0 comments on commit cbaa457

Please sign in to comment.