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::Seq...2669 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',...synonymous /nonsynonymous substitutions ## my $in = Bio::Ali...2662 days ago
Extract fasta sequence from a multifasta file with coordinates
#!/usr/bin/perl use Bio::DB::Fasta; #USAGE perl extractFASTAwithS...my $querySizeED = shift; my $db = Bio::DB::Fasta->new( $fastaFile )...", "$sequence\n"; } __END__ use Bio::DB::Fasta; # Create dat...# Access to sequence objects. See Bio::Pri...2545 days ago
2482 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);2481 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::SeqIO->new(-fh=>$zcat, -format=>'fastq'); my $out=Bio::Seq...2343 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...2327 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....outfile = shift or die $usage; my $factory = Bio::Factory::EMBOSS->new; my $s...= $factory->program('seqret'); # $seqret is a Bio::Too...2264 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...2153 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...pep.fasta" ); my $outfile_cdna = Bio::SeqIO->new( -format => 'fast...$file_fasta = $ARGV[0]; my $db = Bio::DB:...2152 days ago