Check if your coputer ready to use BioPerl
#!/usr/bin/perl use strict; use warnings; #bioperl example code use strict; use warnings; #make the bioperl module (class) accessible to your program use Bio::Seq; print"ok - ready to use Bio::Seq";2902 days ago
Find and replace ambiguous characters in fasta file with Perl and Bioperl
#!/usr/bin/perl -w my $usage="\nU...". "Print out the name of sequences with characters other t..."If multiple files are given, sequences in all files are marged...my $format = "fasta"; my @seqArr = (); @ARGV = ('-') unl...f (defined($opt_m)) { my $seqOut = Bio::SeqIO->new(-fs => \...2899 days ago
2895 days ago
Count GC Content in nucleotide sequence with Perl
#!/usr/bin/perl -w ### Usage: get_gc_content.pl...otal Count\tG Count\tC Count\tA Count\tT Count\n"; $seq = ""; while () { chomp;...f (/^>/) { #finish up previous line. if (length($seq) > 0) { &process_it;...2890 days ago
Perl script to extract fasta sequence by matching name/ids !!
#!/usr/bin/perl use strict; use warnings; use Text::Trim qw(trim); #Usage perl extractSeqbyID.pl ids.txt seq.fasta Result.fasta $ARGV[2...2860 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_po...; my $end_pos = $ARGV[2]; my $in = Bio::SeqIO->new ( -file => $in_file, -format => 'fasta'); my $out = Bio::SeqIO->new( -file => ">$in_file.o...2612 days ago
Perl script to insert sequence in contig !!
# sub signature: #insertSEQintoCONTIGatLOC( SEQ , CONTIG , LOC ) ; sub insertSEQintoCONTIGatLOC{ my ( $SEQ , $CONTIG , $LOC ) = @_; substr( $CONTIG , $LOC , -length($CONTIG) ) = $SEQ ; return $CONTIG; } $s...2693 days ago
2689 days ago
2678 days ago
Perl script to remove the duplicate sequences from multifasta file
use strict; use Bio::SeqIO; my %unique; my $file = "myseqs.fa"; my $seqio = Bio::SeqIO->new(-file => $file, -format => "fasta"); my $outseq =...-file => ">$file.uniq", -format => "fasta"); while(my $seqs = $seqio->next_seq) { my...2675 days ago