Remove the duplicated line present only next to each other with Perl
#!/usr/bin/perl use strict; use warnings; { $_ = ; my $next_line; while( $next_line = ) { #print "current line: $_ -- next line: $next_line$/"; print $...2345 days ago
Extract the values between to user defined string with Perl
#!/usr/bin/perl -w use strict; while () { process_record() if /^\s*START/; } sub process_record { my $line; while (defined ($line = ) and $line !~ /^\s*END/)...2345 days ago
Perl script to remove fasta sequences in multifasta file with certain length threshold
#!/usr/bin/perl use strict; use warnings; my $minlen = shift or die "Error:...next unless /\w/; s/>$//gs; my @chunk = split /\n/; my $header = shift @chunk; my $seqlen = length join "", @ch...2303 days ago
Perl script to convert fastq to fasta file
...erl use strict; use warnings; use Bio::Factory::EMBOSS; my $usage = "perl $0 in.fq out.fa"; my $infile = shift or die $usag...ift or die $usage; my $factory = Bio::Factory::EMBOSS->new; my $seqret = $factory->program(...2303 days ago
Perl script to find palindromic regions in DNA sequences
use strict; use warnings; my $pp = qr/(?: (\w) (?1) \g{-1} | \w? )/ix; my $filename = $ARGV[0]; open(my $fh, '2206 days ago
Perl script to extract the uniq Ids
#!/usr/bin/perl -w use strict; use warnings; use List::Uniq ':all'; open(my $val, "2291 days ago
Perl script to find missing and move to desire folder
#!/usr/bin/perl -w use strict; use warnings; open(my $ids, "2291 days ago
Perl script to count the number of files in a directory with regex
#!/usr/bin/perl use strict; use warnings; my @allNames=("_D14_","_B14_","_B15_...38_","_E3B2_","_E3T1_","_HPRIM14_","_H158_"); my @files = glob("*.scf *.SCF"); foreach my $name (@allNames) { my $nName=lc ($name); my $cnt=0...2289 days ago
Perl script to read multi fasta sequence one by one
...use strict; use warnings; #USAGE #perl rohanRun.pl seq.fa my $outfile='tmp.fa'; my $fastaSeq_ref = readfasta ("$...rint OUT "$key\n$fastaSeq{$key}\n"; } sub readfasta { (my $file)=@_; my %sequence;...2273 days ago
Biological Sequence handling with Perl !
...e as a string sub seq { my $self = shift; croak ref...sequence sub reverse { my $self = shift; my $rever...e vars '@ISA'; :Generic'; my %CODON_TABLE = (...[0]) if defined($_[0]); my $seq = $self->{'data'};...2233 days ago