2934 days ago
Read lines from input file – print lines that match a regular expression
...chomp $line; if ($line =~ /^ATG?C*[ATCG]+?A{3,10}$/) { print "$line\n"; } } exit(); __DATA__ ATGCCCAA ATGCCCAAAA ATGCCCAAAAAAAAAAAAAAAAA A...2934 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";2931 days ago
2926 days ago
Find the number of each 2 consecutive characters AA, AC,AG,AT,CC,CA... with Perl
#!/usr/bin/perl -w use strict; my $subject = "AACGTACTGACGTACTGGTTGGTACGA"; my %results = (); while ($subject =~ m/[ACTG][ATGC]/g) { # matched text = $& if(exi...2926 days ago
Needleman-Wunsch Algorithm in Perl
...1; # +1 for letters that match my $MISMATCH = -1; # -1 for letters that mismatch my $GAP = $gapcost; # for any gap my %BLOSUM50 = (); my @aalist = (); # read substitut...2922 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"; my $I; my...2918 days ago
Blast script to index and extract sequence !!
...romosome, complete genome. AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTC...G TCACTAAATACTTTAACCAATATAGGCATAGCGCACAGACAGATAAAAATTACAGAGTAC # generate t...hromosome, complete genome AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAA...2869 days ago
Perl script to insert the DNA string in genome
...enome file) my $out = $ARGV[1]; # output fasta file my $chr="test"; #insertion chromosome my $pos=10; # position of the insertion my $seqI = "AAAA"; #sequence of the insertion...2676 days ago
Extract fasta sequence from a multifasta file with coordinates
#!/usr/bin/perl use Bio::DB::Fasta; #USAGE perl extractFASTAwithSIZE.pl finalSample_filtered.fa 0 1000 > aaaaaa.fa my $fastaFile = shift; my $querySizeST = shift; my $que...2549 days ago