From 73c3efb2bd9febbc0340ca13d1f20ad2e5ab18d8 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Mon, 1 Sep 2014 13:45:08 +0200 Subject: [PATCH] Text --- LICENSE.txt | 2 +- bin/blastxmlparser | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 90bba68..7f90f29 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2011 Pjotr Prins +Copyright (c) 2011-2014 Pjotr Prins Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/bin/blastxmlparser b/bin/blastxmlparser index f9c3f31..bae4f79 100755 --- a/bin/blastxmlparser +++ b/bin/blastxmlparser @@ -11,24 +11,20 @@ $: << File.join(rootpath,'lib') BLASTXML_VERSION = File.new(File.join(rootpath,'VERSION')).read.chomp -$stderr.print "BioRuby BLAST XML Parser "+BLASTXML_VERSION+" Copyright (C) 2014 Pjotr Prins \n\n" +$stderr.print "BLAST XML Parser "+BLASTXML_VERSION+" Copyright (C) 2014 Pjotr Prins \n\n" USAGE = < 145 - - blastxmlparser -e 'hsp.bit_score>145' test/data/nt_example_blastn.m7 - prints a tab delimited 1 1 lcl|1_0 lcl|I_74685 1 5.82208e-34 @@ -44,6 +40,10 @@ names directly blastxmlparser -e 'hsp["Hsp_bit-score"].to_i>145' test/data/nt_example_blastn.m7 +Or the shorter + + blastxmlparser -e 'hsp.bit_score>145' test/data/nt_example_blastn.m7 + And it is possible to print (non default) named fields where E-value < 0.001 and hit length > 100. E.g. @@ -69,17 +69,19 @@ by query iteration id, and hit_id. E.g. AGTGAAGCTTCTAGATATTTGGCGGGTACCTCTAATTTTGCCTGCCTGCCAACCTATATGCTCCTGTGTTTAG etc. etc. +## Additional options + To use the low-mem (iterated slower) version of the parser use blastxmlparser --parser split -n 'hsp.evalue,hsp.qseq' -e 'hsp.evalue<0.01 and hit.len>100' test/data/nt_example_blastn.m7 -== URL +## URL The project lives at http://github.com/pjotrp/blastxmlparser. If you use this software, please cite http://dx.doi.org/10.1093/bioinformatics/btq475 -== Copyright +## Copyright -Copyright (c) 2011 Pjotr Prins under the MIT licence. See LICENSE.txt and http://www.opensource.org/licenses/mit-license.html for further details. +Copyright (c) 2011-2014 Pjotr Prins under the MIT licence. See LICENSE.txt and http://www.opensource.org/licenses/mit-license.html for further details. EOM @@ -118,11 +120,11 @@ opts = OptionParser.new do |o| options.output_fasta = true end - o.on("-n fields","--named fields",String, "Set named fields") do |s| + o.on("-n fields","--named fields",String, "Print named fields") do |s| options.fields = s.split(/,/) end - o.on("-e filter","--exec filter",String, "Execute filter") do |s| + o.on("-e filter","--exec filter",String, "Evaluate filter") do |s| options.exec = s end