BASH script for SelfBLAST a genome
...t.sh all #Common settings FASTAFILE=MergedContigs.fasta MYDB=myDB OUTFILE=...20 SEQ="" echo "User $USER provided $# arguments, Detail of the arguments: $@...VE ADDED CORRECT NAME" samtools faidx MergedContigs.fasta samtools faidx Me...2664 days ago
Calculate some statistics for a DNA alignment with Perl
...lign => $aln, -method => 'Jukes-Cantor'); print $jcmatrix->print_matrix; #...y $results = $stats->calc_KaKs_pair($alnobj, $seq1id, $seq2id); print "comparing ".$results->[0]{'S...2662 days ago
2649 days ago
Check overlapping range with Perl
...warnings; my @ranges = 0; push @ranges, $ranges[-1] + 1 + int rand 200 for 1..10000; my @tests = map int rand $ranges[-1], 0..1000000;...if (@$ranges == 1) { if (@$tests) { print "tests in range $ranges->[0]:...2640 days ago
Extracting FASTA sequences based on position with perl script !!
...chomp; next unless /(.+)/; my ($header) = "$/$1_$start-$end\n"; my $seq = ${^POSTMATCH}; $seq =~ s/\s//g; print $header; print +( substr $seq, $start - 1, $...2634 days ago
Transpose the file coordinates and plot dendrogram in R
#Save this as tr.awk { for (i=1; i2630 days ago
Extract fasta sequence from a multifasta file with coordinates
...ce )) { die "Sequence $seq not found. \n" } print ">$id\n", "$sequence\n"; }...access tie %sequences,'Bio::DB::Fasta','/path/to/fasta/files/'; print $sequences{'CHROMOSOME_I:1,20...2545 days ago
Download the genome from NCBI using bash script/command
...t summary file to curl # Commentline if you are not interested in that genome set #....txt' | awk '{FS="\t"} !/^#/ {print $20} ' | sed -r 's|(ftp://ftp....txt' | awk '{FS="\t"} !/^#/ {print $20} ' | sed -r 's|(ftp://ftp...tion on each file. $f store current file name wget --input $f...2544 days ago
Unzip all the genome file and remove all fasta header except first one
...ip -d *.gz FILES=$(pwd)/* for f in $FILES do echo "Processing $f file..." if [[ $f =~ \.fna$ ]]; then awk ' /^>/ && FNR > 1 {next} {print $0} ' $f | sed '/^>/{s/ /_/g}...2543 days ago
Read a tab delimited file and search with perl
use strict; use warnings; use Data::Dumper; use Text::CSV; use IO::Handle; my $file = "/home/urbe/Tools/Alienomics_v0.1/Alienomics/output/intermediate_files/rRNA/refGene.megablast"; open my $fh, "[0]\n"; warn Dumper $row; # To see the structure }2537 days ago