We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Snakemake Version: 8.25.5
SyntaxWarning: invalid escape sequence
~/workflow/rules/viral-identify.smk:273: SyntaxWarning: invalid escape sequence '\s' combined=relpath("identify/viral/output/combined.final.vOTUs.fa"), ~/workflow/rules/viral-identify.smk:299: SyntaxWarning: invalid escape sequence '\s' ~/workflow/rules/viral-identify.smk:606: SyntaxWarning: invalid escape sequence '\d' ~/workflow/rules/viral-identify.smk:635: SyntaxWarning: invalid escape sequence '\d'
.smk
Rule 1
shell: """ ... seqkit grep {input.fna} -f {output.hits} | seqkit replace -p "\s.*" -r "" | seqkit replace -p $ -r _{wildcards.sample_id} > {params.tmpdir}/tmp.fa 2> {log} ... """
Rule 2
shell: """ ... seqkit replace {input.provirusfasta} --f-use-regexp -p "(.+)_\d\s.+$" -r '$1' | seqkit grep -f {input.provirushits} > {params.tmpdir}/tmp1.fa 2> {log} seqkit replace {input.virusfasta} --f-use-regexp -p "(.+)_\d\s.+$" -r '$1' | seqkit grep -f {input.provirushits} >> {params.tmpdir}/tmp1.fa 2> {log} ... """
-p
shell: """ ... seqkit grep sample/contigs/results/identify/viral/intermediate/scores/combined.viralcontigs.fa -f sample/contigs/results/identify/viral/output/derep/cluster_representatives.txt > sample/contigs/results/identify/viral/tmp/tmp.fa 2> sample/contigs/results/identify/viral/logs/clustering/filterderep.log ... """
shell: """ ... seqkit grep sample/contigs/results/identify/viral/output/checkv/viruses.fna -f sample/contigs/results/identify/viral/output/virus.list.txt > sample/contigs/results/identify/viral/tmp/tmp2.fa 2> sample/contigs/results/identify/viral/logs/vOTUs.log seqkit grep sample/contigs/results/identify/viral/output/checkv/proviruses.fna -f sample/contigs/results/identify/viral/output/virus.list.txt >> sample/contigs/results/identify/viral/tmp/tmp2.fa 2> sample/contigs/results/identify/viral/logs/vOTUs.log ... """
I've double-checked and the shell command works as it should. It likely has to do with the way Snakemake parsers the shell command.
I was not experiencing this with the older version of Snakemake 7.28.1, just popped up as I updated it!
Is there a good way to bypass or suppress the warning?
Best, Erfan
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Snakemake Version: 8.25.5
When running snakemake I get the following
SyntaxWarning: invalid escape sequence
warning:In my
.smk
file's shell directive I'm using "\s" and "\d" regex characters, so I know this is where the warning comes from:Rule 1
Rule 2
But, when I run with the
-p
flag, it prints my commands fine and it also runs fine, so I don't want to change my code:Rule 1
Rule 2
I've double-checked and the shell command works as it should. It likely has to do with the way Snakemake parsers the shell command.
I was not experiencing this with the older version of Snakemake 7.28.1, just popped up as I updated it!
Is there a good way to bypass or suppress the warning?
Best,
Erfan
The text was updated successfully, but these errors were encountered: