Extract fasta sequence with Ids with Bash script
#!/bin/bash while IFS='' read -r line || [[ -n "$line" ]]; do echo "Text read from file: $line" samtools faidx ONT.fasta $line > $line.faa done < "$1"2353 days ago
Perl script for calculate Levenshtein distance
sub levenshtein_dist { my ($str1, $str2) = @_; my ($len1, $len2) = (length $str1, length $str2); if ($len1 == 0) { return $len2; } if ($len2 == 0) { return $len1; } my %mat; for (my $i = 0; $i2339 days ago
Perl script to remove fasta sequences in multifasta file with certain length threshold
#!/usr/bin/perl use strict; use warnings; my $minlen = shift or die "Error: `minlen` parameter not provided\n"; { local $/=">"; while() { chom...2250 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 =...2250 days ago
Perl script to read multi fasta sequence one by one
#!/usr/bin/env perl use strict; use warnings; #USAGE #perl rohanRun.pl seq.fa my $outfile='tmp.fa'; my $fastaSeq_ref = readfasta ("$ARGV[0]"); my %fastaSeq =...2220 days ago
Perl script to extract the uniq Ids
#!/usr/bin/perl -w use strict; use warnings; use List::Uniq ':all'; open(my $val, "2238 days ago
Perl script to find missing and move to desire folder
#!/usr/bin/perl -w use strict; use warnings; open(my $ids, "2238 days ago
Perl script to count the number of files in a directory with regex
#!/usr/bin/perl use strict; use warnings; my @allNames=("_D14_","_B14_","_B15_","_C1T1_","_C3T3_","_D12_","_D13_","_E1B1_","_E1B3_","_H001_","_H3-03_","_H3-04_","_HB...2236 days ago
Perl script to find palindromic regions in DNA sequences
use strict; use warnings; my $pp = qr/(?: (\w) (?1) \g{-1} | \w? )/ix; my $filename = $ARGV[0]; open(my $fh, '2153 days ago
Perl script to check fastq reads qualities !
#!/usr/bin/env perl use strict; use warnings; sub readfq { my ($fh, $aux) = @_; @$aux = [undef, 0] if (!defined(@$aux)); return if ($aux->[1]); if (!defi...2153 days ago