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";2914 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 => \...2911 days ago
2907 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;...2902 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...2872 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...2624 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...2705 days ago
2701 days ago
2690 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...2687 days ago