Calculate ATGC percentage in parallel with perl
#!/usr/bin/perl use strict; use Parallel::ForkManager; use Bio::SeqIO; #usage: perl testParallel.pl my %sequences; my $seqio = Bio::SeqI...2656 days ago
Calculate some statistics for a DNA alignment with Perl
use Bio::AlignIO; use Bio::Align::DNAStatistics; my $stats = Bio::Align::DNAStatistics->new(); my $alignin = Bio::AlignIO->new(-format => 'emboss',...ts of synonymous /nonsynonymous substitutions ## my $in = Bio::Alig...2650 days ago
Extract fasta sequence from a multifasta file with coordinates
#!/usr/bin/perl use Bio::DB::Fasta; #USAGE perl extractFASTAwithSIZE...ft; my $querySizeED = shift; my $db = Bio::DB::Fasta->new( $fastaFile )...d\n", "$sequence\n"; } __END__ use Bio::D...); # Access to sequence objects. See Bio::Prim...2533 days ago
2470 days ago
Extract the fastq sequence with range in Perl
use Bio::DB::Fasta; open(POSITIONS,"positions.txt"); while(){ chomp; my ($seqName,$begin,$end) = split(/\s/); my $db = Bio::DB::Fasta->new('allGenomeContacted.fa'); my $seq = $db->seq("$seqName", $begin => $end); print "$seq\n"; } close(POSITIONS);2469 days ago
Convert fastq to fasta in Perl
use Bio::SeqIO; #convert .fastq.gz to .fasta open my $zcat, 'zcat seq.fastq.gz |' or die $!; my $in=Bio::S...t, -format=>'fastq'); my $out=Bio::SeqI...2331 days ago
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::Copy; #ARGV[0] should be in following format --- Keep the coordinate sorted by name+location #G...2314 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 o...my $outfile = shift or die $usage; my $factory = Bio::F...qret = $factory->program('seqret'); # $seqret is a Bio::Tool...2252 days ago
Perl script to find the distance beetween all the contigs and scaffolds
#!/usr/bin/perl use strict; use warnings; use Bio::SeqIO; $| = 1; #Script to see the distance beetween all the contigs and scaffolds #Usage: perl clustalReads.pl genome....2141 days ago
Perl script to convert GFF 2 FASTA !
#!/usr/bin/perl use strict; use warnings; use Bio::Seq; use Bio::SeqIO; use Bio::DB::Fasta; $| =...# Flush output my $outfile_cds = Bio::SeqIO->new( -format => 'fast...[2].pep.fasta" ); my $outfile_cdna = Bio::S...my $file_fasta = $ARGV[0]; my $db = Bio::DB::...2139 days ago