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";2901 days ago
Find and replace ambiguous characters in fasta file with Perl and Bioperl
...ter\n". "Print out the name of sequences with characters other t..."If multiple files are given, sequences in all files are marged..._h)); my $format = "fasta"; my @seqArr = (); @ARGV = ('-') unl...if (defined($opt_m)) { my $seqOut = Bio::SeqIO->new(-fs => \...2899 days ago
2894 days ago
Count GC Content in nucleotide sequence with Perl
..."ID\t% GCContent\tTotal Count\tG Count\tC Count\tA Count\tT Count\n"; $seq = ""; while () { chomp; if (/^>/) { #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] or die "use extractSeqbyID.pl LIST FASTA OU...2859 days ago
Extract a range from genome file with perl.
...n/perl use strict; use warnings; use Bio::SeqIO; my $in_file = $ARGV[0];...V[1]; my $end_pos = $ARGV[2]; my $in = Bio::SeqIO->new ( -file => $in_file, -format => 'fasta'); my $out = Bio::SeqIO->new( -file => ">$in_file.o...2611 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
2677 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...2674 days ago