to make my input files I used the following code:
sub get_index(){ my $file = shift; my $indexfile; open FILE,$file; while(<FILE>){ chomp; my @array = split /\,/,$_; if($#array){ $indexfile->{$array[1]} = $array[0]; } } close FILE; return $indexfile;
on a .txt file that looks like this :
1,TCGCCTTA
2,CTAGTACG
3,TTCTGCCT
4,GCTCAGGA
5,AGCGTAGC
6,CATGCCTA
7,GTAGAGAG
8,CCTCTCTG
9,TAGATCGC
10,CTCTCTAT
11,TATCCTCT
12,AGAGTAGA
13,GCGTAAGA
14,ACTGCATA
15,AAGGAGTA
16,CTAAGCCT
along with input files that are added as I iterate over a while loop. These files look like:
p1='CTAAGCCT'
I suppose its possible that p1 is occasionally an empty string, I am not sure how I would print my entire list of query strings.
please let me know if you need more information.
In reply to Re: Help with function, count matches and store in hash & retrieve sorted
by Pathogenomix
in thread Help with function, count matches and store in hash & retrieve sorted
by Pathogenomix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |