Insert the sequence at desire location in multi-fasta file with Perl
#!/usr/bin/perl use warnings; use strict; use Bio::SeqIO; use Bio::Seq; use File::Co...ld not overlaps --- next postition shold be bigger than firstpos+alienLen open(my $fh, '2355 days ago
Create genome scaffolding with Perl
#!/usr/bin/perl use warnings; use strict; use...ME psl_scaffolder.pl - use self-mapped PSL file to scaffold a genom...} # if different, convert to upper case to simplify lookup m...x for contig names "pid" => 90, # percent ID threshold "trimli...2350 days ago
Plot the clock using Lastz -gerenal outfile
...; use warnings; use Statistics::R ; use List::Util qw(sum); #Usage perl clockPlot.pl Palindrome.pal...s::R->new() ; $R->startR ; my $fileN=$ARGV[0]; my $mSize=$ARGV[1]; open (my $fh2, $fileN) or die "Co...2340 days ago
Remove duplicate lines with perl
#! perl -sw use strict; my %lines; #open DATA, $ARGV[0] or die "Couldn't open $ARGV[0]: $!\n"; while () { print if not $lines{$_}++; } __DATA__ apple apple plum vinegar apple banana banana banana apple2334 days ago
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$/";...2334 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 !~ /...2334 days ago
Plot the density of genes in R
#column1 = chromosome name and column2 = start position of the gene # check if ggplot2 is installed, if so, load it, # if not, install and load it if("ggplot2"...2325 days ago
2305 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: `minlen` parameter not provided\n"; { local $/=">"; while() { chomp;...2292 days ago
Perl script to convert fastq to fasta file
#!/usr/bin/env perl use strict; use warnings; use Bio::Factory::EMBOSS; my $usage = "perl $0 in.fq out.fa"; my $infi...2292 days ago