Create genome scaffolding with Perl
#!/usr/bin/perl use warnings; use strict; use English; use Pod::Usage; ## u...or absent bases, so consensus is easy return($b1); } # if different, convert to upper case to simplify loo...2318 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 =...2261 days ago
Perl script to extract the uniq Ids
#!/usr/bin/perl -w use strict; use warnings; use List::Uniq ':all'; open(my $val, "2248 days ago
Perl script to find missing and move to desire folder
#!/usr/bin/perl -w use strict; use warnings; open(my $ids, "2248 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.bai2193 days ago
Perl script to count number of Ns in a multifasta file !
#!/usr/bin/perl my ($h, $n, $l); open(I,$ARGV[0]) or die($!); while(){ ch...$h,"\t",$l,"\t",$n,"\t",$n/($l-$n),"\n"; } } close(I); __END__ Note: Convert sequences in oneline first p...2154 days ago
Perl script to find the distance beetween all the contigs and scaffolds
#!/usr/bin/perl use strict; use warnings; use Bio::SeqIO;...ncy: MAFFT my ($refSeq, $SeqIds) = fastafile2hash($ARGV[0]);...tfile"; foreach my $chr (@$SeqIds) { my $cnt=0; my $value=s...@$SeqIds[$cnt]\n$refSeq->{@$SeqIds[$cnt]}{seq}\n"; close $ofh...id}{desc} = $2; push @allIds, $s...2150 days ago
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...Size = 5000; my $resolution = 5000; my $dotsize = 1; my $cpu=40; my @ids; #Store the ids if...2150 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...2148 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 ids1547 days ago