Corona variant calling steps !
#!/bin/bash FILE_PATH="data/trimmed_fastq_small/" find "$FILE_PATH" -name "*.fasta" | while IFS= read -r my_file do filename=$(basename "$my_file") basename=$(basename "...1045 days ago
990 days ago
Bash script to split multifasta file !
...rintf("chunk%d.fa",n);} print >> file; n++; next;} { print >> file; }' < multi.fasta #Another great solution is genome tools (gt), which you can find here: http://genometools.org/...823 days ago
Install StringTie on ubuntu / Linux !
...lable so to install we can just download this distribution and extract it. Like with our other programs we also make a symlink to make it easier to find. # download and extract c...823 days ago
Bash script to find difference between two files !
#lines which are exist only in file2: grep -Fxvf file1 file2 > file3 #lines which are exist only in file1: grep -Fxvf file2 file1 > file3 #lines which are exist in both files: grep -Fxf file1 file2 > file3773 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.txt770 days ago
Command line to move all files from a directory !
find ~/Downloads/ -type f -print0 | xargs -0 mv -t ~/Videos718 days ago
Perl script to find inverted repeats !
#!/usr/bin/perl use strict; use warnings; use Bio::SeqIO; use Bio::Tools::Run::RepeatMasker; my $genome_file = "genome.fasta"; # read genome sequence my...425 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; $i425 days ago
Raku script to find palindrome in genomes !
...st:g/\s+//; # remove any spaces return $str eq $str.flip; } sub find-palindromes(Str $dna, Int $mi...# Example usage my $dna = "GGATCCATGGCCTAGG"; # example DNA sequence find-palindromes($dna, 3, 8); # fi...425 days ago