forked from GRIAC/system_genetics
24 lines
884 B
Perl
Executable File
24 lines
884 B
Perl
Executable File
#!/usr/bin/perl -w
|
|
use strict;
|
|
|
|
# this script was made with consideration for UMI-deduplicating.
|
|
# this is because there are three .fastq files for each sample.
|
|
# the provider states the info about which file contains which info,
|
|
# but in our case, from GenomeScan in Leiden, R2 contains the UMI read.
|
|
# R1 and R3 contain sequencing information from paired-end sequencing
|
|
|
|
foreach my $file1 ( <*_R1.fastq.gz> ) {
|
|
my $file2 = $file1;
|
|
$file2 =~ s/\_R1\./_R2./;
|
|
my $file3 =~ s/\_R3\./_R2./;
|
|
die "file1==file2" if $file1 eq $file2;
|
|
my $sample = $file1;
|
|
$sample =~ s/\_R1\.fastq\.gz$//;
|
|
mkdir $sample.'_R1', 0700;
|
|
system join(' ', 'fastqc', '-o', $sample.'_R1', $file1);
|
|
mkdir $sample.'_R2', 0700;
|
|
system join(' ', 'fastqc', '-o', $sample.'_R2', $file2);
|
|
mkdir $sample.'_R3', 0700;
|
|
system join(' ', 'fastqc', '-o', $sample.'_R3', $file3)
|
|
}
|