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);2497 days ago
Convert newline formated sequence into fasta format with perl
use strict; use warnings; my $filename = $ARGV[0]; open(my $fh, '2398 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::SeqIO->new(-file=>'>seq.fasta',...2359 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...ing format --- Keep the coordinate sorted by name+location #GenomechrName locationStart AlienGene Ali...2342 days ago
Create genome scaffolding with Perl
#!/usr/bin/perl use warnings;...: $b); } sub rc { my ($seq) = @_; $seq =~ tr/ACGTUYRSWMKDVHBXN-/TGCA...=> 0, # contig file for query sequences "prefix" => "psl_sc...print(STDERR "Loading query sequences into memory..."); open...= $lBlStarts[0]; my $alSeqS = ""; my $alSeqL = ""...2337 days ago
Plot the clock using Lastz -gerenal outfile
use strict; use warnings; use Statistics::R ; use List::Util qw(sum); #Usage perl clockPlot.pl Palindrome.palfc 1500 my $R = Statistics::R->new() ; $R->start...2327 days ago
878 days ago
Perl script to read multi fasta sequence one by one
#!/usr/bin/env perl use strict; u...ngs; #USAGE #perl rohanRun.pl seq.fa my $outfile='tmp.fa'; my $fastaSeq_ref = readfasta ("$ARGV[0]");...ef; foreach my $key ( keys %fastaSeq) { open (OUT, ">$outfile") o...ose fasta files contains multiple sequences; open (IN, "2249 days ago
Perl script to check fastq reads qualities !
#!/usr/bin/env perl use strict; use wa...my $name = /^.(\S+)/? $1 : ''; my $seq = ''; my $c; $aux->[0] =...eq '>' || $c eq '@' || $c eq '+'); $seq .= $_; } $aux->[0] = $_;..., \@aux)) { ++$n; $slen += length($seq); $qlen += length($qual) if...2183 days ago
Perl script to find coding regions in DNA sequences
#!/usr/bin/perl -w use strict;...nt "dnaloglkh.pl codontable DNAsequence\n"; exit(1); } #...odontable = $ARGV[0]; my $filesequence = $ARGV[1]; # open...############## # open the DNA sequence (second file) if (!op...ne) in the array into the var $seq my $i=0; while ($i < sc...2183 days ago