amazon-s3 - 如何在不使用 {output} 的情况下让 Snakemake 确认远程文件
问题描述
感谢您继续为 Snakemake 付出如此多的努力!
snakemake --no-shared-fs --default-remote-provider S3 --default-remote-prefix mybucket hellos3
所以这对我不起作用(MissingOutputException)
rule hellos3:
output: "hello_s3.txt"
shell:
"""
echo "hello world" > hello_s3_tmp.txt
aws s3 cp hello_s3_tmp.txt s3://mybucket/hello_s3.txt
"""
但这有效:
rule hellos3:
output: "hello_s3.txt"
shell:
"""
echo "hello world" > hello_s3_tmp.txt
cp hello_s3_tmp.txt {output}
"""
我怎样才能说服 Snakemake 文件出现在它们应该出现的位置,而不必让 Snakemake 将它们放在那里?如果某个远程进程将它们放在那里怎么办?
解决方案
touch
作品
rule hellos3:
output: "hello_s3.txt"
shell:
"""
echo "hello world" > hello_s3_tmp.txt
aws s3 cp hello_s3_tmp.txt s3://mybucket/hello_s3.txt && touch {output}
"""
推荐阅读
- pipe - Python:如何调试打印到标准输出的数据未打印
- c# - 列表
添加方法不起作用C# - java - JAVA泛型构造函数问题
- openshift - Openshift 3.11 atomic-openshift-node - 服务重启影响
- java - 如何洗牌一个集合?
- javascript - 卡住试图编写分离轴定理代码
- javascript - 带有 Javascript 的 Paypal 智能按钮并获取到 PHP 页面
- java - Java - 将文件从本地目录传输到 S3 的有效方法
- sql - 我想找到已经租借的电影比“Silverado”还多?需要输出:标题和租用次数
- rust - 使用 reqwest crate 进行 oauth2 身份验证 - redirect_uri_mismatch