-
Notifications
You must be signed in to change notification settings - Fork 9
/
miARma
executable file
·95 lines (80 loc) · 2.7 KB
/
miARma
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/perl
#########################################################################
# miARma, miRNA and RNASeq multiprocess Analysis #
# #
# Created at Computational Biology and Bioinformatics Group (CbBio) #
# Institute of Biomedicine of Seville. IBIS (Spain) #
# Modified and Updated at Bioinformatics Unit at IPBLN-CSIC #
# Institue for Parasitology and Biomedicine Lopez-Neyra (IPBLN-CSIC) #
# Granada (Spain) #
# Copyright (c) 2017 IBIS & IPBLN. All rights reserved. #
# mail : miARma-devel@idoproteins.com #
#########################################################################
use strict;
my $configuration_file;
my $miARmaPath;
my $check_input;
sub help{
print_header();
my $usage = qq{
Usage:\n
perl $0 file.ini [options]
Options:
-check Instead of running the analysis contained in file.ini, it checks that parameters are correct and then quits.
-help Print this help.
};
print STDERR $usage;
exit(1);
}
sub print_header{
system("clear");
print "#########################################################################
# miARma, miRNA and RNASeq Multiprocess Analysis #
# miARma v 1.7.3 (Jul-2018) #
# #
# Created at Computational Biology and Bioinformatics Group (CbBio) #
# Institute of Biomedicine of Seville. IBIS (Spain) #
# Modified and Updated at Bioinformatics Unit at IPBLN-CSIC #
# Institue for Parasitology and Biomedicine Lopez-Neyra (IPBLN-CSIC). #
# Granada (Spain) #
# Copyright (c) 2018 IBIS & IPBLN. All rights reserved. #
# mail : miARma-devel\@idoproteins.com #
#########################################################################\n";
}
BEGIN {
#checking input parameter
if(@ARGV<1){
help();
}
if($ARGV[0] eq "help" or $ARGV[0] eq "-help" or $ARGV[0] eq "--help"){
help();
}
# configuration file
$configuration_file=$ARGV[0];
$check_input=$ARGV[1];
my $check=0;
# Searching for needed parameters before start
open(FILE,$configuration_file) || help();
while(<FILE>){
chomp;
if(lc($_) =~ /miarmapath/){
$miARmaPath=$_;
$miARmaPath=~s/.+=(.+)/$1/g;
$check=1;
}
}
close FILE;
if($check ==0){
print STDERR "\nSEVERE ERROR :: $configuration_file is incorrect. Please check the parameter miARmaPath under [General] Section\n\n";
exit;
}
}
#loading miARma libraries
use lib "$miARmaPath/lib/";
use lib "$miARmaPath/lib/Perl";
use CbBio::RNASeq::miARma;
run_miARma(
config=>$configuration_file,
miARmaPath=>$miARmaPath,
check=>$check_input,
)