975 days ago
Installing manadatory software for websites hosting !
...#To install Apache, install the latest meta-package apache2 by running: sudo apt update sudo apt install apache2 #Install the mysql-server sudo apt install mysql-server sudo systemctl sta...972 days ago
Installing manadatory software for websites hosting !
...#To install Apache, install the latest meta-package apache2 by running: sudo apt update sudo apt install apache2 #Install the mysql-server sudo apt install mysql-server sudo systemctl sta...972 days ago
Perl script to rename the fasta file !
#Script #1 #!/usr/bin/perl -w use strict; #USAGE #perl extractPattern.pl kmerfasta > uniref100_result_broad my %kHash; local $/ = '>'; my $infile2 = "$ARGV[0]"; # Kmer fasta open( FH2, '914 days ago
Commands to Find and replace in file(s0) !
#Use SED sed -i 's/my/your/g' test.txt test2.txt test3.txt #Use FIND and SED find . -name *.txt -exec sed -i 's/my/your/g' {} \; #Use AWK awk '{sub(/{OLD_TERM}/,{NEW_TERM}); print}' {file} awk '{sub(/my/,your); print}' test.txt awk '{gsub(/i/,"a"); print}' test.txt826 days ago
Script to rapid genome clustering based on pairwise ANI
First, create a blast+ database: makeblastdb -in -dbtype nucl -out Next, use megablast from blast+ package to perform all-vs-all blastn of sequences: blastn -que...691 days ago
Perl script to read the next line of a file !
my $line = ; while(1) { # keep looping until I say so my $nextLine = ; if ($line =~ m/>/ || !defined $nextLine) { ### Do the stuff } ### Do any other stuff; last unless defined $nextLine; $line = $nextLine; }622 days ago
Perl script to find inverted repeats !
...use Bio::Tools::Run::RepeatMasker; my $genome_file = "genome.fasta"; # read genome sequence my $seqio = Bio::SeqIO->new(-fil...seqobj->seq(); # run RepeatMasker my $rm = Bio::Tools::Run::Repeat...ss = $rm_result->repeat_class(); my $rm_start = $rm_result->start...481 days ago
Perl script to find edit distance between two sequences !
#!/usr/bin/perl use strict; use warnings; sub edit_distance { my ($s1, $s2) = @_; my $len1 = length($s1); my $len2 = length($s2); my @dp; for (my $i = 0; $i481 days ago
Raku script to find palindrome in genomes !
...-> $length { for 0..^$dna.chars - $length -> $pos { my $substring = $dna.substr($pos...pos: $substring"; } } } } # Example usage my $dna = "GGATCCATGGCCTAGG"; #...481 days ago