{"id":57176,"date":"2024-06-16T18:53:36","date_gmt":"2024-06-16T10:53:36","guid":{"rendered":"http:\/\/www.biocloudservice.com\/wordpress\/?p=57176"},"modified":"2024-06-16T18:53:36","modified_gmt":"2024-06-16T10:53:36","slug":"snakemake-%e6%9c%80%e5%a5%bd%e7%94%a8%e7%9a%84%e6%b5%81%e7%a8%8b%e7%ae%a1%e7%90%86%e5%b7%a5%e5%85%b7%e4%b9%8b%e4%b8%80%ef%bc%8c%e4%bd%a0%e5%80%bc%e5%be%97%e6%8b%a5%e6%9c%89-3","status":"publish","type":"post","link":"http:\/\/www.biocloudservice.com\/wordpress\/?p=57176","title":{"rendered":"snakemake&#8211;\u6700\u597d\u7528\u7684\u6d41\u7a0b\u7ba1\u7406\u5de5\u5177\u4e4b\u4e00\uff0c\u4f60\u503c\u5f97\u62e5\u6709"},"content":{"rendered":"<p><html><br \/>\n<head><br \/>\n<title><\/title><br \/>\n<meta charset=\"utf-8\"><br \/>\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0,viewport-fit=cover\"><\/p>\n<style>\n*{margin:0;padding:0}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;line-height:1.6}img{z-index:999;position:relative;max-width:100%;margin:10px 0;}body{letter-spacing:.034em}h1,h2,h3,h4,h5,h6{font-weight:400;font-size:16px}a{color:#576b95;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}td,th{word-wrap:break-word;padding:5px 10px;border:1px solid #DDD;}table{margin-bottom:10px;border-collapse:collapse;display:table;width:100%!important;}.appmsg_skin_default .rich_media_area_primary{background-color:#fff}.appmsg_skin_default .rich_media_area_primary .weui-loadmore_line .weui-loadmore__tips{background-color:#fff}.rich_media_area_primary{padding:20px 16px 12px;background-color:#fafafa}@media (max-width:375px){.rich_media_area_primary{padding:20px 60px 15px 60px}.rich_media_area_extra{padding:0 60px 21px 60px}}@media (min-width:1024px){.rich_media_area_primary_inner,.rich_media_area_extra_inner,body{max-width:677px;margin-left:auto;margin-right:auto}.rich_media_area_primary{padding-top:32px}}.rich_media{padding:20px;overflow:hidden;}.appmsg_skin_default .rich_media_area_primary{background-color:#fff}.appmsg_skin_default .rich_media_area_primary .weui-loadmore_line .weui-loadmore__tips{background-color:#fff}@media screen and (min-width:1024px){.rich_media_area_primary_inner,.rich_media_area_extra_inner{max-width:677px;margin-left:auto;margin-right:auto}.rich_media_area_primary{padding-top:32px}}.rich_media_content{overflow:hidden;color:#333;font-size:17px;word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;text-align:justify;position:relative;z-index:0}.rich_media_content *{max-width:100%!important;box-sizing:border-box!important;-webkit-box-sizing:border-box!important;word-wrap:break-word!important}.rich_media_content p{clear:both;min-height:1em}.rich_media_content em{font-style:italic}.rich_media_content fieldset{min-width:0}.rich_media_content .list-paddingleft-1,.rich_media_content .list-paddingleft-2,.rich_media_content .list-paddingleft-3{padding-left:2.2em}.rich_media_content .list-paddingleft-1 .list-paddingleft-2,.rich_media_content .list-paddingleft-2 .list-paddingleft-2,.rich_media_content .list-paddingleft-3 .list-paddingleft-2{padding-left:30px}.rich_media_content .list-paddingleft-1{padding-left:1.2em}.rich_media_content .list-paddingleft-3{padding-left:3.2em}.rich_media_content .code-snippet,.rich_media_content .code-snippet__fix{max-width:1000%!important}.rich_media_content .code-snippet *,.rich_media_content .code-snippet__fix *{max-width:1000%!important}.rich_media_title{font-size:22px;line-height:1.4;margin-bottom:13px;padding-bottom:13px;border-bottom:1px solid #e7e7eb;}@supports(-webkit-overflow-scrolling:touch){.rich_media_title{font-weight:700}}.rich_media_meta{display:inline-block;vertical-align:middle;padding:0 0 10px 0;font-size:15px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.rich_media_meta.icon_appmsg_tag{margin-right:0px}.rich_media_meta.meta_tag_text{margin-right:0}.rich_media_meta_list em{font-style:normal}.rich_media_meta_text{color:#a5a5a5;}p{margin:0;}.msgBox{margin-top:20px;padding-top:20px;padding-left:50px;overflow:hidden;border-top:2px dashed #09a2ff;}.msg{padding-top:7px;clear:both;}.msgBody{float:right;width:100%;margin-left:55px;padding-bottom:15px;border-bottom:1px dashed #e0e0e0;}.userHeadImg{float:left;margin-left:-50px;}.userHeadImg img{width:40px;height:40px;margin-right:10px;border-radius:3px;}.userName{color:#888888;line-height:24px;font-size:14px;margin:5px 0 5px 0;height:24px;}.replyBody,.autherBody{color:#565656;font-size:15px;}.replyIcon{border-left:4px solid #33ab01;margin-right:5px;}.ad{text-decoration:none;color:#d6d4d4;font-size:12px;}.msgBodyReply{padding-top:5px;}.userName span{float:right;color:#afafaf;font-size:14px;}code{text-align:left;font-size:14px;display:block;white-space:pre;display:-webkit-box;display:-webkit-flex;display:flex;position:relative;}.code-snippet__fix{font-size:14px;margin:10px 0;display:block;color:#333;position:relative;background-color:rgba(0,0,0,0.03);border:1px solid #f0f0f0;border-radius:2px;display:-webkit-box;display:-webkit-flex;display:flex;padding-left:25px;line-height:26px}.code-snippet__fix code{text-align:left;font-size:14px;display:block;white-space:pre;display:-webkit-box;display:-webkit-flex;display:flex;position:relative;font-family:Consolas,\"Liberation Mono\",Menlo,Courier,monospace}.code-snippet__comment,.code-snippet__quote{color:#afafaf;font-style:italic}.code-snippet__keyword,.code-snippet__selector-tag,.code-snippet__subst{color:#ca7d37}.code-snippet__number,.code-snippet__literal,.code-snippet__variable,.code-snippet__template-variable,.code-snippet__tag .code-snippet__attr{color:#0e9ce5}.code-snippet__string,.code-snippet__doctag{color:#d14}.code-snippet__title,.code-snippet__section,.code-snippet__selector-id{color:#d14}.code-snippet__subst{font-weight:normal}.code-snippet__type,.code-snippet__class .code-snippet__title{color:#0e9ce5}.code-snippet__tag,.code-snippet__name,.code-snippet__attribute{color:#0e9ce5;font-weight:normal}.code-snippet__regexp,.code-snippet__link{color:#ca7d37}.code-snippet__symbol,.code-snippet__bullet{color:#d14}.code-snippet__built_in,.code-snippet__builtin-name{color:#ca7d37}.code-snippet__meta{color:#afafaf}.code-snippet__deletion{background:#fdd}.code-snippet__addition{background:#dfd}.code-snippet__emphasis{font-style:italic}.code-snippet__strong{font-weight:bold}.account_avatar{width:40px;height:40px;padding:0;}.account_info{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;padding:20px 0;align-items:center}.flex_bd{padding-left:14px;}.account_nickname{display:inline-block;vertical-align:middle;line-height:1.2;color:#576b95;font-size:14px}.account_desc{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;color:rgba(0,0,0,0.3);font-size:14px;line-height:1.2;padding-top:.4em}.msg_source_url{text-align:left;word-break:break-all;margin-top:20px;}.msg_source_url a{padding-right:10px;}.msg_source_url .url_text{color:#a8a8a8;}.video-desc{font-size:14px;margin-top:15px;color:#6c6c6c;}.msg_source_url{text-align:left;}.original_primary_card_tips{color:rgba(0,0,0,0.3);line-height:1.4;font-size:15px;}.weui-flex__item{margin-bottom:20px;padding:20px 16px;margin-top:16px;line-height:1.4;align-items:center;background-color:#f7f7f7;border-radius:8px;position:relative;}.original_primary_desc{color:rgba(0,0,0,0.5);font-size:14px;padding-top:4px;width:auto;overflow:hidden;text-overflow:ellipsis;}.msgBodyReplyList{border-top:1px solid #e1e1e1;margin-top:10px;}.msgBodyReplyListTop{border-top:0;}.reply_like_num{float:right;font-size:14px;color:#c7c7c7;}.msgData{margin-top:20px;color:#626262;}.msgData span{font-size:14px;padding-right:15px;}.msgData .likes{float:right;padding-right:0;}.js_text_content p{font-size:18px;}.rich_media_meta_link{font-size:15px;}blockquote {padding-left: 10px;border-left: 3px solid #dbdbdb;color: rgba(0,0,0,0.5);font-size: 15px;padding-top: 4px;margin: 1em 0;}.video_iframe{width:500px;height:400px;}.blockquote_info{color:#b5b5b5;margin-top:10px;}#copyright_logo{color:#bdbdbd;}.rich_media_meta_list{margin-bottom:10px;}.reprint{background:#efefef;border-radius:5px;padding:8px;color:#1f1f1f;}.reprint a{word-break:break-all;}.topic{color:#8e8e8e;background:#f7f7f7;border-radius:5px;padding:10px 8px;}.topic a{padding-right:5px;}.topic p{margin-bottom:5px;}\n<\/style>\n<link href=\"https:\/\/www.juyifx.cn\/config\/css\/wxArticle.css\" rel=\"stylesheet\"\/>\n<\/head><script>\nvar data={\"mp\":\"\u751f\u4fe1\u679c\",\"title\":\"snakemake--\u6700\u597d\u7528\u7684\u6d41\u7a0b\u7ba1\u7406\u5de5\u5177\u4e4b\u4e00\uff0c\u4f60\u503c\u5f97\u62e5\u6709\",\"time\":\"2023-05-23 19:01:13\",\"timeStamp\":\"1684839673\"};\n<\/script><br \/>\n<body><\/p>\n<div class=\"rich_media\">\n<h1 class=\"rich_media_title\" id=\"activity-name\"><a href=\"http:\/\/mp.weixin.qq.com\/s?__biz=Mzg3OTg3MjQyNg==&#038;mid=2247487777&#038;idx=1&#038;sn=be4181e5f8b896a6d84c3bfa512cc502&#038;chksm=cf7c81e4f80b08f223c4a84eb015c15678dcd207e7f13fe927f913ac1c045f42000d59222ec7#rd\" target=\"_blank\" rel=\"noopener\">snakemake&#8211;\u6700\u597d\u7528\u7684\u6d41\u7a0b\u7ba1\u7406\u5de5\u5177\u4e4b\u4e00\uff0c\u4f60\u503c\u5f97\u62e5\u6709<\/a><\/h1>\n<div id=\"meta_content\" class=\"rich_media_meta_list\"><span id=\"copyright_logo\" class=\"wx_tap_link js_wx_tap_highlight rich_media_meta icon_appmsg_tag appmsg_title_tag weui-wa-hotarea\">\u539f\u521b&nbsp;&nbsp;<\/span><span class=\"rich_media_meta rich_media_meta_text\">\u5c0f\u679c&nbsp;&nbsp;<\/span><span class=\"rich_media_meta rich_media_meta_nickname\" id=\"profileBt\"><a href=\"javascript:void(0);\" class=\"wx_tap_link js_wx_tap_highlight weui-wa-hotarea\" id=\"js_name\">\u751f\u4fe1\u679c&nbsp;&nbsp;<\/a><\/span><em id=\"publish_time\" class=\"rich_media_meta rich_media_meta_text\">2023-05-23 19:01:13<\/em><\/div>\n<p><content><\/p>\n<section data-role=\"outer\" label=\"edit by 135editor\">\n<section style=\"letter-spacing: 0.578px;font-size: 16px;\">\n<section>\n<section>\n<section>\n<section>\n<section>\n<section data-width=\"100%\" style=\"width: 100%;flex: 0 0 100%;opacity: 1;\">\n<section style=\"line-height: 1.8;\">\n<section>\n<section>\n<section style=\"margin-top: 10px;margin-bottom: 20px;display: flex;flex-flow: row nowrap;text-align: center;justify-content: center;\">\n<section style=\"display: inline-block;width: 100%;vertical-align: top;border-style: solid;border-width: 1px;border-color: rgb(67, 67, 67);flex: 0 0 auto;align-self: flex-start;height: auto;box-shadow: rgb(255, 219, 118) 6px 6px 0px;background-color: rgb(255, 255, 255);\">\n<section style=\"text-align: left;justify-content: flex-start;display: flex;flex-flow: row nowrap;\">\n<section style=\"display: inline-block;width: 70%;vertical-align: top;align-self: flex-start;flex: 0 0 auto;height: auto;max-width: 70% !important;\">\n<section style=\"margin-top: 10px;\">\n<section style=\"text-align: center;\">\n<p style=\"text-indent: 0em;line-height: 1.75em;\"><span style=\"letter-spacing: 0.5px;\"><strong><span style=\"font-size: 15px;\">\u751f\u4fe1\u4ebaR\u8bed\u8a00\u5b66\u4e60\u5fc5\u5907<\/span><\/strong><\/span><\/p>\n<p style=\"text-indent: 0em;line-height: 1.75em;\"><span style=\"letter-spacing: 0.5px;\"><strong><span style=\"font-size: 15px;\">\u7acb\u523b\u62e5\u6709\u4e00\u4e2aRstudio\u8d26\u53f7<\/span><\/strong><\/span><\/p>\n<p style=\"text-indent: 0em;line-height: 1.75em;\"><span style=\"letter-spacing: 0.5px;\"><strong><span style=\"font-size: 15px;\">\u5f00\u542f\u5347\u7ea7\u6a21\u5f0f\u5427<\/span><\/strong><\/span><\/p>\n<p style=\"text-indent: 0em;line-height: 1.75em;\"><span style=\"color: rgb(255, 129, 36);font-size: 12px;letter-spacing: 0.5px;\">\uff0856\u7ebf\u7a0b\uff0c256G\u5185\u5b58\uff0c\u4e2a\u4eba\u5b58\u50a81T\uff09<\/span><\/p>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;width: 30%;vertical-align: top;align-self: flex-start;flex: 0 0 auto;height: auto;max-width: 30% !important;\">\n<section style=\"margin-top: 10px;margin-bottom: 10px;text-align: center;line-height: 0;\">\n<section style=\"vertical-align: middle;display: inline-block;line-height: 0;\">\n<p style=\"text-indent: 0em;line-height: 1.75em;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-cropselx1=\"0\" data-cropselx2=\"162\" data-cropsely1=\"0\" data-cropsely2=\"162\" data-ratio=\"1\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/1_ib2l1ye6HNIkwTG696C2pf9yAtdeGA-39.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/mmbiz_png\/zcicibWZessAyB69UyXDLG0wQcISNwmL6DlpIKVBnCSOXHTWJhLcxic2qtibaib2l1ye6HNIkwTG696C2pf9yAtdeGA\/640?wx_fmt=png'\" data-type=\"jpeg\" data-w=\"400\" style=\"height: 111px;vertical-align: middle;width: 111px;\"  data-recalc-dims=\"1\" \/><\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section data-role=\"list\">\n<ul class=\"list-paddingleft-1\" style=\"padding-left: 30px;width: 100%;list-style-position: outside;\">\n<li>\n<section><span style=\"line-height: 2em;font-size: 14px;letter-spacing: 0.5px;caret-color: rgb(255, 0, 0);\">\u8fd8\u5728\u5bf9\u7740\u5b9e\u9a8c\u5ba4\u4e0a\u53e4\u5927\u4f6c\u7559\u4e0b\u811a\u672c\u53d1\u6101\u5417\uff1f\u8fd8\u5728\u5934\u75bc\u5927shell\u5957\u5c0fshell\u7684\u5c4e\u5c71\u5417?\u8fd8\u5728\u4e3a\u627e\u4e0d\u5230\u95ee\u9898\u6b65\u9aa4\u7684shell\u800c\u70e6\u607c\u5417\uff1f\u5feb\u8ddf\u7740\u5c0f\u679c\u628asnakemake\u5b66\u8d77\u6765\u5427\u3002<\/span><br  \/><\/section>\n<\/li>\n<\/ul>\n<section>\n<section>\n<section><br  \/><\/section>\n<section style=\"font-size: 16px;\">\n<section style=\"line-height: 0;text-align: center;margin-top: 10px;margin-bottom: 10px;\" powered-by=\"xiumi.us\">\n<section style=\"vertical-align: middle;display: inline-block;line-height: 0;width: 20%;height: auto;\"><img decoding=\"async\" data-ratio=\"0.5\" src=\"\u56fe\u7247\/\u751f\u4fe1\u679c_2023-05-23_snakemake--\u6700\u597d\u7528\u7684\u6d41\u7a0b\u7ba1\u7406\u5de5\u5177\u4e4b\u4e00\uff0c\u4f60\u503c\u5f97\u62e5\u6709\/2_QiaOCcR0jFpvjkSAu3UmKL82ohCV5Q.png\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/mmbiz_png\/zcicibWZessAxec5nH6tybm0EXxCaibxbtNXhQ4GD7nqK0jxIA9vNfaZMfcibQiaOCcR0jFpvjkSAu3UmKL82ohCV5Q\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"500\" style=\"vertical-align: middle;width: 100%;\"  \/><\/section>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"text-align: center;white-space: normal;\"><strong><em><span style=\"font-size: 20px;color: rgb(62, 62, 62);\">Snakemake\u7684\u5b89\u88c5<\/span><\/em><\/strong><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u9996\u5148\u5f53\u7136\u662f\u521b\u5efa\u4e00\u4e2asnakemake\u7684\u6587\u4ef6\u5939\u5566\uff0c\u6587\u4ef6\u7ba1\u7406\u8fd8\u662f\u5f88\u91cd\u8981\u6ef4\u3002<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">mkdir snakemake<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">cd snakemake<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u7136\u540e\u4e0b\u8f7d\u89e3\u538b\u5b98\u65b9\u7684\u793a\u4f8b\u6587\u6863<\/span><\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">curl -L https:<span class=\"code-snippet__comment\">\/\/api.github.com\/repos\/snakemake\/snakemake-tutorial-data\/tarball -o snakemake-tutorial-data.tar.gz<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">tar --wildcards -xf snakemake-tutorial-data.tar.gz<\/span><\/code><\/pre>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"white-space: normal;\"><br  \/><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u770b\u5230\u90a3\u4e2aenvironment.yaml\u4e86\u5417\uff0c\u90a3\u5c31\u662f\u6559\u5458\u4f5b\u7956\u771f\u4e3b\u8d50\u4e88\u6211\u7b49\u83dc\u9e21\u6551\u8d4e\uff0c<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"0.1967509025270758\" data-s=\"300,640\" src=\"\u56fe\u7247\/\u751f\u4fe1\u679c_2023-05-23_snakemake--\u6700\u597d\u7528\u7684\u6d41\u7a0b\u7ba1\u7406\u5de5\u5177\u4e4b\u4e00\uff0c\u4f60\u503c\u5f97\u62e5\u6709\/3_7hrm3cKghwdIicjo7Na0liclBS7iaQ.png\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/mmbiz_png\/zcicibWZessAxec5nH6tybm0EXxCaibxbtNFeXA93FObPmXZCBywOydicvsV75D7hrm3cKghwdIicjo7Na0liclBS7iaQ\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"554\" style=\"\"><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">Snakemake\u8fde\u8fd0\u884c\u73af\u5883\u90fd\u5e2e\u6211\u4eec\u914d\u7f6e\u597d\u4e86\uff0cgithub\u4e0b\u8f7d\u7684\u5927\u795epipeline\u76f4\u63a5\u8fd0\u884cmamba(\u4e0d\u8981\u614c\uff0cmamba\u662fconda\u7684\u5f3a\u529b\u66ff\u4ee3\u54c1)<\/span><\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">mamba env create --name snakemake --file environment.yaml<\/span><\/code><code><span class=\"code-snippet_outer\">conda activate snakemake<\/span><\/code><\/pre>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u5b98\u65b9\u793a\u4f8b\u6587\u4ef6\u7ed3\u6784\u5982\u4e0b\u56fe\u6240\u793a<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"0.34115523465703973\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/4_RKbTiaEic9O7XaQE38ClBOvPwibIqw.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/mmbiz_png\/zcicibWZessAxec5nH6tybm0EXxCaibxbtNbOicuDYt79JMVTtrLHNTB2tk4wNbRKbTiaEic9O7XaQE38ClBOvPwibIqw\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"554\" style=\"\" data-recalc-dims=\"1\"><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u63a5\u4e0b\u6765\u5c31\u5230\u4e86\u6fc0\u52a8\u4eba\u5fc3\u7684\u6d41\u7a0b\u642d\u5efa\u4e86<\/span><\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">rule bwa_map: #\u5b9a\u4e49\u7b2c\u4e00\u6761\u89c4\u5219\uff0c\u547d\u540d\u4e3abwa_map<\/span><\/code><code><span class=\"code-snippet_outer\">input: &nbsp; &nbsp; &nbsp;<span class=\"code-snippet__meta\">#input \uff1a\u8f93\u5165\u6587\u4ef6<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"data\/genome.fa\"<\/span>,<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"data\/samples\/A.fastq\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">output: &nbsp; &nbsp; &nbsp;<span class=\"code-snippet__meta\">#output\uff1a\u8f93\u51fa\u6587\u4ef6<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"mapped_reads\/A.bam\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">shell: &nbsp; &nbsp; &nbsp;<span class=\"code-snippet__meta\">#shell\uff1a\u8fd0\u884c\u7684shell\u811a\u672c\uff0c\u4e5f\u53ef\u7528run\uff1a\u8fd0\u884cpython\u811a\u672c<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"bwa mem {input} | samtools view -Sb - &gt; {output}\"<\/span><\/span><\/code><\/pre>\n<\/section>\n<p style=\"white-space: normal;\" powered-by=\"xiumi.us\"><span style=\"font-size: 14px;\">\u5f53\u7136\uff0c\u5b9e\u9645\u9879\u76ee\u600e\u4e48\u53ef\u80fd\u53ea\u6709\u4e00\u4e2a\u6837\u672c\uff0c\u6211\u4eec\u5c31\u4e0d\u80fd\u76f4\u63a5\u5199\u6837\u672c\u540d\u4e86\uff0csnakemake\u652f\u6301\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6279\u91cf\u8fd0\u884c\u547d\u4ee4\uff0c\u4fee\u6539\u4e00\u4e0b\u4e0a\u9762\u7684\u4ee3\u7801,\u5f53\u7136\uff0csample\u53ef\u4ee5\u505a\u4e2ayaml\u6587\u4ef6\uff0c\u6216\u8005\u5728shell\u91cc\u5199\u4e2afor\uff0c\u8fd9\u91cc\u5bb9\u5c0f\u679c\u5077\u4e2a\u61d2<\/span><\/p>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">rule bwa_map: &nbsp;#\u5b9a\u4e49\u7b2c\u4e00\u6761\u89c4\u5219\uff0c\u547d\u540d\u4e3abwa_map<\/span><\/code><code><span class=\"code-snippet_outer\">input: &nbsp; &nbsp; &nbsp;<span class=\"code-snippet__meta\">#input \uff1a\u8f93\u5165\u6587\u4ef6<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"data\/genome.fa\"<\/span>,<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"data\/samples\/{sample}.fastq\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">output: &nbsp; &nbsp; &nbsp;<span class=\"code-snippet__meta\">#output\uff1a\u8f93\u51fa\u6587\u4ef6<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"mapped_reads\/{sample}.bam\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">shell: &nbsp; &nbsp; &nbsp;<span class=\"code-snippet__meta\">#shell\uff1a\u8fd0\u884c\u7684shell\u811a\u672c\uff0c\u4e5f\u53ef\u7528run\uff1a\u8fd0\u884cpython\u811a\u672c<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"bwa mem {input} | samtools view -Sb - &gt; {output}\"<\/span><\/span><\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"1.03971119133574\" data-s=\"300,640\" src=\"\u56fe\u7247\/\u751f\u4fe1\u679c_2023-05-23_snakemake--\u6700\u597d\u7528\u7684\u6d41\u7a0b\u7ba1\u7406\u5de5\u5177\u4e4b\u4e00\uff0c\u4f60\u503c\u5f97\u62e5\u6709\/5_sqT4kEu5IwFIZKl93cdEyRdBwFlvVg.png\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/mmbiz_png\/zcicibWZessAxec5nH6tybm0EXxCaibxbtNewoLY7JaPlEbbpPUY9XUYHOGsqT4kEu5IwFIZKl93cdEyRdBwFlvVg\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"554\" style=\"\"  \/><\/p>\n<p style=\"white-space: normal;\" powered-by=\"xiumi.us\"><span style=\"font-size: 14px;\">\u6d41\u7a0b\u6d41\u7a0b\uff0c\u5f53\u7136\u4e0d\u80fd\u53ea\u6709\u4e00\u4e2a\u89c4\u5219\u5566\u3002\u63a5\u4e0b\u6765\u518d\u5199\u4e2asort\u89c4\u5219\uff0c\u5728\u5934\u6587\u4ef6\u628asample\u5b9a\u4e49\u4e86,\u5c0f\u6837\u672c\u6d4b\u8bd5\u53ef\u4ee5\u8fd9\u6837\u5077\u61d2\uff0c\u5927\u6837\u672c\u8fd8\u662f\u8981yaml\u6587\u4ef6\u54e6<\/span><\/p>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">sample = [\u201cA\u201d, \u201cB\u201d, \u201cC\u201d]<\/span><\/code><code><span class=\"code-snippet_outer\">rule bwa_map: #\u5b9a\u4e49\u7b2c\u4e00\u6761\u89c4\u5219\uff0c\u547d\u540d\u4e3abwa_map<\/span><\/code><code><span class=\"code-snippet_outer\">input: &nbsp; &nbsp; &nbsp;<span class=\"code-snippet__meta\">#input \uff1a\u8f93\u5165\u6587\u4ef6<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"data\/genome.fa\"<\/span>,<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"data\/samples\/{sample}.fastq\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">output: &nbsp; &nbsp; &nbsp;<span class=\"code-snippet__meta\">#output\uff1a\u8f93\u51fa\u6587\u4ef6<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"mapped_reads\/{sample}.bam\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">shell: &nbsp; &nbsp; &nbsp;<span class=\"code-snippet__meta\">#shell\uff1a\u8fd0\u884c\u7684shell\u811a\u672c\uff0c\u4e5f\u53ef\u7528run\uff1a\u8fd0\u884cpython\u811a\u672c<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"bwa mem {input} | samtools view -Sb - &gt; {output}\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">rule samtools_sort:<\/span><\/code><code><span class=\"code-snippet_outer\">input:<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"mapped_reads\/{sample}.bam\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">output:<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"sorted_reads\/{sample}.bam\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">shell:<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"samtools sort -T sorted_reads\/{wildcards.sample} \"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"-O bam {input} &gt; {output}\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">rule samtools_index:<\/span><\/code><code><span class=\"code-snippet_outer\">input:<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"sorted_reads\/{sample}.bam\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">output:<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"sorted_reads\/{sample}.bam.bai\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">shell:<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">\"samtools index {input}\"<\/span><\/span><\/code><\/pre>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;color: rgb(62, 62, 62);\">\u73b0\u5728\uff0c\u89c1\u8bc1\u5947\u8ff9\u7684\u65f6\u523b<\/span><span style=\"text-align: center;letter-spacing: 0.578px;\"><\/span><\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">snakemake --dag sorted_reads\/{A,B}.bam.bai | dot -Tsvg &gt; dag.svg<\/span><\/code><\/pre>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"0.9\" data-s=\"300,640\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/6_AJAJa3Bkco0ByoLVHofcfxGVk3jEdg.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/mmbiz_png\/zcicibWZessAxec5nH6tybm0EXxCaibxbtNwD4324iafCI2vUe0MEXpQkCANAJAJa3Bkco0ByoLVHofcfxGVk3jEdg\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"280\" style=\"\" data-recalc-dims=\"1\"><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\">\u8fd9\u624d\u662fsnakemake\u7684\u7cbe\u9ad3\u6709\u6728\u6709\uff0c\u76f4\u63a5\u751f\u6210\u53ef\u89c6\u5316\u7684\u6d41\u7a0b\u56fe\uff0c\u5988\u5988\u518d\u4e5f\u4e0d\u6015\u5c0f\u679c\u770b\u6d41\u7a0bshell\u4e00\u8138\u61f5\u4e86\uff0c\u5929\u4e0b\u5c31\u6ca1\u6709\u6211\u5c0f\u679c\u770b\u4e0d\u61c2\u7684\u6d41\u7a0b\u3002<\/span><\/p>\n<p style=\"white-space: normal;\"><span style=\"font-size: 14px;\"><br  \/><\/span><\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p><span style=\"line-height: 2em;font-size: 14px;letter-spacing: 0.5px;caret-color: rgb(255, 0, 0);\">\u597d\u5566\uff0c\u4e0d\u591a\u8bf4\u4e86\uff0c\u4eca\u5929\u7684\u5185\u5bb9\u5c31\u5230\u8fd9\u91cc\u4e86\uff0c\u4f60\u5b66\u4f1a\u4e86\u5417\uff01<\/span><em style=\"letter-spacing: 0.578px;color: rgb(0, 0, 0);font-size: 17px;line-height: 1.59em;\"><\/em><\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section data-tools=\"135\u7f16\u8f91\u5668\" data-id=\"105054\" style=\"font-size: 16px;\">\n<section style=\"margin: 10px auto;text-align: center;\">\n<section style=\"padding-top: 30px;padding-bottom: 30px;background-color: rgb(242, 246, 255);border-radius: 7px;\">\n<section style=\"display: flex;justify-content: space-evenly;align-items: center;\">\n<section data-width=\"26%\" style=\"width: 26%;max-width: 26% !important;\">\n<section style=\"padding: 7px;border-radius: 15px;box-shadow: rgba(169, 187, 223, 0.45) 4px 4px 8px, rgb(255, 255, 255) -2.5px -2.5px 5px;\">\n<section data-width=\"100%\" style=\"width: 100%;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"1.005281690140845\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/7_0WFLKBMicbm6iawtkrNrMxpSVU9GBQ.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/mmbiz_png\/zcicibWZessAxec5nH6tybm0EXxCaibxbtN261llpmfF6btPBTUKkibEdnRz5Y0WFLKBMicbm6iawtkrNrMxpSVU9GBQ\/640?wx_fmt=png'\" data-type=\"png\" data-w=\"568\" data-width=\"100%\" style=\"vertical-align: inherit;width: 100%;display: block;border-radius: 7px;\" title=\"\u5c0f\u4e91-\u5fae\u4fe1\u4e8c\u7ef4\u7801.png\"  data-recalc-dims=\"1\" \/><\/section>\n<\/section>\n<\/section>\n<section data-width=\"62%\" style=\"width: 62%;max-width: 62% !important;\">\n<section style=\"display: inline-block;\">\n<section style=\"padding: 7px 15px;border-radius: 20px;box-shadow: rgba(169, 187, 223, 0.45) 6px 6px 8px inset, rgb(255, 255, 255) -2.5px -2.5px 5px inset;\">\n<section data-brushtype=\"text\" style=\"font-size: 14px;letter-spacing: 1.5px;color: rgb(111, 133, 172);\">\n<p style=\"text-indent: 0em;line-height: 1.75em;\"><span style=\"letter-spacing: 0.5px;\">\u5fae\u4fe1\u53f7 | 18502195490<\/span><\/p>\n<\/section>\n<\/section>\n<section style=\"margin-top: 12px;padding: 7px 15px;border-radius: 20px;box-shadow: rgba(169, 187, 223, 0.45) 6px 6px 8px inset, rgb(255, 255, 255) -2.5px -2.5px 5px inset;\">\n<section data-brushtype=\"text\" style=\"font-size: 14px;letter-spacing: 1.5px;color: rgb(111, 133, 172);\">\n<p style=\"text-indent: 0em;line-height: 1.75em;\"><span style=\"letter-spacing: 0.5px;\">\u77e5\u4e4e | \u751f\u4fe1\u679c<\/span><\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"letter-spacing: 0.578px;caret-color: rgba(0, 0, 0, 0);font-size: 16px;\">\n<section>\n<section style=\"margin-top: 0.5em;\">\n<section style=\"padding: 0.5em;border-width: 1px;border-style: solid;box-shadow: rgb(226, 226, 226) 0px 16px 1px -13px;border-color: rgb(0, 150, 136);\">\n<section style=\"text-align: left;\">\n<section style=\"color: rgb(255, 129, 36);text-align: justify;\">\n<section style=\"margin-bottom: 8px;\">\n<p style=\"text-indent: 0em;line-height: 1.75em;\"><span style=\"letter-spacing: 0.5px;\">\u70b9\u51fb<strong><span style=\"color: rgb(0, 150, 136);\">\u201c\u9605\u8bfb\u539f\u6587\u201d<\/span><\/strong>\u7acb\u523b\u62e5\u6709<\/span><\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"margin-bottom: 8px;font-size: 32px;color: rgb(0, 150, 136);\">\n<p style=\"text-indent: 0em;line-height: 1.75em;\"><span style=\"letter-spacing: 0.5px;\">\u2193\u2193\u2193&nbsp;<\/span><\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p style=\"display: none;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<div class=\"msg_source_url\"><a href=\"http:\/\/www.biocloudservice.com\/home.html\" target=\"_blank\" rel=\"noopener\">\u9605\u8bfb\u539f\u6587<\/a><\/div>\n<p><\/content><\/p>\n<div class=\"msg_source_url\"><a href=\"http:\/\/www.biocloudservice.com\/home.html\" target=\"_blank\" rel=\"noopener\">\u9605\u8bfb\u539f\u6587<\/a><\/div>\n<\/div>\n<p><\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>snakemake&#8211;\u6700\u597d\u7528\u7684\u6d41\u7a0b\u7ba1\u7406\u5de5\u5177\u4e4b\u4e00\uff0c\u4f60\u503c\u5f97\u62e5\u6709 \u539f\u521b&nbsp;&nbsp;\u5c0f\u679c&#038;nbs [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":""},"categories":[1],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/57176"}],"collection":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=57176"}],"version-history":[{"count":1,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/57176\/revisions"}],"predecessor-version":[{"id":57186,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/57176\/revisions\/57186"}],"wp:attachment":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=57176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=57176"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=57176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}