2191 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 di...e(){ chomp; next if /^$/; if(/^>/){ $h=substr($_,1); }else{ $n=(...irst perl -pe '/^>/ ? print "\n" : chomp' scaffolds_backup.fasta > out.fasta per...2191 days ago
Perl subroutine for reading multifasta file !
sub readfasta { (my $file)=@_; my %sequence; my $header; my $temp_seq; #suppose fasta files contains multiple sequences; open (IN, "2191 days ago
Perl script to find the distance beetween all the contigs and scaffolds
#!/usr/bin/perl use strict; use warnings; use Bio::SeqIO; $| = 1; #Script to see the distance beetween all the contigs and scaffolds...>{$ids->[1]}{seq}); my $seq1 = substr $seqRef->{$ids->[0]}{seq},...urn \%sequences, \@allIds; } sub read_fh { my $filename =...2187 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...netaV2.fa"; #Ur target file my $satsumaLoc="/home/urbe/Tools/SATSUMA/satsuma-code-0...2187 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;...Flush output my $outfile_cds = Bio::SeqIO->new( -format => 'fa...p.fasta" ); my $outfile_cdna = Bio::SeqIO->new( -format => 'fa...don included) # cdna - transcribed sequence (devoid of introns...2186 days ago
2184 days ago
Long reads mapper bash script !
#!/bin/bash #only for LONG READS ma...f the tools samtools=/home/urbe/anaconda3/bin/samtools grap...imap2-2.3_x64-linux/minimap2 bwaMemLoc=/home/urbe/anaconda3/...exit 1 fi fileName=$(basename "$refFasta"); #fileNam...am elif [ $readsType == "pacbio" ]; then $minimap2Loc...2170 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($_ =~ /...2180 days ago
2174 days ago