Mercurial > repos > geert-vandeweyer > clusterfast
comparison run_cf0611.pl @ 26:9f96e2fa94ed draft
Create local tmp folder under /tmp instead of in galaxy_new_file_path location
author | geert-vandeweyer |
---|---|
date | Mon, 11 Aug 2014 05:22:08 -0400 |
parents | 9a26daf268da |
children |
comparison
equal
deleted
inserted
replaced
25:89f22d2a9dfe | 26:9f96e2fa94ed |
---|---|
95 # if refpaths is defined => split into seperate variables. | 95 # if refpaths is defined => split into seperate variables. |
96 if (defined($refpaths) && $refpaths ne '') { | 96 if (defined($refpaths) && $refpaths ne '') { |
97 ($novoindex, $twobit, $FASTA) = split(/;/,$refpaths); | 97 ($novoindex, $twobit, $FASTA) = split(/;/,$refpaths); |
98 } | 98 } |
99 | 99 |
100 if(! ( defined $inbam && defined $targets && defined $FASTA && defined $outdir && defined $novoindex && defined $twobit )) { | 100 if(! ( defined $inbam && defined $targets && defined $FASTA && defined $novoindex && defined $twobit )) { |
101 print STDERR "Usage: run_cf_0611.pl -b inbam -o outdir -f fasta -t targets -d distance -i novoindex -r rmtmp -m1 min_pairs -m2 min_splits -t genome.2bit\n"; | 101 print STDERR "Usage: run_cf_0611.pl -b inbam -o outdir -f fasta -t targets -d distance -i novoindex -r rmtmp -m1 min_pairs -m2 min_splits -t genome.2bit\n"; |
102 exit(1); | 102 exit(1); |
103 } | 103 } |
104 elsif (! (-e $inbam && -e $targets && -e $FASTA && -e $novoindex && -e $twobit)) { | 104 elsif (! (-e $inbam && -e $targets && -e $FASTA && -e $novoindex && -e $twobit)) { |
105 print STDERR "Critical file missing.\n"; | 105 print STDERR "Critical file missing.\n"; |
106 exit(1); | 106 exit(1); |
107 } | 107 } |
108 | 108 |
109 # output dir specified? | |
110 if (!defined($outdir)) { | |
111 $outdir = "/tmp/cf_tmp_".int(rand(1000)); | |
112 while (-d $outdir) { | |
113 $outdir = "/tmp/cf_tmp_".int(rand(1000)); | |
114 } | |
115 } | |
116 # prepare output dir | |
109 make_empty_output(); | 117 make_empty_output(); |
110 $outdir = abs_path($outdir); | 118 $outdir = abs_path($outdir); |
111 | 119 |
112 ## convert Targets.bed to targets.picard | 120 ## convert Targets.bed to targets.picard |
113 my $cmd="${SAMTOOLS}samtools view -H $inbam > $outdir/Targets.picard"; | 121 my $cmd="${SAMTOOLS}samtools view -H $inbam > $outdir/Targets.picard"; |