Skip to content

Commit

Permalink
add new links
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasdenecker committed Sep 2, 2020
1 parent 00381c2 commit 92e2180
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/assets/md/session2020/Workflow_Snakemake.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
snakemake -s exo5.smk -R all fastqc
</code></pre><p><em><strong><span>Observe the results</span></strong></em><br>
<span>Does Snakemake do the job?</span></p><p><em><strong><span>Fastqc: job or jobs?</span></strong></em><br>
<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>
<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>
<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"]
BIDX = ["1","2","3","4","rev.1","rev.2"]

Expand All @@ -178,7 +178,7 @@
</code></pre><p><strong><span>Snakemake run</span></strong></p><pre><code>rm -Rf FastQC/
snakemake -s exo6.smk -R all fastqc
</code></pre><p><em><strong><span>Observe the results</span></strong></em><br>
<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>
<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>
<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>
<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>
<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"]
Expand Down
4 changes: 2 additions & 2 deletions docs/assets/md/session2020/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ Does Snakemake do the job?
***Fastqc: job or jobs?***
Look at more precisely the fastqc job. We have many input files but snakemake launched only one fastqc job:

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

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.

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

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

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.

Expand Down
2 changes: 1 addition & 1 deletion docs/session2020.html
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ <h2 id="materiel">Matériels des participants</h2>
<p>Outils collaboratif pour le md : <a href="https://hackmd.io/">HackMD</a>. Merci Clémence et Diane !</p>

<ul>
<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>
<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>
<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>
<li>Conda par Thomas & Krisley : <ul>
<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>
Expand Down

0 comments on commit 92e2180

Please sign in to comment.