Perl script to run SATSUMA in loop !
...rict; use File::Temp qw(tempfile); # Usage perl 1by1.pl for SATSUMA analysis # User need to set the reference multifasta file name here my $seqfile=""; my $queryfile = "gen...2133 days ago
Perl script to convert GFF 2 FASTA !
...strict; use warnings; use Bio::Seq; use Bio::SeqIO; use Bio::DB::Fasta; $|...sh output my $outfile_cds = Bio::SeqIO->new( -format => 'fasta', -...asta" ); my $outfile_cdna = Bio::SeqIO->new( -format => 'fasta', -...iption ###### # cds - translated sequence (starting with ATG and e...2132 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 fil..._ =~ /^>/){ if(defined $id && defined $seq){ $map{$id} = $seq;...',$_); $id=~s/>//; } else { $seq=$seq.$_; } } $map{$id}...2126 days ago
2120 days ago
2119 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 ids1531 days ago
1509 days ago
Perl script to extract sequence by Ids from multifasta file !
...use strict; my $idsfile = "$ARGV[0]"; my $seqfile = "$ARGV[1]"; my %ids =..."\n>"; # read by FASTA record open FASTA, $seqfile; while () { chomp;...header if (exists($ids{$id})) { $seq =~ s/^>*.+\n//; # remove FAS...2089 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].pa...#gets contig sequence my $seq = $seqobj->seq; my $lenseq=...ons=(); my @bases=split //,$seq; push(@bases,"E"); #This ex...if (($end+1)trunc($end+1,$lenseq); my $new_id=$cont...2056 days ago
2053 days ago