-
Notifications
You must be signed in to change notification settings - Fork 7
/
MakeNewReference.pl
executable file
·66 lines (47 loc) · 1.38 KB
/
MakeNewReference.pl
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
#!/usr/bin/perl
#########################################
# #
# Written by Kai Battenberg #
# Plant Symbiosis Research Team #
# #
#########################################
use strict;
use warnings;
use Getopt::Long;
#####SCRIPT DESCRIPTION#####
#Script "MakeNewReference.pl" given a genome file (FASTA), annotation file (GTF), and a genome name, generates a reference for cellranger.
###########
#####Options#####
print "\n\#\#\#\#\#Running MakeNewReference\#\#\#\#\#\n";
print "checking options.\n";
#setting the default values.
my $genome = "";
my $annotation = "";
my $name = "";
#making the options into external arguments.
GetOptions (
'genome=s' => \$genome,
'annotation=s' => \$annotation,
'name=s' => \$name
);
#checking for sequence type
if (!$genome) {
die "USAGE: option --genome <FASTA file> is required.\n";
}
elsif (!$annotation){
die "USAGE: option --annotation <GTF file> is required.\n";
}
elsif (!$name) {
die "USAGE: option --name <reference name> is required.\n";
}
print "check complete.\n\n";
##########
#####MAIN#####
print "making cellranger reference.\n";
system "cellranger mkref --genome=$name --fasta=$genome --genes=$annotation";
print "reference made.\n";
print "\#\#\#\#\#MakeNewReference COMPLETE\#\#\#\#\#\n\n";
##########
#####SUB#####
##########
__END__