script/assembly_hub_constructor.pl untested

filter: Statementstmt 0.0% 0 / 50 Branchbran 0.0% 0 / 12 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 8 Podpod n/a totaltotal 0.0% 0 / 73 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/env perl
2 # -*-CPerl-*-
3 # Last changed Time-stamp: <2016-02-04 12:48:53 mtw>
4 #
5 # Construct UCSC genome browser Assembly Hub and display various
6 # genomic sequence annotation data within the Hub
7 #
8 # ***********************************************************************
9 # * Copyright notice
10 # *
11 # * Copyright 2014 Michael T. Wolfinger <michael@wolfinger.eu>
12 # * Florian Eggenhofer <florian.eggenhofer@univie.ac.at>
13 # * All rights reserved
14 # *
15 # * This program is free software: you can redistribute it and/or modify
16 # * it under the terms of the GNU General Public License as published by
17 # * the Free Software Foundation, either version 3 of the License, or
18 # * (at your option) any later version.
19 # *
20 # * This program is distributed in the hope that it will be useful,
21 # * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # * GNU General Public License for more details.
24 # *
25 # * You should have received a copy of the GNU General Public License
26 # * along with this program. If not, see <http://www.gnu.org/licenses/>.
27 # *
28 # * This copyright notice MUST APPEAR in all copies of the script!
29 # ***********************************************************************
30  
31 use strict;
32 use warnings;
33 use Getopt::Long;
34 use Pod::Usage;
35 use Data::Dumper;
36 use File::Basename;
37 use Path::Class;
38 use Bio::ViennaNGS::UCSC qw( make_assembly_hub );
39  
40 #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#
41 #^^^^^^^^^^ Variables ^^^^^^^^^^^#
42 #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#
43  
44 my ($assembly_hub_return_value,$lf);
45 my $logname = "log.txt";
46 my $fasta_in = '-';
47 my $folder_in = '-';
48 my $dest = '.';
49 my $base_URL = '-';
50 my $big_wig_urls = '-';
51 #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#
52 #^^^^^^^^^^^^^^ Main ^^^^^^^^^^^^^#
53 #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#
54 Getopt::Long::config('no_ignore_case');
55 pod2usage(-verbose => 1) unless GetOptions("fa|f=s" => \$fasta_in,
56 "infolder|i=s" => \$folder_in,
57 "out|o=s" => \$dest,
58 "baseurl|b=s" => \$base_URL,
59 "bigwigs|w=s" => \$big_wig_urls,
60 "man" => sub{pod2usage(-verbose => 2)},
61 "help|h" => sub{pod2usage(1)}
62 );
63  
64 unless (-e $fasta_in){
65 warn "Could not find input Fasta file given via --fa option";
66 pod2usage(-verbose => 0);
67 }
68 unless (-d $folder_in){
69 warn "An input folder path is required and must be gi ven via --infolder option";
70 pod2usage(-verbose => 0);
71 }
72 unless ($base_URL =~ /^http/) {
73 warn "Base URL must be given in full format, eg http://foo.bar.com/Hubs/";
74 pod2usage(-verbose => 0);
75 }
76 unless ($dest =~ /\/$/){$dest.= "/";}
77 unless (-d $dest){
78 mkdir $dest or die $!;
79 }
80 $lf = file($dest,$logname);
81  
82 $assembly_hub_return_value = make_assembly_hub($fasta_in,$folder_in,$dest,$base_URL,$big_wig_urls,"$lf");
83  
84  
85 __END__