Compare commits
No commits in common. 'master' and 'gh-pages' have entirely different histories.
56 changed files with 9465 additions and 577 deletions
@ -1,3 +0,0 @@
@@ -1,3 +0,0 @@
|
||||
[submodule "mkdocs-material"] |
||||
path = mkdocs-material |
||||
url = https://git.charlesreid1.com/charlesreid1/mkdocs-material.git |
@ -1,20 +0,0 @@
@@ -1,20 +0,0 @@
|
||||
Copyright (c) 2018 Charles Reid |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software and associated documentation files (the "Software"), to deal |
||||
in the Software without restriction, including without limitation the rights |
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
copies of the Software, and to permit persons to whom the Software is |
||||
furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included in all |
||||
copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
SOFTWARE. |
||||
|
@ -1,10 +0,0 @@
@@ -1,10 +0,0 @@
|
||||
# how do I snakemake? |
||||
|
||||
A guide to getting up and running with Snakemake. |
||||
|
||||
See [how do I snakemake?](https://pages.charlesreid1.com/how-do-i-snakemake) (the website). |
||||
|
||||
Source repository on git.charlesreid1.com [here](https://git.charlesreid1.com/charlesreid1/how-do-i-snakemake). |
||||
|
||||
Source repository on github [here](https://github.com/charlesreid1/how-do-i-snakemake). |
||||
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,13 @@
@@ -0,0 +1,13 @@
|
||||
/*! |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not |
||||
* use this file except in compliance with the License. You may obtain a copy |
||||
* of the License at: |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0 |
||||
* |
||||
* UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, SOFTWARE |
||||
* DISTRIBUTED UNDER THE LICENSE IS DISTRIBUTED ON AN "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. |
||||
* SEE THE LICENSE FOR THE SPECIFIC LANGUAGE GOVERNING PERMISSIONS AND |
||||
* LIMITATIONS UNDER THE LICENSE. |
||||
*/@font-face{font-family:"Material Icons";font-style:normal;font-weight:400;src:local("Material Icons"),local("MaterialIcons-Regular"),url("specimen/MaterialIcons-Regular.woff2") format("woff2"),url("specimen/MaterialIcons-Regular.woff") format("woff"),url("specimen/MaterialIcons-Regular.ttf") format("truetype")} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 521 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.6 KiB |
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,i,n;e.da=function(){this.pipeline.reset(),this.pipeline.add(e.da.trimmer,e.da.stopWordFilter,e.da.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.da.stemmer))},e.da.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.da.trimmer=e.trimmerSupport.generateTrimmer(e.da.wordCharacters),e.Pipeline.registerFunction(e.da.trimmer,"trimmer-da"),e.da.stemmer=(r=e.stemmerSupport.Among,i=e.stemmerSupport.SnowballProgram,n=new function(){var e,n,t,s=[new r("hed",-1,1),new r("ethed",0,1),new r("ered",-1,1),new r("e",-1,1),new r("erede",3,1),new r("ende",3,1),new r("erende",5,1),new r("ene",3,1),new r("erne",3,1),new r("ere",3,1),new r("en",-1,1),new r("heden",10,1),new r("eren",10,1),new r("er",-1,1),new r("heder",13,1),new r("erer",13,1),new r("s",-1,2),new r("heds",16,1),new r("es",16,1),new r("endes",18,1),new r("erendes",19,1),new r("enes",18,1),new r("ernes",18,1),new r("eres",18,1),new r("ens",16,1),new r("hedens",24,1),new r("erens",24,1),new r("ers",16,1),new r("ets",16,1),new r("erets",28,1),new r("et",-1,1),new r("eret",30,1)],o=[new r("gd",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1)],a=[new r("ig",-1,1),new r("lig",0,1),new r("elig",1,1),new r("els",-1,1),new r("løst",-1,2)],d=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],u=[239,254,42,3,0,0,0,0,0,0,0,0,0,0,0,0,16],c=new i;function l(){var e,r=c.limit-c.cursor;c.cursor>=n&&(e=c.limit_backward,c.limit_backward=n,c.ket=c.cursor,c.find_among_b(o,4)?(c.bra=c.cursor,c.limit_backward=e,c.cursor=c.limit-r,c.cursor>c.limit_backward&&(c.cursor--,c.bra=c.cursor,c.slice_del())):c.limit_backward=e)}this.setCurrent=function(e){c.setCurrent(e)},this.getCurrent=function(){return c.getCurrent()},this.stem=function(){var r,i=c.cursor;return function(){var r,i=c.cursor+3;if(n=c.limit,0<=i&&i<=c.limit){for(e=i;;){if(r=c.cursor,c.in_grouping(d,97,248)){c.cursor=r;break}if(c.cursor=r,r>=c.limit)return;c.cursor++}for(;!c.out_grouping(d,97,248);){if(c.cursor>=c.limit)return;c.cursor++}(n=c.cursor)<e&&(n=e)}}(),c.limit_backward=i,c.cursor=c.limit,function(){var e,r;if(c.cursor>=n&&(r=c.limit_backward,c.limit_backward=n,c.ket=c.cursor,e=c.find_among_b(s,32),c.limit_backward=r,e))switch(c.bra=c.cursor,e){case 1:c.slice_del();break;case 2:c.in_grouping_b(u,97,229)&&c.slice_del()}}(),c.cursor=c.limit,l(),c.cursor=c.limit,function(){var e,r,i,t=c.limit-c.cursor;if(c.ket=c.cursor,c.eq_s_b(2,"st")&&(c.bra=c.cursor,c.eq_s_b(2,"ig")&&c.slice_del()),c.cursor=c.limit-t,c.cursor>=n&&(r=c.limit_backward,c.limit_backward=n,c.ket=c.cursor,e=c.find_among_b(a,5),c.limit_backward=r,e))switch(c.bra=c.cursor,e){case 1:c.slice_del(),i=c.limit-c.cursor,l(),c.cursor=c.limit-i;break;case 2:c.slice_from("løs")}}(),c.cursor=c.limit,c.cursor>=n&&(r=c.limit_backward,c.limit_backward=n,c.ket=c.cursor,c.out_grouping_b(d,97,248)?(c.bra=c.cursor,t=c.slice_to(t),c.limit_backward=r,c.eq_v_b(t)&&c.slice_del()):c.limit_backward=r),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return n.setCurrent(e),n.stem(),n.getCurrent()}):(n.setCurrent(e),n.stem(),n.getCurrent())}),e.Pipeline.registerFunction(e.da.stemmer,"stemmer-da"),e.da.stopWordFilter=e.generateStopWordFilter("ad af alle alt anden at blev blive bliver da de dem den denne der deres det dette dig din disse dog du efter eller en end er et for fra ham han hans har havde have hende hendes her hos hun hvad hvis hvor i ikke ind jeg jer jo kunne man mange med meget men mig min mine mit mod ned noget nogle nu når og også om op os over på selv sig sin sine sit skal skulle som sådan thi til ud under var vi vil ville vor være været".split(" ")),e.Pipeline.registerFunction(e.da.stopWordFilter,"stopWordFilter-da")}}); |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r="2"==e.version[0];e.jp=function(){this.pipeline.reset(),this.pipeline.add(e.jp.stopWordFilter,e.jp.stemmer),r?this.tokenizer=e.jp.tokenizer:(e.tokenizer&&(e.tokenizer=e.jp.tokenizer),this.tokenizerFn&&(this.tokenizerFn=e.jp.tokenizer))};var t=new e.TinySegmenter;e.jp.tokenizer=function(n){if(!arguments.length||null==n||null==n)return[];if(Array.isArray(n))return n.map(function(t){return r?new e.Token(t.toLowerCase()):t.toLowerCase()});for(var i=n.toString().toLowerCase().replace(/^\s+/,""),o=i.length-1;o>=0;o--)if(/\S/.test(i.charAt(o))){i=i.substring(0,o+1);break}return t.segment(i).filter(function(e){return!!e}).map(function(t){return r?new e.Token(t):t})},e.jp.stemmer=function(e){return e},e.Pipeline.registerFunction(e.jp.stemmer,"stemmer-jp"),e.jp.wordCharacters="一二三四五六七八九十百千万億兆一-龠々〆ヵヶぁ-んァ-ヴーア-ン゙a-zA-Za-zA-Z0-90-9",e.jp.stopWordFilter=function(t){if(-1===e.jp.stopWordFilter.stopWords.indexOf(r?t.toString():t))return t},e.jp.stopWordFilter=e.generateStopWordFilter("これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし".split(" ")),e.Pipeline.registerFunction(e.jp.stopWordFilter,"stopWordFilter-jp")}}); |
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
!function(e,i){"function"==typeof define&&define.amd?define(i):"object"==typeof exports?module.exports=i():i()(e.lunr)}(this,function(){return function(e){e.multiLanguage=function(){for(var i=Array.prototype.slice.call(arguments),t=i.join("-"),r="",n=[],s=[],p=0;p<i.length;++p)"en"==i[p]?(r+="\\w",n.unshift(e.stopWordFilter),n.push(e.stemmer),s.push(e.stemmer)):(r+=e[i[p]].wordCharacters,n.unshift(e[i[p]].stopWordFilter),n.push(e[i[p]].stemmer),s.push(e[i[p]].stemmer));var o=e.trimmerSupport.generateTrimmer(r);return e.Pipeline.registerFunction(o,"lunr-multi-trimmer-"+t),n.unshift(o),function(){this.pipeline.reset(),this.pipeline.add.apply(this.pipeline,n),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add.apply(this.searchPipeline,s))}}}}); |
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,n,i;e.no=function(){this.pipeline.reset(),this.pipeline.add(e.no.trimmer,e.no.stopWordFilter,e.no.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.no.stemmer))},e.no.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.no.trimmer=e.trimmerSupport.generateTrimmer(e.no.wordCharacters),e.Pipeline.registerFunction(e.no.trimmer,"trimmer-no"),e.no.stemmer=(r=e.stemmerSupport.Among,n=e.stemmerSupport.SnowballProgram,i=new function(){var e,i,t=[new r("a",-1,1),new r("e",-1,1),new r("ede",1,1),new r("ande",1,1),new r("ende",1,1),new r("ane",1,1),new r("ene",1,1),new r("hetene",6,1),new r("erte",1,3),new r("en",-1,1),new r("heten",9,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",12,1),new r("s",-1,2),new r("as",14,1),new r("es",14,1),new r("edes",16,1),new r("endes",16,1),new r("enes",16,1),new r("hetenes",19,1),new r("ens",14,1),new r("hetens",21,1),new r("ers",14,1),new r("ets",14,1),new r("et",-1,1),new r("het",25,1),new r("ert",-1,3),new r("ast",-1,1)],o=[new r("dt",-1,-1),new r("vt",-1,-1)],s=[new r("leg",-1,1),new r("eleg",0,1),new r("ig",-1,1),new r("eig",2,1),new r("lig",2,1),new r("elig",4,1),new r("els",-1,1),new r("lov",-1,1),new r("elov",7,1),new r("slov",7,1),new r("hetslov",9,1)],a=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],m=[119,125,149,1],l=new n;this.setCurrent=function(e){l.setCurrent(e)},this.getCurrent=function(){return l.getCurrent()},this.stem=function(){var r,n,u,d,c=l.cursor;return function(){var r,n=l.cursor+3;if(i=l.limit,0<=n||n<=l.limit){for(e=n;;){if(r=l.cursor,l.in_grouping(a,97,248)){l.cursor=r;break}if(r>=l.limit)return;l.cursor=r+1}for(;!l.out_grouping(a,97,248);){if(l.cursor>=l.limit)return;l.cursor++}(i=l.cursor)<e&&(i=e)}}(),l.limit_backward=c,l.cursor=l.limit,function(){var e,r,n;if(l.cursor>=i&&(r=l.limit_backward,l.limit_backward=i,l.ket=l.cursor,e=l.find_among_b(t,29),l.limit_backward=r,e))switch(l.bra=l.cursor,e){case 1:l.slice_del();break;case 2:n=l.limit-l.cursor,l.in_grouping_b(m,98,122)?l.slice_del():(l.cursor=l.limit-n,l.eq_s_b(1,"k")&&l.out_grouping_b(a,97,248)&&l.slice_del());break;case 3:l.slice_from("er")}}(),l.cursor=l.limit,n=l.limit-l.cursor,l.cursor>=i&&(r=l.limit_backward,l.limit_backward=i,l.ket=l.cursor,l.find_among_b(o,2)?(l.bra=l.cursor,l.limit_backward=r,l.cursor=l.limit-n,l.cursor>l.limit_backward&&(l.cursor--,l.bra=l.cursor,l.slice_del())):l.limit_backward=r),l.cursor=l.limit,l.cursor>=i&&(d=l.limit_backward,l.limit_backward=i,l.ket=l.cursor,(u=l.find_among_b(s,11))?(l.bra=l.cursor,l.limit_backward=d,1==u&&l.slice_del()):l.limit_backward=d),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}):(i.setCurrent(e),i.stem(),i.getCurrent())}),e.Pipeline.registerFunction(e.no.stemmer,"stemmer-no"),e.no.stopWordFilter=e.generateStopWordFilter("alle at av bare begge ble blei bli blir blitt både båe da de deg dei deim deira deires dem den denne der dere deres det dette di din disse ditt du dykk dykkar då eg ein eit eitt eller elles en enn er et ett etter for fordi fra før ha hadde han hans har hennar henne hennes her hjå ho hoe honom hoss hossen hun hva hvem hver hvilke hvilken hvis hvor hvordan hvorfor i ikke ikkje ikkje ingen ingi inkje inn inni ja jeg kan kom korleis korso kun kunne kva kvar kvarhelst kven kvi kvifor man mange me med medan meg meget mellom men mi min mine mitt mot mykje ned no noe noen noka noko nokon nokor nokre nå når og også om opp oss over på samme seg selv si si sia sidan siden sin sine sitt sjøl skal skulle slik so som som somme somt så sånn til um upp ut uten var vart varte ved vere verte vi vil ville vore vors vort vår være være vært å".split(" ")),e.Pipeline.registerFunction(e.no.stopWordFilter,"stopWordFilter-no")}}); |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
!function(r,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(r.lunr)}(this,function(){return function(r){r.stemmerSupport={Among:function(r,t,i,s){if(this.toCharArray=function(r){for(var t=r.length,i=new Array(t),s=0;s<t;s++)i[s]=r.charCodeAt(s);return i},!r&&""!=r||!t&&0!=t||!i)throw"Bad Among initialisation: s:"+r+", substring_i: "+t+", result: "+i;this.s_size=r.length,this.s=this.toCharArray(r),this.substring_i=t,this.result=i,this.method=s},SnowballProgram:function(){var r;return{bra:0,ket:0,limit:0,cursor:0,limit_backward:0,setCurrent:function(t){r=t,this.cursor=0,this.limit=t.length,this.limit_backward=0,this.bra=this.cursor,this.ket=this.limit},getCurrent:function(){var t=r;return r=null,t},in_grouping:function(t,i,s){if(this.cursor<this.limit){var e=r.charCodeAt(this.cursor);if(e<=s&&e>=i&&t[(e-=i)>>3]&1<<(7&e))return this.cursor++,!0}return!1},in_grouping_b:function(t,i,s){if(this.cursor>this.limit_backward){var e=r.charCodeAt(this.cursor-1);if(e<=s&&e>=i&&t[(e-=i)>>3]&1<<(7&e))return this.cursor--,!0}return!1},out_grouping:function(t,i,s){if(this.cursor<this.limit){var e=r.charCodeAt(this.cursor);if(e>s||e<i)return this.cursor++,!0;if(!(t[(e-=i)>>3]&1<<(7&e)))return this.cursor++,!0}return!1},out_grouping_b:function(t,i,s){if(this.cursor>this.limit_backward){var e=r.charCodeAt(this.cursor-1);if(e>s||e<i)return this.cursor--,!0;if(!(t[(e-=i)>>3]&1<<(7&e)))return this.cursor--,!0}return!1},eq_s:function(t,i){if(this.limit-this.cursor<t)return!1;for(var s=0;s<t;s++)if(r.charCodeAt(this.cursor+s)!=i.charCodeAt(s))return!1;return this.cursor+=t,!0},eq_s_b:function(t,i){if(this.cursor-this.limit_backward<t)return!1;for(var s=0;s<t;s++)if(r.charCodeAt(this.cursor-t+s)!=i.charCodeAt(s))return!1;return this.cursor-=t,!0},find_among:function(t,i){for(var s=0,e=i,n=this.cursor,u=this.limit,o=0,h=0,c=!1;;){for(var a=s+(e-s>>1),f=0,l=o<h?o:h,_=t[a],m=l;m<_.s_size;m++){if(n+l==u){f=-1;break}if(f=r.charCodeAt(n+l)-_.s[m])break;l++}if(f<0?(e=a,h=l):(s=a,o=l),e-s<=1){if(s>0||e==s||c)break;c=!0}}for(;;){if(o>=(_=t[s]).s_size){if(this.cursor=n+_.s_size,!_.method)return _.result;var b=_.method();if(this.cursor=n+_.s_size,b)return _.result}if((s=_.substring_i)<0)return 0}},find_among_b:function(t,i){for(var s=0,e=i,n=this.cursor,u=this.limit_backward,o=0,h=0,c=!1;;){for(var a=s+(e-s>>1),f=0,l=o<h?o:h,_=(m=t[a]).s_size-1-l;_>=0;_--){if(n-l==u){f=-1;break}if(f=r.charCodeAt(n-1-l)-m.s[_])break;l++}if(f<0?(e=a,h=l):(s=a,o=l),e-s<=1){if(s>0||e==s||c)break;c=!0}}for(;;){var m;if(o>=(m=t[s]).s_size){if(this.cursor=n-m.s_size,!m.method)return m.result;var b=m.method();if(this.cursor=n-m.s_size,b)return m.result}if((s=m.substring_i)<0)return 0}},replace_s:function(t,i,s){var e=s.length-(i-t),n=r.substring(0,t),u=r.substring(i);return r=n+s+u,this.limit+=e,this.cursor>=i?this.cursor+=e:this.cursor>t&&(this.cursor=t),e},slice_check:function(){if(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>r.length)throw"faulty slice operation"},slice_from:function(r){this.slice_check(),this.replace_s(this.bra,this.ket,r)},slice_del:function(){this.slice_from("")},insert:function(r,t,i){var s=this.replace_s(r,t,i);r<=this.bra&&(this.bra+=s),r<=this.ket&&(this.ket+=s)},slice_to:function(){return this.slice_check(),r.substring(this.bra,this.ket)},eq_v_b:function(r){return this.eq_s_b(r.length,r)}}}},r.trimmerSupport={generateTrimmer:function(r){var t=new RegExp("^[^"+r+"]+"),i=new RegExp("[^"+r+"]+$");return function(r){return"function"==typeof r.update?r.update(function(r){return r.replace(t,"").replace(i,"")}):r.replace(t,"").replace(i,"")}}}}}); |
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,n,t;e.sv=function(){this.pipeline.reset(),this.pipeline.add(e.sv.trimmer,e.sv.stopWordFilter,e.sv.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.sv.stemmer))},e.sv.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.sv.trimmer=e.trimmerSupport.generateTrimmer(e.sv.wordCharacters),e.Pipeline.registerFunction(e.sv.trimmer,"trimmer-sv"),e.sv.stemmer=(r=e.stemmerSupport.Among,n=e.stemmerSupport.SnowballProgram,t=new function(){var e,t,i=[new r("a",-1,1),new r("arna",0,1),new r("erna",0,1),new r("heterna",2,1),new r("orna",0,1),new r("ad",-1,1),new r("e",-1,1),new r("ade",6,1),new r("ande",6,1),new r("arne",6,1),new r("are",6,1),new r("aste",6,1),new r("en",-1,1),new r("anden",12,1),new r("aren",12,1),new r("heten",12,1),new r("ern",-1,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",18,1),new r("or",-1,1),new r("s",-1,2),new r("as",21,1),new r("arnas",22,1),new r("ernas",22,1),new r("ornas",22,1),new r("es",21,1),new r("ades",26,1),new r("andes",26,1),new r("ens",21,1),new r("arens",29,1),new r("hetens",29,1),new r("erns",21,1),new r("at",-1,1),new r("andet",-1,1),new r("het",-1,1),new r("ast",-1,1)],s=[new r("dd",-1,-1),new r("gd",-1,-1),new r("nn",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1),new r("tt",-1,-1)],a=[new r("ig",-1,1),new r("lig",0,1),new r("els",-1,1),new r("fullt",-1,3),new r("löst",-1,2)],o=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,24,0,32],u=[119,127,149],m=new n;this.setCurrent=function(e){m.setCurrent(e)},this.getCurrent=function(){return m.getCurrent()},this.stem=function(){var r,n=m.cursor;return function(){var r,n=m.cursor+3;if(t=m.limit,0<=n||n<=m.limit){for(e=n;;){if(r=m.cursor,m.in_grouping(o,97,246)){m.cursor=r;break}if(m.cursor=r,m.cursor>=m.limit)return;m.cursor++}for(;!m.out_grouping(o,97,246);){if(m.cursor>=m.limit)return;m.cursor++}(t=m.cursor)<e&&(t=e)}}(),m.limit_backward=n,m.cursor=m.limit,function(){var e,r=m.limit_backward;if(m.cursor>=t&&(m.limit_backward=t,m.cursor=m.limit,m.ket=m.cursor,e=m.find_among_b(i,37),m.limit_backward=r,e))switch(m.bra=m.cursor,e){case 1:m.slice_del();break;case 2:m.in_grouping_b(u,98,121)&&m.slice_del()}}(),m.cursor=m.limit,r=m.limit_backward,m.cursor>=t&&(m.limit_backward=t,m.cursor=m.limit,m.find_among_b(s,7)&&(m.cursor=m.limit,m.ket=m.cursor,m.cursor>m.limit_backward&&(m.bra=--m.cursor,m.slice_del())),m.limit_backward=r),m.cursor=m.limit,function(){var e,r;if(m.cursor>=t){if(r=m.limit_backward,m.limit_backward=t,m.cursor=m.limit,m.ket=m.cursor,e=m.find_among_b(a,5))switch(m.bra=m.cursor,e){case 1:m.slice_del();break;case 2:m.slice_from("lös");break;case 3:m.slice_from("full")}m.limit_backward=r}}(),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return t.setCurrent(e),t.stem(),t.getCurrent()}):(t.setCurrent(e),t.stem(),t.getCurrent())}),e.Pipeline.registerFunction(e.sv.stemmer,"stemmer-sv"),e.sv.stopWordFilter=e.generateStopWordFilter("alla allt att av blev bli blir blivit de dem den denna deras dess dessa det detta dig din dina ditt du där då efter ej eller en er era ert ett från för ha hade han hans har henne hennes hon honom hur här i icke ingen inom inte jag ju kan kunde man med mellan men mig min mina mitt mot mycket ni nu när någon något några och om oss på samma sedan sig sin sina sitta själv skulle som så sådan sådana sådant till under upp ut utan vad var vara varför varit varje vars vart vem vi vid vilka vilkas vilken vilket vår våra vårt än är åt över".split(" ")),e.Pipeline.registerFunction(e.sv.stopWordFilter,"stopWordFilter-sv")}}); |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,395 +0,0 @@
@@ -1,395 +0,0 @@
|
||||
# Converting Workflows to Snakemake |
||||
|
||||
One of the common questions about Snakemake is, **how should beginners get |
||||
started?** |
||||
|
||||
When you're starting out with Snakemake, one of the first hurdles you'll |
||||
encounter is a big gap between the examples (simple) and your real-world |
||||
workflow (complicated). |
||||
|
||||
Snakemake is a relatively new (but well-documented) piece of software, so there |
||||
aren't a lot of examples, and the ones you can find will leave you wanting more. |
||||
Starting out, you'll find that (nearly) every step of your workflow presents |
||||
some kind of corner case that's not covered in any Snakemake examples. |
||||
|
||||
Two recommendations to help overcome this: |
||||
|
||||
1. Don't _start_ with Snakemake - start with shell scripts. Get your pipeline |
||||
working as a shell script or a list of commands first, using a small data set. |
||||
_Then_ convert the workflow to Snakemake. |
||||
|
||||
2. Converting your workflow from shell scripts to a Snakefile can happen in |
||||
_stages_. Start with a single Snakemake rule that calls a single bash shell |
||||
script that downloads all of the reads at once (handle the complexity in the |
||||
shell script). Eventually, you can start to break up the shell script into |
||||
smaller parts, and convert some of those parts into separate Snakemake rules. |
||||
|
||||
|
||||
## Example: Filtering Sequencer Reads |
||||
|
||||
Let's illustrate the process of converting a workflow from shell scripts to a |
||||
Snakefile, and doing so in stages, using a hypothetical workflow that involves |
||||
downloading data files containing reads from a sequencer from an external URL: |
||||
|
||||
| Read Files | URL (note: these links are fake) | |
||||
|------------|----------------------------------| |
||||
| `SRR606_1_reads.fq.gz` | <http://example.com/SRR606_1_reads.fq.gz> | |
||||
| `SRR606_2_reads.fq.gz` | <http://example.com/SRR606_2_reads.fq.gz> | |
||||
| `SRR607_1_reads.fq.gz` | <http://example.com/SRR607_1_reads.fq.gz> | |
||||
| `SRR607_2_reads.fq.gz` | <http://example.com/SRR607_2_reads.fq.gz> | |
||||
| `SRR608_1_reads.fq.gz` | <http://example.com/SRR608_1_reads.fq.gz> | |
||||
| `SRR608_2_reads.fq.gz` | <http://example.com/SRR608_2_reads.fq.gz> | |
||||
| `SRR609_1_reads.fq.gz` | <http://example.com/SRR609_1_reads.fq.gz> | |
||||
| `SRR609_2_reads.fq.gz` | <http://example.com/SRR609_2_reads.fq.gz> | |
||||
|
||||
|
||||
## Stage 1: Shell Script + Snakefile |
||||
|
||||
### The Shell Script |
||||
|
||||
Start out with a single Snakemake rule that calls a single bash shell script |
||||
that downloads all the reads. Here is a shell script that uses for loop magic |
||||
to download each of the read files: |
||||
|
||||
**`download_reads.sh`:** |
||||
|
||||
``` |
||||
#!/bin/bash |
||||
# |
||||
# Download some fake read files |
||||
|
||||
# Fail on the first error |
||||
set -e |
||||
|
||||
reads=" SRR606_1_reads.fq.gz |
||||
SRR606_2_reads.fq.gz |
||||
SRR607_1_reads.fq.gz |
||||
SRR607_2_reads.fq.gz |
||||
SRR608_1_reads.fq.gz |
||||
SRR608_2_reads.fq.gz |
||||
SRR609_1_reads.fq.gz |
||||
SRR609_2_reads.fq.gz" |
||||
|
||||
for read in $reads; do |
||||
|
||||
echo "Now downloading read file: ${read}" |
||||
|
||||
# Download the read file's (fake) URL |
||||
curl -L https://example.com/${read} -o ${read} |
||||
|
||||
echo "Done." |
||||
|
||||
done |
||||
``` |
||||
|
||||
The `set -e` option will stop execution of the script if any errors are |
||||
encountered. If any of the downloads fail, the shell script will fail, and |
||||
the Snakemake `download_reads` rule will fail. |
||||
|
||||
Paste this into `download_reads.sh`, and run the following command on |
||||
the command line to make `download_reads.sh` executable: |
||||
|
||||
```bash |
||||
$ chmod download_reads.sh |
||||
``` |
||||
|
||||
### The Snakemake Strategy |
||||
|
||||
Now we want to create a Snakefile with a single very simple rule called |
||||
`download_reads` that will call `download_reads.sh`. |
||||
|
||||
Right away, we run into a challenge: Snakemake operates using files and |
||||
filenames to infer which rules to run and which rules to skip. That means any |
||||
Snakemake rule to download read files needs to have a list of files that will |
||||
only be present if the rule that runs the download reads script has successfully |
||||
run. |
||||
|
||||
If we want to have Snakemake run the `download_reads.sh` script with a single |
||||
rule, our options, in order of worst to best, are: |
||||
|
||||
* **(WORST)** We can tell Snakemake the name of every read file (copy-and-paste from the |
||||
shell script into the Snakefile) so it knows what read files should be |
||||
present when the download script has run. This requires duplicating the |
||||
list of read file names across two files - **YUCK!!!** |
||||
|
||||
* **(BETTER BUT STILL BAD)** We can tell Snakemake the name of _one_ read file, so |
||||
that if that one read file is present, Snakemake will assume the rest are also |
||||
present and that the `download_reads.sh` script has already been run. This has |
||||
the same disadvantage of needing to keep read file names coordinated across |
||||
two separate files, but also has the disadvantage that it cannot detect if the |
||||
process of downloading reads actually completed, or if it was only partially |
||||
completed. |
||||
|
||||
* **(BEST)** We can bypass the use of the read files altogether and use a handy |
||||
command, `touch`, to create a simple empty file whose presence indicates the |
||||
download reads step has run. When we instruct Snakemake to run the download |
||||
reads script, we add a command like `touch .downloaded_reads`, so that if the |
||||
file `.downloaded_reads` is present, the rule will not be run. |
||||
|
||||
Why do we use a file prefixed with a dot? That keeps the file hidden when we run `ls` |
||||
and keeps our working directory clean. |
||||
|
||||
We need to tell Snakemake that the dotfile we touch is the output of the rule, |
||||
so that it knows to link the dotfile `.downloaded_reads` with the rule |
||||
`download_reads`. To do that, we use Snakemake's `touch()` command when we |
||||
specify the output files from the rule. |
||||
|
||||
!!! tip "Tip: Running shell scripts with Snakemake" |
||||
|
||||
If you are writing a Snakemake rule that runs a shell script that outputs |
||||
multiple files, you can avoid keeping duplicate lists of files in both the |
||||
shell script and the Snakefile by defining the output of the Snakemake rule |
||||
that runs the shell script to be a dotfile (file whose name starts with a |
||||
dot, so it is hidden) that is touched when the rule is finished. |
||||
|
||||
Use Snakemake's `touch()` function in the `output:` section of your rule. |
||||
|
||||
|
||||
### The Snakefile |
||||
|
||||
Our Snakefile will define a single rule to run the shell script using |
||||
the command above. This Snakefile demonstrates a couple of concepts: |
||||
|
||||
* Using the `touch()` function to link the `.downloaded_reads` dotfile with |
||||
the `download_reads` rule |
||||
* Using a normally-defined Python variable inside of a Snakemake rule |
||||
* Documenting a rule using a triple-quoted Python docstring and using |
||||
Python-style `#` comments |
||||
|
||||
**`Snakefile`:** |
||||
|
||||
```python |
||||
touchfile = '.downloaded_reads' |
||||
|
||||
rule download_reads: |
||||
""" |
||||
Run a shell script that downloads all of our read files. |
||||
""" |
||||
output: |
||||
# This rule is now linked to this touchfile |
||||
touch(touchfile) |
||||
shell: |
||||
''' |
||||
./download_reads.sh |
||||
''' |
||||
``` |
||||
|
||||
Paste the Python code above into a file called `Snakefile`. |
||||
|
||||
|
||||
### Snakemake Flags |
||||
|
||||
Before we run Snakemake, let's cover two useful flags: |
||||
|
||||
* The `--dryrun` or `-n` option will print out the rules that Snakemake would |
||||
run, but does not actually run them. |
||||
|
||||
* The `--printshellcmds` or `-p` option will print out the shell command |
||||
associated with each rule. |
||||
|
||||
See [Executing |
||||
Snakemake](https://snakemake.readthedocs.io/en/stable/executable.html#all-options) |
||||
in the Snakemake documentation for a complete list of command line |
||||
arguments that Snakemake accepts. |
||||
|
||||
|
||||
### Running Snakemake |
||||
|
||||
Start by making sure you have Snakemake installed (see the [Installing |
||||
Snakemake](installing.md) page for instructions). |
||||
|
||||
When you run the `snakemake` command without specifying a target, it |
||||
will determine a default target and run that. The default target is the |
||||
first rule in the Snakefile. |
||||
|
||||
Alternatively, we can specify the `download_reads` target when we run Snakemake. |
||||
|
||||
From the command line, run the following: |
||||
|
||||
```bash |
||||
snakemake --dryrun --printshellcmds download_reads |
||||
``` |
||||
|
||||
This should show us that Snakemake will run a single rule and a single command: |
||||
|
||||
```plain |
||||
$ snakemake --dryrun --printshellcmds download_reads |
||||
Building DAG of jobs... |
||||
Job counts: |
||||
count jobs |
||||
1 download_reads |
||||
1 |
||||
|
||||
rule download_reads: |
||||
output: .downloaded_reads |
||||
jobid: 0 |
||||
|
||||
|
||||
./download_reads.sh |
||||
|
||||
Job counts: |
||||
count jobs |
||||
1 download_reads |
||||
1 |
||||
``` |
||||
|
||||
When we run the command without the `--dryrun` option, we should see |
||||
the output from several curl commands: |
||||
|
||||
``` |
||||
$ snakemake --printshellcmds download_reads |
||||
Building DAG of jobs... |
||||
Using shell: /usr/local/bin/bash |
||||
Provided cores: 1 |
||||
Rules claiming more threads will be scaled down. |
||||
Job counts: |
||||
count jobs |
||||
1 download_reads |
||||
1 |
||||
|
||||
rule download_reads: |
||||
output: .downloaded_reads |
||||
jobid: 0 |
||||
|
||||
|
||||
./download_reads.sh |
||||
|
||||
Now downloading read file: SRR606_1_reads.fq.gz |
||||
% Total % Received % Xferd Average Speed Time Time Time Current |
||||
Dload Upload Total Spent Left Speed |
||||
100 1270 100 1270 0 0 2346 0 --:--:-- --:--:-- --:--:-- 2347 |
||||
Now downloading read file: SRR606_2_reads.fq.gz |
||||
% Total % Received % Xferd Average Speed Time Time Time Current |
||||
Dload Upload Total Spent Left Speed |
||||
100 1270 100 1270 0 0 6214 0 --:--:-- --:--:-- --:--:-- 6195 |
||||
Now downloading read file: SRR607_1_reads.fq.gz |
||||
% Total % Received % Xferd Average Speed Time Time Time Current |
||||
Dload Upload Total Spent Left Speed |
||||
100 1270 100 1270 0 0 5191 0 --:--:-- --:--:-- --:--:-- 5204 |
||||
Now downloading read file: SRR607_2_reads.fq.gz |
||||
% Total % Received % Xferd Average Speed Time Time Time Current |
||||
Dload Upload Total Spent Left Speed |
||||
100 1270 100 1270 0 0 5296 0 --:--:-- --:--:-- --:--:-- 5313 |
||||
Now downloading read file: SRR608_1_reads.fq.gz |
||||
% Total % Received % Xferd Average Speed Time Time Time Current |
||||
Dload Upload Total Spent Left Speed |
||||
100 1270 100 1270 0 0 5981 0 --:--:-- --:--:-- --:--:-- 5990 |
||||
Now downloading read file: SRR608_2_reads.fq.gz |
||||
% Total % Received % Xferd Average Speed Time Time Time Current |
||||
Dload Upload Total Spent Left Speed |
||||
100 1270 100 1270 0 0 6177 0 --:--:-- --:--:-- --:--:-- 6165 |
||||
Now downloading read file: SRR609_1_reads.fq.gz |
||||
% Total % Received % Xferd Average Speed Time Time Time Current |
||||
Dload Upload Total Spent Left Speed |
||||
100 1270 100 1270 0 0 4482 0 --:--:-- --:--:-- --:--:-- 4487 |
||||
Now downloading read file: SRR609_2_reads.fq.gz |
||||
% Total % Received % Xferd Average Speed Time Time Time Current |
||||
Dload Upload Total Spent Left Speed |
||||
100 1270 100 1270 0 0 5558 0 --:--:-- --:--:-- --:--:-- 5570 |
||||
Touching output file .downloaded_reads. |
||||
Finished job 0. |
||||
1 of 1 steps (100%) done |
||||
Complete log: |
||||
/tmp/how-do-i-snakemake/.snakemake/log/2018-07-16T145427.253977.snakemake.log |
||||
``` |
||||
|
||||
Notice that Snakemake does not touch the file `.downloaded_reads` until it |
||||
completes running the script. It is important to add the `set -e` command |
||||
to any shell script being run this way, because otherwise the script |
||||
will keep going when it encounters errors, and Snakemake will think the |
||||
script completed successfully and will touch `.downloaded_reads`. |
||||
|
||||
|
||||
### The `.snakemake` Directory |
||||
|
||||
The above script was run from `/tmp/how-do-i-snakemake`. Snakemake created a |
||||
directory called `.snakemake/` to store its own files. Snakemake automatically |
||||
creates a log of what occurred in `.snakemake/log/` in a timestamped log file: |
||||
|
||||
``` |
||||
/tmp/how-do-i-snakemake/.snakemake/log/2018-07-16T145427.253977.snakemake.log |
||||
``` |
||||
|
||||
|
||||
### Re-running Snakemake |
||||
|
||||
If you re-run Snakemake, it will find the `.downloaded_reads` file and will |
||||
not download the files again: |
||||
|
||||
``` |
||||
$ snakemake |
||||
Building DAG of jobs... |
||||
Nothing to be done. |
||||
Complete log: /private/tmp/how-do-i-snakemake/.snakemake/log/2018-07-16T165657.111397.snakemake.log |
||||
``` |
||||
|
||||
You can force Snakemake to re-download the files two ways: |
||||
|
||||
* Remove the output dotfile that the rule creates; this will cause Snakemake |
||||
to detect that the output file for the rule is missing, and it will re-run |
||||
the rule. |
||||
|
||||
* Run Snakemake with the `--force` flag. |
||||
|
||||
|
||||
|
||||
## Stage 2: Replace Script with Snakefile (Hard-Coded) |
||||
|
||||
The next step in converting our workflow to Snakemake is to |
||||
hard-code the file names into a Snakemake rule and let Snakemake |
||||
run the curl command to download them. Here are the links: |
||||
|
||||
| Read Files | URL (note: these links are fake) | |
||||
|------------|----------------------------------| |
||||
| `SRR606_1_reads.fq.gz` | <http://example.com/SRR606_1_reads.fq.gz> | |
||||
| `SRR606_2_reads.fq.gz` | <http://example.com/SRR606_2_reads.fq.gz> | |
||||
| `SRR607_1_reads.fq.gz` | <http://example.com/SRR607_1_reads.fq.gz> | |
||||
| `SRR607_2_reads.fq.gz` | <http://example.com/SRR607_2_reads.fq.gz> | |
||||
| `SRR608_1_reads.fq.gz` | <http://example.com/SRR608_1_reads.fq.gz> | |
||||
| `SRR608_2_reads.fq.gz` | <http://example.com/SRR608_2_reads.fq.gz> | |
||||
| `SRR609_1_reads.fq.gz` | <http://example.com/SRR609_1_reads.fq.gz> | |
||||
| `SRR609_2_reads.fq.gz` | <http://example.com/SRR609_2_reads.fq.gz> | |
||||
|
||||
There are multiple ways to modify the Snakefile to download the files directly. |
||||
The approach shown below uses a `run` directive to run Python code, and a |
||||
`shell()` call to run a shell command. It also shows how these two can be mixed: |
||||
|
||||
**`Snakefile`:** |
||||
|
||||
```python |
||||
touchfile = '.downloaded_reads' |
||||
|
||||
# map of read files to read urls |
||||
reads = { |
||||
"SRR606_1_reads.fq.gz" : "http://example.com/SRR606_1_reads.fq.gz", |
||||
"SRR606_2_reads.fq.gz" : "http://example.com/SRR606_2_reads.fq.gz", |
||||
"SRR607_1_reads.fq.gz" : "http://example.com/SRR607_1_reads.fq.gz", |
||||
"SRR607_2_reads.fq.gz" : "http://example.com/SRR607_2_reads.fq.gz", |
||||
"SRR608_1_reads.fq.gz" : "http://example.com/SRR608_1_reads.fq.gz", |
||||
"SRR608_2_reads.fq.gz" : "http://example.com/SRR608_2_reads.fq.gz", |
||||
"SRR609_1_reads.fq.gz" : "http://example.com/SRR609_1_reads.fq.gz", |
||||
"SRR609_2_reads.fq.gz" : "http://example.com/SRR609_2_reads.fq.gz" |
||||
} |
||||
|
||||
rule download_reads: |
||||
""" |
||||
Download all of our read files using Python code + a shell command. |
||||
""" |
||||
output: |
||||
# This rule is now linked to this touchfile |
||||
touch(touchfile) |
||||
run: |
||||
for read_file, read_url in reads: |
||||
shell(''' |
||||
curl -L {read_url} -o {read_file} |
||||
''') |
||||
``` |
||||
|
||||
The Python variables `read_file` and `read_url` are available to the shell command |
||||
through `{read_file}` and `{read_url}`. |
||||
|
||||
|
||||
## Stage 3: Replace Script with Snakefile (Wildcards) |
||||
|
||||
|
||||
|
@ -1,58 +0,0 @@
@@ -1,58 +0,0 @@
|
||||
# How Do I Snakemake? |
||||
|
||||
A guide to getting up and running with Snakemake. |
||||
|
||||
Snakemake is a powerful tool for building complex workflows in Python. |
||||
It is similar to [GNU make](https://www.gnu.org/software/make/), |
||||
from whence it derives its name. |
||||
|
||||
However, Snakemake is more powerful than make, and there are some important |
||||
differences (that are also reasons for `make` users to migrate to Snakemake): |
||||
|
||||
* Snakemake is implemented in Python, so Snakemake is able to bootstrap on the |
||||
capabilities of Python. Snakefiles are also Python programs, so Python modules |
||||
can be used in workflow definitions. |
||||
|
||||
* Snakemake integrates seamlessly with conda, and a conda environment file can |
||||
be specified for a given rule. |
||||
|
||||
* Snakemake can be used with Singularity (containerization technology for |
||||
running Docker containers on high performance computing (HPC) clusters) |
||||
or with Kubernetes (technology for running multiple Docker containers across |
||||
multiple machines). |
||||
|
||||
* Snakemake integrates with HPC batch and queue systems, and can be used to |
||||
run workflows using HPC or batch systems. |
||||
|
||||
## Links |
||||
|
||||
How Do I Snakemake on pages.charlesreid1.com: |
||||
<https://pages.charlesreid1.com/how-do-i-snakemake> |
||||
|
||||
Source code for tutorial on git.charlesreid1.com: |
||||
<https://git.charlesreid1.com/charlesreid1/how-do-i-snakemake> |
||||
|
||||
## Installing |
||||
|
||||
[Installing Snakemake](installing.md) - installation instructions for Snakemake |
||||
using pip or conda. |
||||
|
||||
|
||||
## Terminology |
||||
|
||||
[Snakemake Terminology](terminology.md) - a glossary of Snakemake terms used |
||||
throughout this documentation and what they mean. |
||||
|
||||
|
||||
## Converting Workflows to Snakemake |
||||
|
||||
[Converting Workflows to Snakemake](converting.md) - strategies for |
||||
converting shell script workflows into Snakemake workflows. |
||||
|
||||
|
||||
## Useful Resources |
||||
|
||||
Following is a list of useful Snakemake resources: |
||||
|
||||
* <https://snakemake.readthedocs.io/> |
||||
|
@ -1,39 +0,0 @@
@@ -1,39 +0,0 @@
|
||||
# Installing Snakemake |
||||
|
||||
Also see the [installation |
||||
page](https://snakemake.readthedocs.io/en/stable/getting_started/installation.html#installation-via-conda) |
||||
of the Snakemake documentation. |
||||
|
||||
|
||||
## Prerequisites |
||||
|
||||
Before you can install Snakemake, you will need to install Python. |
||||
|
||||
I recommend [pyenv](https://github.com/pyenv/pyenv), which provides a very |
||||
simple and graceful solution to the problem of managing multiple versions of |
||||
Python on a single machine. |
||||
|
||||
The creators of pyenv also provide [pyenv-installer](https://github.com/pyenv/pyenv-installer), |
||||
which enables the installation of pyenv with a single command. |
||||
|
||||
Also see [how-do-i-pyenv](https://pages.charlesreid1.com/how-do-i-pyenv). |
||||
|
||||
|
||||
## Installing Snakemake from Pypi with Pip |
||||
|
||||
Once you have Python installed, you should have `pip` available as well. |
||||
Snakemake can be installed using pip: |
||||
|
||||
``` |
||||
$ virtualenv -p python3 .venv |
||||
$ source .venv/bin/activate |
||||
$ pip install snakemake |
||||
``` |
||||
|
||||
## Installing Snakemake from Bioconda with Conda |
||||
|
||||
If you are using conda, you can install Snakemake using conda by first |
||||
adding some conda channels, then installing Snakemake using `conda install`: |
||||
|
||||
|
||||
|
@ -1,11 +0,0 @@
@@ -1,11 +0,0 @@
|
||||
# Terminology |
||||
|
||||
* **rule** - Snakemake rules define a given task, |
||||
the input files it depends on, the output files |
||||
it produces, the shell commands it should run, |
||||
etc. |
||||
|
||||
* **directive** - this refers to subheadings of rules, |
||||
such as `input:` or `output:` or `shell:` |
||||
|
||||
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
@ -0,0 +1,515 @@
@@ -0,0 +1,515 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<!DOCTYPE html> |
||||
<html lang="en" class="no-js"> |
||||
<head> |
||||
|
||||
<meta charset="utf-8"> |
||||
<meta name="viewport" content="width=device-width,initial-scale=1"> |
||||
<meta http-equiv="x-ua-compatible" content="ie=edge"> |
||||
|
||||
|
||||
<link rel="canonical" href="https://pages.charlesreid1.com/how-do-i-snakemake/"> |
||||
|
||||
|
||||
|
||||
<meta name="lang:clipboard.copy" content="Copy to clipboard"> |
||||
|
||||
<meta name="lang:clipboard.copied" content="Copied to clipboard"> |
||||
|
||||
<meta name="lang:search.language" content="en"> |
||||
|
||||
<meta name="lang:search.pipeline.stopwords" content="True"> |
||||
|
||||
<meta name="lang:search.pipeline.trimmer" content="True"> |
||||
|
||||
<meta name="lang:search.result.none" content="No matching documents"> |
||||
|
||||
<meta name="lang:search.result.one" content="1 matching document"> |
||||
|
||||
<meta name="lang:search.result.other" content="# matching documents"> |
||||
|
||||
<meta name="lang:search.tokenizer" content="[\s\-]+"> |
||||
|
||||
<link rel="shortcut icon" href="."> |
||||
<meta name="generator" content="mkdocs-1.0, mkdocs-material-3.0.3"> |
||||
|
||||
|
||||
|
||||
<title>how do I snakemake?</title> |
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="assets/stylesheets/application.451f80e5.css"> |
||||
|
||||
<link rel="stylesheet" href="assets/stylesheets/application-palette.22915126.css"> |
||||
|
||||
|
||||
|
||||
|
||||
<meta name="theme-color" content="#3f51b5"> |
||||
|
||||
|
||||
|
||||
<script src="assets/javascripts/modernizr.1aa3b519.js"></script> |
||||
|
||||
|
||||
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin> |
||||
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Bitter:300,400,400i,700|PT+Mono"> |
||||
<style>body,input{font-family:"Bitter","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"PT Mono","Courier New",Courier,monospace}</style> |
||||
|
||||
|
||||
<link rel="stylesheet" href="assets/fonts/material-icons.css"> |
||||
|
||||
<link rel="stylesheet" href="css/custom.css"> |
||||
|
||||
|
||||
</head> |
||||
|
||||
|
||||
|
||||
<body dir="ltr" data-md-color-primary="indigo" data-md-color-accent="indigo"> |
||||
|
||||
<svg class="md-svg"> |
||||
<defs> |
||||
|
||||
|
||||
</defs> |
||||
</svg> |
||||
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> |
||||
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> |
||||
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label> |
||||
|
||||
<a href="#how-do-i-snakemake" tabindex="1" class="md-skip"> |
||||
Skip to content |
||||
</a> |
||||
|
||||
|
||||
<header class="md-header" data-md-component="header"> |
||||
<nav class="md-header-nav md-grid"> |
||||
<div class="md-flex"> |
||||
<div class="md-flex__cell md-flex__cell--shrink"> |
||||
<a href="https://pages.charlesreid1.com/how-do-i-snakemake" title="how do I snakemake?" class="md-header-nav__button md-logo"> |
||||
|
||||
<img src="images/snake.svg" width="24" height="24"> |
||||
|
||||
</a> |
||||
</div> |
||||
<div class="md-flex__cell md-flex__cell--shrink"> |
||||
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label> |
||||
</div> |
||||
<div class="md-flex__cell md-flex__cell--stretch"> |
||||
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title"> |
||||
|
||||
|
||||
<span class="md-header-nav__topic"> |
||||
how do I snakemake? |
||||
</span> |
||||
<span class="md-header-nav__topic"> |
||||
Index |
||||
</span> |
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
<div class="md-flex__cell md-flex__cell--shrink"> |
||||
|
||||
|
||||
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label> |
||||
|
||||
<div class="md-search" data-md-component="search" role="dialog"> |
||||
<label class="md-search__overlay" for="__search"></label> |
||||
<div class="md-search__inner" role="search"> |
||||
<form class="md-search__form" name="search"> |
||||
<input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active"> |
||||
<label class="md-icon md-search__icon" for="__search"></label> |
||||
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1"> |
||||
 |
||||
</button> |
||||
</form> |
||||
<div class="md-search__output"> |
||||
<div class="md-search__scrollwrap" data-md-scrollfix> |
||||
<div class="md-search-result" data-md-component="result"> |
||||
<div class="md-search-result__meta"> |
||||
Type to start searching |
||||
</div> |
||||
<ol class="md-search-result__list"></ol> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
</div> |
||||
|
||||
<div class="md-flex__cell md-flex__cell--shrink"> |
||||
<div class="md-header-nav__source"> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://git.charlesreid1.com/charlesreid1/how-do-i-snakemake" title="Go to repository" class="md-source" data-md-source=""> |
||||
|
||||
<div class="md-source__repository"> |
||||
charlesreid1/how-do-i-snakemake |
||||
</div> |
||||
</a> |
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
</div> |
||||
</nav> |
||||
</header> |
||||
|
||||
<div class="md-container"> |
||||
|
||||
|
||||
|
||||
<main class="md-main"> |
||||
<div class="md-main__inner md-grid" data-md-component="container"> |
||||
|
||||
|
||||
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation"> |
||||
<div class="md-sidebar__scrollwrap"> |
||||
<div class="md-sidebar__inner"> |
||||
<nav class="md-nav md-nav--primary" data-md-level="0"> |
||||
<label class="md-nav__title md-nav__title--site" for="__drawer"> |
||||
<a href="https://pages.charlesreid1.com/how-do-i-snakemake" title="how do I snakemake?" class="md-nav__button md-logo"> |
||||
|
||||
<img src="images/snake.svg" width="48" height="48"> |
||||
|
||||
</a> |
||||
how do I snakemake? |
||||
</label> |
||||
|
||||
<div class="md-nav__source"> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://git.charlesreid1.com/charlesreid1/how-do-i-snakemake" title="Go to repository" class="md-source" data-md-source=""> |
||||
|
||||
<div class="md-source__repository"> |
||||
charlesreid1/how-do-i-snakemake |
||||
</div> |
||||
</a> |
||||
|
||||
</div> |
||||
|
||||
<ul class="md-nav__list" data-md-scrollfix> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item md-nav__item--active"> |
||||
|
||||
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc"> |
||||
|
||||
|
||||
|
||||
|
||||
<label class="md-nav__link md-nav__link--active" for="__toc"> |
||||
Index |
||||
</label> |
||||
|
||||
<a href="." title="Index" class="md-nav__link md-nav__link--active"> |
||||
Index |
||||
</a> |
||||
|
||||
|
||||
<nav class="md-nav md-nav--secondary"> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="md-nav__title" for="__toc">Table of contents</label> |
||||
<ul class="md-nav__list" data-md-scrollfix> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#links" title="Links" class="md-nav__link"> |
||||
Links |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#installing" title="Installing" class="md-nav__link"> |
||||
Installing |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#terminology" title="Terminology" class="md-nav__link"> |
||||
Terminology |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#converting-workflows-to-snakemake" title="Converting Workflows to Snakemake" class="md-nav__link"> |
||||
Converting Workflows to Snakemake |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#useful-resources" title="Useful Resources" class="md-nav__link"> |
||||
Useful Resources |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ul> |
||||
|
||||
</nav> |
||||
|
||||
</li> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="installing/" title="Installing Snakemake" class="md-nav__link"> |
||||
Installing Snakemake |
||||
</a> |
||||
</li> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="terminology/" title="Snakemake Terminology" class="md-nav__link"> |
||||
Snakemake Terminology |
||||
</a> |
||||
</li> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="converting/" title="Converting Workflows to Snakemake" class="md-nav__link"> |
||||
Converting Workflows to Snakemake |
||||
</a> |
||||
</li> |
||||
|
||||
|
||||
</ul> |
||||
</nav> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc"> |
||||
<div class="md-sidebar__scrollwrap"> |
||||
<div class="md-sidebar__inner"> |
||||
|
||||
<nav class="md-nav md-nav--secondary"> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="md-nav__title" for="__toc">Table of contents</label> |
||||
<ul class="md-nav__list" data-md-scrollfix> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#links" title="Links" class="md-nav__link"> |
||||
Links |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#installing" title="Installing" class="md-nav__link"> |
||||
Installing |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#terminology" title="Terminology" class="md-nav__link"> |
||||
Terminology |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#converting-workflows-to-snakemake" title="Converting Workflows to Snakemake" class="md-nav__link"> |
||||
Converting Workflows to Snakemake |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
<li class="md-nav__item"> |
||||
<a href="#useful-resources" title="Useful Resources" class="md-nav__link"> |
||||
Useful Resources |
||||
</a> |
||||
|
||||
</li> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ul> |
||||
|
||||
</nav> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<div class="md-content"> |
||||
<article class="md-content__inner md-typeset"> |
||||
|
||||
|
||||
|
||||
<h1 id="how-do-i-snakemake">How Do I Snakemake?<a class="headerlink" href="#how-do-i-snakemake" title="Permanent link">¶</a></h1> |
||||
<p>A guide to getting up and running with Snakemake.</p> |
||||
<p>Snakemake is a powerful tool for building complex workflows in Python. |
||||
It is similar to <a href="https://www.gnu.org/software/make/">GNU make</a>, |
||||
from whence it derives its name.</p> |
||||
<p>However, Snakemake is more powerful than make, and there are some important |
||||
differences (that are also reasons for <code>make</code> users to migrate to Snakemake):</p> |
||||
<ul> |
||||
<li> |
||||
<p>Snakemake is implemented in Python, so Snakemake is able to bootstrap on the |
||||
capabilities of Python. Snakefiles are also Python programs, so Python modules |
||||
can be used in workflow definitions.</p> |
||||
</li> |
||||
<li> |
||||
<p>Snakemake integrates seamlessly with conda, and a conda environment file can |
||||
be specified for a given rule.</p> |
||||
</li> |
||||
<li> |
||||
<p>Snakemake can be used with Singularity (containerization technology for |
||||
running Docker containers on high performance computing (HPC) clusters) |
||||
or with Kubernetes (technology for running multiple Docker containers across |
||||
multiple machines).</p> |
||||
</li> |
||||
<li> |
||||
<p>Snakemake integrates with HPC batch and queue systems, and can be used to |
||||
run workflows using HPC or batch systems.</p> |
||||
</li> |
||||
</ul> |
||||
<h2 id="links">Links<a class="headerlink" href="#links" title="Permanent link">¶</a></h2> |
||||
<p>How Do I Snakemake on pages.charlesreid1.com: |
||||
<a href="https://pages.charlesreid1.com/how-do-i-snakemake">https://pages.charlesreid1.com/how-do-i-snakemake</a></p> |
||||
<p>Source code for tutorial on git.charlesreid1.com: |
||||
<a href="https://git.charlesreid1.com/charlesreid1/how-do-i-snakemake">https://git.charlesreid1.com/charlesreid1/how-do-i-snakemake</a></p> |
||||
<h2 id="installing">Installing<a class="headerlink" href="#installing" title="Permanent link">¶</a></h2> |
||||
<p><a href="installing/">Installing Snakemake</a> - installation instructions for Snakemake |
||||
using pip or conda.</p> |
||||
<h2 id="terminology">Terminology<a class="headerlink" href="#terminology" title="Permanent link">¶</a></h2> |
||||
<p><a href="terminology/">Snakemake Terminology</a> - a glossary of Snakemake terms used |
||||
throughout this documentation and what they mean.</p> |
||||
<h2 id="converting-workflows-to-snakemake">Converting Workflows to Snakemake<a class="headerlink" href="#converting-workflows-to-snakemake" title="Permanent link">¶</a></h2> |
||||
<p><a href="converting/">Converting Workflows to Snakemake</a> - strategies for |
||||
converting shell script workflows into Snakemake workflows.</p> |
||||
<h2 id="useful-resources">Useful Resources<a class="headerlink" href="#useful-resources" title="Permanent link">¶</a></h2> |
||||
<p>Following is a list of useful Snakemake resources:</p> |
||||
<ul> |
||||
<li><a href="https://snakemake.readthedocs.io/">https://snakemake.readthedocs.io/</a></li> |
||||
</ul> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article> |
||||
</div> |
||||
</div> |
||||
</main> |
||||
|
||||
|
||||
<footer class="md-footer"> |
||||
|
||||
<div class="md-footer-nav"> |
||||
<nav class="md-footer-nav__inner md-grid"> |
||||
|
||||
|
||||
<a href="installing/" title="Installing Snakemake" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next"> |
||||
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title"> |
||||
<span class="md-flex__ellipsis"> |
||||
<span class="md-footer-nav__direction"> |
||||
Next |
||||
</span> |
||||
Installing Snakemake |
||||
</span> |
||||
</div> |
||||
<div class="md-flex__cell md-flex__cell--shrink"> |
||||
<i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i> |
||||
</div> |
||||
</a> |
||||
|
||||
</nav> |
||||
</div> |
||||
|
||||
<div class="md-footer-meta md-typeset"> |
||||
<div class="md-footer-meta__inner md-grid"> |
||||
<div class="md-footer-copyright"> |
||||
|
||||
<div class="md-footer-copyright__highlight"> |
||||
Copyright © 2018 <a href="https://charlesreid1.com">Charles Reid</a>, released under the <a href="https://opensource.org/licenses/MIT">MIT license</a> <br /><br /> <div>Snake icon made by Freepik, obtained from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a>, used under a <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div> license. |
||||
</div> |
||||
|
||||
powered by |
||||
<a href="https://www.mkdocs.org">MkDocs</a> |
||||
and |
||||
<a href="https://squidfunk.github.io/mkdocs-material/"> |
||||