Skip to content

Commit 7b11e90

Browse files
committed
[fix](Aggregation): Namespace error fixed
1 parent da40422 commit 7b11e90

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

rules/common.smk

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,13 @@ def fq_pairs_w(wildcards) -> Dict[str, str]:
180180
"""
181181
Dynamic wildcards call for snakemake.
182182
"""
183-
return {"fastq": fq_pairs_dict[wildcards.sample],
184-
"gtf": refs_pack_dict["gtf"],
185-
"index": "kallisto_index/genome_index"}
183+
try:
184+
return {"fastq": fq_pairs_dict[wildcards.sample],
185+
"gtf": refs_pack_dict["gtf"],
186+
"index": "kallisto_index/genome_index"}
187+
except KeyError:
188+
return {"fastq": fq_pairs_dict[wildcards.sample],
189+
"index": "kallisto_index/genome_index"}
186190

187191

188192
def sample_id() -> List[str]:

scripts/aggregate_samples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def extract_field(*paths: List[str],
5959

6060

6161
if __name__ == '__main__':
62-
makedirs(os.path.dirname(snakemake.output["est_counts"]))
62+
makedirs(op.dirname(snakemake.output["est_counts"]))
6363

6464
for column in ["est_counts", "tpm"]:
6565
data = extract_field(

tests/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ params:
55
kallisto_index_extra: \-\-kmer-size=5
66
kallisto_quant_extra: ''
77
ref:
8-
fasta: genomes/transcriptome.fasta
8+
fasta: genome/transcriptome.fasta
99
gtf: null
1010
singularity_docker_image: docker://continuumio/miniconda3:4.4.10
1111
threads: 1

0 commit comments

Comments
 (0)