2907 days ago
Blast result parser with Perl and Bioperl
...ong Bai # It may be freely distributed under GNU General Public Lic...hit, the following results are reported: # accesion number, length,...cal # The results are tab-deliminated and ready for import into a...int the header info for tab-deliminated columns print OUT "query_na...2911 days ago
Find and replace ambiguous characters in fasta file with Perl and Bioperl
...-h: help\n". " -m: missing character\n". "Print out the name of sequences with characters other than ATGC-.\n"....'?' will place ? to the ambigous characters.\n" . "If multiple fil...oreach my $s (@seqArr) { $seqOut->write_seq($s); } } exit;...2911 days ago
2911 days ago
Perl to print indivisual nucleotide from a sequence!
#!/usr/bin/perl use strict; use warnings; my $string = "ATGCTTGCGT?AAATG??CT?GCGTA"; my @chars = split("", $string); print "First character: $chars[0]\n";2911 days ago
2906 days ago
Find the number of each 2 consecutive characters AA, AC,AG,AT,CC,CA... with Perl
...bin/perl -w use strict; my $subject = "AACGTACTGACGTACTGGTTGGTACGA"; my %results = (); while ($subject =~ m/[ACTG][ATGC]/g) { # matched text = $& if(exists $re...2906 days ago
Generating a random string with Perl
#!/usr/bin/perl # This function generates random strings of a given length sub generate_random_string { my $length...th of # the random string to generate my @chars=('a'..'z','A'.....string) { # rand @chars will generate a random # number between...2904 days ago
Needleman-Wunsch Algorithm in Perl
...# Needleman-Wunsch global alignment algo (GOTHO 1982 mod) # usage statement die "usage: $0 \n" u...ne my ($seq1, $seq2, $smfile, $gapcost) = @ARGV; # scoring scheme (instead of using fixed MATCH and MI...2902 days ago
Count GC Content in nucleotide sequence with Perl
...---- #Deal with passed parameters #-------------------------...) { print "Couldn't create $out_file\n"; exit; }...------ print OUT "ID\t% GCContent\tTotal Count\tG Count\tC Co...t; } else { $gccontent = 0; } print OUT...2902 days ago