annotate NEUMA-1.2.1/auto_NEUMA_SE.pl @ 0:c44c43d185ef draft default tip

NEUMA-1.2.1 Uploaded
author chawhwa
date Thu, 08 Aug 2013 00:46:13 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
1 #!/usr/bin/perl
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
2
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
3 if(@ARGV<9) { print "usage: $0 [options] -L=<read_length> -i=<input_file> -U=<EUMA_prefix(fullpath, before .gEUMA or .iEUMA)> --g2m=<gene2NM_file> --g2s=<gene2symbol_file> -b=<bowtie_dir(eg.bin/bowtie-0.12.7)> --bi=<bowtieindex> -o=<outputdir> -s=<sample_name>\n\nOrder of arguments can be interchangeable.\n\n"; exit; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
4
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
5
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
6
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
7 ## options ##
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
8 ($fastoption)= grep /^-f=/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
9 if(!defined($fastoption)){$fastoption='q'; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
10 else { $fastoption =~s/^-f=//; if($fastoption !~/^[fq]$/) { die "wrong file type (-f).\n"; } }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
11
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
12 ($coding_option)= grep /^-c=/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
13 if(!defined($coding_option)){$coding_option='n'; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
14 else { $coding_option =~s/^-c=//; if($coding_option !~/^[nc]$/) { die "wrong coding option (-c).\n"; } }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
15
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
16 ($datatype)= grep /^-d=/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
17 if(!defined($datatype)){$datatype='R'; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
18 else { $datatype =~s/^-d=//; if($datatype !~/^[RE]$/) { die "wrong data type (-d).\n"; } }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
19
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
20 ($parallel)= grep /^-p=/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
21 if(!defined($parallel)){$parallel=1; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
22 else { $parallel =~s/^-p=//; if($parallel !~/^[\d]+$/) { die "wrong parallel (multi-thread) option (-p).\n"; } }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
23
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
24 ($EUMAcut)= grep /^-t=/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
25 if(!defined($EUMAcut)){$EUMAcut=50; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
26 else { $EUMAcut =~s/^-t=//; if($EUMAcut !~/^[\d\.]+$/) { die "wrong EUMAcut (-t).\n"; } }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
27
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
28 ($StrandSpecificity)= grep /^--str=/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
29 if(!defined($StrandSpecificity)){ $StrandSpecificity='N'; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
30 else { $StrandSpecificity =~s/^--str=//; if($StrandSpecificity !~/^[SRN]+$/) { die "wrong strand specificity (--str).\n"; } }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
31
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
32 ($get_gReadcount)= grep /^--gReadcount/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
33 if(!defined($get_gReadcount)){ $get_gReadcount=0; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
34 else { $get_gReadcount=1; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
35
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
36 ($mm)= grep /^--mm=/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
37 if(!defined($mm)){ $mm=0; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
38 else { $mm =~s/^--mm=//; if($mm !~/^[\d\.]+$/) { die "ERROR: wrong number of mismatches (--mm).\n"; } }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
39
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
40 ($noNIR)= grep /^--noNIR/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
41 if(!defined($noNIR)){ $noNIR=0; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
42 else { $noNIR=1; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
43
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
44 ($noNEUMA)= grep /^--noNEUMA/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
45 if(!defined($noNEUMA)){ $noNEUMA=0; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
46 else { $noNEUMA=1; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
47
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
48 if($noNIR==1 && $noNEUMA==0) { die "ERROR: --noNIR must be used together with --noNEUMA.\n"; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
49
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
50
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
51
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
52
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
53 ## required arguments ##
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
54
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
55 ($READ_LENGTH)= grep /^-L=/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
56 if(!defined($READ_LENGTH)){ die "READ_LENGTH must be specified (-L).\n"; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
57 else { $READ_LENGTH =~s/^-L=//; if($READ_LENGTH !~/^[\d]+$/) { die "wrong READ_LENGTH (-L).\n"; } }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
58
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
59 ($input_fa)= grep /^-i=/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
60 if(!defined($input_fa)){ die "input_fa must be specified (-i).\n"; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
61 else { $input_fa =~s/^-i=//; if(!-e $input_fa) { die "wrong input_file (-i).\n"; } }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
62
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
63 ($EUMAprefix)= grep /^-U=/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
64 if(!defined($EUMAprefix)){ die "EUMAprefix must be specified (-U).\n"; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
65 else { $EUMAprefix =~s/^-U=//; if(!-e $EUMAprefix.".gEUMA" || !-e $EUMAprefix.".iEUMA") { die "wrong EUMAprefix (-U).\n"; } }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
66
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
67 ($gene2NM_file)= grep /^--g2m=/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
68 if(!defined($gene2NM_file)){ die "gene2NM_file must be specified (--g2m).\n"; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
69 else { $gene2NM_file =~s/^--g2m=//; if(!-e $gene2NM_file) { die "wrong gene2NM_file (--g2m).\n"; } }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
70
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
71 ($gene2symbol_file)= grep /^--g2s=/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
72 if(!defined($gene2symbol_file)){ die "gene2symbol_file must be specified (--g2s).\n"; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
73 else { $gene2symbol_file =~s/^--g2s=//; if(!-e $gene2symbol_file) { die "wrong gene2symbol_file (--g2s).\n"; } }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
74
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
75 ($bowtie_dir)= grep /^-b=/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
76 if(!defined($bowtie_dir)){ die "bowtie_dir must be specified (-b).\n"; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
77 else { $bowtie_dir =~s/^-b=//; if(!-d $bowtie_dir || !-e "$bowtie_dir/bowtie") { die "wrong bowtie_dir(please avoid using '~') (-b).\n"; } }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
78
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
79 ($bowtieindex)= grep /^--bi=/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
80 if(!defined($bowtieindex)){ die "bowtieindex must be specified (--bi).\n"; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
81 else { $bowtieindex =~s/^--bi=//; if(!-e "$bowtieindex.1.ebwt") { die "wrong bowtieindex (--bi).\n"; } }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
82
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
83 ($basedir)= grep /^-o=/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
84 if(!defined($basedir)){ die "output dir must be specified (-o).\n"; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
85 else { $basedir =~s/^-o=//; if($basedir=~/~/) { die "wrong base_dir(please avoid using '~') (-o).\n"; } }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
86
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
87 ($sample)= grep /^-s=/, @ARGV;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
88 if(!defined($sample)){ die "sample name must be specified (-s).\n"; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
89 else { $sample =~s/^-s=//; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
90
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
91
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
92 ##############
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
93
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
94
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
95 my $coding='';
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
96 if($coding_option eq 'n') {$coding='';}
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
97 elsif($coding_option eq 'c') {$coding='-C';}
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
98 else { die "Error: invalid coding option.\n"; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
99
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
100 if($datatype eq 'R') { $mapping_stat_column = 1; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
101 elsif($datatype eq 'E') { $mapping_stat_column = 3; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
102 else { die "Error: wrong datatype.\n"; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
103
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
104 if($StrandSpecificity eq 'S') { $bowtie_strand_option = "--norc"; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
105 elsif($StrandSpecificity eq 'R') { $bowtie_strand_option = "--nofc"; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
106 else { $bowtie_strand_option = ""; }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
107
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
108
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
109 ($scriptdir) = $0 =~ /(.+)\/[^\/]+$/;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
110
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
111 $bowtieout_dir = "$basedir/bowtieout";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
112 $readcount_dir = "$basedir/readcount";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
113 $FVKMdir = "$basedir/FVKM";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
114 $LVKMdir = "$basedir/LVKM";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
115
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
116 $bowtieoutfile = "$bowtieout_dir/$sample.single.mm$mm.bowtieout";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
117 $bestbowtieoutfile = "$bowtieout_dir/$sample.single.mm$mm.best.bowtieout";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
118 $mapping_stat_file = "$basedir/mapping_stat.$sample.single";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
119
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
120 `mkdir -p $bowtieout_dir`;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
121 `mkdir -p $readcount_dir`;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
122 `mkdir -p $FVKMdir`;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
123 `mkdir -p $LVKMdir`;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
124
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
125 `dos2unix $gene2NM_file`;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
126 `dos2unix $gene2symbol_file`;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
127
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
128
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
129 #$perlcommand = "perl -I $scriptdir";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
130 $perlcommand = "perl";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
131 $bestbowtieout_script = "$scriptdir/filter.best.from.bowtieout.3.pl";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
132 $bowtieout2mappingstat_script = "$scriptdir/bowtieout2mappingstat.3.pl";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
133 $bowtieout2readcount_script = "$scriptdir/bowtie2genecount.11.pl";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
134 $NIR2LVKM_script = " $scriptdir/NIR2LVKM_SE.pl";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
135
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
136 =cut
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
137 print STDERR "Mapping reads using bowtie...\n";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
138 `$bowtie_dir/bowtie -$fastoption $coding -a -v $mm --suppress 5,6,7 -p $parallel -m 100 $bowtie_strand_option $bowtieindex $input_fa > $bowtieoutfile`;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
139
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
140
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
141
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
142 print STDERR "Filtering best-matching alignments...\n";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
143 if($mm > 0) {
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
144 system("$perlcommand $bestbowtieout_script -d $datatype --rm $bowtieoutfile 0");
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
145 }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
146 else {
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
147 system("mv $bowtieoutfile $bestbowtieoutfile");
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
148 }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
149
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
150 print STDERR "Computing the mapping stat...\n";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
151 system("$perlcommand $bowtieout2mappingstat_script -d $datatype $bestbowtieoutfile $sample 0 > $mapping_stat_file");
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
152 print STDERR "Mapping stat :\n";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
153 system("cat $mapping_stat_file");
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
154
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
155 if($noNIR==0){
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
156 system("$perlcommand $bowtieout2readcount_script -d $datatype --gNIR -f -s $sample -v $gene2NM_file $bestbowtieoutfile 0 > $readcount_dir/$sample.mm$mm.gNIR");
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
157 system("$perlcommand $bowtieout2readcount_script -d $datatype --iNIR -f -s $sample -v $gene2NM_file $bestbowtieoutfile 0 > $readcount_dir/$sample.mm$mm.iNIR");
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
158 }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
159 =cut
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
160 #if($get_gReadcount==1) {
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
161 system("$perlcommand $bowtieout2readcount_script -d $datatype -f -s $sample -v $gene2NM_file $bestbowtieoutfile 0 > $readcount_dir/$sample.mm$mm.gReadcount");
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
162 #}
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
163
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
164
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
165 =cut
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
166
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
167 if($noNEUMA==0){
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
168 print STDERR "Computing FVKM and LVKM...\n";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
169 `$perlcommand $NIR2LVKM_script $sample $readcount_dir mm$mm $EUMAprefix $FVKMdir $LVKMdir $EUMAcut $mapping_stat_column $mapping_stat_file 0 2 $gene2NM_file $gene2symbol_file $datatype $scriptdir`;
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
170 }
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
171
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
172 print STDERR "Done.\n";
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
173
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
174
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
175
c44c43d185ef NEUMA-1.2.1 Uploaded
chawhwa
parents:
diff changeset
176