<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Snakemake]]></title><description><![CDATA[<p dir="auto">一，安装<br />
准备：<br />
sudo apt update<br />
sudo apt install python3-venv<br />
python3 -m venv .<br />
source bin/activate<br />
准备：<br />
sudo apt-get install build-essential<br />
python <a href="http://setup.py" rel="nofollow ugc">setup.py</a> bdist_wheel<br />
sudo apt-get install python3-dev<br />
安装：<br />
pip3 install --upgrade snakemake<br />
二，简介<br />
参考胶片：<a href="/assets/uploads/files/1595408737491-snakemake.pptx">snakemake.pptx</a><br />
The Snakemake workflow management system is a tool to create <strong>reproducible and scalable</strong> data analyses. Workflows are described via a human readable, Python based language. They can be seamlessly scaled to server, cluster, grid and cloud environments, without the need to modify the workflow definition. Finally, Snakemake workflows can entail a description of required software, which will be automatically deployed to any execution environment.</p>
<pre><code>rule targets:
    input:
        "plots/myplot.pdf"

rule transform:
    input:
        "raw/{dataset}.csv"
    output:
        "transformed/{dataset}.csv"
    singularity:
        "docker://somecontainer:v1.0"
    shell:
        "somecommand {input} {output}"

rule aggregate_and_plot:
    input:
        expand("transformed/{dataset}.csv", dataset=[1, 2])
    output:
        "plots/myplot.pdf"
    conda:
        "envs/matplotlib.yaml"
    script:
        "scripts/plot.py"
</code></pre>
<p dir="auto">也支持 k8s　运行：</p>
<pre><code>snakemake --kubernetes --use-conda --default-remote-provider $REMOTE --default-remote-prefix $PREFIX
</code></pre>
<p dir="auto"><a href="https://snakemake.readthedocs.io/en/stable/" rel="nofollow ugc">https://snakemake.readthedocs.io/en/stable/</a></p>
]]></description><link>http://an.forum.genostack.com/topic/9/snakemake</link><generator>RSS for Node</generator><lastBuildDate>Sat, 13 Jun 2026 12:30:59 GMT</lastBuildDate><atom:link href="http://an.forum.genostack.com/topic/9.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Jul 2020 08:36:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Snakemake on Fri, 02 Jun 2023 08:37:04 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://snakemake.readthedocs.io/en/stable/executing/cloud.html" rel="nofollow ugc">https://snakemake.readthedocs.io/en/stable/executing/cloud.html</a><br />
snakemake支持tes</p>
]]></description><link>http://an.forum.genostack.com/post/2203</link><guid isPermaLink="true">http://an.forum.genostack.com/post/2203</guid><dc:creator><![CDATA[anneng]]></dc:creator><pubDate>Fri, 02 Jun 2023 08:37:04 GMT</pubDate></item><item><title><![CDATA[Reply to Snakemake on Fri, 02 Jun 2023 08:20:17 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://elixir-workflow-workshop.github.io/2021/slide_decks/ELIXIR_WorkWork2021_WESkit.pdf" rel="nofollow ugc">https://elixir-workflow-workshop.github.io/2021/slide_decks/ELIXIR_WorkWork2021_WESkit.pdf</a><br />
<a href="https://gitlab.com/one-touch-pipeline/weskit/api" rel="nofollow ugc">https://gitlab.com/one-touch-pipeline/weskit/api</a></p>
<p dir="auto">weskit<br />
A GA4GH compliant Workflow-Execution-Service (WES) for Nextflow and Snakemake.</p>
]]></description><link>http://an.forum.genostack.com/post/2202</link><guid isPermaLink="true">http://an.forum.genostack.com/post/2202</guid><dc:creator><![CDATA[anneng]]></dc:creator><pubDate>Fri, 02 Jun 2023 08:20:17 GMT</pubDate></item><item><title><![CDATA[Reply to Snakemake on Fri, 02 Jun 2023 07:47:50 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://docs.nersc.gov/jobs/workflow/snakemake/" rel="nofollow ugc">https://docs.nersc.gov/jobs/workflow/snakemake/</a><br />
Strengths of Snakemake¶<br />
Suitable for complex jobs and dependency structures, including wildcards<br />
Built-in methods to visualize task graph<br />
Can run tasks in parallel<br />
Built-in methods to keep track of finished and pending tasks<br />
Easy on SLURM (when Cluster execution is not used)<br />
Disadvantages of Snakemake¶<br />
Snakemake is complex and requires time to learn<br />
Works in two modes: single node or cluster mode, although cluster mode is not a good fit for NERSC. We strongly suggest that Snakemake be used for single node jobs. Users who need multinode jobs should use another tool such as Parsl, Taskfarmer, or Fireworks.<br />
Cluster execution not suitable for NERSC</p>
<p dir="auto">Astute readers of the Snakemake docs will find that Snakemake has a cluster execution capability. However, this means that Snakemake will treat each rule as a separate job and submit many requests to Slurm. We don't recommend this for Snakemake users at NERSC. 1) Submitting each rule as a separate job means that a Snakemake workflow may take a long time to complete and 2) submitting many jobs to Slurm will degrade scheduler performance for everyone. One of the main advantages of workflow tools is that they can often work independently of a job scheduler, so we strongly encourage single node Snakeflow jobs that will run without burdening Slurm.</p>
]]></description><link>http://an.forum.genostack.com/post/2201</link><guid isPermaLink="true">http://an.forum.genostack.com/post/2201</guid><dc:creator><![CDATA[anneng]]></dc:creator><pubDate>Fri, 02 Jun 2023 07:47:50 GMT</pubDate></item></channel></rss>