-
Notifications
You must be signed in to change notification settings - Fork 23
plot_nucleotide_distribution
plot_nucleotide_distribution creates a nucleotide distribution plot per sequence position of sequences in the stream. Plotting is done using GNUplot which allows for different types of output the default one being crufty ASCII graphics.
If plotting distributions from sequences of variable length you can use the -c
swith to co-plot the relative
count at each base position. This allow you to explain areas with a scewed distribution.
GNUplot must be installed for plot_nucleotide_distribution to work. Read more here:
Also, the GNUplot gem for Ruby is required - run: gem install gnuplot
... | plot_nucleotide_distribution [options]
[-? | --help] # Print full usage description.
[-o <file> | --data_out=<file>] # Write result to file.
[-x | --no_stream] # Do not emit records.
[-c | --count] # Plot relative count.
[-t <string> | --terminal=<string>] # Terminal for output: dumb|post|svg|x11|aqua|png|pdf - Default=dumb
[-T <string> | --title=<string>] # Set plot title - Default="Nucleotide Distribution"
[-X <string> | --xlabel=<string>] # Set x-axis label - Default="Sequence position"
[-Y <string> | --ylabel=<string>] # Set y-axis label - Default="Nucleotide distribution (%)"
[-I <file!> | --stream_in=<file!>] # Read input from stream file - Default=STDIN
[-O <file> | --stream_out=<file>] # Write output to stream file - Default=STDOUT
[-v | --verbose] # Verbose output.
Here we plot the nucleotide distribution of sequences a FASTA file and save the result in a PNG image file:
read_fasta -i test.fna | plot_nucleotide_distribution -t png -o plot_nucleotide_distribution.png -x
And the result will look like this:
To co-plot the relative count at each position use the -c
switch:
read_fasta -i test.fna | plot_nucleotide_distribution -c -t png -o plot_nucleotide_distribution.png -x
And the result will look like this:
If you choose -t svg
instead of -t png
the output will be in SVG which is
neat since it can easily be modified using e.g. Inkscape to apply labels and such.
Read more about Inkscape here:
Martin Asser Hansen - Copyright (C) - All rights reserved.
August 2012
GNU General Public License version 2
http://www.gnu.org/copyleft/gpl.html
plot_nucleotide_distribution is part of the Biopieces framework.