Skip to content

Commit 92e2180

Browse files
add new links
1 parent 00381c2 commit 92e2180

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/assets/md/session2020/Workflow_Snakemake.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
snakemake -s exo5.smk -R all fastqc
153153
</code></pre><p><em><strong><span>Observe the results</span></strong></em><br>
154154
<span>Does Snakemake do the job?</span></p><p><em><strong><span>Fastqc: job or jobs?</span></strong></em><br>
155-
<span>Look at more precisely the fastqc job. We have many input files but snakemake launched only one fastqc job:</span></p><p><img src="https://github.com/chernan/FAIR_bioinfo_docs/blob/master/03_workflow/images/FAIR_ex1_o5_smk.png" alt="image"></p><p><span>It is because thefastqcrule is defined with a list of files and not for one unique file and because thefastqc tool accepts both a unique file as wellas a list of files.</span></p><h3 id="Objective-6-Running-n-individual-jobs" data-id="Objective-6-Running-n-individual-jobs"><a class="anchor hidden-xs" href="#Objective-6-Running-n-individual-jobs" title="Objective-6-Running-n-individual-jobs"><span class="octicon octicon-link"></span></a><span>Objective 6: Running n individual jobs</span></h3><p><span>Create snakemake file </span><em><span>exo6.smk</span></em><span>. Improve previous code: Thank to the all rule, all expected files are designated. So we don’t need to give the fastqc rule a list anymore and we can replace it to manage only one file and all files one by one. We will gain in power in system shaving more than one core.</span></p><hr><p><em><strong><span>HINT</span></strong></em><br>
155+
<span>Look at more precisely the fastqc job. We have many input files but snakemake launched only one fastqc job:</span></p><p><img src="https://github.com/chernan/FAIR_bioinfo_docs/raw/master/03_workflow/images/FAIR_ex1_o5_smk.png" alt="image"></p><p><span>It is because thefastqcrule is defined with a list of files and not for one unique file and because thefastqc tool accepts both a unique file as wellas a list of files.</span></p><h3 id="Objective-6-Running-n-individual-jobs" data-id="Objective-6-Running-n-individual-jobs"><a class="anchor hidden-xs" href="#Objective-6-Running-n-individual-jobs" title="Objective-6-Running-n-individual-jobs"><span class="octicon octicon-link"></span></a><span>Objective 6: Running n individual jobs</span></h3><p><span>Create snakemake file </span><em><span>exo6.smk</span></em><span>. Improve previous code: Thank to the all rule, all expected files are designated. So we don’t need to give the fastqc rule a list anymore and we can replace it to manage only one file and all files one by one. We will gain in power in system shaving more than one core.</span></p><hr><p><em><strong><span>HINT</span></strong></em><br>
156156
<span>Replace the expand()function with a wildcard for one filename in the fastqc rule.</span></p><hr><p><strong><span>Solution</span></strong></p><pre><code>SAMPLES = ["SRR3099585_chr18","SRR3099586_chr18","SRR3099587_chr18"]
157157
BIDX = ["1","2","3","4","rev.1","rev.2"]
158158

@@ -178,7 +178,7 @@
178178
</code></pre><p><strong><span>Snakemake run</span></strong></p><pre><code>rm -Rf FastQC/
179179
snakemake -s exo6.smk -R all fastqc
180180
</code></pre><p><em><strong><span>Observe the results</span></strong></em><br>
181-
<span>Now Snakemake did many fastqc jobs:</span></p><p><img src="https://github.com/chernan/FAIR_bioinfo_docs/blob/master/03_workflow/images/FAIR_ex1_o6_smk.png" alt="image"></p><p><span>But what happens to the runtime displays on the screen? To correct this, we will move the displays to a log file specific for each rule and each input file.</span></p><h3 id="Objective-7-Adding-log-file" data-id="Objective-7-Adding-log-file"><a class="anchor hidden-xs" href="#Objective-7-Adding-log-file" title="Objective-7-Adding-log-file"><span class="octicon octicon-link"></span></a><span>Objective 7: Adding log file</span></h3><p><span>Create snakemake file </span><em><span>exo7.smk</span></em><span>. Improve previous code:</span><br>
181+
<span>Now Snakemake did many fastqc jobs:</span></p><p><img src="https://github.com/chernan/FAIR_bioinfo_docs/raw/master/03_workflow/images/FAIR_ex1_o6_smk.png" alt="image"></p><p><span>But what happens to the runtime displays on the screen? To correct this, we will move the displays to a log file specific for each rule and each input file.</span></p><h3 id="Objective-7-Adding-log-file" data-id="Objective-7-Adding-log-file"><a class="anchor hidden-xs" href="#Objective-7-Adding-log-file" title="Objective-7-Adding-log-file"><span class="octicon octicon-link"></span></a><span>Objective 7: Adding log file</span></h3><p><span>Create snakemake file </span><em><span>exo7.smk</span></em><span>. Improve previous code:</span><br>
182182
<span>In Unix systems, the output of a command is usually sent to two separate streams: the normal output: to Standard Out (stdout also “&gt;” in shell),and error messages: to Standard Error (stderr, or “2&gt;” in shell). To integrate stderr into the same log file as the stdout can be use “&amp;&gt;” instead of “&gt;”:</span><br>
183183
<span>shell: … &amp;&gt; {log}, but use with care when output files are printed tostdout (as often in shell comands). Redirect the stdout and stderr streams of the fastqc and bowtie2-build commands.</span></p><hr><p><em><strong><span>HINT</span></strong></em><br>
184184
<span>For the bowtie2-build and fastqc rules, add the log: directive with two variables (log1 and log2) to redirect each streams.</span></p><hr><p><strong><span>Solution</span></strong></p><pre><code>SAMPLES = ["SRR3099585_chr18","SRR3099586_chr18","SRR3099587_chr18"]

docs/assets/md/session2020/workflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ Does Snakemake do the job?
242242
***Fastqc: job or jobs?***
243243
Look at more precisely the fastqc job. We have many input files but snakemake launched only one fastqc job:
244244

245-
![image](https://github.com/chernan/FAIR_bioinfo_docs/blob/master/03_workflow/images/FAIR_ex1_o5_smk.png)
245+
![image](https://github.com/chernan/FAIR_bioinfo_docs/raw/master/03_workflow/images/FAIR_ex1_o5_smk.png)
246246

247247
It is because thefastqcrule is defined with a list of files and not for one unique file and because thefastqc tool accepts both a unique file as wellas a list of files.
248248

@@ -294,7 +294,7 @@ snakemake -s exo6.smk -R all fastqc
294294
***Observe the results***
295295
Now Snakemake did many fastqc jobs:
296296

297-
![image](https://github.com/chernan/FAIR_bioinfo_docs/blob/master/03_workflow/images/FAIR_ex1_o6_smk.png)
297+
![image](https://github.com/chernan/FAIR_bioinfo_docs/raw/master/03_workflow/images/FAIR_ex1_o6_smk.png)
298298

299299
But what happens to the runtime displays on the screen? To correct this, we will move the displays to a log file specific for each rule and each input file.
300300

docs/session2020.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ <h2 id="materiel">Matériels des participants</h2>
403403
<p>Outils collaboratif pour le md : <a href="https://hackmd.io/">HackMD</a>. Merci Clémence et Diane !</p>
404404

405405
<ul>
406-
<li>Git / GitHub par Alexandra & Clothilde : <a href="./assets/md/session2020/" target="_blank">html</a> <a href="./assets/md/session2020/git-github.md" target="_blank">md</a></li>
406+
<li>Git / GitHub par Alexandra & Clothilde : <a href="./assets/md/session2020/git-github.html" target="_blank">html</a> <a href="./assets/md/session2020/git-github.md" target="_blank">md</a></li>
407407
<li>Docker par Diane & Clémence : <a href="./assets/md/session2020/TPDocker.html" target="_blank">html</a> <a href="./assets/md/session2020/TPDocker.md" target="_blank">md</a></li>
408408
<li>Conda par Thomas & Krisley : <ul>
409409
<li>Cours : <a href="./assets/md/session2020/Conda cours.html" target="_blank">html</a> <a href="./assets/md/session2020/Conda_cours.md" target="_blank">md</a>

0 commit comments

Comments
 (0)