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 OUT...2896 days ago
2893 days ago
Perl subroutine to read and write files
# Input output (InOut) the file # usage: # @array = InOut('read',$file) # $string = InOut('read',$file) # InOut('write',$file,\$string) # InOut('write',$file,\@...2887 days ago
Perl script introduces control structures, arrays and hashes.
#!/usr/bin/env perl use strict; use warnings; my @first_array = ('DNA', 'ATGCGTGC', 5, 'RNA', 'AUGC'); pri...rst_array; # implicit way print "Scalar of array: $size_of_array\n\n"; print "Per...2883 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-...2648 days ago
Perl script to insert sequence in contig !!
# sub signature: #insertSEQintoCONTIGatLOC( SEQ , CONTIG , LOC ) ; sub insertSEQintoCONTIGatLOC{ my ( $SEQ , $CONTIG , $LOC ) = @_; substr( $CONTIG , $LOC ,...2730 days ago
2726 days ago
2715 days ago
2715 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 = Bio::SeqIO->ne...2711 days ago