如何将.txt文件中的每一行用作snakemake的新输入
我在其中有一个“ filenames.txt”文件:
a.txt
b.txt
c.txt
d.txt
我想将这些行用作snakemake中的输入。有人知道我该怎么做吗?
I have a file 'filenames.txt' with in it:
a.txt
b.txt
c.txt
d.txt
I want to use these lines as input in snakemake. Does anyone know how I could do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在蛇文件中使用Python。这是您可以获取文件名列表的方式:
然后,我不确定您打算如何使用这些文件名。
如果您希望工作流创建这些文件,则应将其制成
Input
top all 规则的部分:您当然应该有一个可以创建这样的规则文件:
You can use python inside a snakefile. Here is how you could obtain a list of file names:
Then, I'm not sure how you intend to use those file names.
If you want your workflow to create those files, it should be made the
input
section of the topall
rule:And you should of course have a rule that can create such a file: