Snakemake version : 7.32.4,
python version : 3.10.14,
linux ubuntu system
I am experiecing a problem with snakemake that no matter what I do , it does not get resolved. It also changes the KeyError when I do a small change to the output file name in my rule.
for example if I change from from this:
forwardPaired=”results/cutAdapt/{sample}-{unit}.1.fastq.gz”,
reversePaired=”results/cutAdapt/{sample}-{unit}.2.fastq.gz”,
to this:
forwardPaired=”results/cutAdapt/{sample}-{unit}_1.fastq.gz”,
reversePaired=”results/cutAdapt/{sample}-{unit}_2.fastq.gz”,
I get a different KeyError:
Error:
KeyError: (‘ShS-DIF4-rep1’, ‘FC2.1’)
Wildcards:
sample=ShS-DIF4-rep1
unit=Take1
take into consideration that ‘ShS-DIF4-rep1’ should match ‘FC1’ unit in my units dataframe
Thank you in advance for the help.
BELOW IS THE COMPLETE ERROR
Building DAG of jobs…
InputFunctionException in rule cutAdapt_se in file /home/x/snakemake_longRNAseq/workflow/rules/trim.smk, line 16:
Error:
KeyError: (‘ShS-DIF4-rep1’, ‘FC1.1’)
Wildcards:
sample=ShS-DIF4-rep1
unit=FC1.1
Traceback:
File “/home/x/snakemake_longRNAseq/workflow/rules/common.smk”, line 27, in cutAdapt_rawFastq
File “/home/x/snakemake_longRNAseq/workflow/rules/common.smk”, line 23, in single_end
File “/home/x/mambaforge/envs/longRNAseq/lib/python3.10/site-packages/pandas/core/indexing.py”, line 1184, in getitem
File “/home/x/mambaforge/envs/longRNAseq/lib/python3.10/site-packages/pandas/core/indexing.py”, line 1368, in _getitem_tuple
File “/home/x/mambaforge/envs/longRNAseq/lib/python3.10/site-packages/pandas/core/indexing.py”, line 1041, in _getitem_lowerdim
File “/home/x/mambaforge/envs/longRNAseq/lib/python3.10/site-packages/pandas/core/indexing.py”, line 1153, in _getitem_nested_tuple
File “/home/x/mambaforge/envs/longRNAseq/lib/python3.10/site-packages/pandas/core/indexing.py”, line 1431, in _getitem_axis
File “/home/x/mambaforge/envs/longRNAseq/lib/python3.10/site-packages/pandas/core/indexing.py”, line 1381, in _get_label
File “/home/x/mambaforge/envs/longRNAseq/lib/python3.10/site-packages/pandas/core/generic.py”, line 4293, in xs
File “/home/x/mambaforge/envs/longRNAseq/lib/python3.10/site-packages/pandas/core/indexes/multi.py”, line 3222, in _get_loc_level
I am expecting for respective ‘ShS-DIF4-rep1’ to match ‘FC1’ and same from other sample to match their respective unit column for the same row from my units.tsv table.
bioinfo_passion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.