Skip to content
Snippets Groups Projects
Commit 468ff7a8 authored by Jeremy Mathews's avatar Jeremy Mathews
Browse files

Fix check design file to not die

parent 87bd5bfe
Branches
Tags
1 merge request!7Resolve "Check file inputs"
Pipeline #4176 failed with stage
in 2 hours, 22 minutes, and 38 seconds
......@@ -54,15 +54,14 @@ while (my $line = <DFILE>) {
my $j = $lnct %% 2;
$hash{SampleGroup} = $grp[$j];
}
$lnct ++;
$hash{SampleGroup} =~ s/_//g;
unless ($hash{FqR1} =~ m/_good.fastq.gz/) {
my $name = $hash{FqR1};
$name =~ s/.f.*/_good.fastq.gz/;
unless ($hash{FqR1} eq $name) {
$hash{FqR1} = $name;
unless (-e ($name)) {
die "Unable to find fastq read 1\n${name}\n";
}
next unless (-e ($name));
}
}
$hash{FqR2} = 'na' unless ($hash{FqR2});
......@@ -71,9 +70,7 @@ while (my $line = <DFILE>) {
$name =~ s/.f.*/_good.fastq.gz/;
unless ($hash{FqR2} eq $name) {
$hash{FqR2} = $name;
unless (-e ($name)) {
die "Unable to find fastq read 2\n${name}\n";
}
next unless (-e ($name));
}
}
my @line;
......@@ -82,5 +79,4 @@ while (my $line = <DFILE>) {
}
print OUT join("\t",@line),"\n";
print join(",",$hash{SampleID},$hash{FqR1},$hash{FqR2}),"\n";
$lnct ++;
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment