{"id":465,"date":"2016-04-05T03:14:20","date_gmt":"2016-04-05T03:14:20","guid":{"rendered":"http:\/\/www.abyteofcommonsense.com\/?p=465"},"modified":"2016-04-05T03:14:20","modified_gmt":"2016-04-05T03:14:20","slug":"blasted-megan-round-2-or-what-to-do-when-youre-running-yet-another-blast","status":"publish","type":"post","link":"http:\/\/www.abyteofcommonsense.com\/?p=465","title":{"rendered":"Blast(ed) MEGAN Round 2 &#8211; or what to do when you&#8217;re running yet another blast"},"content":{"rendered":"<p>So MEGAN can be a bit annoying at times. As can Blast outputs required by MEGAN. Because I&#8217;m particularly interested in the alignments produced, and want to create a consensus sequence for designing primers, I need to run blast again from <a href=\"http:\/\/www.abyteofcommonsense.com\/?p=400\">what I did the other day<\/a>.<\/p>\n<p>This time, I&#8217;ve already identified that the top hit is sufficient for me to make decisions (and culled out any sequences that didn&#8217;t have an ncbi hits at any stage). So I am able to use<\/p>\n<p><strong>-num_descriptions 1<\/strong><\/p>\n<p><strong>-num_alignments 1<\/strong><\/p>\n<p>This works for -m values of 0-4. If you are using local blast, -m is not a command you can use. As I am putting the data into MEGAN, I just use the default. Tabular (-m 7, -m 8) can also be very useful, but does not retain the alignment data.<\/p>\n<p><em>\/ncbi-blast-2.2.31+\/bin\/blastn -query PP.blastn.all.fasta -db \/ncbi-blast-2.2.31+\/db\/flavivirus-nt-custom-db\/flavivirus.nogaps.noempty.db -out PP.blastn.all.fasta.blast -num_threads 2 -num_descriptions 1 -num_alignments 1<\/em><\/p>\n<p>In this case, I have so far decided that I am more interested in comparing the three areas than I am the area as a whole (any more, and I&#8217;d be giving away my paper!). It also means the blast will be slightly shorter to run, because several small sets of files are faster to run than one big one.<\/p>\n<p>Unfortunately, I also needed to run a blastx on my data, and so I&#8217;ll need to redo that one as well. It should be quicker, because I am only using sequences I have already identified as interesting. Then again, blastx is always extremely slow. The command I am using there is<\/p>\n<p><em>\/ncbi-blast-2.2.31+\/bin\/blastx -query PP.blastx.all.fasta -db \/ncbi-blast-2.2.31+\/db\/<span class=\"s1\">flavivirus-aminoacid-custom-db<\/span>\/<span class=\"s1\">flavivirus.protein.db\u00a0<\/span>-out PP.blastx.all.fasta.blast -num_threads 2 -num_descriptions 1 -num_alignments 1<\/em><\/p>\n<p>A note on this is that MEGAN will let you import more than one blast output file at a time &#8211; but they have to be in the same directory. I haven&#8217;t actually been able to test this yet, because I want to know the differences between the files. I&#8217;ll test this current lot out anyway&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So MEGAN can be a bit annoying at times. As can Blast outputs required by MEGAN. Because I&#8217;m particularly interested in the alignments produced, and&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"http:\/\/www.abyteofcommonsense.com\/?p=465\">Continue reading<span class=\"screen-reader-text\">Blast(ed) MEGAN Round 2 &#8211; or what to do when you&#8217;re running yet another blast<\/span><\/a><\/div>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[69],"tags":[70,76],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6nzXS-7v","jetpack-related-posts":[{"id":410,"url":"http:\/\/www.abyteofcommonsense.com\/?p=410","url_meta":{"origin":465,"position":0},"title":"Creating a custom local Blast database from .fasta","date":"November 23, 2015","format":false,"excerpt":"All these commands are pretty simple to use, but I couldn't find really straight forward answers for why the hell I was getting errors, so here is my quick guide. I hope you find it useful. When you are creating a custom NCBI blast database to use, there's a couple\u2026","rel":"","context":"In &quot;Bioinformatics&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":400,"url":"http:\/\/www.abyteofcommonsense.com\/?p=400","url_meta":{"origin":465,"position":1},"title":"Local NCBI BLAST problems? Some solutions for the unexperienced bioinformatician","date":"November 16, 2015","format":false,"excerpt":"Is local blast driving you nuts? Blast is a super powerful tool if you download it onto your own computer because you can blast more than one sequence at once, and not have to worry about the server dying on you. Having set it up both with the experience of\u2026","rel":"","context":"In &quot;Bioinformatics&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":403,"url":"http:\/\/www.abyteofcommonsense.com\/?p=403","url_meta":{"origin":465,"position":2},"title":"How to deal with Blast output and Fasta to get what you need for MEGAN (using Qiime)","date":"November 18, 2015","format":false,"excerpt":"So... You have some sequence data from Illumina sequencing.\u00a0These are the two sets of files I have, one is forward reads, and the other is reverse. PP2_S1_L001_R2_001.fastq.gz PP2_S1_L001_R1_001.fastq.gz ... it's in fastaq.gz format. You want to upzip it, simple right? You want to use this command: gunzip --keep PP2_S1_L001_R2_001.fastq.gz But\u2026","rel":"","context":"In &quot;Bioinformatics&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":412,"url":"http:\/\/www.abyteofcommonsense.com\/?p=412","url_meta":{"origin":465,"position":3},"title":"Using the mac OSX command line","date":"November 30, 2015","format":false,"excerpt":"The most sensible way to set up your working environment in the Mac command line when you want to do the same thing in multiple folders is to make sure you have labelled everything in the same way.\u00a0A handy hint here is that if you have terminal open, and you\u2026","rel":"","context":"In &quot;Bioinformatics&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":457,"url":"http:\/\/www.abyteofcommonsense.com\/?p=457","url_meta":{"origin":465,"position":4},"title":"Converting Gene Names to GO IDs or GO terms","date":"January 14, 2016","format":false,"excerpt":"This is to prevent frustration when doing a beginner's task of annotating genes with GO IDs, or Gene Ontologies. This is useful to visualise large datasets of genes. First, convert\u00a0your gene names to a format recognised by UniProtKB. The tool you can use is DAVID. Don't try and use the\u2026","rel":"","context":"In &quot;Bioinformatics&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":443,"url":"http:\/\/www.abyteofcommonsense.com\/?p=443","url_meta":{"origin":465,"position":5},"title":"Getting into tea tasting: review #1","date":"December 28, 2015","format":false,"excerpt":"I find myself reaching for a cup of tea more often these days. I'm trying to lose some weight, and so I need to start having less juice and more water-based things. Water doesn't really appeal to me unless it's chilled and from the fridge on a hot day. Or\u2026","rel":"","context":"In &quot;Food&quot;","img":{"alt_text":"","src":"https:\/\/i1.wp.com\/www.abyteofcommonsense.com\/wp-content\/uploads\/2015\/12\/6887907.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"http:\/\/www.abyteofcommonsense.com\/index.php?rest_route=\/wp\/v2\/posts\/465"}],"collection":[{"href":"http:\/\/www.abyteofcommonsense.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.abyteofcommonsense.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.abyteofcommonsense.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.abyteofcommonsense.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=465"}],"version-history":[{"count":2,"href":"http:\/\/www.abyteofcommonsense.com\/index.php?rest_route=\/wp\/v2\/posts\/465\/revisions"}],"predecessor-version":[{"id":467,"href":"http:\/\/www.abyteofcommonsense.com\/index.php?rest_route=\/wp\/v2\/posts\/465\/revisions\/467"}],"wp:attachment":[{"href":"http:\/\/www.abyteofcommonsense.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.abyteofcommonsense.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=465"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.abyteofcommonsense.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}