Skip to content

Commit e915bd1

Browse files
committed
Merge branch 'master' of https://github.com/UBrau/SPARpipe
2 parents 43f08ec + f5361c2 commit e915bd1

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

2_align.pl

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,22 @@
6565

6666
# Run bowtie on each file
6767
foreach my $input (@ARGV) {
68+
## Check conformity of file names
69+
my $volume;
70+
my $dirs;
71+
my $sfile;
72+
($volume,$dirs,$sfile) = File::Spec->splitpath($input);
73+
74+
$sfile =~ /^[^_]+_W[0-9]+.*_(Fwd|Rev)\.(fq|fastq)(\.gz|)$/ ||
75+
die "Input file name $sfile is misshapen. Must match pattern ^[^_]+_W[0-9]+.*_(Fwd|Rev)\.(fq|fastq)(\.gz|)$\n";
76+
6877
my $cmdline = "$path/$0 --junc=$junc --outDir=$outDir --cores=$cores --trim5=$trim5 --trim3=$trim3";
6978

7079
$cmdline .= " $btopt $input";
7180
print $logFH "$cmdline";
7281
system "$path/bin/run_bowtie.sh $input $junc ".$outDir."/map $cores $trim5 $trim3 \"$btopt\" $path/bin" and
7382
die "[2] Error during bowtie mapping of $input\n";
7483

75-
my $volume;
76-
my $dirs;
77-
my $sfile;
78-
($volume,$dirs,$sfile) = File::Spec->splitpath($input);
7984
$sfile =~ s/\.(fastq|fq).*//;
8085
my $ssize = -s "$outDir/map/$sfile.stats.txt";
8186
if ($ssize > 0) {

0 commit comments

Comments
 (0)