Skip to content

Commit

Permalink
update doco
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben J. Woodcroft committed May 9, 2012
1 parent f61fa6e commit 78f89cc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 18 deletions.
15 changes: 12 additions & 3 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
= bio-gag

Full description goes here
bio-gag is a biogem for detecting and correcting a particular type of error that occurs/occurred in a particular version of the IonTorrent sequencing kit. Newer versions of these kits do not appear to be affected by this error.

Note: this software is under active development!
To search for these errors, a pileup of aligned sequences is required. These can be generated either from an assembly or by aligning to a reference, although it has only been tested on de-novo assemblies assembled with newbler. Note that it is probably not optimised due to time constraints combined with the fact they appear to have been fixed in newer kits.

== Installation

gem install bio-gag

== Usage

To use the script, the important options are these:

gag [options] <pileup_output>

--lookahead Work out if gag predictions are supported by orf predictions being extended [default is just to print out found gag errors]
--fix CONSENSUS_FASTA_FILE Find gag errors in the pileup file, correct them in CONSENSUS_FASTA_FILE, and print to STDOUT the fixed up consensus
-g, --gags GAG_FILE Specify a list of GAG errors to be fixed in tab-separated form (use with --fix, the tab-separated output is from regular output or --lookahead)


== Developers

To use the library

require 'bio-gag
require 'bio-gag'

The API doc is online. For more code examples see also the test files in
the source tree.
Expand Down
30 changes: 16 additions & 14 deletions bin/gag
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,22 @@ options = {
:trace => 'info',
}
o = OptionParser.new do |opts|
opts.banner = "gag [options] <pileup_output>"
opts.banner = "\ngag [options] <pileup_output>\n\n"


opts.on('--lookahead', 'Work out if gag predictions are supported by orf predictions being extended [default is just to print out found gag errors]. There\'s modifed usage too - probably best for you to look at the code if you are using this operation') do |v|
options[:operation] = LOOKAHEAD
end

opts.on('--fix CONSENSUS_FASTA_FILE', 'Find gag errors in the pileup file, correct them in CONSENSUS_FASTA_FILE, and print to STDOUT the fixed up consensus') do |v|
options[:operation] = FIX
options[:fix_file] = v
end

opts.on('-g','--gags GAG_FILE', 'Specify a list of GAG errors to be fixed in tab-separated form (use with --fix, the tab-separated output is from regular output or --lookahead)') do |v|
options[:gags_file] = v
end


opts.on("--logger filename",String,"Log to file (default STDERR)") do | name |
options[:logger] = name
Expand All @@ -38,19 +53,6 @@ o = OptionParser.new do |opts|
opts.on("-v", "--verbose", "Run verbosely") do |v|
options[:trace] = 'info'
end

opts.on('--lookahead', 'Work out if gag predictions are supported by orf predictions being extended') do |v|
options[:operation] = LOOKAHEAD
end

opts.on('--fix CONSENSUS_FASTA_FILE', 'Find gag errors in the pileup file, correct them in CONSENSUS_FASTA_FILE, and print to STDOUT the fixed up consensus') do |v|
options[:operation] = FIX
options[:fix_file] = v
end

opts.on('-g','--gags GAG_FILE', 'Specify a list of GAG errors to be fixed in tab-separated form (use with --fix, the tab-separated output is from regular output or --lookahead)') do |v|
options[:gags_file] = v
end
end.parse!

# Realize settings
Expand Down
2 changes: 1 addition & 1 deletion lib/bio/db/gag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class Bio::DB::PileupIterator
# Find places in this pileup that correspond to GAG errors
# * Currently XYX in the consensus (i.e. the first and third bases are the same, and different to the middle one)
# * Currently XYX in the consensus (i.e. the first and third bases are the same, and different to the middle one). This is actually probably not optimal.
# * There is at least 3 reads that have an insertion of base Y next to Y, and are all in the one direction. Can change this with options[:min_disagreeing_absolute]
# * The 3 or more reads form at least a proportion of 0.1 (i.e. 10%) of all the reads at that position. Can change this with options[:min_disagreeing_proportion]
#
Expand Down

0 comments on commit 78f89cc

Please sign in to comment.