Perl script to run SATSUMA in loop !
#!/usr/bin/perl -w use strict; use File::Temp qw(tempfile); # Usage perl 1by1.pl for SATSUMA analysis # User need to set the reference multifasta file name here my...2138 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( -format =>...2136 days ago
Perl subroutine to read genome/reads fasta file !
sub readSeqFromFasta{ my $file = $_[0]; my (%map,$id,$seq); open(IN,$file) or die("Cannot open file for reading $file:$!\n"); while(){ chomp; if($_ =~ /^>/){...2131 days ago
2124 days ago
2124 days ago
Bash oneliner to extract all ids from a multifasta file
#List of ids - one per line in allIds.txt $ awk 'BEGIN{while((getline0)l[">"$1]=1}/^>/{f=!l[$1]}f' seq.fa # You can play with this f=!l[$1 ] if wanted to extract or not extract the ids1535 days ago
1513 days ago
Perl script to extract sequence by Ids from multifasta file !
#!/usr/bin/perl -w use strict; my $idsfile = "$ARGV[0]"; my $seqfile = "$ARGV[1]"; my %ids = (); open FILE, $idsfile; while() { chomp; $ids{$_} += 1; }...2093 days ago
Perl script to break the contigs by 'N'
#!/usr/bin/perl -w use Bio::SeqIO; use strict; my $fasta = Bio::SeqIO->new( -file => "$ARGV[0].parts.fasta",-format=>'fasta'); open(SCAFF,">$ARGV[0].parts.scaff");...2060 days ago
2058 days ago