bash script to extract sequence by ids !
Use a Perl one-liner, grep and seqtk subseq to extract the desired fasta sequences: # Create test input: cat > in.fasta BGI_novel_T016313 Solyc03g025570.2.1 TTCAAG...837 days ago
Commands to get the detail of disk usage on Linux !
#A simplistic approach would be du -shc /home/* du -shc /home/jnarayan #To sort it: du -smc /home/* | sort -n #There is also a wellknown Perl script that has the option of mailing disk usage reports per user: durep http://www.ubuntugeek.com/create-disk-usage-reports-with-durep.html829 days ago
Command line to print disk usage on Linux terminal !
#Print disk usage - perl du -h |perl -e'%h=map{/.\s/;99**(ord$&&7)-$`,$_}`du -h`;die@h{sort%h}' #Bash du -k * | sort -nr | cut -f2 | xargs -d '\n' du -sh #Base du -scBM | sort -n #More du -s * | sort -rn | cut -f2- | xargs -d "\n" du -sh828 days ago
Multiline fasta to single line fasta !
perl -pe '$. > 1 and /^>/ ? print "\n" : chomp' in.fasta > out.fasta809 days ago
799 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; }579 days ago
Identify genome-wide synteny with LASTZ alignment
...chr1.chain.filter.tnet.synnet.axt.maf Step 3: Get syntenic markers perl Maf2rawsynteny.pl chr1.chain.filter.tnet.synnet.axt.maf target.AAChr1 query.FFChr1 perl Get_synteny.pl -i chr1.chain....531 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 $seq...439 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; $i438 days ago
Perl script for chi-squared test !
#!/usr/bin/perl # # chidi.pl # # A script to perform a chi-squared test of the dinucleotide frequencies of two FASTA files # Last updated by: $Author$ # Last updated...425 days ago