-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathgffParse.pl
More file actions
executable file
·38 lines (34 loc) · 897 Bytes
/
gffParse.pl
File metadata and controls
executable file
·38 lines (34 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/perl
# Script: gffParse.pl
# Description:
# Author: Steven Ahrendt
# email: sahrendt0@gmail.com
# Date: 07.09.2014
##################################
use warnings;
use strict;
use Getopt::Long;
use lib '/rhome/sahrendt/Scripts';
use Bio::Tools::GFF;
#####-----Global Variables-----#####
my $input;
my ($help,$verb);
GetOptions ('i|input=s' => \$input,
'h|help' => \$help,
'v|verbose' => \$verb);
my $usage = "Usage: gffParse.pl -i input\n\n";
die $usage if $help;
die "No input.\n$usage" if (!$input);
#####-----Main-----#####
# specify input via -fh or -file
my $gffio = Bio::Tools::GFF->new(-file => $input,
-gff_version => 2);
# loop over the input stream
while(my $feature = $gffio->next_feature())
{
print $feature->primary_tag(),"\n";
}
$gffio->close();
warn "Done.\n";
exit(0);
#####-----Subroutines-----#####