{"id":368,"date":"2011-01-05T11:12:25","date_gmt":"2011-01-05T11:12:25","guid":{"rendered":"http:\/\/41j.com\/blog\/?p=368"},"modified":"2011-10-05T11:13:21","modified_gmt":"2011-10-05T11:13:21","slug":"split-fasta-file-into-files-with-one-contig-per-file","status":"publish","type":"post","link":"https:\/\/41j.com\/blog\/2011\/01\/split-fasta-file-into-files-with-one-contig-per-file\/","title":{"rendered":"Split fasta file into files with one contig per file"},"content":{"rendered":"<p>csplit does this quite neatly:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncsplit -z myfile.fas '\/&gt;\/' '{*}'\r\n<\/pre>\n<p>Default output filename is xxNN (where NN is a integer). you can use something other than xx by specifying a prefix with &#8211;prefix=PREFIX.<\/p>\n<p>Note, this command assumes that the contig title don&#8217;t contain a > except for at the start of the line. You can probably do something like &#8216;\\n>&#8217; or &#8216;^>&#8217; to insure it must occur at the start of the line.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>csplit does this quite neatly: csplit -z myfile.fas &#8216;\/&gt;\/&#8217; &#8216;{*}&#8217; Default output filename is xxNN (where NN is a integer). you can use something other than xx by specifying a prefix with &#8211;prefix=PREFIX. Note, this command assumes that the contig title don&#8217;t contain a > except for at the start of the line. You can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-368","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1RRoU-5W","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/368","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/comments?post=368"}],"version-history":[{"count":2,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/368\/revisions"}],"predecessor-version":[{"id":2171,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/368\/revisions\/2171"}],"wp:attachment":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/media?parent=368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/categories?post=368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/tags?post=368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}