Hello everybody!
I got a script problem in Perl. I want to extract the sequences of my Fastq file (the second line of each block of four lines), regroups the identical sequences and count the number of times they are in the original file.
So I made a little script Perl....................that doesn't work... Can anyone help me please?
Here is my script:
I got a script problem in Perl. I want to extract the sequences of my Fastq file (the second line of each block of four lines), regroups the identical sequences and count the number of times they are in the original file.
So I made a little script Perl....................that doesn't work... Can anyone help me please?
Here is my script:
Code:
$fastq="C:/Users/fastqtest.fastq"; open(IN, "$fastq"); $resultat="C:/Users/resultat.fastq"; open(SEQ, ">$resultat"); my %Hash; while (<IN>) { my $seq=<IN>; for (my $i = 0; $i <= IN.length(); $i++) { if ($i % 4 == 1) { $Hash{$seq}++; } } } print SEQ $Hash; close (IN); close (SEQ); print "Script executed"; <STDIN>
Comment