Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding options to filter

  • Loading branch information...
commit 45bda27bf36ca94768e3a3a940ab3eb5ec88e1d4 1 parent f050b41
@pjotrp authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 bin/fasta_filter.rb
View
9 bin/fasta_filter.rb
@@ -30,11 +30,15 @@ def self.parse(args)
options.codonize = b
end
- opts.on("--min [size]",
+ opts.on("--min size",
"Set minimum sequence size") do |min|
options.min = min.to_i
end
+ opts.on("--id","Write out ID only") do |b|
+ options.id = b
+ end
+
opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
options.verbose = v
end
@@ -62,7 +66,8 @@ def self.parse(args)
size = rec.seq.size
rec.seq = rec.seq[0..size - (size % 3) - 1]
end
- next if options.min and req.seq.size < options.min
+ next if options.min and rec.seq.size < options.min
+ rec.descr = rec.id if options.id
print rec.to_fasta
}
Please sign in to comment.
Something went wrong with that request. Please try again.