Permalink
Browse files

Updating info

  • Loading branch information...
1 parent 05ceb1f commit fdfcff316ce25156b480b0c99ba5686a1c85249a @pjotrp committed Aug 10, 2012
Showing with 30 additions and 28 deletions.
  1. +8 −13 README.rdoc
  2. +1 −1 VERSION
  3. +15 −8 bin/gff3-fetch
  4. +3 −4 lib/bio/db/gff/block/gffblockparser.rb
  5. +2 −1 lib/bio/db/gff/digest/gffparser.rb
  6. +1 −1 lib/bio/db/gff/gffcomponent.rb
View
@@ -61,13 +61,9 @@ For a write-up see http://thebird.nl/bioruby/BioRuby_GFF3.html
-------------------------------------------------------------------------------
-== Copyright
-
-Copyright (C) 2010,2011 Pjotr Prins <pjotr.prins@thebird.nl>
-
-
+= Command line usage (CLI)
- 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
@@ -100,10 +96,10 @@ Copyright (C) 2010,2011 Pjotr Prins <pjotr.prins@thebird.nl>
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:
@@ -133,7 +129,7 @@ Copyright (C) 2010,2011 Pjotr Prins <pjotr.prins@thebird.nl>
gff3-fetch mRNA test/data/gff/test.gff3 --trace ERROR
- Fine tuning output - show messages matching regex
+ Fine tuning outpt - show messages matching regex
gff3-fetch mRNA test/data/gff/test.gff3 --trace '=msg =~ /component/'
@@ -170,8 +166,7 @@ time gff3-fetch cds m_hapla.WS217.dna.fa m_hapla.WS217.gff3 2> /dev/null > test.
Cache real user sys gff3 version
------------------------------------------------------------
- in preparation see also biolib/HPC:
- https://github.com/pjotrp/biolib_hpc/tree/master/modules/gff3
+ in preparation
------------------------------------------------------------
where
@@ -194,5 +189,5 @@ on an 8 CPU, 2.6 GHz (6MB cache), 16 GB RAM machine.
== Copyright
-Copyright (C) 2010-2012 Pjotr Prins <pjotr.prins@thebird.nl>
+Copyright (C) 2010-2012 Pjotr Prins <pjotr.prins@thebird.nl>
View
@@ -1 +1 @@
-0.8.8
+0.8.9
View
@@ -1,11 +1,13 @@
-#! /usr/bin/ruby
+#! /usr/bin/env ruby
#
# Author:: Pjotr Prins
# License:: Ruby License
+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
@@ -38,10 +40,10 @@ USAGE = <<EOM
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:
@@ -123,11 +125,15 @@ on an 8 CPU, 2.6 GHz (6MB cache), 16 GB RAM machine.
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
@@ -141,7 +147,7 @@ require 'optparse'
require 'ostruct'
require 'bio/output/gfffastawriter'
-$stderr.print "BioRuby GFF3 Plugin "+GFF3_VERSION+" Copyright (C) 2010-2012 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
@@ -155,7 +161,7 @@ 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
@@ -236,6 +242,7 @@ opts = OptionParser.new() { |opts|
end
}
+opts = opts2
opts.parse!(ARGV)
Bio::Log::CLI.configure('bio-gff3')
@@ -69,23 +69,22 @@ def parse_block gfftype, recs, sequence
def each_seq(gfftype)
parse(gfftype) { | id, seq | yield id,seq }
-
end
def each_gene_seq
each_seq('gene') { | id, seq | yield id,seq }
end
+
def each_mRNA_seq
each_seq('mrna') { | id, seq | yield id,seq }
-
end
+
def each_exon_seq
each_seq('exon') { | id, seq | yield id,seq }
-
end
+
def each_CDS_seq
each_seq('cds') { | id, seq | yield id,seq }
-
end
end
end
@@ -56,7 +56,7 @@ def store_record rec
def show_unrecognized_features
@unrecognized_features.keys.each do | k |
- warn "Feature has no match",k if k
+ warn "Unknown feature is ignored",k if k
end
end
@@ -131,6 +131,7 @@ def each_mRNA_seq
def each_CDS_seq
each_CDS do | id, reclist, component |
if component
+ p id,reclist,component
sequence = @sequencelist[component.seqname]
# p sequence
if sequence
@@ -83,7 +83,7 @@ module Gff3Features
# Ignore the following features (case sensitive?)
IGNORE_FEATURES = Gff3Component::COMPONENT_TYPES + Set.new(%w{
- transposon Match similarity UTR
+ transposon Match similarity UTR hsp Peptide match
TF_binding_site intronSO:0000188 polyA_sequence SO:0000610
polyA_site SO:0000553
five_prime_UTR SO:0000204 three_prime_UTR SO:0000205

0 comments on commit fdfcff3

Please sign in to comment.