You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I intentionally changed some triple quoted shell strings to separate concatenated strings so that I could intersperse comments, but even though the code works, snakefmt moved the comments to the beginning and end.
Desired (note the space between the + and the "):
shell:
# Concatenate all the files together
"cat {input:q} 2> {log.cat:q} | "
# Coordinate sort everything
+ "sortBed 2> {log.sort:q} | "
# Merge overlapping coordinates into individual expanded records
+ "mergeBed 2> {log.merge:q} 1> {output:q}"
snakefmt's munge:
shell:
# Concatenate all the files together
"cat {input:q} 2> {log.cat:q} | "
+"sortBed 2> {log.sort:q} | "
+"mergeBed 2> {log.merge:q} 1> {output:q}"
# Coordinate sort everything
# Merge overlapping coordinates into individual expanded records
It also requires that the + be at the beginning of the next line and won't let them be at the end. If they are at the end, it gived a confusing syntax error.
Desired:
shell:
# Concatenate all the files together
"cat {input:q} 2> {log.cat:q} | " +
# Coordinate sort everything
"sortBed 2> {log.sort:q} | " +
# Merge overlapping coordinates into individual expanded records
"mergeBed 2> {log.merge:q} 1> {output:q}"
I intentionally changed some triple quoted shell strings to separate concatenated strings so that I could intersperse comments, but even though the code works, snakefmt moved the comments to the beginning and end.
Desired (note the space between the
+
and the"
):snakefmt's munge:
It also requires that the
+
be at the beginning of the next line and won't let them be at the end. If they are at the end, it gived a confusing syntax error.Desired:
snakefmt error:
How can I intersperse comments in multi-line shell strings without snakefmt moving them?
The text was updated successfully, but these errors were encountered: