text: user727: I'm attempting to visualize the results of my BLAST search in a way similar to the graphical display of the distribution of blast hits from the web BLAST.
  For example, from my BLAST search:
  
  except I would like the graph to contain information including information for the distribution of all 6139 hits across my query sequence.
  Since this is a large number of sequences to visualize a distribution, I am considering using a score of the number of hits on a certain region, and having an output more similar to:
  
  If I were to run my blast using the BLAST+ command line tool, and read the results into R, which parts of the output should I plot in order to recreate the graphical display of the distribution? Ideally I would like to make a reusable object that can make an equivalent plot for any BLAST input.
  Thanks.
  
  user939: You probably want to include query start (qstart) and query end (qend) in your blast output.
  Something like this:
  blastn -query your.fasta -out blast.out.txt -db your.db -outfmt '6 qseqid sseqid qstart qend length evalue'
  
  In R you can take the "qstart:qend" from each line for density plot.
  There are many ways in R to plot the densities of these start and end amino acids.
  Let me show an example with a small data frame:
  qstart <- c(200, 300, 250, 400, 500)
  qend <- c(300, 450, 400, 600, 650)
  
  df <- as.data.frame(cbind(qstart,qend))
  
  aa <- vector()
  i=1
  for(i in 1:5){
  aa <- append(aa, c(df[i,1]:df[i,2]))
  i+1
  }
  
  hist(aa)
  dens <- density(aa)
  plot(dens)
  
  
original_text: 727: <p>I'm attempting to visualize the results of my BLAST search in a way similar to the graphical display of the distribution of blast hits from the web BLAST.</p>
  
  <p>For example, from my BLAST search:</p>
  
  <p><a href="https://i.stack.imgur.com/zVWjr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zVWjr.png" alt="enter image description here"></a></p>
  
  <p>except I would like the graph to contain information including information for the distribution of all 6139 hits across my query sequence.</p>
  
  <p>Since this is a large number of sequences to visualize a distribution, I am considering using a score of the number of hits on a certain region, and having an output more similar to:</p>
  
  <p><a href="https://i.stack.imgur.com/HhPYg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HhPYg.png" alt="enter image description here"></a></p>
  
  <p>If I were to run my blast using the BLAST+ command line tool, and read the results into R, which parts of the output should I plot in order to recreate the graphical display of the distribution? Ideally I would like to make a reusable object that can make an equivalent plot for any BLAST input.</p>
  
  <p>Thanks.</p>
   939: <p>You probably want to include query start (qstart) and query end (qend) in your blast output.</p>
  
  <p>Something like this:</p>
  
  <pre><code>blastn -query your.fasta -out blast.out.txt -db your.db -outfmt '6 qseqid sseqid qstart qend length evalue'
  </code></pre>
  
  <p>In R you can take the "qstart:qend" from each line for density plot.</p>
  
  <p>There are many ways in R to plot the densities of these start and end amino acids.</p>
  
  <p>Let me show an example with a small data frame:</p>
  
  <pre><code>qstart &lt;- c(200, 300, 250, 400, 500)
  qend &lt;- c(300, 450, 400, 600, 650)
  
  df &lt;- as.data.frame(cbind(qstart,qend))
  
  aa &lt;- vector()
  i=1
  for(i in 1:5){
  aa &lt;- append(aa, c(df[i,1]:df[i,2]))
  i+1
  }
  
  hist(aa)
  dens &lt;- density(aa)
  plot(dens)
  </code></pre>
  