bin/gff3-fetch in bio-gff3-0.8.7 vs bin/gff3-fetch in bio-gff3-0.9.0
- old
+ new
@@ -1,16 +1,15 @@
-#! /usr/bin/ruby
+#! /usr/bin/env ruby
#
# Author:: Pjotr Prins
-# Copyright:: August 2010
# License:: Ruby License
-#
-# Copyright (C) 2010,2011 Pjotr Prins <pjotr.prins@thebird.nl>
+COPYRIGHT = "Copyright (C) 2010-2012 Pjotr Prins <pjotr.prins@thebird.nl>"
+
USAGE = <<EOM
- Fetch and assemble GFF3 types (e.g. ORF, mRNA, CDS) + print in FASTA format.
+ Fetch and assemble GFF3 types (ORF, mRNA, CDS) + print in FASTA format.
gff3-fetch [options] type [filename.fa] filename.gff3
--translate : output as amino acid sequence
--validate : validate GFF3 file by translating
@@ -39,14 +38,14 @@
--emboss : use EMBOSS translation (fast) -- NYI
Where (NYI == Not Yet Implemented):
Multiple GFF3 files can be used. With external FASTA files, always the last
- one before the GFF3 filename is matched.
+ one before the GFF3 filename is matched. Make sure the FASTA file
+ comes before the GFF3 file on the command line.
- Note that above switches are only partially implemented at this stage. Full
- feature support is projected Feb. 2011.
+ Note that above switches are only partially implemented at this stage.
Examples:
Assemble mRNA and CDS information from test.gff3 (which includes sequence information)
@@ -124,15 +123,19 @@
== Cite
If you use this software, please cite
+ http://dx.doi.org/10.1093/bioinformatics/bts080
+
+ or
+
http://dx.doi.org/10.1093/bioinformatics/btq475
== Copyright
-Copyright (C) 2010,2011 Pjotr Prins <pjotr.prins@thebird.nl>
+#{COPYRIGHT}
EOM
rootpath = File.dirname(File.dirname(__FILE__))
$: << File.join(rootpath,'lib')
@@ -142,11 +145,11 @@
require 'bio-gff3'
require 'optparse'
require 'ostruct'
require 'bio/output/gfffastawriter'
-$stderr.print "BioRuby GFF3 Plugin "+GFF3_VERSION+" Copyright (C) 2010,2011 Pjotr Prins <pjotr.prins@thebird.nl>\n\n"
+$stderr.print "gff3-fetch (biogem Ruby #{RUBY_VERSION}) "+GFF3_VERSION+" "+COPYRIGHT+"\n\n"
if ARGV.size == 0
print USAGE
end
@@ -156,11 +159,11 @@
options = OpenStruct.new()
# ---- Default options
options.parser = :line
-opts = OptionParser.new() { |opts|
+opts2 = OptionParser.new() { |opts|
opts.on_tail("-h", "--help", "Show help and examples") {
print(opts)
print USAGE
exit()
}
@@ -237,9 +240,10 @@
Bio::Log::CLI.trace('debug')
options.debug = true
end
}
+opts = opts2
opts.parse!(ARGV)
Bio::Log::CLI.configure('bio-gff3')
gfftype = ARGV.shift