Skip to content
Snippets Groups Projects
Commit 2dbf2b7b authored by Shaman Narayanasamy's avatar Shaman Narayanasamy
Browse files

Add perl script to filter length

parent 2103bc06
No related branches found
No related tags found
No related merge requests found
## removesmalls.pl
#
#!/usr/bin/perl
use strict;
use warnings;
my $minlen = shift or die "Error: `minlen` parameter not provided\n";
{
local $/=">";
while(<>) {
chomp;
next unless /\w/;
s/>$//gs;
my @chunk = split /\n/;
my $header = shift @chunk;
my $seqlen = length join "", @chunk;
print ">$_" if($seqlen >= $minlen);
}
local $/="\n";
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment