Perl script to remove the duplicate sequences from multifasta file
use strict; use Bio::SeqIO; my %unique; my...o = Bio::SeqIO->new(-file => $file, -format => "fasta"); my $outseq =...::SeqIO->new(-file => ">$file.uniq", -format => "fasta"); while(my $...exists($unique{$seq})) { $outseq->write_seq($seqs); $unique{$...2674 days ago
Perl script to insert the DNA string in genome
#!/usr/bin/perl use warnings; use strict; use Bio::...use Bio::Seq; my $file = $ARGV[0]; # input fasta file (genome file) my $out = $ARGV[1]; # output fasta file..."AAAA"; #sequence of the insertion my $seq_in = Bio::Seq...my $upstream=substr($seq->seq, 0, $pos);...2643 days ago
Calculate ATGC percentage in parallel with perl
#!/usr/bin/perl use strict; use Parallel::ForkManager; use Bio::SeqIO; #usage: perl testParallel.pl my %sequences; m...$seqobj->display_id; # there's your key my $seq = $s..._on_wait( sub { #print "** Have to wait for one c...2640 days ago
BASH script for SelfBLAST a genome
...blast and samtools installed in your system #Author: Jitendra Narayan #USAGE: ./...#Common settings FASTAFILE=MergedContigs.fasta MYDB=myDB O...me exists" else echo "Thanks for testing this script $USER; Me...all" ] then echo "You want entire sequence to blast" SEQ=$F...2636 days ago
Extract a range from genome file with perl.
#!/usr/bin/perl use strict; use warnings; use Bio::SeqIO; my $in_file = $ARGV[0]; my $start_pos = $ARGV[1]; my $end_pos = $ARGV[2]; my $in = Bio::SeqIO->new ( -file => $i...= Bio::SeqIO->new( -file => ">$in_file.out", -format => 'fasta'); while (m...2611 days ago
Calculate some statistics for a DNA alignment with Perl
...my $alignin = Bio::AlignIO->new(-format => 'emboss',...-file => 't/data/insulin.water'); my $aln = $alignin->nex...-method => 'Jukes-Cantor'); print $jcmatrix->prin...my $results = $stats->calc_KaKs_pair($alnobj, $seq1id, $seq2id);...2633 days ago
2620 days ago
Check overlapping range with Perl
#!/usr/bin/perl use strict; use warnings; my @ranges = 0; push @ranges, $ranges[-1] + 1 + int rand 200 for 1..10000; my @tests = ma..., \@tests); sub div { my ($border, $tests) = @_; my ($l...if (@$tests) { print "tests in range $ranges->[...2611 days ago
Extracting FASTA sequences based on position with perl script !!
#!/usr/bin/env perl #Uses: perl sub-seq.pl input.txt range use strict; use warnings; my $end = pop; my $start = pop; loc...while () { chomp; next unless /(.+)/; my ($header) = "$/$1_$start-$end\n";...2606 days ago
Transpose the file coordinates and plot dendrogram in R
#Save this as tr.awk { for (i=1; i2601 days ago