2142 days ago
Perl script to Mutate a DNA Sequence
...urrent_base); substr($dna,$position,1,$newbase); return $dna; } sub randomposition { my($string) = @_; return int rand length $string; } sub randomelement {...2913 days ago
Retrieve NCBI GenBank records with a range of accession numbers
#!/usr/bin/perl #FILE: ncbi_search.pl #AUTH: Paul Stothard (paul.stothard@gmail.com) use warnings; use strict; use Getopt::Long; use LWP::Simple; use URI::Es...2913 days ago
Find and replace ambiguous characters in fasta file with Perl and Bioperl
...TDOUT, -format => $format); foreach my $s (@seqArr) { $seqOut->write_seq($s); } } exit; sub AmbiguousChar { my $string = shift; $string =~ s/[ATGC-]//g; $stri...2912 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
Generating a random string with Perl
...rl # This function generates random strings of a given length sub generate_random_string { my $length_of_randomstri...ift;# the length of # the random string to generate my @chars=('a...between 0 and scalar @chars $random_string.=$chars[rand @chars]; } r...2905 days ago
Implementation of biological random mutation with Perl
#!/usr/bin/perl -w use strict; use warnings; #sequence for a better recognition my $DNA="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA \ n";...2899 days ago
Perl subroutine to read and write files
# Input output (InOut) the file # usage: # @array = InOut('read',$file) # $string = InOut('read',$file) # InOut('write',$file,\$string) # InOut('write',$file,\@array) #$string = "YO!"; #InOut('write','f...2863 days ago
2690 days ago