diff --git a/MOP1.0/404.html b/MOP1.0/404.html new file mode 100644 index 0000000..22d9308 --- /dev/null +++ b/MOP1.0/404.html @@ -0,0 +1,55 @@ + + + + + + + + Master of Pores + + + + + + + + + + +
+ + + + + + + +
+
+

404

+ +

Page not found :(

+

The requested page could not be found.

+ +
+
+
+ + + + + + + + + diff --git a/MOP1.0/assets/css/docs.css b/MOP1.0/assets/css/docs.css new file mode 100644 index 0000000..5d64ae0 --- /dev/null +++ b/MOP1.0/assets/css/docs.css @@ -0,0 +1,7 @@ +/*! + * Milligram v1.3.0 + * https://milligram.github.io + * + * Copyright (c) 2017 CJ Patoilo + * Licensed under the MIT license + */*,*:after,*:before{box-sizing:inherit}html{box-sizing:border-box;font-size:62.5%}body{color:#606c76;font-family:"Roboto","Helvetica Neue","Helvetica","Arial",sans-serif;font-size:1.6em;font-weight:300;letter-spacing:.01em;line-height:1.6}blockquote{border-left:.3rem solid #d1d1d1;margin-left:0;margin-right:0;padding:1rem 1.5rem}blockquote *:last-child{margin-bottom:0}.button,button,input[type=button],input[type=reset],input[type=submit]{background-color:#9b4dca;border:.1rem solid #9b4dca;border-radius:.4rem;color:#fff;cursor:pointer;display:inline-block;font-size:1.1rem;font-weight:700;height:3.8rem;letter-spacing:.1rem;line-height:3.8rem;padding:0 3rem;text-align:center;text-decoration:none;text-transform:uppercase;white-space:nowrap}.button:focus,.button:hover,button:focus,button:hover,input[type=button]:focus,input[type=button]:hover,input[type=reset]:focus,input[type=reset]:hover,input[type=submit]:focus,input[type=submit]:hover{background-color:#606c76;border-color:#606c76;color:#fff;outline:0}.button[disabled],button[disabled],input[type=button][disabled],input[type=reset][disabled],input[type=submit][disabled]{cursor:default;opacity:.5}.button[disabled]:focus,.button[disabled]:hover,button[disabled]:focus,button[disabled]:hover,input[type=button][disabled]:focus,input[type=button][disabled]:hover,input[type=reset][disabled]:focus,input[type=reset][disabled]:hover,input[type=submit][disabled]:focus,input[type=submit][disabled]:hover{background-color:#9b4dca;border-color:#9b4dca}.button.button-outline,button.button-outline,input[type=button].button-outline,input[type=reset].button-outline,input[type=submit].button-outline{background-color:rgba(0,0,0,0);color:#9b4dca}.button.button-outline:focus,.button.button-outline:hover,button.button-outline:focus,button.button-outline:hover,input[type=button].button-outline:focus,input[type=button].button-outline:hover,input[type=reset].button-outline:focus,input[type=reset].button-outline:hover,input[type=submit].button-outline:focus,input[type=submit].button-outline:hover{background-color:rgba(0,0,0,0);border-color:#606c76;color:#606c76}.button.button-outline[disabled]:focus,.button.button-outline[disabled]:hover,button.button-outline[disabled]:focus,button.button-outline[disabled]:hover,input[type=button].button-outline[disabled]:focus,input[type=button].button-outline[disabled]:hover,input[type=reset].button-outline[disabled]:focus,input[type=reset].button-outline[disabled]:hover,input[type=submit].button-outline[disabled]:focus,input[type=submit].button-outline[disabled]:hover{border-color:inherit;color:#9b4dca}.button.button-clear,button.button-clear,input[type=button].button-clear,input[type=reset].button-clear,input[type=submit].button-clear{background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0);color:#9b4dca}.button.button-clear:focus,.button.button-clear:hover,button.button-clear:focus,button.button-clear:hover,input[type=button].button-clear:focus,input[type=button].button-clear:hover,input[type=reset].button-clear:focus,input[type=reset].button-clear:hover,input[type=submit].button-clear:focus,input[type=submit].button-clear:hover{background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0);color:#606c76}.button.button-clear[disabled]:focus,.button.button-clear[disabled]:hover,button.button-clear[disabled]:focus,button.button-clear[disabled]:hover,input[type=button].button-clear[disabled]:focus,input[type=button].button-clear[disabled]:hover,input[type=reset].button-clear[disabled]:focus,input[type=reset].button-clear[disabled]:hover,input[type=submit].button-clear[disabled]:focus,input[type=submit].button-clear[disabled]:hover{color:#9b4dca}code{background:#f4f5f6;border-radius:.4rem;font-size:86%;margin:0 .2rem;padding:.2rem .5rem;white-space:nowrap}pre{background:#f4f5f6;border-left:.3rem solid #9b4dca;overflow-y:hidden}pre>code{border-radius:0;display:block;padding:1rem 1.5rem;white-space:pre}hr{border:0;border-top:.1rem solid #f4f5f6;margin:3rem 0}input[type=email],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:rgba(0,0,0,0);border:.1rem solid #d1d1d1;border-radius:.4rem;box-shadow:none;box-sizing:inherit;height:3.8rem;padding:.6rem 1rem;width:100%}input[type=email]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,textarea:focus,select:focus{border-color:#9b4dca;outline:0}select{background:url('data:image/svg+xml;utf8,') center right no-repeat;padding-right:3rem}select:focus{background-image:url('data:image/svg+xml;utf8,')}textarea{min-height:6.5rem}label,legend{display:block;font-size:1.6rem;font-weight:700;margin-bottom:.5rem}fieldset{border-width:0;padding:0}input[type=checkbox],input[type=radio]{display:inline}.label-inline{display:inline-block;font-weight:normal;margin-left:.5rem}.container{margin:0 auto;max-width:112rem;padding:0 2rem;position:relative;width:100%}.row{display:flex;flex-direction:column;padding:0;width:100%}.row.row-no-padding{padding:0}.row.row-no-padding>.column{padding:0}.row.row-wrap{flex-wrap:wrap}.row.row-top{align-items:flex-start}.row.row-bottom{align-items:flex-end}.row.row-center{align-items:center}.row.row-stretch{align-items:stretch}.row.row-baseline{align-items:baseline}.row .column{display:block;flex:1 1 auto;margin-left:0;max-width:100%;width:100%}.row .column.column-offset-10{margin-left:10%}.row .column.column-offset-20{margin-left:20%}.row .column.column-offset-25{margin-left:25%}.row .column.column-offset-33,.row .column.column-offset-34{margin-left:33.3333%}.row .column.column-offset-50{margin-left:50%}.row .column.column-offset-66,.row .column.column-offset-67{margin-left:66.6666%}.row .column.column-offset-75{margin-left:75%}.row .column.column-offset-80{margin-left:80%}.row .column.column-offset-90{margin-left:90%}.row .column.column-10{flex:0 0 10%;max-width:10%}.row .column.column-20{flex:0 0 20%;max-width:20%}.row .column.column-25{flex:0 0 25%;max-width:25%}.row .column.column-33,.row .column.column-34{flex:0 0 33.3333%;max-width:33.3333%}.row .column.column-40{flex:0 0 40%;max-width:40%}.row .column.column-50{flex:0 0 50%;max-width:50%}.row .column.column-60{flex:0 0 60%;max-width:60%}.row .column.column-66,.row .column.column-67{flex:0 0 66.6666%;max-width:66.6666%}.row .column.column-75{flex:0 0 75%;max-width:75%}.row .column.column-80{flex:0 0 80%;max-width:80%}.row .column.column-90{flex:0 0 90%;max-width:90%}.row .column .column-top{align-self:flex-start}.row .column .column-bottom{align-self:flex-end}.row .column .column-center{-ms-grid-row-align:center;align-self:center}@media(min-width: 40rem){.row{flex-direction:row;margin-left:-1rem;width:calc(100% + 2rem)}.row .column{margin-bottom:inherit;padding:0 1rem}}a{color:#9b4dca;text-decoration:none}a:focus,a:hover{color:#606c76}dl,ol,ul{list-style:none;margin-top:0;padding-left:0}dl dl,dl ol,dl ul,ol dl,ol ol,ol ul,ul dl,ul ol,ul ul{font-size:90%;margin:1.5rem 0 1.5rem 3rem}ol{list-style:decimal inside}ul{list-style:circle inside}.button,button,dd,dt,li{margin-bottom:1rem}fieldset,input,select,textarea{margin-bottom:1.5rem}blockquote,dl,figure,form,ol,p,pre,table,ul{margin-bottom:2.5rem}table{border-spacing:0;width:100%}td,th{border-bottom:.1rem solid #e1e1e1;padding:1.2rem 1.5rem;text-align:left}td:first-child,th:first-child{padding-left:0}td:last-child,th:last-child{padding-right:0}b,strong{font-weight:bold}p{margin-top:0}h1,h2,h3,h4,h5,h6{font-weight:300;letter-spacing:-0.1rem;margin-bottom:2rem;margin-top:0}h1{font-size:4.6rem;line-height:1.2}h2{font-size:3.6rem;line-height:1.25}h3{font-size:2.8rem;line-height:1.3}h4{font-size:2.2rem;letter-spacing:-0.08rem;line-height:1.35}h5{font-size:1.8rem;letter-spacing:-0.05rem;line-height:1.5}h6{font-size:1.6rem;letter-spacing:0;line-height:1.4}img{max-width:100%}.clearfix:after{clear:both;content:" ";display:table}.float-left{float:left}.float-right{float:right}code[class*=language-],pre[class*=language-]{color:#000;background:none;text-shadow:0 1px #fff;font-family:Consolas,Monaco,"Andale Mono","Ubuntu Mono",monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,code[class*=language-] ::-moz-selection{text-shadow:none;background:#b3d4fc}pre[class*=language-]::selection,pre[class*=language-] ::selection,code[class*=language-]::selection,code[class*=language-] ::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#708090}.token.punctuation{color:#999}.namespace{opacity:.7}.token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol,.token.deleted{color:#905}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#690}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string{color:#a67f59;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.function{color:#dd4a68}.token.regex,.token.important,.token.variable{color:#e90}.token.important,.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.entity{cursor:help}html,body{margin:0;height:100%;max-height:100%;overflow:hidden;min-width:360px}*{box-sizing:border-box}pre{margin-bottom:2em !important}a{text-decoration:none;color:inherit}a:link{color:blue}a:visited{color:blue}a:active{color:blue}a:hover{color:red;text-decoration:none}.wrapper{height:100%;width:100%;max-height:100%;min-height:100%;display:flex;overflow:hidden}.sidebar{display:block;width:20%;max-width:300px;padding:0;border-right:1px solid rgba(0,0,0,.07);height:100%;overflow:hidden;color:#364149}.sidebar .sidebar-main{height:90%;background:#fafafa;display:flex;overflow-x:auto;padding:1em;padding-bottom:100px}.sidebar .sidebar-mobile{display:none;height:50px;padding:1em;text-align:right}.sidebar .sidebar-mobile .close-icon,.sidebar .sidebar-mobile .menu-icon{width:18px;cursor:pointer;height:auto;display:none}.search{height:50px;border-bottom:1px solid rgba(0,0,0,.07);padding:0 1em}.search .search-input{border:none;font-size:.9em;font-weight:300;width:100%;height:100%}.navigation{display:block;width:100%;margin:0;padding:0;list-style:none}.navigation li{margin:0;padding:10px 15px}.navigation a{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.navigation a.active{color:#008cff}.content{display:flex;justify-content:center;min-height:100%;height:100%;width:100%;overflow-y:auto;color:#333;line-height:1.7;word-wrap:break-word}.inner{width:100%;max-width:800px;padding:1em 2em 3em 1em}.section{margin-bottom:1em}@media(max-width: 745px){.wrapper{flex-direction:column}.sidebar{width:100%;max-width:100%;border-right:none;height:50px}.sidebar .sidebar-mobile{display:block}.sidebar .sidebar-mobile .menu-icon{display:inline}.sidebar.opened{overflow:visible;height:auto;border-bottom:1px solid rgba(0,0,0,.07)}.sidebar.opened .sidebar-mobile{background:#fafafa}.content{width:100%;margin-top:0;height:calc(100% - 50px);min-height:calc(100% - 50px)}.inner{padding:1em}}/*# sourceMappingURL=docs.css.map */ \ No newline at end of file diff --git a/MOP1.0/assets/css/docs.css.map b/MOP1.0/assets/css/docs.css.map new file mode 100644 index 0000000..8da1a40 --- /dev/null +++ b/MOP1.0/assets/css/docs.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../_sass/milligram.scss","../../_sass/prism.scss","docs.scss","../../_sass/variables.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQA,mBAGE,mBAGF,KACE,sBACA,gBAGF,KACE,cACA,qEACA,gBACA,gBACA,qBACA,gBAGF,WACE,gCACA,cACA,eACA,oBAGF,wBACE,gBAGF,uEAKE,yBACA,2BACA,oBACA,WACA,eACA,qBACA,iBACA,gBACA,cACA,qBACA,mBACA,eACA,kBACA,qBACA,yBACA,mBAGF,0MASE,yBACA,qBACA,WACA,UAGF,yHAKE,eACA,WAGF,8SASE,yBACA,qBAGF,kJAKE,+BACA,cAGF,gWASE,+BACA,qBACA,cAGF,ocASE,qBACA,cAGF,wIAKE,+BACA,2BACA,cAGF,4UASE,+BACA,2BACA,cAGF,gbASE,cAGF,KACE,mBACA,oBACA,cACA,eACA,oBACA,mBAGF,IACE,mBACA,gCACA,kBAGF,SACE,gBACA,cACA,oBACA,gBAGF,GACE,SACA,+BACA,cAGF,8IASE,wBACG,qBACK,gBACR,+BACA,2BACA,oBACA,gBACA,mBACA,cACA,mBACA,WAGF,oMASE,qBACA,UAGF,OACE,mOACA,mBAGF,aACE,kNAGF,SACE,kBAGF,aAEE,cACA,iBACA,gBACA,oBAGF,SACE,eACA,UAGF,uCAEE,eAGF,cACE,qBACA,mBACA,kBAGF,WACE,cACA,iBACA,eACA,kBACA,WAGF,KACE,aACA,sBACA,UACA,WAGF,oBACE,UAGF,4BACE,UAGF,cACE,eAGF,aACE,uBAGF,gBACE,qBAGF,gBACE,mBAGF,iBACE,oBAGF,kBACE,qBAGF,aACE,cACA,cACA,cACA,eACA,WAGF,8BACE,gBAGF,8BACE,gBAGF,8BACE,gBAGF,4DACE,qBAGF,8BACE,gBAGF,4DACE,qBAGF,8BACE,gBAGF,8BACE,gBAGF,8BACE,gBAGF,uBACE,aACA,cAGF,uBACE,aACA,cAGF,uBACE,aACA,cAGF,8CACE,kBACA,mBAGF,uBACE,aACA,cAGF,uBACE,aACA,cAGF,uBACE,aACA,cAGF,8CACE,kBACA,mBAGF,uBACE,aACA,cAGF,uBACE,aACA,cAGF,uBACE,aACA,cAGF,yBACE,sBAGF,4BACE,oBAGF,4BACE,0BACI,kBAGN,yBACE,KACE,mBACA,kBACA,wBAEF,aACE,sBACA,gBAIJ,EACE,cACA,qBAGF,gBACE,cAGF,SAGE,gBACA,aACA,eAGF,sDASE,cACA,4BAGF,GACE,0BAGF,GACE,yBAGF,wBAKE,mBAGF,+BAIE,qBAGF,4CASE,qBAGF,MACE,iBACA,WAGF,MAEE,kCACA,sBACA,gBAGF,8BAEE,eAGF,4BAEE,gBAGF,SAEE,iBAGF,EACE,aAGF,kBAME,gBACA,uBACA,mBACA,aAGF,GACE,iBACA,gBAGF,GACE,iBACA,iBAGF,GACE,iBACA,gBAGF,GACE,iBACA,wBACA,iBAGF,GACE,iBACA,wBACA,gBAGF,GACE,iBACA,iBACA,gBAGF,IACE,eAGF,gBACE,WACA,YACA,cAGF,YACE,WAGF,aACE,YC/kBF,6CAEC,WACA,gBACA,uBACA,kEACA,gBACA,gBACA,oBACA,kBACA,iBACA,gBAEA,gBACA,cACA,WAEA,qBACA,kBACA,iBACA,aAGD,4JAEC,iBACA,mBAGD,wIAEC,iBACA,mBAGD,aACC,6CAEC,kBAKF,sBACC,YACA,cACA,cAGD,uDAEC,mBAID,iCACC,aACA,mBACA,mBAGD,yDAIC,cAGD,mBACC,WAGD,WACC,WAGD,qGAOC,WAGD,0FAMC,WAGD,0FAKC,cACA,8BAGD,+CAGC,WAGD,gBACC,cAGD,8CAGC,WAGD,6BAEC,iBAED,cACC,kBAGD,cACC,YCnID,UACC,SACA,YACA,gBACA,gBACA,UCFW,MDKZ,EACC,sBAGD,IACC,6BAGD,EACC,qBACA,cAEA,OACC,WAEM,UACQ,WAER,SACQ,WAEd,QACA,UACA,qBAIF,SACC,YACA,WACA,gBACA,gBACA,aACA,gBAID,SACC,cACA,UACA,UC/Ce,MDgDf,UACA,aC1CgB,0BD2ChB,YACA,gBACA,MC5Ce,QD8Cf,uBACC,WACA,WC9CsB,QD+CtB,aACA,gBACA,QC7DY,ID8DZ,qBAID,yBACC,aACA,OC/Dc,KDgEd,QCrEY,IDsEZ,iBAEA,yEACC,WACA,eACA,YACA,aAKH,QACC,OC7Ee,KD8Ef,cC1EgB,0BD2EhB,cAEA,sBACC,YACA,eACA,gBACA,WACA,YAIF,YACC,cACA,WACA,SACA,UACA,gBAEA,eACC,SACA,kBAGD,cACC,cACA,mBACA,gBACA,uBAEA,qBACC,MCrGqB,QD2GxB,SACC,aACC,uBACD,gBACA,YACC,WACD,gBACA,MChHe,KDiHf,gBACA,qBAGD,OACE,WACD,UCrIe,MDsIf,wBAGD,SACC,cC3Ia,IDiJd,yBACC,SACC,sBAGD,SACC,WACA,eACA,kBACA,OCrJc,KDuJd,yBACC,cAEA,oCACC,eAIF,gBACC,iBACA,YACA,cC9Jc,0BDgKd,gCACC,WC9JoB,QDmKvB,SACC,WACA,aACA,yBACA,6BAGD,OACC,QCvLY","sourcesContent":["/*!\n * Milligram v1.3.0\n * https://milligram.github.io\n *\n * Copyright (c) 2017 CJ Patoilo\n * Licensed under the MIT license\n */\n\n*,\n*:after,\n*:before {\n box-sizing: inherit;\n}\n\nhtml {\n box-sizing: border-box;\n font-size: 62.5%;\n}\n\nbody {\n color: #606c76;\n font-family: 'Roboto', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;\n font-size: 1.6em;\n font-weight: 300;\n letter-spacing: .01em;\n line-height: 1.6;\n}\n\nblockquote {\n border-left: 0.3rem solid #d1d1d1;\n margin-left: 0;\n margin-right: 0;\n padding: 1rem 1.5rem;\n}\n\nblockquote *:last-child {\n margin-bottom: 0;\n}\n\n.button,\nbutton,\ninput[type='button'],\ninput[type='reset'],\ninput[type='submit'] {\n background-color: #9b4dca;\n border: 0.1rem solid #9b4dca;\n border-radius: .4rem;\n color: #fff;\n cursor: pointer;\n display: inline-block;\n font-size: 1.1rem;\n font-weight: 700;\n height: 3.8rem;\n letter-spacing: .1rem;\n line-height: 3.8rem;\n padding: 0 3.0rem;\n text-align: center;\n text-decoration: none;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.button:focus, .button:hover,\nbutton:focus,\nbutton:hover,\ninput[type='button']:focus,\ninput[type='button']:hover,\ninput[type='reset']:focus,\ninput[type='reset']:hover,\ninput[type='submit']:focus,\ninput[type='submit']:hover {\n background-color: #606c76;\n border-color: #606c76;\n color: #fff;\n outline: 0;\n}\n\n.button[disabled],\nbutton[disabled],\ninput[type='button'][disabled],\ninput[type='reset'][disabled],\ninput[type='submit'][disabled] {\n cursor: default;\n opacity: .5;\n}\n\n.button[disabled]:focus, .button[disabled]:hover,\nbutton[disabled]:focus,\nbutton[disabled]:hover,\ninput[type='button'][disabled]:focus,\ninput[type='button'][disabled]:hover,\ninput[type='reset'][disabled]:focus,\ninput[type='reset'][disabled]:hover,\ninput[type='submit'][disabled]:focus,\ninput[type='submit'][disabled]:hover {\n background-color: #9b4dca;\n border-color: #9b4dca;\n}\n\n.button.button-outline,\nbutton.button-outline,\ninput[type='button'].button-outline,\ninput[type='reset'].button-outline,\ninput[type='submit'].button-outline {\n background-color: transparent;\n color: #9b4dca;\n}\n\n.button.button-outline:focus, .button.button-outline:hover,\nbutton.button-outline:focus,\nbutton.button-outline:hover,\ninput[type='button'].button-outline:focus,\ninput[type='button'].button-outline:hover,\ninput[type='reset'].button-outline:focus,\ninput[type='reset'].button-outline:hover,\ninput[type='submit'].button-outline:focus,\ninput[type='submit'].button-outline:hover {\n background-color: transparent;\n border-color: #606c76;\n color: #606c76;\n}\n\n.button.button-outline[disabled]:focus, .button.button-outline[disabled]:hover,\nbutton.button-outline[disabled]:focus,\nbutton.button-outline[disabled]:hover,\ninput[type='button'].button-outline[disabled]:focus,\ninput[type='button'].button-outline[disabled]:hover,\ninput[type='reset'].button-outline[disabled]:focus,\ninput[type='reset'].button-outline[disabled]:hover,\ninput[type='submit'].button-outline[disabled]:focus,\ninput[type='submit'].button-outline[disabled]:hover {\n border-color: inherit;\n color: #9b4dca;\n}\n\n.button.button-clear,\nbutton.button-clear,\ninput[type='button'].button-clear,\ninput[type='reset'].button-clear,\ninput[type='submit'].button-clear {\n background-color: transparent;\n border-color: transparent;\n color: #9b4dca;\n}\n\n.button.button-clear:focus, .button.button-clear:hover,\nbutton.button-clear:focus,\nbutton.button-clear:hover,\ninput[type='button'].button-clear:focus,\ninput[type='button'].button-clear:hover,\ninput[type='reset'].button-clear:focus,\ninput[type='reset'].button-clear:hover,\ninput[type='submit'].button-clear:focus,\ninput[type='submit'].button-clear:hover {\n background-color: transparent;\n border-color: transparent;\n color: #606c76;\n}\n\n.button.button-clear[disabled]:focus, .button.button-clear[disabled]:hover,\nbutton.button-clear[disabled]:focus,\nbutton.button-clear[disabled]:hover,\ninput[type='button'].button-clear[disabled]:focus,\ninput[type='button'].button-clear[disabled]:hover,\ninput[type='reset'].button-clear[disabled]:focus,\ninput[type='reset'].button-clear[disabled]:hover,\ninput[type='submit'].button-clear[disabled]:focus,\ninput[type='submit'].button-clear[disabled]:hover {\n color: #9b4dca;\n}\n\ncode {\n background: #f4f5f6;\n border-radius: .4rem;\n font-size: 86%;\n margin: 0 .2rem;\n padding: .2rem .5rem;\n white-space: nowrap;\n}\n\npre {\n background: #f4f5f6;\n border-left: 0.3rem solid #9b4dca;\n overflow-y: hidden;\n}\n\npre > code {\n border-radius: 0;\n display: block;\n padding: 1rem 1.5rem;\n white-space: pre;\n}\n\nhr {\n border: 0;\n border-top: 0.1rem solid #f4f5f6;\n margin: 3.0rem 0;\n}\n\ninput[type='email'],\ninput[type='number'],\ninput[type='password'],\ninput[type='search'],\ninput[type='tel'],\ninput[type='text'],\ninput[type='url'],\ntextarea,\nselect {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background-color: transparent;\n border: 0.1rem solid #d1d1d1;\n border-radius: .4rem;\n box-shadow: none;\n box-sizing: inherit;\n height: 3.8rem;\n padding: .6rem 1.0rem;\n width: 100%;\n}\n\ninput[type='email']:focus,\ninput[type='number']:focus,\ninput[type='password']:focus,\ninput[type='search']:focus,\ninput[type='tel']:focus,\ninput[type='text']:focus,\ninput[type='url']:focus,\ntextarea:focus,\nselect:focus {\n border-color: #9b4dca;\n outline: 0;\n}\n\nselect {\n background: url('data:image/svg+xml;utf8,') center right no-repeat;\n padding-right: 3.0rem;\n}\n\nselect:focus {\n background-image: url('data:image/svg+xml;utf8,');\n}\n\ntextarea {\n min-height: 6.5rem;\n}\n\nlabel,\nlegend {\n display: block;\n font-size: 1.6rem;\n font-weight: 700;\n margin-bottom: .5rem;\n}\n\nfieldset {\n border-width: 0;\n padding: 0;\n}\n\ninput[type='checkbox'],\ninput[type='radio'] {\n display: inline;\n}\n\n.label-inline {\n display: inline-block;\n font-weight: normal;\n margin-left: .5rem;\n}\n\n.container {\n margin: 0 auto;\n max-width: 112.0rem;\n padding: 0 2.0rem;\n position: relative;\n width: 100%;\n}\n\n.row {\n display: flex;\n flex-direction: column;\n padding: 0;\n width: 100%;\n}\n\n.row.row-no-padding {\n padding: 0;\n}\n\n.row.row-no-padding > .column {\n padding: 0;\n}\n\n.row.row-wrap {\n flex-wrap: wrap;\n}\n\n.row.row-top {\n align-items: flex-start;\n}\n\n.row.row-bottom {\n align-items: flex-end;\n}\n\n.row.row-center {\n align-items: center;\n}\n\n.row.row-stretch {\n align-items: stretch;\n}\n\n.row.row-baseline {\n align-items: baseline;\n}\n\n.row .column {\n display: block;\n flex: 1 1 auto;\n margin-left: 0;\n max-width: 100%;\n width: 100%;\n}\n\n.row .column.column-offset-10 {\n margin-left: 10%;\n}\n\n.row .column.column-offset-20 {\n margin-left: 20%;\n}\n\n.row .column.column-offset-25 {\n margin-left: 25%;\n}\n\n.row .column.column-offset-33, .row .column.column-offset-34 {\n margin-left: 33.3333%;\n}\n\n.row .column.column-offset-50 {\n margin-left: 50%;\n}\n\n.row .column.column-offset-66, .row .column.column-offset-67 {\n margin-left: 66.6666%;\n}\n\n.row .column.column-offset-75 {\n margin-left: 75%;\n}\n\n.row .column.column-offset-80 {\n margin-left: 80%;\n}\n\n.row .column.column-offset-90 {\n margin-left: 90%;\n}\n\n.row .column.column-10 {\n flex: 0 0 10%;\n max-width: 10%;\n}\n\n.row .column.column-20 {\n flex: 0 0 20%;\n max-width: 20%;\n}\n\n.row .column.column-25 {\n flex: 0 0 25%;\n max-width: 25%;\n}\n\n.row .column.column-33, .row .column.column-34 {\n flex: 0 0 33.3333%;\n max-width: 33.3333%;\n}\n\n.row .column.column-40 {\n flex: 0 0 40%;\n max-width: 40%;\n}\n\n.row .column.column-50 {\n flex: 0 0 50%;\n max-width: 50%;\n}\n\n.row .column.column-60 {\n flex: 0 0 60%;\n max-width: 60%;\n}\n\n.row .column.column-66, .row .column.column-67 {\n flex: 0 0 66.6666%;\n max-width: 66.6666%;\n}\n\n.row .column.column-75 {\n flex: 0 0 75%;\n max-width: 75%;\n}\n\n.row .column.column-80 {\n flex: 0 0 80%;\n max-width: 80%;\n}\n\n.row .column.column-90 {\n flex: 0 0 90%;\n max-width: 90%;\n}\n\n.row .column .column-top {\n align-self: flex-start;\n}\n\n.row .column .column-bottom {\n align-self: flex-end;\n}\n\n.row .column .column-center {\n -ms-grid-row-align: center;\n align-self: center;\n}\n\n@media (min-width: 40rem) {\n .row {\n flex-direction: row;\n margin-left: -1.0rem;\n width: calc(100% + 2.0rem);\n }\n .row .column {\n margin-bottom: inherit;\n padding: 0 1.0rem;\n }\n}\n\na {\n color: #9b4dca;\n text-decoration: none;\n}\n\na:focus, a:hover {\n color: #606c76;\n}\n\ndl,\nol,\nul {\n list-style: none;\n margin-top: 0;\n padding-left: 0;\n}\n\ndl dl,\ndl ol,\ndl ul,\nol dl,\nol ol,\nol ul,\nul dl,\nul ol,\nul ul {\n font-size: 90%;\n margin: 1.5rem 0 1.5rem 3.0rem;\n}\n\nol {\n list-style: decimal inside;\n}\n\nul {\n list-style: circle inside;\n}\n\n.button,\nbutton,\ndd,\ndt,\nli {\n margin-bottom: 1.0rem;\n}\n\nfieldset,\ninput,\nselect,\ntextarea {\n margin-bottom: 1.5rem;\n}\n\nblockquote,\ndl,\nfigure,\nform,\nol,\np,\npre,\ntable,\nul {\n margin-bottom: 2.5rem;\n}\n\ntable {\n border-spacing: 0;\n width: 100%;\n}\n\ntd,\nth {\n border-bottom: 0.1rem solid #e1e1e1;\n padding: 1.2rem 1.5rem;\n text-align: left;\n}\n\ntd:first-child,\nth:first-child {\n padding-left: 0;\n}\n\ntd:last-child,\nth:last-child {\n padding-right: 0;\n}\n\nb,\nstrong {\n font-weight: bold;\n}\n\np {\n margin-top: 0;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-weight: 300;\n letter-spacing: -.1rem;\n margin-bottom: 2.0rem;\n margin-top: 0;\n}\n\nh1 {\n font-size: 4.6rem;\n line-height: 1.2;\n}\n\nh2 {\n font-size: 3.6rem;\n line-height: 1.25;\n}\n\nh3 {\n font-size: 2.8rem;\n line-height: 1.3;\n}\n\nh4 {\n font-size: 2.2rem;\n letter-spacing: -.08rem;\n line-height: 1.35;\n}\n\nh5 {\n font-size: 1.8rem;\n letter-spacing: -.05rem;\n line-height: 1.5;\n}\n\nh6 {\n font-size: 1.6rem;\n letter-spacing: 0;\n line-height: 1.4;\n}\n\nimg {\n max-width: 100%;\n}\n\n.clearfix:after {\n clear: both;\n content: ' ';\n display: table;\n}\n\n.float-left {\n float: left;\n}\n\n.float-right {\n float: right;\n}\n\n/*# sourceMappingURL=milligram.css.map */","/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */\n/**\n * prism.js default theme for JavaScript, CSS and HTML\n * Based on dabblet (http://dabblet.com)\n * @author Lea Verou\n */\n\ncode[class*=\"language-\"],\npre[class*=\"language-\"] {\n\tcolor: black;\n\tbackground: none;\n\ttext-shadow: 0 1px white;\n\tfont-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;\n\ttext-align: left;\n\twhite-space: pre;\n\tword-spacing: normal;\n\tword-break: normal;\n\tword-wrap: normal;\n\tline-height: 1.5;\n\n\t-moz-tab-size: 4;\n\t-o-tab-size: 4;\n\ttab-size: 4;\n\n\t-webkit-hyphens: none;\n\t-moz-hyphens: none;\n\t-ms-hyphens: none;\n\thyphens: none;\n}\n\npre[class*=\"language-\"]::-moz-selection, pre[class*=\"language-\"] ::-moz-selection,\ncode[class*=\"language-\"]::-moz-selection, code[class*=\"language-\"] ::-moz-selection {\n\ttext-shadow: none;\n\tbackground: #b3d4fc;\n}\n\npre[class*=\"language-\"]::selection, pre[class*=\"language-\"] ::selection,\ncode[class*=\"language-\"]::selection, code[class*=\"language-\"] ::selection {\n\ttext-shadow: none;\n\tbackground: #b3d4fc;\n}\n\n@media print {\n\tcode[class*=\"language-\"],\n\tpre[class*=\"language-\"] {\n\t\ttext-shadow: none;\n\t}\n}\n\n/* Code blocks */\npre[class*=\"language-\"] {\n\tpadding: 1em;\n\tmargin: .5em 0;\n\toverflow: auto;\n}\n\n:not(pre) > code[class*=\"language-\"],\npre[class*=\"language-\"] {\n\tbackground: #f5f2f0;\n}\n\n/* Inline code */\n:not(pre) > code[class*=\"language-\"] {\n\tpadding: .1em;\n\tborder-radius: .3em;\n\twhite-space: normal;\n}\n\n.token.comment,\n.token.prolog,\n.token.doctype,\n.token.cdata {\n\tcolor: slategray;\n}\n\n.token.punctuation {\n\tcolor: #999;\n}\n\n.namespace {\n\topacity: .7;\n}\n\n.token.property,\n.token.tag,\n.token.boolean,\n.token.number,\n.token.constant,\n.token.symbol,\n.token.deleted {\n\tcolor: #905;\n}\n\n.token.selector,\n.token.attr-name,\n.token.string,\n.token.char,\n.token.builtin,\n.token.inserted {\n\tcolor: #690;\n}\n\n.token.operator,\n.token.entity,\n.token.url,\n.language-css .token.string,\n.style .token.string {\n\tcolor: #a67f59;\n\tbackground: hsla(0, 0%, 100%, .5);\n}\n\n.token.atrule,\n.token.attr-value,\n.token.keyword {\n\tcolor: #07a;\n}\n\n.token.function {\n\tcolor: #DD4A68;\n}\n\n.token.regex,\n.token.important,\n.token.variable {\n\tcolor: #e90;\n}\n\n.token.important,\n.token.bold {\n\tfont-weight: bold;\n}\n.token.italic {\n\tfont-style: italic;\n}\n\n.token.entity {\n\tcursor: help;\n}\n\n","@import 'variables';\n\n@import 'milligram';\n@import 'prism';\n\nhtml, body {\n\tmargin: 0;\n\theight: 100%;\n\tmax-height: 100%;\n\toverflow: hidden;\n\tmin-width: $min-width;\n}\n\n* {\n\tbox-sizing: border-box;\n}\n\npre {\n\tmargin-bottom: ($base-height * 2) !important;\n}\n\na {\n\ttext-decoration: none;\n\tcolor: inherit;\n\t\n\t&:link{ \n\t\tcolor: blue;\n\t}\n &:visited {\n color: blue;\n }\n &:active {\n color: blue;\n } \n \t&:hover {\n\t\tcolor: red;\n\t\ttext-decoration: none;\n\t}\n}\n\n.wrapper {\n\theight: 100%;\n\twidth: 100%;\n\tmax-height: 100%;\n\tmin-height: 100%;\n\tdisplay: flex;\n\toverflow: hidden;\n}\n\n// Sidebar\n.sidebar {\n\tdisplay: block;\n\twidth: 20%;\n\tmax-width: $sidebar-width;\n\tpadding: 0;\n\tborder-right: $sidebar-border;\n\theight: 100%;\n\toverflow: hidden;\n\tcolor: $sidebar-color;\n\n\t.sidebar-main {\n\t\theight: 90%;\n\t\tbackground: $navigation-background;\n\t\tdisplay: flex;\n\t\toverflow-x: auto;\n\t\tpadding: $base-height;\n\t\tpadding-bottom: 100px;\n\n\t}\n\n\t.sidebar-mobile {\n\t\tdisplay: none;\n\t\theight: $header-height;\n\t\tpadding: $base-height;\n\t\ttext-align: right;\n\n\t\t.close-icon, .menu-icon {\n\t\t\twidth: 18px;\n\t\t\tcursor: pointer;\n\t\t\theight: auto;\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n.search {\n\theight: $header-height;\n\tborder-bottom: $sidebar-border;\n\tpadding: 0 $base-height;\n\n\t.search-input {\n\t\tborder: none;\n\t\tfont-size: 0.9em;\n\t\tfont-weight: 300;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n}\n\n.navigation {\n\tdisplay: block;\n\twidth: 100%;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\n\tli {\n\t\tmargin: 0;\n\t\tpadding: 10px 15px;\n\t}\n\n\ta {\n\t\tdisplay: block;\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\n\t\t&.active {\n\t\t\tcolor: $navigation-link-color;\n\t\t}\n\t}\n}\n\n// Content\n.content {\n\tdisplay: flex;\n justify-content: center;\n\tmin-height: 100%;\n\theight: 100%;\n width: 100%;\n\toverflow-y: auto;\n\tcolor: $content-color;\n\tline-height: 1.7;\n\tword-wrap: break-word;\n}\n\n.inner {\n width: 100%;\n\tmax-width: $content-width;\n\tpadding: $base-height ($base-height * 2) ($base-height * 3) $base-height;\n}\n\n.section {\n\tmargin-bottom: $base-height;\n}\n\n/**\n* Mobile\n*/\n@media (max-width: $mobile-width) {\n\t.wrapper {\n\t\tflex-direction: column;\n\t}\n\n\t.sidebar {\n\t\twidth: 100%;\n\t\tmax-width: 100%;\n\t\tborder-right: none;\n\t\theight: $header-height;\n\n\t\t.sidebar-mobile {\n\t\t\tdisplay: block;\n\n\t\t\t.menu-icon {\n\t\t\t\tdisplay: inline;\n\t\t\t}\n\t\t}\n\n\t\t&.opened {\n\t\t\toverflow: visible;\n\t\t\theight: auto;\n\t\t\tborder-bottom: $sidebar-border;\n\n\t\t\t.sidebar-mobile {\n\t\t\t\tbackground: $navigation-background;\n\t\t\t}\n\t\t}\n\t}\n\n\t.content {\n\t\twidth: 100%;\n\t\tmargin-top: 0;\n\t\theight: calc(100% - #{$header-height});\n\t\tmin-height: calc(100% - #{$header-height});\n\t}\n\n\t.inner {\n\t\tpadding: $base-height;\n\t}\n}\n","/**\n* VARIABLES\n*/\n\n$base-height: 1em;\n$content-width: 800px;\n$sidebar-width: 300px;\n$mobile-width: 745px;\n$min-width: 360px;\n$header-height: 50px;\n\n$link-color: #008cff;\n\n$sidebar-border: 1px solid rgba(0,0,0,0.07);\n$sidebar-color: #364149;\n\n$navigation-background: #fafafa;\n$navigation-link-color: #008cff;\n\n$content-color: #333;\n\n"],"file":"docs.css"} \ No newline at end of file diff --git a/MOP1.0/assets/images/close.svg b/MOP1.0/assets/images/close.svg new file mode 100644 index 0000000..e115ff0 --- /dev/null +++ b/MOP1.0/assets/images/close.svg @@ -0,0 +1,3 @@ + + + diff --git a/MOP1.0/assets/images/favicon.ico b/MOP1.0/assets/images/favicon.ico new file mode 100644 index 0000000..1808a71 Binary files /dev/null and b/MOP1.0/assets/images/favicon.ico differ diff --git a/MOP1.0/assets/images/menu.svg b/MOP1.0/assets/images/menu.svg new file mode 100644 index 0000000..e4eb9cc --- /dev/null +++ b/MOP1.0/assets/images/menu.svg @@ -0,0 +1,3 @@ + + + diff --git a/MOP1.0/assets/js/database.js b/MOP1.0/assets/js/database.js new file mode 100644 index 0000000..c29f3b7 --- /dev/null +++ b/MOP1.0/assets/js/database.js @@ -0,0 +1,71 @@ +window.database = { + + + + + "cloud-html": { + "title": "Running on the cloud", + "category": "", + "content": "Amazon Web Service EC2The simplest option is running an EC2 instance interactively where the pipeline can be installed as pointed in the previous documentation pages.Last available Amazon Machine (AMI) we provide is: ami-0bf3a9a6cb7a5ea9f (Ubuntu 18.04, CUDA compatible, Docker 19.x, Singularity 3.2.1 and Nextflow 19.10 preinstalled)When running an instance among the different available types, minimum CPU and memory requirements must be taken into account. These must fit with Nextflow executor process configuration values. In our sample configuration files we use m4.2xlarge for CPU and p3.2xlarge for GPU as examples.Keep in mind that not all Amazon infrastructure regions may have the same instance types. As a example, in January 2020 Frankfurt has GPU nodes, but not Paris.Launch an instane from the AMI image above (Go to EC2 > Images > AMI and copy-paste the ID provided above filtering in public images). Once you find that image, you can launch an instance from it.You can connect to the launched instance by using this command below:ssh -i \"key-nf.pem\" ubuntu@xxx.eu-central-1.compute.amazonaws.comwhere key-nf.pem is your private key (reference) and host details can be obtained from Connect popup in EC2 instances dashboard.TerraformFor sake of commodity, you may prefer to automate deployment of EC2 instances and S3 buckets. Terraform is a convenient tool for this.Place terraform binary in your local workstation path and move where your are keeping your tf files. Examples are provided in the terraform directory of this repository.Adapt terraform configuration files to include your credentials, use your chosen instance types, which key pair they are associated with, or whether allow files in S3 bucket to be kept or not (force_destroy parameter).Initialize terraform directory:terraform initValidate terraform files:terraform validateInspect what changes are going to be performed in your AWS account:terraform planProceed:terraform applyOnce analyses are finished, infrastructure can be dismantled with:terraform destroyShare files in Amazon S3Amazon Simple Storage Service (S3) is a convenient web service storage system for sharing raw input and final output files between your premises and your computing cloud instances.Below we provide some instructions and advices to set up a S3 bucket.Some convenient instructions for S3 permisions in your EC2 instance can be found here. From the previous link you can learn how to retrieve the key and password to place in /root/.passwd-s3fsEnsure proper permission as well: chmod 600 /root/.passwd-s3fsYou can include in /etc/fstab the following mounting point (adapt according to your case):frankfurt-nf /mnt/frankfurt-nf fuse.s3fs _netdev,allow_other,passwd_file=/root/.passwd-s3fs,uid=1000,gid=1000 0 0If not mounted, you can mount it therefore straightforward by running:sudo mount /mnt/frankfurt-nfAdapt your S3 bucket and mounting point names according to your choice.Specially for huge amount of data, we suggest to use AWS CLI to transfer files from your premises to a S3 Bucket (Ref). For instance, the commandline below uploads the data example file in a pre-existing bucket.aws s3 cp multifast5_1.fast5 s3://frankfurt-nfModify your Nexflow configuration files in order to point your input files at the mounted S3 bucket. Both input and final output files can be placed in that mounted S3 storage, but we do not recommend that work Nextflow directory (containing pipeline intermediary files) is kept there, since it significatively delays the whole process. Choose a suitable disk size for your instance depending on the amount of data to be processed.", + "url": "/cloud.html", + "href": "/master_of_pores/MOP1.0/cloud.html" + } + , + + + + + + + "": { + "title": "Home", + "category": "", + "content": "[![Docker Build Status](https://img.shields.io/docker/automated/biocorecrg/nanopore.svg)](https://cloud.docker.com/u/biocorecrg/repository/docker/biocorecrg/nanopore/builds)[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3518291.svg)](https://doi.org/10.5281/zenodo.3518291)[![Nextflow version](https://img.shields.io/badge/Nextflow-19.10.0-brightgreen)](https://www.nextflow.io/)[![Singularity version](https://img.shields.io/badge/Singularity-v2.6.1-green.svg)](https://www.sylabs.io/)[![Docker version](https://img.shields.io/badge/Docker-v19.03-blue)](https://www.docker.com/)# ![Direct RNA nanopore analysis pipeline](https://raw.githubusercontent.com/biocorecrg/master_of_pores/v1.0/docs/logo_master.jpg) # Nanopore analysis pipelineNextflow pipeline for analysis of Nanopore data from direct RNA sequencing. This is a joint project between [CRG bioinformatics core](https://biocore.crg.eu/) and [Epitranscriptomics and RNA Dynamics research group](https://www.crg.eu/en/programmes-groups/novoa-lab). ## BackgroundThe direct RNA sequencing platform offered by Oxford Nanopore Technologies allows for direct measurement of RNA molecules without the need of conversion to complementary DNA (cDNA), and as such, is virtually capable of detecting any given RNA modification present in the molecule that is being sequenced.Although the technology has been publicly available since 2017, the complexity of the raw current intensity output data generated by nanopore sequencing, together with lack of systematic and reproducible pipelines for the analysis of direct RNA sequencing datasets, have greatly hindered the access of this technology to the general user. Here we provide an in silico scalable and parallelizable workflow for the analysis of direct RNA sequencing reads, which converts raw current intensities into multiple types of processed data, providing metrics of the quality of the run, per-gene counts, RNA modification predictions and polyA tail length predictions.The workflow named Master of Pores, which has been built using the Nextflow framework and is distributed with Docker and Singularity containers, can be executed on any Unix-compatible OS on a computer, cluster or cloud without the need of installing any additional software or dependencies. The workflow is easily scalable, as it can incorporate updated software versions or algorithms that may be released in the future in a modular manner. We expect that our pipeline will make the analysis of direct RNA sequencing datasets highly simplified and accessible to the non-bioinformatic expert, and thus boost our understanding of the epitranscriptome with single molecule resolution.## Modules includedThe MasterOfPores workflow includes all steps needed to process raw FAST5 files produced by Nanopore direct RNA sequencing and executes the following steps, allowing users a choice among different algorithms. The pipeline consists of 3 modules:### Module 1: *NanoPreprocess*This module takes as input the raw Fast5 reads and produces as output base-called FASTQ and BAM. The pre-processing module performs base-calling, demultiplexing, filtering, quality control, mapping, read counting, generating a final report of the performance and results of each of the steps performed. It automatically detects the kinf of input fast5 file (single or multi sequence).The NanoPreprocess module comprises 8 main steps:1. *Read base-calling* with the algorithm of choice, using ***Albacore*** (https://nanoporetech.com) or ***Guppy*** (https://nanoporetech.com). This step can be run in parallel and the user can decide the number of files to be processed in a single job by using the command --granularity. When using GPU the granularity is ignored and all the files are analyzed sequentially.2. *Filtering* of the resulting fastq files using ***Nanofilt*** (https://github.com/wdecoster/nanofilt). This step is optional and can be run in parallel.3. *Demultiplexing* of the fastq files using ***DeePlexiCon*** (https://github.com/Psy-Fer/deeplexicon). This step is optional, and can only be used if the libraries have been barcoded using the oligonucleotides used to train the deep neural classifier. The model must be given as option as indicated in the params.config4. *Quality control* of the base-called data using ***MinIONQC*** (https://github.com/roblanf/minion_qc) and ***FastQC*** (http://www.bioinformatics.babraham.ac.uk/projects/fastqc).5. *Read mapping* to the reference genome or transcriptome using ***minimap2*** (https://github.com/lh3/minimap2) or ***Graphmap2*** (https://github.com/lbcb-sci/graphmap2). 6. Quality control on the alignment using ***NanoPlot*** (https://github.com/wdecoster/NanoPlot) and ***bam2stats*** (https://github.com/lpryszcz/bin).7. *Gene or Isoform quantification* using ***HTSeq*** (https://htseq.readthedocs.io/) or ***NanoCount*** (https://github.com/a-slide/NanoCount) which estimates transcript abundance using an expectation-maximization algorithm. Of note, NanoCount is run if the reads have been mapped to the transcriptome, using the flag --reference_type transcriptome while HTseq is used when mapping to the genome. By default, reads are mapped to the genome and HTSeq is used to quantify per-gene counts. 8. *Final report* of the data processing using ***MultiQC*** (https://github.com/ewels/MultiQC) that combines the single quality controls done previously, as well as global run statistics. ### Module 2: *NanoTail* This module takes as input the output produced by the NanoPreprocess module and produces polyA tail estimations.The NanoTail module estimates polyA tail lengths using ***Nanopolish*** (https://github.com/jts/nanopolish) and ***Tailfindr*** (https://github.com/adnaniazi/tailfindr), producing a plain text file that includes polyA tail length estimates for each read, computed using both algorithms. The correlation between the two algorithms is also reported as a plot. ### Module 3: *NanoMod* This module takes as input the rthe output produced by the NanoPreprocess module and produces a flat text file which includes the predicted RNA modifications.The NanoMod module predicts RNA modifications using ***Tombo*** (https://github.com/nanoporetech/tombo) and ***EpiNano*** (https://github.com/enovoa/EpiNano), producing a plain text file that is intersection of predicted sites both algorithms, to reduce the number of false positives. ## Citing this workIf you use this tool please cite our pre-print:[\"MasterOfPores: A Workflow for the Analysis of Oxford Nanopore Direct RNA Sequencing Datasets\"Luca Cozzuto, Huanle Liu, Leszek P. Pryszcz, Toni Hermoso Pulido, Anna Delgado-Tejedor, Julia Ponomarenko, Eva Maria Novoa.*Front. Genet., 17 March 2020.*](https://doi.org/10.3389/fgene.2020.00211)", + "url": "/", + "href": "/master_of_pores/MOP1.0/" + } + , + + + "install-html": { + "title": "Installation", + "category": "", + "content": "## Pre-requisitesFor using the pipeline [Nextflow](https://www.nextflow.io/) and a linux container engine (either [Docker](https://www.docker.com/) or [Singularity](https://sylabs.io/guides/3.1/user-guide/cli/singularity_apps.html)) need to be installed. The pipeline can be run in Mac OSX and Linux operative systems. ## Installation### 1. Install Nextflow (version 19.10.0)```bashcurl -s https://get.nextflow.io | bash```### 2. Clone the MasterOfPores repositoryThe pipeline can be cloned in this way using **git**:```bashgit clone --depth 1 https://github.com/biocorecrg/master_of_pores.git```### 3. Install Docker and/or Singularity - Docker: https://docs.docker.com/install/ (version 10.03 or later is required)- Singularity: https://sylabs.io/guides/2.6/user-guide/quick_start.html#quick-installation-steps (version 2.6.1 or 3.2.1 is required)### 4. Download Nanopore base-calling algorithmsBecause of redistribution restriction of the basecallers **Albacore** and **Guppy** we cannot provide them inside the docker image, so you would need to download the binaries from the official website https://nanoporetech.com and place them inside the **master_of_pores/NanoPreprocess/bin** folder. For installing Guppy you need to install the tarball file.#### a) Both Albacore and Guppy```bashcd master_of_pores/NanoPreprocess/bintar -zvxf ont-guppy_3.1.5_linux64.tar.gzln -s ont-guppy_3.1.5_linux64/ont-guppy/bin/guppy_* .pip3 install --target=./albacore ont_albacore-2.1.7-cp36-cp36m-manylinux1_x86_64.whlln -s albacore/bin/read_fast5_basecaller.py .```#### b) AlbacoreDownload the wheel file.```bashcd master_of_pores/NanoPreprocess/binpip3 install --target=./albacore ont_albacore-2.1.7-cp36-cp36m-manylinux1_x86_64.whl$ ln -s albacore/bin/multi_to_single_fast5 $ ln -s albacore/bin/read_fast5_basecaller.py .```#### c) GuppyPlease note Guppy versions older than 3.1 (e.g. 3.0.3) only runs on CPUs.Newer versions (e.g. 3.1.5 and above) works on both CPUs and GPUs. The difference of speed between CPUs and GPU is more than 10 times. You need to install the tarball file of Guppy.```bashcd master_of_pores/NanoPreprocess/bintar -zvxf ont-guppy_3.1.5_linux64.tar.gzln -s ont-guppy_3.1.5_linux64/ont-guppy/bin/guppy_* .````### 5. Optional step: install CUDA drivers (only needed for GPU support): In case you want to use the GPU you need to install the [CUDA drivers](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html) ### 6. Run the pipeline:Using Singularity:```bashcd master_of_pores/NanoPreprocess/nextflow run preprocessing.nf -with-singularity```Using Docker:```bashcd master_of_pores/NanoPreprocess/nextflow run preprocessing.nf -with-docker``` ", + "url": "/install.html", + "href": "/master_of_pores/MOP1.0/install.html" + } + , + + + "nanomod-html": { + "title": "NanoMod", + "category": "", + "content": "# NanoModThis module allows to predict the loci with RNA modifications starting from data produced by NanoPreprocess.## Workflow* **index_reference** index the reference file for Epinano* **call_variants** uses Samtools for calling the variants for Epinano* **calc_var_frequencies** it uses TSV_to_Variants_Freq.py3 for calculating the frequencies of each variants for Epinano* **predict_with_EPInano** It predicts the modifications with Epinano in parallel splitting the input file in 1 million rows* **combineEpinanoPred** It combine the results from Epinano * **resquiggling** resquiggle fast5 files for Tombo* **getModifications** it estimates the modifications using Tombo comparing WT vs KO## Input Parameters1. **input_path** path to the folders produced by NanoPreprocessing step.1. **comparison** tab separated text file containing the list of comparison. Here an example:```bashWT1 KO1WT2 KO2WT3 KO3```1. **reference** reference transcriptome1. **output** folder1. **coverage** read coverage threshold for prediction1. **tombo_opt** options for tombo1. **epinano_opt** options for epinano1. **email**## ResultsThree folders are produced by this module:1. Epinano, containing the results obtained with this method. You have a single file with putative modifications. ```bash#Kmer,Window,Ref,Coverage,q1,q2,q3,q4,q5,mis1,mis2,mis3,mis4,mis5,ins1,ins2,ins3,ins4,ins5,del1,del2,del3,del4,del5,prediction,dist,ProbM,ProbUAGTGG,394404:394405:394406:394407:394408,chr2,8.0:8.0:7.0:7.0:7.0,21.5,21.25,19.857,23.0,16.285999999999998,0.0,0.0,0.0,0.0,0.0,0.0,0.062,0.071,0.0,0.0,0.0,0.0,0.0,0.0,0.0,unm,19.26143361547619,3.00000089999998e-14,0.9999999999999699TTTTT,12150:12151:12152:12153:12154,chr8,3.0:3.0:3.0:3.0:3.0,0.0,16.5,18.5,16.0,16.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.33299999999999996,0.33299999999999996,0.0,0.0,unm,2.5976484688977424,0.06071658133381308,0.9392834186661868ACATT,438165:438166:438167:438168:438169,chr13,67.0:67.0:67.0:68.0:68.0,13.635,13.446,9.323,9.6,12.127,0.03,0.045,0.015,0.147,0.07400000000000001,0.0,0.0,0.0,0.0,0.0,0.06,0.03,0.075,0.11800000000000001,0.07400000000000001,unm,0.08435556637195174,0.519879422458087,0.48012057754191295...```2. Tombo, containing the results obtained with this method in fasta format. You have one file for each comparison WT vs KO```bash>chr11:455562:- Est. Frac. Alternate: 0.98TGACA>chr12:1008723:- Est. Frac. Alternate: 0.98TATCT>chr15:491587:+ Est. Frac. Alternate: 0.96TATAT>chr10:425794:- Est. Frac. Alternate: 0.95ATGTT>chr13:510759:+ Est. Frac. Alternate: 0.95...```", + "url": "/nanomod.html", + "href": "/master_of_pores/MOP1.0/nanomod.html" + } + , + + + "nanopreprocess-html": { + "title": "NanoPreprocess", + "category": "", + "content": "# NanoPreprocessThis module takes as input the raw fast5 reads and produces a number of outputs (basecalled fast5, sequences in fastq format, aligned reads in BAM format etc). The pre-processing module performs base-calling, demultiplexing (optional), filtering, quality control, mapping to a genome / transcriptome reference, read counting and it generates a final report of the performance and results of each of the steps performed. It automatically detects the kinf of input fast5 file (single or multi sequence).## Workflow| Process name | Description || ------------- | ------------- ||**testInput**|Detection of kind of fast5 (multi or single)||**baseCalling**|Basecalling with *Albacore* or *Guppy*||**demultiplexing_with_deeplexicon**|Demultiplexing (optional) with **DeePlexiCon**||**concatenateFastQFiles**|This process concatenates the fastq files produces for each single basecalling ||**QC**|performed with *MinIONQC*||**fastQC**|on fastq files||**mapping**|to the genome / transcriptome with either *minimap2* or *graphmap2*||**counting**|counts per gene, if mapping to the genome with *htseq-count*, or per transcript if mapping to the transcriptome with *NanoCount*. Reads are also assigned to a gene or to a transcript if they are uniquely mapping. A report file is also generated||**alnQC**|QC of aligned reads with *bam2stats*.||**joinCountQCs**|This process is for merging the report files generated by the counting step.||**joinAlnQCs**|This process is for merging the QC files generated by the alnQC step.||**alnQC2**|QC of aligned reads with *NanoPlot*. The plots PercentIdentityvsAverageBaseQuality_kde, LengthvsQualityScatterPlot_dot, HistogramReadlength and Weighted_HistogramReadlength are then merged together in a single picture.||**multiQC**|Final repor enventually sent by mail too.| You can launch the pipeline choosing either the parameter **-with-singularity** or **-with-docker** depending on which containers you want to use:## Input Parameters| Parameter name | Description || ------------- | --------------||**fast5 files**|Path to fast5 input files. They can contain either a single sequence or multiple ones. They should be inside a folder that will be used as sample name.||**reference**|file in fasta format. It can be either a genome or a transcriptome. this must be specified via **ref_type** parameter.||**kit**|and **flowcell** parameters needed for basecalling.||**annotation**|in GTF format. It is optional and needed only in case of mapping to the genome and when interested in gene counts. ||**seq_type**| It can be either RNA or DNA.||**output**|output folder name||**granularity**|indicates the number of input fast5 files analyzed in a single process. It is by default 4000 for single-sequence fast5 files and 1 for multi-sequence fast5 files. In case **GPU** option is turned on this value is not needed since every file will be analyzed sequentially.||**basecaller**|program. guppy or albacore are supported.||**basecaller_opt**|command line options for basecaller program ||**GPU**|it allows using GPU or not. I can be either OFF or NO||**demultiplexing**|program. It is supported only deeplexicon. It can be turned off by specifying \"OFF\"||**demultiplexing_opt**|options for the demultiplexing program. ||**filter**|it can be NanoFilt or OFF is filtering is needed.||**filter_opt**|options of the filtering program. ||**mapper**|it can be either minimap2 or graphmap2||**mapper_opt**| options of the mapping program. ||**map_type**|it can be either spliced or not. In case the alignment is to a eukaryotic genome it should be spliced.||**counter**|this parameter can be YES for counting the number of tags per gene (in case of mapping to the genome) or per transcript (in case of mapping to the transcriptome). An annotation file is needed in case of mapping to the genome.||**counter_opt**|options of the counter program: NanoCount for transcripts and Htseq-count for genes.||**email**|for receving a mail with the final report when the pipeline is finished|You can change them by editing the **params.config** file or using the command line (each param name needs to have the characters **--** before): ```bashnextflow run nanopreprocess.nf -with-singularity -bg --output test2 > log.txt```To resume a previous execution that failed at a certain step or if you change a parameter that affects only some steps you can use the **Netxtlow** parameter **-resume** (only one dash!):```bashnextflow run nanopreprocess.nf -with-singularity -bg -resume > log.txt...[warm up] executor > crg[e8/2e64bd] Cached process > baseCalling (RNA081120181_1)[b2/21f680] Cached process > QC (RNA081120181_1)[c8/3f5d17] Cached process > mapping (RNA081120181_1)...```## Results:Seven folders are created by the pipeline within the output folder specified by the **output** parameter:* **fast5_files**: contains the basecalled multisequence fast5 files. Each batch contains 4000 sequences. * **fastq_files**: contains one or, in case of demultiplexing, more fastq files.* **QC_files**: contains each single QC produced by the pipeline.* **alignment**: contains the bam file(s)* **counts**: contains read counts per gene / transcript. It is optional.* **assigned**: contains assignment of each read to a given gene / transcript. It is optional.* **report**: contains the final multiqc report. -----------------------------------------------------", + "url": "/nanopreprocess.html", + "href": "/master_of_pores/MOP1.0/nanopreprocess.html" + } + , + + + "nanotail-html": { + "title": "NanoTail", + "category": "", + "content": "# NanoTailThis module allows to estimates polyA sizes by using two different methods (nanopolish and talifindr). it reads directly the output produced by NanoPreprocess and in particular it needs the read counts / assignment.# Workflow 1. **check_reference** It verifies whether the reference is zipped and eventually unzip it 1. **tailfindr** it runs *tailfindr* tool in parallel. 1. **collect_tailfindr_results** It collects the results of tailfindr. 1. **filter_bam** Bam files are filtered with *samtools* to keep only mapped reads and remove secondary alignments 1. **tail_nanopolish** It runs *nanopolish* in parallel. 1. **collect_nanopolish_results** It collects the results of tail_nanopolish. 1. **join_results** It merges the results from the two algorithms and make a plot of the correlation.## Input Parameters1. **input_folders** path to the folders produced by NanoPreprocessing step.1. **nanopolish_opt** options for the nanopolish program1. **tailfindr_opt** options for the tailfindr program1. **reference** reference genome / transcriptome1. **output** folder1. **email** ## ResultsThree folders are created by the pipeline within the output folder:1. NanoPolish: contains the output of *nanopolish* tool.1. Tailfindr: contains the output of *tailfindr* tool.1. PolyA_final: contains the txt files with the combined results (i.e. predicted polyA sizes). Here an example of a test:```bash\"Read name\"\t\"Tailfindr\"\t\"Nanopolish\"\t\"Gene Name\"\"013a5dde-9c52-4de1-83eb-db70fb2cd130\"\t52.16\t49.39\t\"YKR072C\"\"01119f62-ca68-458d-aa1f-cf8c8c04cd3b\"\t231.64\t274.28\t\"YDR133C\"\"0154ce9c-fe6b-4ebc-bbb1-517fdc524207\"\t24.05\t24.24\t\"YFL044C\"\"020cde28-970d-4710-90a5-977e4b4bbc46\"\t41.27\t56.79\t\"YGL238W\"```A plot is also produced for showing the correlation between the two methods.", + "url": "/nanotail.html", + "href": "/master_of_pores/MOP1.0/nanotail.html" + } + , + + + +}; diff --git a/MOP1.0/assets/js/lunar.min.js b/MOP1.0/assets/js/lunar.min.js new file mode 100644 index 0000000..050e1c7 --- /dev/null +++ b/MOP1.0/assets/js/lunar.min.js @@ -0,0 +1,6 @@ +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.0.1 + * Copyright (C) 2017 Oliver Nightingale + * @license MIT + */ +!function(){var e=function(t){var r=new e.Builder;return r.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),r.searchPipeline.add(e.stemmer),t.call(r,r),r.build()};e.version="2.0.1",e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),e.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},e.idf=function(e,t){var r=0;for(var i in e)"_index"!=i&&(r+=Object.keys(e[i]).length);return(t-r+.5)/(r+.5)},e.Token=function(e,t){this.str=e||"",this.metadata=t||{}},e.Token.prototype.toString=function(){return this.str},e.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},e.Token.prototype.clone=function(t){return t=t||function(e){return e},new e.Token(t(this.str,this.metadata),this.metadata)},e.tokenizer=function(t){if(null==t||void 0==t)return[];if(Array.isArray(t))return t.map(function(t){return new e.Token(e.utils.asString(t).toLowerCase())});for(var r=t.toString().trim().toLowerCase(),i=r.length,n=[],s=0,o=0;i>=s;s++){var a=r.charAt(s),u=s-o;(a.match(e.tokenizer.separator)||s==i)&&(u>0&&n.push(new e.Token(r.slice(o,s),{position:[o,u],index:n.length})),o=s+1)}return n},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(-1==i)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(-1==i)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;t>r;r++){var i=this._stack[r];e=e.reduce(function(t,r,n){var s=i(r,n,e);return void 0===s||""===s?t:t.concat(s)},[])}return e},e.Pipeline.prototype.runString=function(t){var r=new e.Token(t);return this.run([r]).map(function(e){return e.toString()})},e.Pipeline.prototype.reset=function(){this._stack=[]},e.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return e.Pipeline.warnIfFunctionNotRegistered(t),t.label})},e.Vector=function(e){this._magnitude=0,this.elements=e||[]},e.Vector.prototype.insert=function(e,t){if(this._magnitude=0,0==this.elements.length)return void this.elements.push(e,t);for(var r=0,i=this.elements.length,n=i-r,s=2*Math.floor(n/2/2),o=this.elements[s];n>2;){if(o==e)throw"duplicate index";e>o&&(r=s),o>e&&(i=s),n=i-r,s=r+2*Math.floor(n/2/2),o=this.elements[s]}o>e&&this.elements.splice(s,0,e,t),e>o&&this.elements.splice(s+2,0,e,t)},e.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,t=this.elements.length,r=1;t>r;r+=2){var i=this.elements[r];e+=i*i}return this._magnitude=Math.sqrt(e)},e.Vector.prototype.dot=function(e){for(var t=0,r=this.elements,i=e.elements,n=r.length,s=i.length,o=0,a=0,u=0,h=0;n>u&&s>h;)o=r[u],a=i[h],a>o?u+=2:o>a?h+=2:o==a&&(t+=r[u+1]*i[h+1],u+=2,h+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/(this.magnitude()*e.magnitude())},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;ti;i++)r.insert(t[i]);return r.finish(),r.root},e.TokenSet.fromClause=function(t){return"editDistance"in t?e.TokenSet.fromFuzzyString(t.term,t.editDistance):e.TokenSet.fromString(t.term)},e.TokenSet.fromFuzzyString=function(t,r){for(var i=new e.TokenSet,n=[{node:i,editsRemaining:r,str:t}];n.length;){var s=n.pop();if(s.str.length>0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length?o["final"]=!0:n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining>0&&s.str.length>1){var u,a=s.str.charAt(1);a in s.node.edges?u=s.node.edges[a]:(u=new e.TokenSet,s.node.edges[a]=u),s.str.length<=2?u["final"]=!0:n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(2)})}if(s.editsRemaining>0&&1==s.str.length&&(s.node["final"]=!0),s.editsRemaining>0&&s.str.length>=1){if("*"in s.node.edges)var h=s.node.edges["*"];else{var h=new e.TokenSet;s.node.edges["*"]=h}1==s.str.length?h["final"]=!0:n.push({node:h,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.editsRemaining>0){if("*"in s.node.edges)var d=s.node.edges["*"];else{var d=new e.TokenSet;s.node.edges["*"]=d}0==s.str.length?d["final"]=!0:n.push({node:d,editsRemaining:s.editsRemaining-1,str:s.str})}if(s.editsRemaining>0&&s.str.length>1){var l,c=s.str.charAt(0),p=s.str.charAt(1);p in s.node.edges?l=s.node.edges[p]:(l=new e.TokenSet,s.node.edges[p]=l),1==s.str.length?l["final"]=!0:n.push({node:l,editsRemaining:s.editsRemaining-1,str:c+s.str.slice(2)})}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=!1,s=0,o=t.length;o>s;s++){var a=t[s],u=s==o-1;if("*"==a)n=!0,r.edges[a]=r,r["final"]=u;else{var h=new e.TokenSet;h["final"]=u,r.edges[a]=h,r=h,n&&(r.edges["*"]=i)}}return i},e.TokenSet.prototype.toArray=function(){for(var e=[],t=[{prefix:"",node:this}];t.length;){var r=t.pop(),i=Object.keys(r.node.edges),n=i.length;r.node["final"]&&e.push(r.prefix);for(var s=0;n>s;s++){var o=i[s];t.push({prefix:r.prefix.concat(o),node:r.node.edges[o]})}}return e},e.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this["final"]?"1":"0",t=Object.keys(this.edges).sort(),r=t.length,i=0;r>i;i++){var n=t[i],s=this.edges[n];e=e+n+s.id}return e},e.TokenSet.prototype.intersect=function(t){for(var r=new e.TokenSet,i=void 0,n=[{qNode:t,output:r,node:this}];n.length;){i=n.pop();for(var s=Object.keys(i.qNode.edges),o=s.length,a=Object.keys(i.node.edges),u=a.length,h=0;o>h;h++)for(var d=s[h],l=0;u>l;l++){var c=a[l];if(c==d||"*"==d){var p=i.node.edges[c],f=i.qNode.edges[d],m=p["final"]&&f["final"],y=void 0;c in i.output.edges?(y=i.output.edges[c],y["final"]=y["final"]||m):(y=new e.TokenSet,y["final"]=m,i.output.edges[c]=y),n.push({qNode:f,output:y,node:p})}}}return r},e.TokenSet.Builder=function(){this.previousWord="",this.root=new e.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},e.TokenSet.Builder.prototype.insert=function(t){var r,i=0;if(t=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.documentVectors=e.documentVectors,this.tokenSet=e.tokenSet,this.documentCount=e.documentCount,this.averageDocumentLength=e.averageDocumentLength,this.b=e.b,this.k1=e.k1,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){var r=new e.Query(this.fields),i=Object.create(null),n=new e.Vector;t.call(r,r);for(var s=0;se?this._b=0:e>1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(e){var t=e[this._ref],r={};this.documentCount+=1,this.documentTermFrequencies[t]=r,this.documentLengths[t]=0;for(var i=0;ii;i++){var n=e[i];r+=this.documentLengths[n]}this.averageDocumentLength=r/t},e.Builder.prototype.createDocumentVectors=function(){for(var t={},r=Object.keys(this.documentTermFrequencies),i=r.length,n=0;i>n;n++){for(var s=r[n],o=this.documentLengths[s],a=new e.Vector,u=this.documentTermFrequencies[s],h=Object.keys(u),d=h.length,l=0;d>l;l++){var c=h[l],p=u[c],f=this.invertedIndex[c]._index,m=e.idf(this.invertedIndex[c],this.documentCount),y=m*((this._k1+1)*p)/(this._k1*(1-this._b+this._b*(o/this.averageDocumentLength))+p);a.insert(f,y)}t[s]=a}this.documentVectors=t},e.Builder.prototype.createTokenSet=function(){this.tokenSet=e.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},e.Builder.prototype.build=function(){return this.calculateAverageDocumentLengths(),this.createDocumentVectors(),this.createTokenSet(),new e.Index({invertedIndex:this.invertedIndex,documentVectors:this.documentVectors,tokenSet:this.tokenSet,averageDocumentLength:this.averageDocumentLength,documentCount:this.documentCount,fields:this._fields,pipeline:this.searchPipeline,b:this._b,k1:this._k1})},e.Builder.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},e.MatchData=function(e,t,r){this.metadata={},this.metadata[e]={},this.metadata[e][t]=r},e.MatchData.prototype.combine=function(e){for(var t=Object.keys(e.metadata),r=0;r47&&58>r);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more()?e.QueryLexer.lexText:void 0},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if(" "==r)return e.QueryLexer.lexTerm}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseFieldOrTerm;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseFieldOrTerm=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type+" with value '"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(-1==t.query.allFields.indexOf(r.str)){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting a field, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),-1!=r.str.indexOf("*")&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/MOP1.0/assets/js/mobile-navigation.js b/MOP1.0/assets/js/mobile-navigation.js new file mode 100644 index 0000000..686e32e --- /dev/null +++ b/MOP1.0/assets/js/mobile-navigation.js @@ -0,0 +1,18 @@ +'use strict'; +(function ($) { + var menuIcon = $('#menu') + var closeIcon = $('#close') + var sidebar = $('#sidebar') + + menuIcon.on('click', function () { + sidebar.addClass('opened') + menuIcon.hide() + closeIcon.show() + }) + + closeIcon.on('click', function () { + sidebar.removeClass('opened') + menuIcon.show() + closeIcon.hide() + }) +})(Zepto) diff --git a/MOP1.0/assets/js/prism.min.js b/MOP1.0/assets/js/prism.min.js new file mode 100644 index 0000000..c31318b --- /dev/null +++ b/MOP1.0/assets/js/prism.min.js @@ -0,0 +1,6 @@ +/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */ +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,util:{encode:function(e){return e instanceof a?new a(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){h.lastIndex=0;var _=h.exec(w),P=1;if(!_&&m&&b!=t.length-1){if(h.lastIndex=k,_=h.exec(e),!_)break;for(var A=_.index+(d?_[1].length:0),j=_.index+_[0].length,x=b,O=k,S=t.length;S>x&&(j>O||!t[x].type&&!t[x-1].greedy);++x)O+=t[x].length,A>=O&&(++b,k=O);if(t[b]instanceof s||t[x-1].greedy)continue;P=x-b,w=e.slice(k,O),_.index-=k}if(_){d&&(p=_[1].length);var A=_.index+p,_=_[0].slice(p),j=A+_.length,N=w.slice(0,A),C=w.slice(j),E=[b,P];N&&(++b,k+=N.length,E.push(N));var L=new s(u,f?n.tokenize(_,f):_,y,_,m);if(E.push(L),C&&E.push(C),Array.prototype.splice.apply(t,E),1!=P&&n.matchGrammar(e,t,a,b,k,!0,u),l)break}else if(l)break}}}}},tokenize:function(e,t){var a=[e],r=t.rest;if(r){for(var i in r)t[i]=r[i];delete t.rest}return n.matchGrammar(e,a,t,0,0,!1),a},hooks:{all:{},add:function(e,t){var a=n.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=n.hooks.all[e];if(a&&a.length)for(var r,i=0;r=a[i++];)r(t)}}},a=n.Token=function(e,t,n,a,r){this.type=e,this.content=t,this.alias=n,this.length=0|(a||"").length,this.greedy=!!r};if(a.stringify=function(e,t,r){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return a.stringify(n,t,e)}).join("");var i={type:e.type,content:a.stringify(e.content,t,r),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:r};if("comment"==i.type&&(i.attributes.spellcheck="true"),e.alias){var l="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,l)}n.hooks.run("wrap",i);var o=Object.keys(i.attributes).map(function(e){return e+'="'+(i.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+(o?" "+o:"")+">"+i.content+""},!_self.document)return _self.addEventListener?(_self.addEventListener("message",function(e){var t=JSON.parse(e.data),a=t.language,r=t.code,i=t.immediateClose;_self.postMessage(n.highlight(r,n.languages[a],a)),i&&_self.close()},!1),_self.Prism):_self.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(n.filename=r.src,!document.addEventListener||n.manual||r.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); +Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\s\S])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\s\S]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; +Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:{pattern:/("|')(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.util.clone(Prism.languages.css),Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/()[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css"}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); +Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/}; +Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\\\|\\?[^\\])*?`/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript"}}),Prism.languages.js=Prism.languages.javascript; diff --git a/MOP1.0/assets/js/search.js b/MOP1.0/assets/js/search.js new file mode 100644 index 0000000..f9d95d7 --- /dev/null +++ b/MOP1.0/assets/js/search.js @@ -0,0 +1,129 @@ +'use strict'; + +(function ($, lunr, database) { + var resultsContainer = $('#search-results') + var navigationContainer = $('#navigation') + var nothingFound = $('
  • Nothing found.
  • ') + var searchQuery = $('#search-input') + database = database || {} + + function createSearchStore(data) { + var searchStore = lunr(function () { + var self = this + + self.field('id'); + self.field('title', { boost: 10 }); + self.field('category'); + self.field('content'); + + Object.keys(data).forEach(function (key) { + self.add({ + id: key, + title: data[key].title, + category: data[key].category, + content: data[key].content + }); + }) + + }); + + return searchStore + } + + function resultEntry(result) { + var searchEntry = $('
  • ') + var searchLink = $('') + + var categoryPath = result.url.split('/') + categoryPath.shift() + categoryPath.pop() + + searchEntry + .append(searchLink) + + searchLink.attr('href', result.href) + + searchLink.text(result.title) + + return searchEntry + } + + function displayResults(results) { + resultsContainer.empty() + + if (results.length > 0) { + results.map(function(entry) { + resultsContainer.append(resultEntry(entry)) + }) + } else { + resultsContainer.append(nothingFound) + } + + navigationContainer.hide() + resultsContainer.show() + } + + function hideResults() { + resultsContainer.hide() + navigationContainer.show() + } + + function searchStore(store, data) { + return function (term) { + var results = store.search(term) + + return results.map(function (result) { + return data[result.ref] + }) + } + } + + function queryChange(display, hide, search) { + return function (event) { + var value = event.srcElement.value + + if (value.length === 0) { + hide() + } + + if (value.length > 2) { + display(search(value)) + } + } + } + + function keyboardControls(hide) { + return function (event) { + switch (event.keyCode) { + case 27: + hide() + break + } + } + } + + function getQueryVariable(variable) { + var query = window.location.search.substring(1); + var vars = query.split('&') + + for (var i = 0; i < vars.length; i++) { + var pair = vars[i].split('=') + + if (pair[0] === variable) { + return decodeURIComponent(pair[1].replace(/\+/g, '%20')) + } + } + } + + var search = searchStore(createSearchStore(database), database) + var searchTerm = getQueryVariable('query') + + if (searchTerm) { + displayResults(search(searchTerm)) + searchQuery.attr('value', searchTerm) + } + + searchQuery.on('input', queryChange(displayResults, hideResults, search)) + $(document).on('keyup', keyboardControls(hideResults)) + +})(Zepto, lunr, window.database) diff --git a/MOP1.0/assets/js/zepto.min.js b/MOP1.0/assets/js/zepto.min.js new file mode 100644 index 0000000..ad43ef1 --- /dev/null +++ b/MOP1.0/assets/js/zepto.min.js @@ -0,0 +1,2 @@ +/* Zepto v1.2.0 - zepto event ajax form ie - zeptojs.com/license */ +!function(t,e){"function"==typeof define&&define.amd?define(function(){return e(t)}):e(t)}(this,function(t){var e=function(){function $(t){return null==t?String(t):S[C.call(t)]||"object"}function F(t){return"function"==$(t)}function k(t){return null!=t&&t==t.window}function M(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function R(t){return"object"==$(t)}function Z(t){return R(t)&&!k(t)&&Object.getPrototypeOf(t)==Object.prototype}function z(t){var e=!!t&&"length"in t&&t.length,n=r.type(t);return"function"!=n&&!k(t)&&("array"==n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function q(t){return a.call(t,function(t){return null!=t})}function H(t){return t.length>0?r.fn.concat.apply([],t):t}function I(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function V(t){return t in l?l[t]:l[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function _(t,e){return"number"!=typeof e||h[I(t)]?e:e+"px"}function B(t){var e,n;return c[t]||(e=f.createElement(t),f.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),c[t]=n),c[t]}function U(t){return"children"in t?u.call(t.children):r.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function X(t,e){var n,r=t?t.length:0;for(n=0;r>n;n++)this[n]=t[n];this.length=r,this.selector=e||""}function J(t,r,i){for(n in r)i&&(Z(r[n])||L(r[n]))?(Z(r[n])&&!Z(t[n])&&(t[n]={}),L(r[n])&&!L(t[n])&&(t[n]=[]),J(t[n],r[n],i)):r[n]!==e&&(t[n]=r[n])}function W(t,e){return null==e?r(t):r(t).filter(e)}function Y(t,e,n,r){return F(e)?e.call(t,n,r):e}function G(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function K(t,n){var r=t.className||"",i=r&&r.baseVal!==e;return n===e?i?r.baseVal:r:void(i?r.baseVal=n:t.className=n)}function Q(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?r.parseJSON(t):t):t}catch(e){return t}}function tt(t,e){e(t);for(var n=0,r=t.childNodes.length;r>n;n++)tt(t.childNodes[n],e)}var e,n,r,i,O,P,o=[],s=o.concat,a=o.filter,u=o.slice,f=t.document,c={},l={},h={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},p=/^\s*<(\w+|!)[^>]*>/,d=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,m=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,g=/^(?:body|html)$/i,v=/([A-Z])/g,y=["val","css","html","text","data","width","height","offset"],x=["after","prepend","before","append"],b=f.createElement("table"),E=f.createElement("tr"),j={tr:f.createElement("tbody"),tbody:b,thead:b,tfoot:b,td:E,th:E,"*":f.createElement("div")},w=/complete|loaded|interactive/,T=/^[\w-]*$/,S={},C=S.toString,N={},A=f.createElement("div"),D={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},L=Array.isArray||function(t){return t instanceof Array};return N.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=A).appendChild(t),r=~N.qsa(i,e).indexOf(t),o&&A.removeChild(t),r},O=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},P=function(t){return a.call(t,function(e,n){return t.indexOf(e)==n})},N.fragment=function(t,n,i){var o,s,a;return d.test(t)&&(o=r(f.createElement(RegExp.$1))),o||(t.replace&&(t=t.replace(m,"<$1>")),n===e&&(n=p.test(t)&&RegExp.$1),n in j||(n="*"),a=j[n],a.innerHTML=""+t,o=r.each(u.call(a.childNodes),function(){a.removeChild(this)})),Z(i)&&(s=r(o),r.each(i,function(t,e){y.indexOf(t)>-1?s[t](e):s.attr(t,e)})),o},N.Z=function(t,e){return new X(t,e)},N.isZ=function(t){return t instanceof N.Z},N.init=function(t,n){var i;if(!t)return N.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&p.test(t))i=N.fragment(t,RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);i=N.qsa(f,t)}else{if(F(t))return r(f).ready(t);if(N.isZ(t))return t;if(L(t))i=q(t);else if(R(t))i=[t],t=null;else if(p.test(t))i=N.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);i=N.qsa(f,t)}}return N.Z(i,t)},r=function(t,e){return N.init(t,e)},r.extend=function(t){var e,n=u.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){J(t,n,e)}),t},N.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,s=T.test(o);return t.getElementById&&s&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:u.call(s&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},r.contains=f.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},r.type=$,r.isFunction=F,r.isWindow=k,r.isArray=L,r.isPlainObject=Z,r.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},r.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},r.inArray=function(t,e,n){return o.indexOf.call(e,t,n)},r.camelCase=O,r.trim=function(t){return null==t?"":String.prototype.trim.call(t)},r.uuid=0,r.support={},r.expr={},r.noop=function(){},r.map=function(t,e){var n,i,o,r=[];if(z(t))for(i=0;i=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return o.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return F(t)?this.not(this.not(t)):r(a.call(this,function(e){return N.matches(e,t)}))},add:function(t,e){return r(P(this.concat(r(t,e))))},is:function(t){return this.length>0&&N.matches(this[0],t)},not:function(t){var n=[];if(F(t)&&t.call!==e)this.each(function(e){t.call(this,e)||n.push(this)});else{var i="string"==typeof t?this.filter(t):z(t)&&F(t.item)?u.call(t):r(t);this.forEach(function(t){i.indexOf(t)<0&&n.push(t)})}return r(n)},has:function(t){return this.filter(function(){return R(t)?r.contains(this,t):r(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!R(t)?t:r(t)},last:function(){var t=this[this.length-1];return t&&!R(t)?t:r(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?r(t).filter(function(){var t=this;return o.some.call(n,function(e){return r.contains(e,t)})}):1==this.length?r(N.qsa(this[0],t)):this.map(function(){return N.qsa(this,t)}):r()},closest:function(t,e){var n=[],i="object"==typeof t&&r(t);return this.each(function(r,o){for(;o&&!(i?i.indexOf(o)>=0:N.matches(o,t));)o=o!==e&&!M(o)&&o.parentNode;o&&n.indexOf(o)<0&&n.push(o)}),r(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=r.map(n,function(t){return(t=t.parentNode)&&!M(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return W(e,t)},parent:function(t){return W(P(this.pluck("parentNode")),t)},children:function(t){return W(this.map(function(){return U(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||u.call(this.childNodes)})},siblings:function(t){return W(this.map(function(t,e){return a.call(U(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return r.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=B(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=F(t);if(this[0]&&!e)var n=r(t).get(0),i=n.parentNode||this.length>1;return this.each(function(o){r(this).wrapAll(e?t.call(this,o):i?n.cloneNode(!0):n)})},wrapAll:function(t){if(this[0]){r(this[0]).before(t=r(t));for(var e;(e=t.children()).length;)t=e.first();r(t).append(this)}return this},wrapInner:function(t){var e=F(t);return this.each(function(n){var i=r(this),o=i.contents(),s=e?t.call(this,n):t;o.length?o.wrapAll(s):i.append(s)})},unwrap:function(){return this.parent().each(function(){r(this).replaceWith(r(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var n=r(this);(t===e?"none"==n.css("display"):t)?n.show():n.hide()})},prev:function(t){return r(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return r(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;r(this).empty().append(Y(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=Y(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,r){var i;return"string"!=typeof t||1 in arguments?this.each(function(e){if(1===this.nodeType)if(R(t))for(n in t)G(this,n,t[n]);else G(this,t,Y(this,r,e,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(i=this[0].getAttribute(t))?i:e},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){G(this,t)},this)})},prop:function(t,e){return t=D[t]||t,1 in arguments?this.each(function(n){this[t]=Y(this,e,n,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=D[t]||t,this.each(function(){delete this[t]})},data:function(t,n){var r="data-"+t.replace(v,"-$1").toLowerCase(),i=1 in arguments?this.attr(r,n):this.attr(r);return null!==i?Q(i):e},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=Y(this,t,e,this.value)})):this[0]&&(this[0].multiple?r(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each(function(t){var n=r(this),i=Y(this,e,t,n.offset()),o=n.offsetParent().offset(),s={top:i.top-o.top,left:i.left-o.left};"static"==n.css("position")&&(s.position="relative"),n.css(s)});if(!this.length)return null;if(f.documentElement!==this[0]&&!r.contains(f.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+t.pageXOffset,top:n.top+t.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(t,e){if(arguments.length<2){var i=this[0];if("string"==typeof t){if(!i)return;return i.style[O(t)]||getComputedStyle(i,"").getPropertyValue(t)}if(L(t)){if(!i)return;var o={},s=getComputedStyle(i,"");return r.each(t,function(t,e){o[e]=i.style[O(e)]||s.getPropertyValue(e)}),o}}var a="";if("string"==$(t))e||0===e?a=I(t)+":"+_(t,e):this.each(function(){this.style.removeProperty(I(t))});else for(n in t)t[n]||0===t[n]?a+=I(n)+":"+_(n,t[n])+";":this.each(function(){this.style.removeProperty(I(n))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(r(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?o.some.call(this,function(t){return this.test(K(t))},V(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){i=[];var n=K(this),o=Y(this,t,e,n);o.split(/\s+/g).forEach(function(t){r(this).hasClass(t)||i.push(t)},this),i.length&&K(this,n+(n?" ":"")+i.join(" "))}}):this},removeClass:function(t){return this.each(function(n){if("className"in this){if(t===e)return K(this,"");i=K(this),Y(this,t,n,i).split(/\s+/g).forEach(function(t){i=i.replace(V(t)," ")}),K(this,i.trim())}})},toggleClass:function(t,n){return t?this.each(function(i){var o=r(this),s=Y(this,t,i,K(this));s.split(/\s+/g).forEach(function(t){(n===e?!o.hasClass(t):n)?o.addClass(t):o.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var n="scrollTop"in this[0];return t===e?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var n="scrollLeft"in this[0];return t===e?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),i=g.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(r(t).css("margin-top"))||0,n.left-=parseFloat(r(t).css("margin-left"))||0,i.top+=parseFloat(r(e[0]).css("border-top-width"))||0,i.left+=parseFloat(r(e[0]).css("border-left-width"))||0,{top:n.top-i.top,left:n.left-i.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||f.body;t&&!g.test(t.nodeName)&&"static"==r(t).css("position");)t=t.offsetParent;return t})}},r.fn.detach=r.fn.remove,["width","height"].forEach(function(t){var n=t.replace(/./,function(t){return t[0].toUpperCase()});r.fn[t]=function(i){var o,s=this[0];return i===e?k(s)?s["inner"+n]:M(s)?s.documentElement["scroll"+n]:(o=this.offset())&&o[t]:this.each(function(e){s=r(this),s.css(t,Y(this,i,e,s[t]()))})}}),x.forEach(function(n,i){var o=i%2;r.fn[n]=function(){var n,a,s=r.map(arguments,function(t){var i=[];return n=$(t),"array"==n?(t.forEach(function(t){return t.nodeType!==e?i.push(t):r.zepto.isZ(t)?i=i.concat(t.get()):void(i=i.concat(N.fragment(t)))}),i):"object"==n||null==t?t:N.fragment(t)}),u=this.length>1;return s.length<1?this:this.each(function(e,n){a=o?n:n.parentNode,n=0==i?n.nextSibling:1==i?n.firstChild:2==i?n:null;var c=r.contains(f.documentElement,a);s.forEach(function(e){if(u)e=e.cloneNode(!0);else if(!a)return r(e).remove();a.insertBefore(e,n),c&&tt(e,function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}})})})},r.fn[o?n+"To":"insert"+(i?"Before":"After")]=function(t){return r(t)[n](this),this}}),N.Z.prototype=X.prototype=r.fn,N.uniq=P,N.deserializeValue=Q,r.zepto=N,r}();return t.Zepto=e,void 0===t.$&&(t.$=e),function(e){function h(t){return t._zid||(t._zid=n++)}function p(t,e,n,r){if(e=d(e),e.ns)var i=m(e.ns);return(a[h(t)]||[]).filter(function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||i.test(t.ns))&&(!n||h(t.fn)===h(n))&&(!r||t.sel==r)})}function d(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function m(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function g(t,e){return t.del&&!f&&t.e in c||!!e}function v(t){return l[t]||f&&c[t]||t}function y(t,n,i,o,s,u,f){var c=h(t),p=a[c]||(a[c]=[]);n.split(/\s/).forEach(function(n){if("ready"==n)return e(document).ready(i);var a=d(n);a.fn=i,a.sel=s,a.e in l&&(i=function(t){var n=t.relatedTarget;return!n||n!==this&&!e.contains(this,n)?a.fn.apply(this,arguments):void 0}),a.del=u;var c=u||i;a.proxy=function(e){if(e=T(e),!e.isImmediatePropagationStopped()){e.data=o;var n=c.apply(t,e._args==r?[e]:[e].concat(e._args));return n===!1&&(e.preventDefault(),e.stopPropagation()),n}},a.i=p.length,p.push(a),"addEventListener"in t&&t.addEventListener(v(a.e),a.proxy,g(a,f))})}function x(t,e,n,r,i){var o=h(t);(e||"").split(/\s/).forEach(function(e){p(t,e,n,r).forEach(function(e){delete a[o][e.i],"removeEventListener"in t&&t.removeEventListener(v(e.e),e.proxy,g(e,i))})})}function T(t,n){return(n||!t.isDefaultPrevented)&&(n||(n=t),e.each(w,function(e,r){var i=n[e];t[e]=function(){return this[r]=b,i&&i.apply(n,arguments)},t[r]=E}),t.timeStamp||(t.timeStamp=Date.now()),(n.defaultPrevented!==r?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(t.isDefaultPrevented=b)),t}function S(t){var e,n={originalEvent:t};for(e in t)j.test(e)||t[e]===r||(n[e]=t[e]);return T(n,t)}var r,n=1,i=Array.prototype.slice,o=e.isFunction,s=function(t){return"string"==typeof t},a={},u={},f="onfocusin"in t,c={focus:"focusin",blur:"focusout"},l={mouseenter:"mouseover",mouseleave:"mouseout"};u.click=u.mousedown=u.mouseup=u.mousemove="MouseEvents",e.event={add:y,remove:x},e.proxy=function(t,n){var r=2 in arguments&&i.call(arguments,2);if(o(t)){var a=function(){return t.apply(n,r?r.concat(i.call(arguments)):arguments)};return a._zid=h(t),a}if(s(n))return r?(r.unshift(t[n],t),e.proxy.apply(null,r)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var b=function(){return!0},E=function(){return!1},j=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,w={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,n,a,u,f){var c,l,h=this;return t&&!s(t)?(e.each(t,function(t,e){h.on(t,n,a,e,f)}),h):(s(n)||o(u)||u===!1||(u=a,a=n,n=r),(u===r||a===!1)&&(u=a,a=r),u===!1&&(u=E),h.each(function(r,o){f&&(c=function(t){return x(o,t.type,u),u.apply(this,arguments)}),n&&(l=function(t){var r,s=e(t.target).closest(n,o).get(0);return s&&s!==o?(r=e.extend(S(t),{currentTarget:s,liveFired:o}),(c||u).apply(s,[r].concat(i.call(arguments,1)))):void 0}),y(o,t,u,a,n,l||c)}))},e.fn.off=function(t,n,i){var a=this;return t&&!s(t)?(e.each(t,function(t,e){a.off(t,n,e)}),a):(s(n)||o(i)||i===!1||(i=n,n=r),i===!1&&(i=E),a.each(function(){x(this,t,i,n)}))},e.fn.trigger=function(t,n){return t=s(t)||e.isPlainObject(t)?e.Event(t):T(t),t._args=n,this.each(function(){t.type in c&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)})},e.fn.triggerHandler=function(t,n){var r,i;return this.each(function(o,a){r=S(s(t)?e.Event(t):t),r._args=n,r.target=a,e.each(p(a,t.type||t),function(t,e){return i=e.proxy(r),r.isImmediatePropagationStopped()?!1:void 0})}),i},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}}),e.Event=function(t,e){s(t)||(e=t,t=e.type);var n=document.createEvent(u[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),T(n)}}(e),function(e){function p(t,n,r){var i=e.Event(n);return e(t).trigger(i,r),!i.isDefaultPrevented()}function d(t,e,n,i){return t.global?p(e||r,n,i):void 0}function m(t){t.global&&0===e.active++&&d(t,null,"ajaxStart")}function g(t){t.global&&!--e.active&&d(t,null,"ajaxStop")}function v(t,e){var n=e.context;return e.beforeSend.call(n,t,e)===!1||d(e,n,"ajaxBeforeSend",[t,e])===!1?!1:void d(e,n,"ajaxSend",[t,e])}function y(t,e,n,r){var i=n.context,o="success";n.success.call(i,t,o,e),r&&r.resolveWith(i,[t,o,e]),d(n,i,"ajaxSuccess",[e,n,t]),b(o,e,n)}function x(t,e,n,r,i){var o=r.context;r.error.call(o,n,e,t),i&&i.rejectWith(o,[n,e,t]),d(r,o,"ajaxError",[n,r,t||e]),b(e,n,r)}function b(t,e,n){var r=n.context;n.complete.call(r,e,t),d(n,r,"ajaxComplete",[e,n]),g(n)}function E(t,e,n){if(n.dataFilter==j)return t;var r=n.context;return n.dataFilter.call(r,t,e)}function j(){}function w(t){return t&&(t=t.split(";",2)[0]),t&&(t==c?"html":t==f?"json":a.test(t)?"script":u.test(t)&&"xml")||"text"}function T(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function S(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=T(t.url,t.data),t.data=void 0)}function C(t,n,r,i){return e.isFunction(n)&&(i=r,r=n,n=void 0),e.isFunction(r)||(i=r,r=void 0),{url:t,data:n,success:r,dataType:i}}function O(t,n,r,i){var o,s=e.isArray(n),a=e.isPlainObject(n);e.each(n,function(n,u){o=e.type(u),i&&(n=r?i:i+"["+(a||"object"==o||"array"==o?n:"")+"]"),!i&&s?t.add(u.name,u.value):"array"==o||!r&&"object"==o?O(t,u,r,n):t.add(n,u)})}var i,o,n=+new Date,r=t.document,s=/)<[^<]*)*<\/script>/gi,a=/^(?:text|application)\/javascript/i,u=/^(?:text|application)\/xml/i,f="application/json",c="text/html",l=/^\s*$/,h=r.createElement("a");h.href=t.location.href,e.active=0,e.ajaxJSONP=function(i,o){if(!("type"in i))return e.ajax(i);var c,p,s=i.jsonpCallback,a=(e.isFunction(s)?s():s)||"Zepto"+n++,u=r.createElement("script"),f=t[a],l=function(t){e(u).triggerHandler("error",t||"abort")},h={abort:l};return o&&o.promise(h),e(u).on("load error",function(n,r){clearTimeout(p),e(u).off().remove(),"error"!=n.type&&c?y(c[0],h,i,o):x(null,r||"error",h,i,o),t[a]=f,c&&e.isFunction(f)&&f(c[0]),f=c=void 0}),v(h,i)===!1?(l("abort"),h):(t[a]=function(){c=arguments},u.src=i.url.replace(/\?(.+)=\?/,"?$1="+a),r.head.appendChild(u),i.timeout>0&&(p=setTimeout(function(){l("timeout")},i.timeout)),h)},e.ajaxSettings={type:"GET",beforeSend:j,success:j,error:j,complete:j,context:null,global:!0,xhr:function(){return new t.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:f,xml:"application/xml, text/xml",html:c,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:j},e.ajax=function(n){var u,f,s=e.extend({},n||{}),a=e.Deferred&&e.Deferred();for(i in e.ajaxSettings)void 0===s[i]&&(s[i]=e.ajaxSettings[i]);m(s),s.crossDomain||(u=r.createElement("a"),u.href=s.url,u.href=u.href,s.crossDomain=h.protocol+"//"+h.host!=u.protocol+"//"+u.host),s.url||(s.url=t.location.toString()),(f=s.url.indexOf("#"))>-1&&(s.url=s.url.slice(0,f)),S(s);var c=s.dataType,p=/\?.+=\?/.test(s.url);if(p&&(c="jsonp"),s.cache!==!1&&(n&&n.cache===!0||"script"!=c&&"jsonp"!=c)||(s.url=T(s.url,"_="+Date.now())),"jsonp"==c)return p||(s.url=T(s.url,s.jsonp?s.jsonp+"=?":s.jsonp===!1?"":"callback=?")),e.ajaxJSONP(s,a);var P,d=s.accepts[c],g={},b=function(t,e){g[t.toLowerCase()]=[t,e]},C=/^([\w-]+:)\/\//.test(s.url)?RegExp.$1:t.location.protocol,N=s.xhr(),O=N.setRequestHeader;if(a&&a.promise(N),s.crossDomain||b("X-Requested-With","XMLHttpRequest"),b("Accept",d||"*/*"),(d=s.mimeType||d)&&(d.indexOf(",")>-1&&(d=d.split(",",2)[0]),N.overrideMimeType&&N.overrideMimeType(d)),(s.contentType||s.contentType!==!1&&s.data&&"GET"!=s.type.toUpperCase())&&b("Content-Type",s.contentType||"application/x-www-form-urlencoded"),s.headers)for(o in s.headers)b(o,s.headers[o]);if(N.setRequestHeader=b,N.onreadystatechange=function(){if(4==N.readyState){N.onreadystatechange=j,clearTimeout(P);var t,n=!1;if(N.status>=200&&N.status<300||304==N.status||0==N.status&&"file:"==C){if(c=c||w(s.mimeType||N.getResponseHeader("content-type")),"arraybuffer"==N.responseType||"blob"==N.responseType)t=N.response;else{t=N.responseText;try{t=E(t,c,s),"script"==c?(1,eval)(t):"xml"==c?t=N.responseXML:"json"==c&&(t=l.test(t)?null:e.parseJSON(t))}catch(r){n=r}if(n)return x(n,"parsererror",N,s,a)}y(t,N,s,a)}else x(N.statusText||null,N.status?"error":"abort",N,s,a)}},v(N,s)===!1)return N.abort(),x(null,"abort",N,s,a),N;var A="async"in s?s.async:!0;if(N.open(s.type,s.url,A,s.username,s.password),s.xhrFields)for(o in s.xhrFields)N[o]=s.xhrFields[o];for(o in g)O.apply(N,g[o]);return s.timeout>0&&(P=setTimeout(function(){N.onreadystatechange=j,N.abort(),x(null,"timeout",N,s,a)},s.timeout)),N.send(s.data?s.data:null),N},e.get=function(){return e.ajax(C.apply(null,arguments))},e.post=function(){var t=C.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=C.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,n,r){if(!this.length)return this;var a,i=this,o=t.split(/\s/),u=C(t,n,r),f=u.success;return o.length>1&&(u.url=o[0],a=o[1]),u.success=function(t){i.html(a?e("
    ").html(t.replace(s,"")).find(a):t),f&&f.apply(i,arguments)},e.ajax(u),this};var N=encodeURIComponent;e.param=function(t,n){var r=[];return r.add=function(t,n){e.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(N(t)+"="+N(n))},O(r,t,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[],i=function(t){return t.forEach?t.forEach(i):void r.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(r,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&i(t(o).val())}),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(e){var n=getComputedStyle;t.getComputedStyle=function(t,e){try{return n(t,e)}catch(r){return null}}}}(),e}); diff --git a/MOP1.0/cloud.html b/MOP1.0/cloud.html new file mode 100644 index 0000000..25280f8 --- /dev/null +++ b/MOP1.0/cloud.html @@ -0,0 +1,126 @@ + + + + + + + + Running on the cloud + + + + + + + + + + +
    + + + + + + + +
    +
    +

    Amazon Web Service EC2

    + +

    The simplest option is running an EC2 instance interactively where the pipeline can be installed as pointed in the previous documentation pages.

    + +

    Last available Amazon Machine (AMI) we provide is:

    +
      +
    • ami-0bf3a9a6cb7a5ea9f (Ubuntu 18.04, CUDA compatible, Docker 19.x, Singularity 3.2.1 and Nextflow 19.10 preinstalled)
    • +
    + +

    When running an instance among the different available types, minimum CPU and memory requirements must be taken into account. These must fit with Nextflow executor process configuration values. In our sample configuration files we use m4.2xlarge for CPU and p3.2xlarge for GPU as examples.

    + +

    Keep in mind that not all Amazon infrastructure regions may have the same instance types. As a example, in January 2020 Frankfurt has GPU nodes, but not Paris.

    + +

    Launch an instane from the AMI image above (Go to EC2 > Images > AMI and copy-paste the ID provided above filtering in public images). Once you find that image, you can launch an instance from it.

    + +

    You can connect to the launched instance by using this command below:

    + +
    ssh -i "key-nf.pem" ubuntu@xxx.eu-central-1.compute.amazonaws.com
    +
    + +

    where key-nf.pem is your private key (reference) and host details can be obtained from Connect popup in EC2 instances dashboard.

    + +

    Terraform

    + +

    For sake of commodity, you may prefer to automate deployment of EC2 instances and S3 buckets. Terraform is a convenient tool for this.

    + +

    Place terraform binary in your local workstation path and move where your are keeping your tf files. Examples are provided in the terraform directory of this repository.

    + +

    Adapt terraform configuration files to include your credentials, use your chosen instance types, which key pair they are associated with, or whether allow files in S3 bucket to be kept or not (force_destroy parameter).

    + +

    Initialize terraform directory:

    + +
    terraform init
    +
    +

    Validate terraform files:

    +
    terraform validate
    +
    +

    Inspect what changes are going to be performed in your AWS account:

    + +
    terraform plan
    +
    +

    Proceed:

    +
    terraform apply
    +
    +

    Once analyses are finished, infrastructure can be dismantled with:

    +
    terraform destroy
    +
    + +

    Share files in Amazon S3

    + +

    Amazon Simple Storage Service (S3) is a convenient web service storage system for sharing raw input and final output files between your premises and your computing cloud instances.

    + +

    Below we provide some instructions and advices to set up a S3 bucket.

    + +

    Some convenient instructions for S3 permisions in your EC2 instance can be found here. From the previous link you can learn how to retrieve the key and password to place in /root/.passwd-s3fs

    + +

    Ensure proper permission as well: chmod 600 /root/.passwd-s3fs

    + +

    You can include in /etc/fstab the following mounting point (adapt according to your case):

    + +
    frankfurt-nf    /mnt/frankfurt-nf fuse.s3fs _netdev,allow_other,passwd_file=/root/.passwd-s3fs,uid=1000,gid=1000   0 0
    +
    + +

    If not mounted, you can mount it therefore straightforward by running:

    + +
    sudo mount /mnt/frankfurt-nf
    +
    + +

    Adapt your S3 bucket and mounting point names according to your choice.

    + +

    Specially for huge amount of data, we suggest to use AWS CLI to transfer files from your premises to a S3 Bucket (Ref). For instance, the commandline below uploads the data example file in a pre-existing bucket.

    +
    aws s3 cp  multifast5_1.fast5 s3://frankfurt-nf
    +
    +

    Modify your Nexflow configuration files in order to point your input files at the mounted S3 bucket. Both input and final output files can be placed in that mounted S3 storage, but we do not recommend that work Nextflow directory (containing pipeline intermediary files) is kept there, since it significatively delays the whole process. Choose a suitable disk size for your instance depending on the amount of data to be processed.

    + + +
    +
    +
    + + + + + + + + + diff --git a/MOP1.0/dag_graph3.png b/MOP1.0/dag_graph3.png new file mode 100644 index 0000000..52c68bf Binary files /dev/null and b/MOP1.0/dag_graph3.png differ diff --git a/MOP1.0/dag_mod.png b/MOP1.0/dag_mod.png new file mode 100644 index 0000000..7974006 Binary files /dev/null and b/MOP1.0/dag_mod.png differ diff --git a/MOP1.0/dag_mod_2.png b/MOP1.0/dag_mod_2.png new file mode 100644 index 0000000..b38002b Binary files /dev/null and b/MOP1.0/dag_mod_2.png differ diff --git a/MOP1.0/dag_nanotail.png b/MOP1.0/dag_nanotail.png new file mode 100644 index 0000000..d29ba68 Binary files /dev/null and b/MOP1.0/dag_nanotail.png differ diff --git a/MOP1.0/feed.xml b/MOP1.0/feed.xml new file mode 100644 index 0000000..bb01f8c --- /dev/null +++ b/MOP1.0/feed.xml @@ -0,0 +1 @@ +Jekyll2024-12-03T19:47:49+00:00https://biocorecrg.github.io/master_of_pores/MOP1.0/feed.xmlMaster of PoresNextflow pipeline for analysis of Nanopore data from direct RNA sequencing. \ No newline at end of file diff --git a/MOP1.0/index.html b/MOP1.0/index.html new file mode 100644 index 0000000..57062c8 --- /dev/null +++ b/MOP1.0/index.html @@ -0,0 +1,112 @@ + + + + + + + + Home + + + + + + + + + + +
    + + + + + + + +
    +
    +

    Docker Build Status +License: MIT +DOI +Nextflow version +Singularity version +Docker version +

    + +


    + +

    Direct RNA nanopore analysis pipeline

    + +

    Nanopore analysis pipeline

    +

    Nextflow pipeline for analysis of Nanopore data from direct RNA sequencing. This is a joint project between CRG bioinformatics core and Epitranscriptomics and RNA Dynamics research group.

    + +

    Background

    + +

    The direct RNA sequencing platform offered by Oxford Nanopore Technologies allows for direct measurement of RNA molecules without the need of conversion to complementary DNA (cDNA), and as such, is virtually capable of detecting any given RNA modification present in the molecule that is being sequenced.

    + +

    Although the technology has been publicly available since 2017, the complexity of the raw current intensity output data generated by nanopore sequencing, together with lack of systematic and reproducible pipelines for the analysis of direct RNA sequencing datasets, have greatly hindered the access of this technology to the general user. Here we provide an in silico scalable and parallelizable workflow for the analysis of direct RNA sequencing reads, which converts raw current intensities into multiple types of processed data, providing metrics of the quality of the run, per-gene counts, RNA modification predictions and polyA tail length predictions.

    + +

    The workflow named Master of Pores, which has been built using the Nextflow framework and is distributed with Docker and Singularity containers, can be executed on any Unix-compatible OS on a computer, cluster or cloud without the need of installing any additional software or dependencies. The workflow is easily scalable, as it can incorporate updated software versions or algorithms that may be released in the future in a modular manner. We expect that our pipeline will make the analysis of direct RNA sequencing datasets highly simplified and accessible to the non-bioinformatic expert, and thus boost our understanding of the epitranscriptome with single molecule resolution.

    + +

    Modules included

    + +

    The MasterOfPores workflow includes all steps needed to process raw FAST5 files produced by Nanopore direct RNA sequencing and executes the following steps, allowing users a choice among different algorithms. The pipeline consists of 3 modules:

    + +

    Module 1: NanoPreprocess

    +

    This module takes as input the raw Fast5 reads and produces as output base-called FASTQ and BAM. The pre-processing module performs base-calling, demultiplexing, filtering, quality control, mapping, read counting, generating a final report of the performance and results of each of the steps performed. It automatically detects the kinf of input fast5 file (single or multi sequence).

    + +

    The NanoPreprocess module comprises 8 main steps:

    + +
      +
    1. Read base-calling with the algorithm of choice, using Albacore (https://nanoporetech.com) or Guppy (https://nanoporetech.com). This step can be run in parallel and the user can decide the number of files to be processed in a single job by using the command –granularity. When using GPU the granularity is ignored and all the files are analyzed sequentially.
    2. +
    3. Filtering of the resulting fastq files using Nanofilt (https://github.com/wdecoster/nanofilt). This step is optional and can be run in parallel.
    4. +
    5. Demultiplexing of the fastq files using DeePlexiCon (https://github.com/Psy-Fer/deeplexicon). This step is optional, and can only be used if the libraries have been barcoded using the oligonucleotides used to train the deep neural classifier. The model must be given as option as indicated in the params.config
    6. +
    7. Quality control of the base-called data using MinIONQC (https://github.com/roblanf/minion_qc) and FastQC (http://www.bioinformatics.babraham.ac.uk/projects/fastqc).
    8. +
    9. Read mapping to the reference genome or transcriptome using minimap2 (https://github.com/lh3/minimap2) or Graphmap2 (https://github.com/lbcb-sci/graphmap2).
    10. +
    11. Quality control on the alignment using NanoPlot (https://github.com/wdecoster/NanoPlot) and bam2stats (https://github.com/lpryszcz/bin).
    12. +
    13. Gene or Isoform quantification using HTSeq (https://htseq.readthedocs.io/) or NanoCount (https://github.com/a-slide/NanoCount) which estimates transcript abundance using an expectation-maximization algorithm. Of note, NanoCount is run if the reads have been mapped to the transcriptome, using the flag –reference_type transcriptome while HTseq is used when mapping to the genome. By default, reads are mapped to the genome and HTSeq is used to quantify per-gene counts.
    14. +
    15. Final report of the data processing using MultiQC (https://github.com/ewels/MultiQC) that combines the single quality controls done previously, as well as global run statistics.
    16. +
    + +

    Module 2: NanoTail

    +

    This module takes as input the output produced by the NanoPreprocess module and produces polyA tail estimations.

    + +

    The NanoTail module estimates polyA tail lengths using Nanopolish (https://github.com/jts/nanopolish) and Tailfindr (https://github.com/adnaniazi/tailfindr), producing a plain text file that includes polyA tail length estimates for each read, computed using both algorithms. The correlation between the two algorithms is also reported as a plot.

    + +

    Module 3: NanoMod

    +

    This module takes as input the rthe output produced by the NanoPreprocess module and produces a flat text file which includes the predicted RNA modifications.

    + +

    The NanoMod module predicts RNA modifications using Tombo (https://github.com/nanoporetech/tombo) and EpiNano (https://github.com/enovoa/EpiNano), producing a plain text file that is intersection of predicted sites both algorithms, to reduce the number of false positives.

    + +

    Citing this work

    +

    If you use this tool please cite our pre-print:

    + +

    “MasterOfPores: A Workflow for the Analysis of Oxford Nanopore Direct RNA Sequencing Datasets” +Luca Cozzuto, Huanle Liu, Leszek P. Pryszcz, Toni Hermoso Pulido, Anna Delgado-Tejedor, Julia Ponomarenko, Eva Maria Novoa. +Front. Genet., 17 March 2020.

    + + + +
    +
    +
    + + + + + + + + + diff --git a/MOP1.0/install.html b/MOP1.0/install.html new file mode 100644 index 0000000..f8cb7f3 --- /dev/null +++ b/MOP1.0/install.html @@ -0,0 +1,117 @@ + + + + + + + + Installation + + + + + + + + + + +
    + + + + + + + +
    +
    +

    Pre-requisites

    +

    For using the pipeline Nextflow and a linux container engine (either Docker or Singularity) need to be installed. +The pipeline can be run in Mac OSX and Linux operative systems.

    + +

    Installation

    + +

    1. Install Nextflow (version 19.10.0)

    + +
    curl -s https://get.nextflow.io | bash
    +
    + +

    2. Clone the MasterOfPores repository

    +

    The pipeline can be cloned in this way using git:

    + +
    git clone --depth 1 https://github.com/biocorecrg/master_of_pores.git
    +
    + +

    3. Install Docker and/or Singularity

    +
      +
    • Docker: https://docs.docker.com/install/ (version 10.03 or later is required)
    • +
    • Singularity: https://sylabs.io/guides/2.6/user-guide/quick_start.html#quick-installation-steps (version 2.6.1 or 3.2.1 is required)
    • +
    + +

    4. Download Nanopore base-calling algorithms

    +

    Because of redistribution restriction of the basecallers Albacore and Guppy we cannot provide them inside the docker image, so you would need to download the binaries from the official website https://nanoporetech.com and place them inside the master_of_pores/NanoPreprocess/bin folder. For installing Guppy you need to install the tarball file.

    + +

    a) Both Albacore and Guppy

    +
    cd master_of_pores/NanoPreprocess/bin
    +tar -zvxf ont-guppy_3.1.5_linux64.tar.gz
    +ln -s ont-guppy_3.1.5_linux64/ont-guppy/bin/guppy_* .
    +pip3 install --target=./albacore ont_albacore-2.1.7-cp36-cp36m-manylinux1_x86_64.whl
    +ln -s albacore/bin/read_fast5_basecaller.py .
    +
    + +

    b) Albacore

    +

    Download the wheel file.

    + +
    cd master_of_pores/NanoPreprocess/bin
    +pip3 install --target=./albacore ont_albacore-2.1.7-cp36-cp36m-manylinux1_x86_64.whl
    +$ ln -s albacore/bin/multi_to_single_fast5 
    +$ ln -s albacore/bin/read_fast5_basecaller.py .
    +
    +

    c) Guppy

    +

    Please note Guppy versions older than 3.1 (e.g. 3.0.3) only runs on CPUs. +Newer versions (e.g. 3.1.5 and above) works on both CPUs and GPUs. The difference of speed between CPUs and GPU is more than 10 times. You need to install the tarball file of Guppy.

    + +
    cd master_of_pores/NanoPreprocess/bin
    +tar -zvxf ont-guppy_3.1.5_linux64.tar.gz
    +ln -s ont-guppy_3.1.5_linux64/ont-guppy/bin/guppy_* .
    +
    + +

    5. Optional step: install CUDA drivers (only needed for GPU support):

    + +

    In case you want to use the GPU you need to install the CUDA drivers

    + +

    6. Run the pipeline:

    +

    Using Singularity:

    +
    cd master_of_pores/NanoPreprocess/
    +nextflow run preprocessing.nf -with-singularity
    +
    +

    Using Docker:

    +
    cd master_of_pores/NanoPreprocess/
    +nextflow run preprocessing.nf -with-docker
    +
    + + + +
    +
    +
    + + + + + + + + + diff --git a/MOP1.0/logo_master.jpg b/MOP1.0/logo_master.jpg new file mode 100644 index 0000000..f270e28 Binary files /dev/null and b/MOP1.0/logo_master.jpg differ diff --git a/MOP1.0/logo_small.png b/MOP1.0/logo_small.png new file mode 100644 index 0000000..015ced5 Binary files /dev/null and b/MOP1.0/logo_small.png differ diff --git a/MOP1.0/nanomod.html b/MOP1.0/nanomod.html new file mode 100644 index 0000000..4374e04 --- /dev/null +++ b/MOP1.0/nanomod.html @@ -0,0 +1,119 @@ + + + + + + + + NanoMod + + + + + + + + + + +
    + + + + + + + +
    +
    +

    NanoMod

    +

    This module allows to predict the loci with RNA modifications starting from data produced by NanoPreprocess.

    + +

    Workflow

    + +

    + +
      +
    • index_reference index the reference file for Epinano
    • +
    • call_variants uses Samtools for calling the variants for Epinano
    • +
    • calc_var_frequencies it uses TSV_to_Variants_Freq.py3 for calculating the frequencies of each variants for Epinano
    • +
    • predict_with_EPInano It predicts the modifications with Epinano in parallel splitting the input file in 1 million rows
    • +
    • combineEpinanoPred It combine the results from Epinano
    • +
    • resquiggling resquiggle fast5 files for Tombo
    • +
    • getModifications it estimates the modifications using Tombo comparing WT vs KO
    • +
    + +

    Input Parameters

    +
      +
    1. input_path path to the folders produced by NanoPreprocessing step.
    2. +
    3. comparison tab separated text file containing the list of comparison. Here an example: +
      WT1 KO1
      +WT2 KO2
      +WT3 KO3
      +
      +
    4. +
    5. reference reference transcriptome
    6. +
    7. output folder
    8. +
    9. coverage read coverage threshold for prediction
    10. +
    11. tombo_opt options for tombo
    12. +
    13. epinano_opt options for epinano
    14. +
    15. email
    16. +
    + +

    Results

    +

    Three folders are produced by this module:

    + +
      +
    1. Epinano, containing the results obtained with this method. You have a single file with putative modifications.
    2. +
    + +
    #Kmer,Window,Ref,Coverage,q1,q2,q3,q4,q5,mis1,mis2,mis3,mis4,mis5,ins1,ins2,ins3,ins4,ins5,del1,del2,del3,del4,del5,prediction,dist,ProbM,Pro
    +bU
    +AGTGG,394404:394405:394406:394407:394408,chr2,8.0:8.0:7.0:7.0:7.0,21.5,21.25,19.857,23.0,16.285999999999998,0.0,0.0,0.0,0.0,0.0,0.0,0.062,0.0
    +71,0.0,0.0,0.0,0.0,0.0,0.0,0.0,unm,19.26143361547619,3.00000089999998e-14,0.9999999999999699
    +TTTTT,12150:12151:12152:12153:12154,chr8,3.0:3.0:3.0:3.0:3.0,0.0,16.5,18.5,16.0,16.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.3329999999
    +9999996,0.33299999999999996,0.0,0.0,unm,2.5976484688977424,0.06071658133381308,0.9392834186661868
    +ACATT,438165:438166:438167:438168:438169,chr13,67.0:67.0:67.0:68.0:68.0,13.635,13.446,9.323,9.6,12.127,0.03,0.045,0.015,0.147,0.0740000000000
    +0001,0.0,0.0,0.0,0.0,0.0,0.06,0.03,0.075,0.11800000000000001,0.07400000000000001,unm,0.08435556637195174,0.519879422458087,0.4801205775419129
    +5...
    +
    +
      +
    1. Tombo, containing the results obtained with this method in fasta format. You have one file for each comparison WT vs KO
    2. +
    + +
    >chr11:455562:- Est. Frac. Alternate: 0.98
    +TGACA
    +>chr12:1008723:- Est. Frac. Alternate: 0.98
    +TATCT
    +>chr15:491587:+ Est. Frac. Alternate: 0.96
    +TATAT
    +>chr10:425794:- Est. Frac. Alternate: 0.95
    +ATGTT
    +>chr13:510759:+ Est. Frac. Alternate: 0.95
    +...
    +
    + + + +
    +
    +
    + + + + + + + + + diff --git a/MOP1.0/nanopreprocess.html b/MOP1.0/nanopreprocess.html new file mode 100644 index 0000000..515b220 --- /dev/null +++ b/MOP1.0/nanopreprocess.html @@ -0,0 +1,253 @@ + + + + + + + + NanoPreprocess + + + + + + + + + + +
    + + + + + + + +
    +
    +

    NanoPreprocess

    + +

    This module takes as input the raw fast5 reads and produces a number of outputs (basecalled fast5, sequences in fastq format, aligned reads in BAM format etc). The pre-processing module performs base-calling, demultiplexing (optional), filtering, quality control, mapping to a genome / transcriptome reference, read counting and it generates a final report of the performance and results of each of the steps performed. It automatically detects the kinf of input fast5 file (single or multi sequence).

    + +

    Workflow

    + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Process nameDescription
    testInputDetection of kind of fast5 (multi or single)
    baseCallingBasecalling with Albacore or Guppy
    demultiplexing_with_deeplexiconDemultiplexing (optional) with DeePlexiCon
    concatenateFastQFilesThis process concatenates the fastq files produces for each single basecalling
    QCperformed with MinIONQC
    fastQCon fastq files
    mappingto the genome / transcriptome with either minimap2 or graphmap2
    countingcounts per gene, if mapping to the genome with htseq-count, or per transcript if mapping to the transcriptome with NanoCount. Reads are also assigned to a gene or to a transcript if they are uniquely mapping. A report file is also generated
    alnQCQC of aligned reads with bam2stats.
    joinCountQCsThis process is for merging the report files generated by the counting step.
    joinAlnQCsThis process is for merging the QC files generated by the alnQC step.
    alnQC2QC of aligned reads with NanoPlot. The plots PercentIdentityvsAverageBaseQuality_kde, LengthvsQualityScatterPlot_dot, HistogramReadlength and Weighted_HistogramReadlength are then merged together in a single picture.
    multiQCFinal repor enventually sent by mail too.
    + +

    You can launch the pipeline choosing either the parameter -with-singularity or -with-docker depending on which containers you want to use:

    + +

    Input Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Parameter nameDescription
    fast5 filesPath to fast5 input files. They can contain either a single sequence or multiple ones. They should be inside a folder that will be used as sample name.
    referencefile in fasta format. It can be either a genome or a transcriptome. this must be specified via ref_type parameter.
    kitand flowcell parameters needed for basecalling.
    annotationin GTF format. It is optional and needed only in case of mapping to the genome and when interested in gene counts.
    seq_typeIt can be either RNA or DNA.
    outputoutput folder name
    granularityindicates the number of input fast5 files analyzed in a single process. It is by default 4000 for single-sequence fast5 files and 1 for multi-sequence fast5 files. In case GPU option is turned on this value is not needed since every file will be analyzed sequentially.
    basecallerprogram. guppy or albacore are supported.
    basecaller_optcommand line options for basecaller program
    GPUit allows using GPU or not. I can be either OFF or NO
    demultiplexingprogram. It is supported only deeplexicon. It can be turned off by specifying “OFF”
    demultiplexing_optoptions for the demultiplexing program.
    filterit can be NanoFilt or OFF is filtering is needed.
    filter_optoptions of the filtering program.
    mapperit can be either minimap2 or graphmap2
    mapper_optoptions of the mapping program.
    map_typeit can be either spliced or not. In case the alignment is to a eukaryotic genome it should be spliced.
    counterthis parameter can be YES for counting the number of tags per gene (in case of mapping to the genome) or per transcript (in case of mapping to the transcriptome). An annotation file is needed in case of mapping to the genome.
    counter_optoptions of the counter program: NanoCount for transcripts and Htseq-count for genes.
    emailfor receving a mail with the final report when the pipeline is finished
    + +

    You can change them by editing the params.config file or using the command line (each param name needs to have the characters before):

    + +
    nextflow run nanopreprocess.nf -with-singularity -bg --output test2 > log.txt
    +
    + +

    To resume a previous execution that failed at a certain step or if you change a parameter that affects only some steps you can use the Netxtlow parameter -resume (only one dash!):

    + +
    nextflow run nanopreprocess.nf -with-singularity -bg -resume > log.txt
    +
    +...
    +
    +[warm up] executor > crg
    +[e8/2e64bd] Cached process > baseCalling (RNA081120181_1)
    +[b2/21f680] Cached process > QC (RNA081120181_1)
    +[c8/3f5d17] Cached process > mapping (RNA081120181_1)
    +...
    +
    +
    + +

    Results:

    + +

    Seven folders are created by the pipeline within the output folder specified by the output parameter:

    + +
      +
    • fast5_files: contains the basecalled multisequence fast5 files. Each batch contains 4000 sequences.
    • +
    • fastq_files: contains one or, in case of demultiplexing, more fastq files.
    • +
    • QC_files: contains each single QC produced by the pipeline.
    • +
    • alignment: contains the bam file(s)
    • +
    • counts: contains read counts per gene / transcript. It is optional.
    • +
    • assigned: contains assignment of each read to a given gene / transcript. It is optional.
    • +
    • report: contains the final multiqc report.
    • +
    + +
    + + + +
    +
    +
    + + + + + + + + + diff --git a/MOP1.0/nanotail.html b/MOP1.0/nanotail.html new file mode 100644 index 0000000..d0e3aed --- /dev/null +++ b/MOP1.0/nanotail.html @@ -0,0 +1,95 @@ + + + + + + + + NanoTail + + + + + + + + + + +
    + + + + + + + +
    +
    +

    NanoTail

    +

    This module allows to estimates polyA sizes by using two different methods (nanopolish and talifindr). it reads directly the output produced by NanoPreprocess and in particular it needs the read counts / assignment.

    + +

    Workflow

    + +

    + +
      +
    1. check_reference It verifies whether the reference is zipped and eventually unzip it
    2. +
    3. tailfindr it runs tailfindr tool in parallel.
    4. +
    5. collect_tailfindr_results It collects the results of tailfindr.
    6. +
    7. filter_bam Bam files are filtered with samtools to keep only mapped reads and remove secondary alignments
    8. +
    9. tail_nanopolish It runs nanopolish in parallel.
    10. +
    11. collect_nanopolish_results It collects the results of tail_nanopolish.
    12. +
    13. join_results It merges the results from the two algorithms and make a plot of the correlation.
    14. +
    + +

    Input Parameters

    + +
      +
    1. input_folders path to the folders produced by NanoPreprocessing step.
    2. +
    3. nanopolish_opt options for the nanopolish program
    4. +
    5. tailfindr_opt options for the tailfindr program
    6. +
    7. reference reference genome / transcriptome
    8. +
    9. output folder
    10. +
    11. email
    12. +
    + +

    Results

    +

    Three folders are created by the pipeline within the output folder:

    +
      +
    1. NanoPolish: contains the output of nanopolish tool.
    2. +
    3. Tailfindr: contains the output of tailfindr tool.
    4. +
    5. PolyA_final: contains the txt files with the combined results (i.e. predicted polyA sizes). Here an example of a test:
    6. +
    + +
    "Read name"	"Tailfindr"	"Nanopolish"	"Gene Name"
    +"013a5dde-9c52-4de1-83eb-db70fb2cd130"	52.16	49.39	"YKR072C"
    +"01119f62-ca68-458d-aa1f-cf8c8c04cd3b"	231.64	274.28	"YDR133C"
    +"0154ce9c-fe6b-4ebc-bbb1-517fdc524207"	24.05	24.24	"YFL044C"
    +"020cde28-970d-4710-90a5-977e4b4bbc46"	41.27	56.79	"YGL238W"
    +
    +

    A plot is also produced for showing the correlation between the two methods.

    + + +
    +
    +
    + + + + + + + + + diff --git a/MOP1.0/output.md b/MOP1.0/output.md new file mode 100644 index 0000000..1e4cfff --- /dev/null +++ b/MOP1.0/output.md @@ -0,0 +1,21 @@ +## Output generated by the MasterOfPores pipeline +The final outputs of the pipeline include: + +From NanoPreprocess (Module 1): +- Basecalled fast5 files within the “fast5_files” folder. +- Filtered fastq files within “fastq_files” folder. +- QC reports within “QC” folder. +- Final report within “report” folder. +- Aligned reads in BAM files within the “aln” folder. +- Read counts within the "count" folder. + + +From NanoMod (Module 2): +- Plain TXT files with predicted RNA modifications in the “rna_mods” folder + + +From NanoTail (Module 3): +- Plain TXT files with polyA tail length estimations in the “polyA_length” folder + + + diff --git a/MOP1.0/running.md b/MOP1.0/running.md new file mode 100644 index 0000000..5cbe62c --- /dev/null +++ b/MOP1.0/running.md @@ -0,0 +1,197 @@ +# Running the pipeline +The pipeline is composed of three different modules within three different folders: + +1. **NanoPreprocess** containing the preprocessing steps that will extract the data from raw fast5 files +1. **NanoTail** that will use the results produced by NanoPreprocess for estimating polyA sizes. +1. **NanoMod** that will use the results produced by NanoPreprocess for estimating checmically modified sites. + +Each module relies on tools installed within linux containers which recipes are stored within the **docker** folder. In case the *singularity* engine is chosen a number of images will be automatically generated and placed within the **singularity** folder. + +## NanoPreprocess + +Input files are either multifast5 or single fast5 files containing reads from direct RNA sequencing. +They will be basecalled and eventually demultiplexed and aligned to a reference sequence (genome or transcriptome). + +### Steps + 1. **testInput** Detection of kind of fast5 (multi or single) + 1. **baseCalling** Basecalling with *Albacore* or *Guppy* + 1. **demultiplexing_with_deeplexicon** Demultiplexing (optional) with **DeePlexiCon** + 1. **concatenateFastQFiles** This process concatenates the fastq files produces for each single basecalling + 1. **QC** performed with *MinIONQC* + 1. **fastQC** on fastq files + 1. **mapping** to the genome / transcriptome with either *minimap2* or *graphmap2* + 1. **counting** counts per gene, if mapping to the genome with *htseq-count*, or per transcript if mapping to the transcriptome with *NanoCount*. Reads are also assigned to a gene or to a transcript if they are uniquely mapping. A report file is also generated + 1. **alnQC** QC of aligned reads with *bam2stats*. + 1. **joinCountQCs** This process is for merging the report files generated by the counting step. + 1. **joinAlnQCs** This process is for merging the QC files generated by the alnQC step. + 1. **alnQC2** QC of aligned reads with *NanoPlot*. The plots PercentIdentityvsAverageBaseQuality_kde, LengthvsQualityScatterPlot_dot, HistogramReadlength and Weighted_HistogramReadlength are then merged together in a single picture. + 1. **multiQC**. Final repor enventually sent by mail too. + + +You can launch the pipeline choosing either the parameter **-with-singularity** or **-with-docker** depending on which containers you want to use: + +### Input Parameters + +1. **fast5 files**. Path to fast5 input files. They can contain either a single sequence or multiple ones. They should be inside a folder that will be used as sample name. +1. **reference** file in fasta format. It can be either a genome or a transcriptome. this must be specified via **ref_type** parameter. +1. **kit** and **flowcell** parameters needed for basecalling. +1. **annotation** in GTF format. It is optional and needed only in case of mapping to the genome and when interested in gene counts. +1. **seq_type**, It can be either RNA or DNA. +1. **output** output folder name +1. **granularity** indicates the number of input fast5 files analyzed in a single process. It is by default 4000 for single-sequence fast5 files and 1 for multi-sequence fast5 files. In case **GPU** option is turned on this value is not needed since every file will be analyzed sequentially. +1. **basecaller** program. guppy or albacore are supported. +1. **basecaller_opt** command line options for basecaller program +1. **GPU** it allows using GPU or not. I can be either OFF or NO +1. **demultiplexing** program. It is supported only deeplexicon. It can be turned off by specifying "OFF" +1. **demultiplexing_opt** options for the demultiplexing program. +1. **filter** it can be NanoFilt or OFF is filtering is needed. +1. **filter_opt** options of the filtering program. +1. **mapper** it can be either minimap2 or graphmap2 +1. **mapper_opt** options of the mapping program. +1. **map_type** it can be either spliced or not. In case the alignment is to a eukaryotic genome it should be spliced. +1. **count** this parameter can be YES for counting the number of tags per gene (in case of mapping to the genome) or per transcript (in case of mapping to the transcriptome). An annotation file is needed in case of mapping to the genome. +1. **counter_opt** options of the counter program: NanoCount for transcripts and Htseq-count for genes. +1. **email** for receving a mail with the final report when the pipeline is finished + + +You can change them by editing the **params.config** file or using the command line (each param name needs to have the characters **--** before): + +```bash +nextflow run nanopreprocess.nf -with-singularity -bg --output test2 > log.txt +``` + +To resume a previous execution that failed at a certain step or if you change a parameter that affects only some steps you can use the **Netxtlow** parameter **-resume** (only one dash!): + + +```bash +nextflow run nanopreprocess.nf -with-singularity -bg -resume > log.txt + +... + +[warm up] executor > crg +[e8/2e64bd] Cached process > baseCalling (RNA081120181_1) +[b2/21f680] Cached process > QC (RNA081120181_1) +[c8/3f5d17] Cached process > mapping (RNA081120181_1) +... + +``` + +### Results: + +Seven folders are created by the pipeline within the output folder specified by the **output** parameter: + +1. fast5_files: contains the basecalled multisequence fast5 files. Each batch contains 4000 sequences. +1. fastq_files: contains one or, in case of demultiplexing, more fastq files. +1. QC_files: contains each single QC produced by the pipeline. +1. alignment: contains the bam file(s) +1. counts: contains read counts per gene / transcript. It is optional. +1. assigned: contains assignment of each read to a given gene / transcript. It is optional. +1. report: contains the final multiqc report. + +----------------------------------------------------- + + +## NanoTail +This module allows to estimates polyA sizes by using two different methods. Data produced by NanoPreprocess are needed and in particular the read counts / assignment must be given. + +### Steps + + 1. **check_reference** It verifies whether the reference is zipped and eventually unzip it + 1. **tailfindr** it runs *tailfindr* tool in parallel. + 1. **collect_tailfindr_results** It collects the results of tailfindr. + 1. **filter_bam** Bam files are filtered with *samtools* to keep only mapped reads and remove secondary alignments + 1. **tail_nanopolish** It runs *nanopolish* in parallel. + 1. **collect_nanopolish_results** It collects the results of tail_nanopolish. + 1. **join_results** It merges the results from the two algorithms and make a plot of the correlation. + + +### Input Parameters + +1. **input_folders** path to the folders produced by NanoPreprocessing step. +1. **nanopolish_opt** options for the nanopolish program +1. **tailfindr_opt** options for the tailfindr program +1. **reference** reference genome / transcriptome +1. **output** folder +1. **email** + + +### Results +Three folders are created by the pipeline within the output folder: +1. NanoPolish: contains the output of *nanopolish* tool. +1. Tailfindr: contains the output of *tailfindr* tool. +1. PolyA_final: contains the txt files with the combined results (i.e. predicted polyA sizes). Here an example of a test: + +```bash +"Read name" "Tailfindr" "Nanopolish" "Gene Name" +"013a5dde-9c52-4de1-83eb-db70fb2cd130" 52.16 49.39 "YKR072C" +"01119f62-ca68-458d-aa1f-cf8c8c04cd3b" 231.64 274.28 "YDR133C" +"0154ce9c-fe6b-4ebc-bbb1-517fdc524207" 24.05 24.24 "YFL044C" +"020cde28-970d-4710-90a5-977e4b4bbc46" 41.27 56.79 "YGL238W" +``` +A plot is also produced for showing the correlation between the two methods. + +## NanoMod +This module allows to predict the loci with RNA modifications. Data produced by NanoPreprocess are needed and in particular the reads must be aligned to the transcriptome. + +### Steps +1. **index_reference** index the reference file for Epinano +1. **call_variants** uses Samtools for calling the variants for Epinano +1. **calc_var_frequencies** it uses TSV_to_Variants_Freq.py3 for calculating the frequencies of each variants for Epinano +1. **predict_with_EPInano** It predicts the modifications with Epinano +1. **filter_EPInano_pred** It filers the results from Epinano using replicates if avialable +1. **resquiggling** resquiggle fast5 files for Tombo +1. **getModifications** it estimates the modifications using Tombo comparing WT vs KO +1. **cross_tombo_pred** it gets the intersection between differen replicates +1. **join_results** it gets the intersection between the Epinano and Tombo predictions + +### Input Parameters +1. **input_folders** path to the folders produced by NanoPreprocessing step. +1. **comparison** tab separated text file containing the list of comparison. Here an example: +```bash +WT1 KO1 +WT2 KO2 +WT3 KO3 +``` +1. **reference** reference transcriptome +1. **output** folder +1. **tombo_opt** options for tombo +1. **epinano_opt** options for epinano +1. **tombo_score** score for filtering reliable modifications (from 0.5 to 1) +1. **epinano_score** coverage score for epinano for filtering reliable modifications (integer) +1. **email** + +### Results +Three folders are produced by this module: + +1. Epinano, containing the results obtained with this method. You have a single file with already filtered modifications. + +```bash +geneA,126771,GAACT,5.0,0.7865299392210111,6.0,7.650999662942007e-06,YES +geneA,139467,AGACA,26.0,1.2631007354786662e-05,34.0,9.22202894828834e-14,YES +geneA,139625,AGACA,17.0,0.012299404049052885,20.0,4.64573431891912e-06,YES +geneA,192033,AGACC,11.0,1.849874054901369e-12,11.0,3.00000089999998e-14,YES +geneA,192201,AGACA,14.0,0.01469732206992497,16.0,3.00000089999998e-14,YES +... +``` +2. Tombo, containing the results obtained with this method. You have one file for each comparison WT vs KO and a final one, **tombo_all.txt**, with the intersection after filtering per score. Here an example of tombo_all.txt file: + +```bash +>geneA:549289:+ +CTGAC +>geneA:478105:+ +GAGCT +>geneA:426607:- +TTTTT +... +``` + +3. Comb_mod, containing the all the modifications found in Epinano and Tombo called **RNA_modifications.txt** and a Venn Diagram. Here an example of RNA_modifications.txt file: + + +```bash +"positions" "epinano" "tombo" +"chrIX-290356" "1" "1" +"chrX-274861" "1" "1" +"chrXV-513509" "1" "1" +"chrI-126771" "1" "0" +```