Find the number of each 2 consecutive characters AA, AC,AG,AT,CC,CA... with Perl
...ults{$&}) { $results{$&}++ } else { $results{$&} = 1; } } foreach (sort keys %results) { print "$_ :...2922 days ago
Perl script to extract fasta sequence by matching name/ids !!
...$list" or die; while () { chomp; next if /^\s*$/; s/>//g; my @ids=split (/\t/, $_); $select{$ids[0]} = 1; } my $size = keys %select; print "Total Ids $s...2888 days ago
Perl script introduces control structures, arrays and hashes.
...GC', 'Number of seqs' => 2 ); print $sequence{'DNA'}, "\n"; # Control Loop: foreach foreach my $key (sort (keys %sequence)) { print "Key...2875 days ago
2706 days ago
Calculate ATGC percentage in parallel with perl
...e's your key my $seq = $seqobj->seq; # and there's your value $sequences{$id} = $seq; } my $max_procs = 5; my @names = keys %sequences; # hash to re...2669 days ago
Calculate some statistics for a DNA alignment with Perl
...".$results->[0]{'Seq1'}." and ".$results->[0]{'Seq2'}."\n"; for (sort keys %{$results->[0]} ){ ne...mparing ". $an->{'Seq1'}." and ". $an->{'Seq2'}. " \n"; for (sort keys %$an ){ next if /S...2662 days ago
Calculate Dinucleotide Frequency with Perl
#!/usr/bin/perl -w use strict; my ($genome, $head, $tail); my (%mono_nt, %di_nt); $/ = ">"; open my $fasta, '2351 days ago
Clump Finding Problem Solved with Perl
...max) { $max = $km;} #print "$km\t$myStr\n"; $myHash{$myStr}=$km; } #Print all key which have matching values foreach my $name (keys %myHash){ print "$name "...2347 days ago
Create genome scaffolding with Perl
...: identity (%f) too low\n", # $qName, $tName, $pid); } } printf(STDERR " done\n"); my %displayed = (); foreach my $seqID (sort(keys(%targetSeqs))){ my $fullNa...2321 days ago
Plot the clock using Lastz -gerenal outfile
...open (my $fh2, $fileN) or die "Could not open file $fileN $!"; my (@allKeys, @allFreq); my %pHash; while...$chr[0]"."_"."$arr[3]"; $pHash{$newChr}++; } } foreach my $val (keys %pHash) { #next if $pHash{$...2312 days ago