BioPerl to convert between sequence formats from Fasta to Genbank
#!/usr/local/bin/perl -w # Sequence formats to choose: Fasta, EMBL. GenBank, Swissprot, PIR and GCG use Bio::SeqIO; $inFile = "BRCA2.fa"; $in = Bio::SeqIO-...2934 days ago
Convert newline formated sequence into fasta format with perl
use strict; use warnings; my $filename = $ARGV[0]; open(my $fh, '2388 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');...2349 days ago
Create genome scaffolding with Perl
...b1 eq $b2) || ($b1 eq " ") || ($b2 eq " ")){ ## equal bases, or absent bases, so consensus is easy return($b1); } # if different, convert to upper case to simplify loo...2326 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 $infile = shift or die $usage; my $outfile =...2269 days ago
Bash script to convert SAM to BAM visualization ready
samtools view -bS file.sam | samtools sort - file_sorted samtools index test_sorted.bam test_sorted.bai2201 days ago
Perl script to count number of Ns in a multifasta file !
...}else{ $n=($_=~tr/nN/nN/); $l=length($_); print $h,"\t",$l,"\t",$n,"\t",$n/($l-$n),"\n"; } } close(I); __END__ Note: Convert sequences in oneline first p...2162 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; $| = 1; # Flush output my $outfile_cds = Bio::SeqIO->new( -forma...2157 days ago
2093 days ago
1743 days ago